Subversion Repositories SmartDukaan

Rev

Rev 1114 | Rev 1148 | 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
 
483 rajveer 47
    public List<Order> getAllOrders(OrderStatus status, long from_date, long to_date, long warehouse_id) throws TransactionServiceException, TException;
68 ashish 48
 
1133 chandransh 49
    /**
50
     * Returns orders within a range of their billing dates
51
     * 
52
     * @param status
53
     * @param start_billing_date
54
     * @param end_billing_date
55
     * @param warehouse_id
56
     */
1022 varun.gupt 57
    public List<Order> getOrdersByBillingDate(OrderStatus status, long start_billing_date, long end_billing_date, long warehouse_id) throws TransactionServiceException, TException;
58
 
483 rajveer 59
    public boolean changeOrderStatus(long orderId, OrderStatus status, String description) throws TransactionServiceException, TException;
68 ashish 60
 
640 chandransh 61
    public boolean addBillingDetails(long orderId, String invoice_number, long jacket_number, String billed_by) throws TransactionServiceException, TException;
495 rajveer 62
 
923 rajveer 63
    public boolean acceptOrder(long orderId) throws TransactionServiceException, TException;
64
 
65
    public boolean billOrder(long orderId) throws TransactionServiceException, TException;
66
 
483 rajveer 67
    public List<Order> getOrdersForTransaction(long transactionId) throws TransactionServiceException, TException;
68 ashish 68
 
483 rajveer 69
    public List<Order> getOrdersForCustomer(long customerId, long from_date, long to_date, OrderStatus status) throws TransactionServiceException, TException;
68 ashish 70
 
483 rajveer 71
    public long createOrder(Order order) throws TransactionServiceException, TException;
68 ashish 72
 
483 rajveer 73
    public Order getOrder(long id) throws TransactionServiceException, TException;
68 ashish 74
 
483 rajveer 75
    public List<LineItem> getLineItemsForOrder(long orderId) throws TransactionServiceException, TException;
68 ashish 76
 
758 chandransh 77
    /**
78
     * Marks all BILLED orders for a warehouse and a provider as SHIPPED_FROM_WH
79
     * 
80
     * @param warehouseId
81
     * @param providerId
82
     */
83
    public boolean markOrdersAsManifested(long warehouseId, long providerId) throws TransactionServiceException, TException;
84
 
1114 chandransh 85
    /**
86
     * Marks all SHIPPED_FROM_WH orders of the previous day for a provider as SHIPPED_TO_LOGISTICS.
87
     * Returns a list of orders that were shipped from warehouse but did not appear in the pick-up report.
88
     * Raises an exception if we encounter report for an AWB number that we did not ship.
89
     * 
90
     * @param providerId
91
     * @param pickupDetails
92
     */
93
    public List<Order> markOrdersAsPickedUp(long providerId, Map<String,Long> pickupDetails) throws TransactionServiceException, TException;
94
 
1133 chandransh 95
    /**
96
     * Marks all orders with AWBs in the given map as delivered. Also sets the delivery timestamp and
97
     * the name of the receiver.
98
     * Raises an exception if we encounter report for an AWB number that we did not ship.
99
     * 
100
     * @param providerId
101
     * @param deliveredOrders
102
     */
103
    public void markOrdersAsDelivered(long providerId, Map<String,String> deliveredOrders) throws TransactionServiceException, TException;
104
 
105
    /**
106
     * Mark all orders with AWBs in the given map as failed. Also sets the delivery timestamp.
107
     * Raises an exception if we encounter report for an AWB number that we did not ship.
108
     * 
109
     * @param providerId
110
     * @param returnedOrders
111
     */
112
    public void markOrdersAsFailed(long providerId, Map<String,String> returnedOrders) throws TransactionServiceException, TException;
113
 
483 rajveer 114
    public List<Alert> getAlerts(long orderId, boolean valid) throws TException;
68 ashish 115
 
483 rajveer 116
    public void setAlert(long orderId, boolean unset, long type, String comment) throws TException;
68 ashish 117
 
118
  }
119
 
120
  public static class Client implements Iface {
121
    public Client(TProtocol prot)
122
    {
123
      this(prot, prot);
124
    }
125
 
126
    public Client(TProtocol iprot, TProtocol oprot)
127
    {
128
      iprot_ = iprot;
129
      oprot_ = oprot;
130
    }
131
 
132
    protected TProtocol iprot_;
133
    protected TProtocol oprot_;
134
 
135
    protected int seqid_;
136
 
137
    public TProtocol getInputProtocol()
138
    {
139
      return this.iprot_;
140
    }
141
 
142
    public TProtocol getOutputProtocol()
143
    {
144
      return this.oprot_;
145
    }
146
 
764 rajveer 147
    public void closeSession() throws TException
148
    {
149
      send_closeSession();
150
      recv_closeSession();
151
    }
152
 
153
    public void send_closeSession() throws TException
154
    {
155
      oprot_.writeMessageBegin(new TMessage("closeSession", TMessageType.CALL, seqid_));
156
      closeSession_args args = new closeSession_args();
157
      args.write(oprot_);
158
      oprot_.writeMessageEnd();
159
      oprot_.getTransport().flush();
160
    }
161
 
162
    public void recv_closeSession() throws TException
163
    {
164
      TMessage msg = iprot_.readMessageBegin();
165
      if (msg.type == TMessageType.EXCEPTION) {
166
        TApplicationException x = TApplicationException.read(iprot_);
167
        iprot_.readMessageEnd();
168
        throw x;
169
      }
170
      closeSession_result result = new closeSession_result();
171
      result.read(iprot_);
172
      iprot_.readMessageEnd();
173
      return;
174
    }
175
 
132 ashish 176
    public long createTransaction(Transaction transaction) throws TransactionServiceException, TException
68 ashish 177
    {
178
      send_createTransaction(transaction);
132 ashish 179
      return recv_createTransaction();
68 ashish 180
    }
181
 
182
    public void send_createTransaction(Transaction transaction) throws TException
183
    {
184
      oprot_.writeMessageBegin(new TMessage("createTransaction", TMessageType.CALL, seqid_));
185
      createTransaction_args args = new createTransaction_args();
186
      args.transaction = transaction;
187
      args.write(oprot_);
188
      oprot_.writeMessageEnd();
189
      oprot_.getTransport().flush();
190
    }
191
 
132 ashish 192
    public long recv_createTransaction() throws TransactionServiceException, TException
68 ashish 193
    {
194
      TMessage msg = iprot_.readMessageBegin();
195
      if (msg.type == TMessageType.EXCEPTION) {
196
        TApplicationException x = TApplicationException.read(iprot_);
197
        iprot_.readMessageEnd();
198
        throw x;
199
      }
200
      createTransaction_result result = new createTransaction_result();
201
      result.read(iprot_);
202
      iprot_.readMessageEnd();
132 ashish 203
      if (result.isSetSuccess()) {
204
        return result.success;
205
      }
68 ashish 206
      if (result.ex != null) {
207
        throw result.ex;
208
      }
132 ashish 209
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "createTransaction failed: unknown result");
68 ashish 210
    }
211
 
212
    public Transaction getTransaction(long id) throws TransactionServiceException, TException
213
    {
214
      send_getTransaction(id);
215
      return recv_getTransaction();
216
    }
217
 
218
    public void send_getTransaction(long id) throws TException
219
    {
220
      oprot_.writeMessageBegin(new TMessage("getTransaction", TMessageType.CALL, seqid_));
221
      getTransaction_args args = new getTransaction_args();
222
      args.id = id;
223
      args.write(oprot_);
224
      oprot_.writeMessageEnd();
225
      oprot_.getTransport().flush();
226
    }
227
 
228
    public Transaction recv_getTransaction() throws TransactionServiceException, TException
229
    {
230
      TMessage msg = iprot_.readMessageBegin();
231
      if (msg.type == TMessageType.EXCEPTION) {
232
        TApplicationException x = TApplicationException.read(iprot_);
233
        iprot_.readMessageEnd();
234
        throw x;
235
      }
236
      getTransaction_result result = new getTransaction_result();
237
      result.read(iprot_);
238
      iprot_.readMessageEnd();
239
      if (result.isSetSuccess()) {
240
        return result.success;
241
      }
242
      if (result.ex != null) {
243
        throw result.ex;
244
      }
245
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getTransaction failed: unknown result");
246
    }
247
 
132 ashish 248
    public List<Transaction> getTransactionsForCustomer(long customerId, long from_date, long to_date, TransactionStatus status) throws TransactionServiceException, TException
68 ashish 249
    {
132 ashish 250
      send_getTransactionsForCustomer(customerId, from_date, to_date, status);
68 ashish 251
      return recv_getTransactionsForCustomer();
252
    }
253
 
132 ashish 254
    public void send_getTransactionsForCustomer(long customerId, long from_date, long to_date, TransactionStatus status) throws TException
68 ashish 255
    {
256
      oprot_.writeMessageBegin(new TMessage("getTransactionsForCustomer", TMessageType.CALL, seqid_));
257
      getTransactionsForCustomer_args args = new getTransactionsForCustomer_args();
258
      args.customerId = customerId;
132 ashish 259
      args.from_date = from_date;
260
      args.to_date = to_date;
68 ashish 261
      args.status = status;
262
      args.write(oprot_);
263
      oprot_.writeMessageEnd();
264
      oprot_.getTransport().flush();
265
    }
266
 
267
    public List<Transaction> recv_getTransactionsForCustomer() throws TransactionServiceException, TException
268
    {
269
      TMessage msg = iprot_.readMessageBegin();
270
      if (msg.type == TMessageType.EXCEPTION) {
271
        TApplicationException x = TApplicationException.read(iprot_);
272
        iprot_.readMessageEnd();
273
        throw x;
274
      }
275
      getTransactionsForCustomer_result result = new getTransactionsForCustomer_result();
276
      result.read(iprot_);
277
      iprot_.readMessageEnd();
278
      if (result.isSetSuccess()) {
279
        return result.success;
280
      }
281
      if (result.ex != null) {
282
        throw result.ex;
283
      }
284
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getTransactionsForCustomer failed: unknown result");
285
    }
286
 
132 ashish 287
    public List<Transaction> getTransactionsForShoppingCartId(long shoppingCartId) throws TransactionServiceException, TException
288
    {
289
      send_getTransactionsForShoppingCartId(shoppingCartId);
290
      return recv_getTransactionsForShoppingCartId();
291
    }
292
 
293
    public void send_getTransactionsForShoppingCartId(long shoppingCartId) throws TException
294
    {
295
      oprot_.writeMessageBegin(new TMessage("getTransactionsForShoppingCartId", TMessageType.CALL, seqid_));
296
      getTransactionsForShoppingCartId_args args = new getTransactionsForShoppingCartId_args();
297
      args.shoppingCartId = shoppingCartId;
298
      args.write(oprot_);
299
      oprot_.writeMessageEnd();
300
      oprot_.getTransport().flush();
301
    }
302
 
303
    public List<Transaction> recv_getTransactionsForShoppingCartId() throws TransactionServiceException, TException
304
    {
305
      TMessage msg = iprot_.readMessageBegin();
306
      if (msg.type == TMessageType.EXCEPTION) {
307
        TApplicationException x = TApplicationException.read(iprot_);
308
        iprot_.readMessageEnd();
309
        throw x;
310
      }
311
      getTransactionsForShoppingCartId_result result = new getTransactionsForShoppingCartId_result();
312
      result.read(iprot_);
313
      iprot_.readMessageEnd();
314
      if (result.isSetSuccess()) {
315
        return result.success;
316
      }
317
      if (result.ex != null) {
318
        throw result.ex;
319
      }
320
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getTransactionsForShoppingCartId failed: unknown result");
321
    }
322
 
68 ashish 323
    public TransactionStatus getTransactionStatus(long transactionId) throws TransactionServiceException, TException
324
    {
325
      send_getTransactionStatus(transactionId);
326
      return recv_getTransactionStatus();
327
    }
328
 
329
    public void send_getTransactionStatus(long transactionId) throws TException
330
    {
331
      oprot_.writeMessageBegin(new TMessage("getTransactionStatus", TMessageType.CALL, seqid_));
332
      getTransactionStatus_args args = new getTransactionStatus_args();
333
      args.transactionId = transactionId;
334
      args.write(oprot_);
335
      oprot_.writeMessageEnd();
336
      oprot_.getTransport().flush();
337
    }
338
 
339
    public TransactionStatus recv_getTransactionStatus() throws TransactionServiceException, TException
340
    {
341
      TMessage msg = iprot_.readMessageBegin();
342
      if (msg.type == TMessageType.EXCEPTION) {
343
        TApplicationException x = TApplicationException.read(iprot_);
344
        iprot_.readMessageEnd();
345
        throw x;
346
      }
347
      getTransactionStatus_result result = new getTransactionStatus_result();
348
      result.read(iprot_);
349
      iprot_.readMessageEnd();
350
      if (result.isSetSuccess()) {
351
        return result.success;
352
      }
353
      if (result.ex != null) {
354
        throw result.ex;
355
      }
356
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getTransactionStatus failed: unknown result");
357
    }
358
 
359
    public boolean changeTransactionStatus(long transactionId, TransactionStatus status, String description) throws TransactionServiceException, TException
360
    {
361
      send_changeTransactionStatus(transactionId, status, description);
362
      return recv_changeTransactionStatus();
363
    }
364
 
365
    public void send_changeTransactionStatus(long transactionId, TransactionStatus status, String description) throws TException
366
    {
367
      oprot_.writeMessageBegin(new TMessage("changeTransactionStatus", TMessageType.CALL, seqid_));
368
      changeTransactionStatus_args args = new changeTransactionStatus_args();
369
      args.transactionId = transactionId;
370
      args.status = status;
371
      args.description = description;
372
      args.write(oprot_);
373
      oprot_.writeMessageEnd();
374
      oprot_.getTransport().flush();
375
    }
376
 
377
    public boolean recv_changeTransactionStatus() throws TransactionServiceException, TException
378
    {
379
      TMessage msg = iprot_.readMessageBegin();
380
      if (msg.type == TMessageType.EXCEPTION) {
381
        TApplicationException x = TApplicationException.read(iprot_);
382
        iprot_.readMessageEnd();
383
        throw x;
384
      }
385
      changeTransactionStatus_result result = new changeTransactionStatus_result();
386
      result.read(iprot_);
387
      iprot_.readMessageEnd();
388
      if (result.isSetSuccess()) {
389
        return result.success;
390
      }
391
      if (result.ex != null) {
392
        throw result.ex;
393
      }
394
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "changeTransactionStatus failed: unknown result");
395
    }
396
 
483 rajveer 397
    public List<Order> getAllOrders(OrderStatus status, long from_date, long to_date, long warehouse_id) throws TransactionServiceException, TException
68 ashish 398
    {
483 rajveer 399
      send_getAllOrders(status, from_date, to_date, warehouse_id);
400
      return recv_getAllOrders();
68 ashish 401
    }
402
 
483 rajveer 403
    public void send_getAllOrders(OrderStatus status, long from_date, long to_date, long warehouse_id) throws TException
68 ashish 404
    {
483 rajveer 405
      oprot_.writeMessageBegin(new TMessage("getAllOrders", TMessageType.CALL, seqid_));
406
      getAllOrders_args args = new getAllOrders_args();
407
      args.status = status;
408
      args.from_date = from_date;
409
      args.to_date = to_date;
410
      args.warehouse_id = warehouse_id;
68 ashish 411
      args.write(oprot_);
412
      oprot_.writeMessageEnd();
413
      oprot_.getTransport().flush();
414
    }
415
 
483 rajveer 416
    public List<Order> recv_getAllOrders() throws TransactionServiceException, TException
68 ashish 417
    {
418
      TMessage msg = iprot_.readMessageBegin();
419
      if (msg.type == TMessageType.EXCEPTION) {
420
        TApplicationException x = TApplicationException.read(iprot_);
421
        iprot_.readMessageEnd();
422
        throw x;
423
      }
483 rajveer 424
      getAllOrders_result result = new getAllOrders_result();
68 ashish 425
      result.read(iprot_);
426
      iprot_.readMessageEnd();
427
      if (result.isSetSuccess()) {
428
        return result.success;
429
      }
430
      if (result.ex != null) {
431
        throw result.ex;
432
      }
483 rajveer 433
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getAllOrders failed: unknown result");
68 ashish 434
    }
435
 
1022 varun.gupt 436
    public List<Order> getOrdersByBillingDate(OrderStatus status, long start_billing_date, long end_billing_date, long warehouse_id) throws TransactionServiceException, TException
437
    {
438
      send_getOrdersByBillingDate(status, start_billing_date, end_billing_date, warehouse_id);
439
      return recv_getOrdersByBillingDate();
440
    }
441
 
442
    public void send_getOrdersByBillingDate(OrderStatus status, long start_billing_date, long end_billing_date, long warehouse_id) throws TException
443
    {
444
      oprot_.writeMessageBegin(new TMessage("getOrdersByBillingDate", TMessageType.CALL, seqid_));
445
      getOrdersByBillingDate_args args = new getOrdersByBillingDate_args();
446
      args.status = status;
447
      args.start_billing_date = start_billing_date;
448
      args.end_billing_date = end_billing_date;
449
      args.warehouse_id = warehouse_id;
450
      args.write(oprot_);
451
      oprot_.writeMessageEnd();
452
      oprot_.getTransport().flush();
453
    }
454
 
455
    public List<Order> recv_getOrdersByBillingDate() throws TransactionServiceException, TException
456
    {
457
      TMessage msg = iprot_.readMessageBegin();
458
      if (msg.type == TMessageType.EXCEPTION) {
459
        TApplicationException x = TApplicationException.read(iprot_);
460
        iprot_.readMessageEnd();
461
        throw x;
462
      }
463
      getOrdersByBillingDate_result result = new getOrdersByBillingDate_result();
464
      result.read(iprot_);
465
      iprot_.readMessageEnd();
466
      if (result.isSetSuccess()) {
467
        return result.success;
468
      }
469
      if (result.ex != null) {
470
        throw result.ex;
471
      }
472
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getOrdersByBillingDate failed: unknown result");
473
    }
474
 
483 rajveer 475
    public boolean changeOrderStatus(long orderId, OrderStatus status, String description) throws TransactionServiceException, TException
68 ashish 476
    {
483 rajveer 477
      send_changeOrderStatus(orderId, status, description);
478
      return recv_changeOrderStatus();
68 ashish 479
    }
480
 
483 rajveer 481
    public void send_changeOrderStatus(long orderId, OrderStatus status, String description) throws TException
68 ashish 482
    {
483 rajveer 483
      oprot_.writeMessageBegin(new TMessage("changeOrderStatus", TMessageType.CALL, seqid_));
484
      changeOrderStatus_args args = new changeOrderStatus_args();
485
      args.orderId = orderId;
486
      args.status = status;
487
      args.description = description;
68 ashish 488
      args.write(oprot_);
489
      oprot_.writeMessageEnd();
490
      oprot_.getTransport().flush();
491
    }
492
 
483 rajveer 493
    public boolean recv_changeOrderStatus() throws TransactionServiceException, TException
68 ashish 494
    {
495
      TMessage msg = iprot_.readMessageBegin();
496
      if (msg.type == TMessageType.EXCEPTION) {
497
        TApplicationException x = TApplicationException.read(iprot_);
498
        iprot_.readMessageEnd();
499
        throw x;
500
      }
483 rajveer 501
      changeOrderStatus_result result = new changeOrderStatus_result();
68 ashish 502
      result.read(iprot_);
503
      iprot_.readMessageEnd();
504
      if (result.isSetSuccess()) {
505
        return result.success;
506
      }
507
      if (result.ex != null) {
508
        throw result.ex;
509
      }
483 rajveer 510
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "changeOrderStatus failed: unknown result");
68 ashish 511
    }
512
 
640 chandransh 513
    public boolean addBillingDetails(long orderId, String invoice_number, long jacket_number, String billed_by) throws TransactionServiceException, TException
495 rajveer 514
    {
640 chandransh 515
      send_addBillingDetails(orderId, invoice_number, jacket_number, billed_by);
495 rajveer 516
      return recv_addBillingDetails();
517
    }
518
 
640 chandransh 519
    public void send_addBillingDetails(long orderId, String invoice_number, long jacket_number, String billed_by) throws TException
495 rajveer 520
    {
521
      oprot_.writeMessageBegin(new TMessage("addBillingDetails", TMessageType.CALL, seqid_));
522
      addBillingDetails_args args = new addBillingDetails_args();
523
      args.orderId = orderId;
524
      args.invoice_number = invoice_number;
640 chandransh 525
      args.jacket_number = jacket_number;
495 rajveer 526
      args.billed_by = billed_by;
527
      args.write(oprot_);
528
      oprot_.writeMessageEnd();
529
      oprot_.getTransport().flush();
530
    }
531
 
532
    public boolean recv_addBillingDetails() throws TransactionServiceException, TException
533
    {
534
      TMessage msg = iprot_.readMessageBegin();
535
      if (msg.type == TMessageType.EXCEPTION) {
536
        TApplicationException x = TApplicationException.read(iprot_);
537
        iprot_.readMessageEnd();
538
        throw x;
539
      }
540
      addBillingDetails_result result = new addBillingDetails_result();
541
      result.read(iprot_);
542
      iprot_.readMessageEnd();
543
      if (result.isSetSuccess()) {
544
        return result.success;
545
      }
546
      if (result.ex != null) {
547
        throw result.ex;
548
      }
549
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "addBillingDetails failed: unknown result");
550
    }
551
 
923 rajveer 552
    public boolean acceptOrder(long orderId) throws TransactionServiceException, TException
553
    {
554
      send_acceptOrder(orderId);
555
      return recv_acceptOrder();
556
    }
557
 
558
    public void send_acceptOrder(long orderId) throws TException
559
    {
560
      oprot_.writeMessageBegin(new TMessage("acceptOrder", TMessageType.CALL, seqid_));
561
      acceptOrder_args args = new acceptOrder_args();
562
      args.orderId = orderId;
563
      args.write(oprot_);
564
      oprot_.writeMessageEnd();
565
      oprot_.getTransport().flush();
566
    }
567
 
568
    public boolean recv_acceptOrder() throws TransactionServiceException, TException
569
    {
570
      TMessage msg = iprot_.readMessageBegin();
571
      if (msg.type == TMessageType.EXCEPTION) {
572
        TApplicationException x = TApplicationException.read(iprot_);
573
        iprot_.readMessageEnd();
574
        throw x;
575
      }
576
      acceptOrder_result result = new acceptOrder_result();
577
      result.read(iprot_);
578
      iprot_.readMessageEnd();
579
      if (result.isSetSuccess()) {
580
        return result.success;
581
      }
582
      if (result.ex != null) {
583
        throw result.ex;
584
      }
585
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "acceptOrder failed: unknown result");
586
    }
587
 
588
    public boolean billOrder(long orderId) throws TransactionServiceException, TException
589
    {
590
      send_billOrder(orderId);
591
      return recv_billOrder();
592
    }
593
 
594
    public void send_billOrder(long orderId) throws TException
595
    {
596
      oprot_.writeMessageBegin(new TMessage("billOrder", TMessageType.CALL, seqid_));
597
      billOrder_args args = new billOrder_args();
598
      args.orderId = orderId;
599
      args.write(oprot_);
600
      oprot_.writeMessageEnd();
601
      oprot_.getTransport().flush();
602
    }
603
 
604
    public boolean recv_billOrder() throws TransactionServiceException, TException
605
    {
606
      TMessage msg = iprot_.readMessageBegin();
607
      if (msg.type == TMessageType.EXCEPTION) {
608
        TApplicationException x = TApplicationException.read(iprot_);
609
        iprot_.readMessageEnd();
610
        throw x;
611
      }
612
      billOrder_result result = new billOrder_result();
613
      result.read(iprot_);
614
      iprot_.readMessageEnd();
615
      if (result.isSetSuccess()) {
616
        return result.success;
617
      }
618
      if (result.ex != null) {
619
        throw result.ex;
620
      }
621
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "billOrder failed: unknown result");
622
    }
623
 
483 rajveer 624
    public List<Order> getOrdersForTransaction(long transactionId) throws TransactionServiceException, TException
68 ashish 625
    {
483 rajveer 626
      send_getOrdersForTransaction(transactionId);
627
      return recv_getOrdersForTransaction();
68 ashish 628
    }
629
 
483 rajveer 630
    public void send_getOrdersForTransaction(long transactionId) throws TException
68 ashish 631
    {
483 rajveer 632
      oprot_.writeMessageBegin(new TMessage("getOrdersForTransaction", TMessageType.CALL, seqid_));
633
      getOrdersForTransaction_args args = new getOrdersForTransaction_args();
68 ashish 634
      args.transactionId = transactionId;
635
      args.write(oprot_);
636
      oprot_.writeMessageEnd();
637
      oprot_.getTransport().flush();
638
    }
639
 
483 rajveer 640
    public List<Order> recv_getOrdersForTransaction() throws TransactionServiceException, TException
68 ashish 641
    {
642
      TMessage msg = iprot_.readMessageBegin();
643
      if (msg.type == TMessageType.EXCEPTION) {
644
        TApplicationException x = TApplicationException.read(iprot_);
645
        iprot_.readMessageEnd();
646
        throw x;
647
      }
483 rajveer 648
      getOrdersForTransaction_result result = new getOrdersForTransaction_result();
68 ashish 649
      result.read(iprot_);
650
      iprot_.readMessageEnd();
651
      if (result.isSetSuccess()) {
652
        return result.success;
653
      }
654
      if (result.ex != null) {
655
        throw result.ex;
656
      }
483 rajveer 657
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getOrdersForTransaction failed: unknown result");
68 ashish 658
    }
659
 
483 rajveer 660
    public List<Order> getOrdersForCustomer(long customerId, long from_date, long to_date, OrderStatus status) throws TransactionServiceException, TException
68 ashish 661
    {
483 rajveer 662
      send_getOrdersForCustomer(customerId, from_date, to_date, status);
663
      return recv_getOrdersForCustomer();
68 ashish 664
    }
665
 
483 rajveer 666
    public void send_getOrdersForCustomer(long customerId, long from_date, long to_date, OrderStatus status) throws TException
68 ashish 667
    {
483 rajveer 668
      oprot_.writeMessageBegin(new TMessage("getOrdersForCustomer", TMessageType.CALL, seqid_));
669
      getOrdersForCustomer_args args = new getOrdersForCustomer_args();
670
      args.customerId = customerId;
671
      args.from_date = from_date;
672
      args.to_date = to_date;
673
      args.status = status;
68 ashish 674
      args.write(oprot_);
675
      oprot_.writeMessageEnd();
676
      oprot_.getTransport().flush();
677
    }
678
 
483 rajveer 679
    public List<Order> recv_getOrdersForCustomer() throws TransactionServiceException, TException
68 ashish 680
    {
681
      TMessage msg = iprot_.readMessageBegin();
682
      if (msg.type == TMessageType.EXCEPTION) {
683
        TApplicationException x = TApplicationException.read(iprot_);
684
        iprot_.readMessageEnd();
685
        throw x;
686
      }
483 rajveer 687
      getOrdersForCustomer_result result = new getOrdersForCustomer_result();
68 ashish 688
      result.read(iprot_);
689
      iprot_.readMessageEnd();
690
      if (result.isSetSuccess()) {
691
        return result.success;
692
      }
693
      if (result.ex != null) {
694
        throw result.ex;
695
      }
483 rajveer 696
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getOrdersForCustomer failed: unknown result");
68 ashish 697
    }
698
 
483 rajveer 699
    public long createOrder(Order order) throws TransactionServiceException, TException
68 ashish 700
    {
483 rajveer 701
      send_createOrder(order);
702
      return recv_createOrder();
68 ashish 703
    }
704
 
483 rajveer 705
    public void send_createOrder(Order order) throws TException
68 ashish 706
    {
483 rajveer 707
      oprot_.writeMessageBegin(new TMessage("createOrder", TMessageType.CALL, seqid_));
708
      createOrder_args args = new createOrder_args();
709
      args.order = order;
68 ashish 710
      args.write(oprot_);
711
      oprot_.writeMessageEnd();
712
      oprot_.getTransport().flush();
713
    }
714
 
483 rajveer 715
    public long recv_createOrder() throws TransactionServiceException, TException
68 ashish 716
    {
717
      TMessage msg = iprot_.readMessageBegin();
718
      if (msg.type == TMessageType.EXCEPTION) {
719
        TApplicationException x = TApplicationException.read(iprot_);
720
        iprot_.readMessageEnd();
721
        throw x;
722
      }
483 rajveer 723
      createOrder_result result = new createOrder_result();
68 ashish 724
      result.read(iprot_);
725
      iprot_.readMessageEnd();
726
      if (result.isSetSuccess()) {
727
        return result.success;
728
      }
729
      if (result.ex != null) {
730
        throw result.ex;
731
      }
483 rajveer 732
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "createOrder failed: unknown result");
68 ashish 733
    }
734
 
483 rajveer 735
    public Order getOrder(long id) throws TransactionServiceException, TException
68 ashish 736
    {
483 rajveer 737
      send_getOrder(id);
738
      return recv_getOrder();
68 ashish 739
    }
740
 
483 rajveer 741
    public void send_getOrder(long id) throws TException
68 ashish 742
    {
483 rajveer 743
      oprot_.writeMessageBegin(new TMessage("getOrder", TMessageType.CALL, seqid_));
744
      getOrder_args args = new getOrder_args();
745
      args.id = id;
68 ashish 746
      args.write(oprot_);
747
      oprot_.writeMessageEnd();
748
      oprot_.getTransport().flush();
749
    }
750
 
483 rajveer 751
    public Order recv_getOrder() throws TransactionServiceException, TException
68 ashish 752
    {
753
      TMessage msg = iprot_.readMessageBegin();
754
      if (msg.type == TMessageType.EXCEPTION) {
755
        TApplicationException x = TApplicationException.read(iprot_);
756
        iprot_.readMessageEnd();
757
        throw x;
758
      }
483 rajveer 759
      getOrder_result result = new getOrder_result();
68 ashish 760
      result.read(iprot_);
761
      iprot_.readMessageEnd();
762
      if (result.isSetSuccess()) {
763
        return result.success;
764
      }
765
      if (result.ex != null) {
766
        throw result.ex;
767
      }
483 rajveer 768
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getOrder failed: unknown result");
68 ashish 769
    }
770
 
483 rajveer 771
    public List<LineItem> getLineItemsForOrder(long orderId) throws TransactionServiceException, TException
68 ashish 772
    {
483 rajveer 773
      send_getLineItemsForOrder(orderId);
774
      return recv_getLineItemsForOrder();
68 ashish 775
    }
776
 
483 rajveer 777
    public void send_getLineItemsForOrder(long orderId) throws TException
68 ashish 778
    {
483 rajveer 779
      oprot_.writeMessageBegin(new TMessage("getLineItemsForOrder", TMessageType.CALL, seqid_));
780
      getLineItemsForOrder_args args = new getLineItemsForOrder_args();
781
      args.orderId = orderId;
68 ashish 782
      args.write(oprot_);
783
      oprot_.writeMessageEnd();
784
      oprot_.getTransport().flush();
785
    }
786
 
483 rajveer 787
    public List<LineItem> recv_getLineItemsForOrder() throws TransactionServiceException, TException
68 ashish 788
    {
789
      TMessage msg = iprot_.readMessageBegin();
790
      if (msg.type == TMessageType.EXCEPTION) {
791
        TApplicationException x = TApplicationException.read(iprot_);
792
        iprot_.readMessageEnd();
793
        throw x;
794
      }
483 rajveer 795
      getLineItemsForOrder_result result = new getLineItemsForOrder_result();
68 ashish 796
      result.read(iprot_);
797
      iprot_.readMessageEnd();
798
      if (result.isSetSuccess()) {
799
        return result.success;
800
      }
801
      if (result.ex != null) {
802
        throw result.ex;
803
      }
483 rajveer 804
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getLineItemsForOrder failed: unknown result");
68 ashish 805
    }
806
 
758 chandransh 807
    public boolean markOrdersAsManifested(long warehouseId, long providerId) throws TransactionServiceException, TException
808
    {
809
      send_markOrdersAsManifested(warehouseId, providerId);
810
      return recv_markOrdersAsManifested();
811
    }
812
 
813
    public void send_markOrdersAsManifested(long warehouseId, long providerId) throws TException
814
    {
815
      oprot_.writeMessageBegin(new TMessage("markOrdersAsManifested", TMessageType.CALL, seqid_));
816
      markOrdersAsManifested_args args = new markOrdersAsManifested_args();
817
      args.warehouseId = warehouseId;
818
      args.providerId = providerId;
819
      args.write(oprot_);
820
      oprot_.writeMessageEnd();
821
      oprot_.getTransport().flush();
822
    }
823
 
824
    public boolean recv_markOrdersAsManifested() throws TransactionServiceException, TException
825
    {
826
      TMessage msg = iprot_.readMessageBegin();
827
      if (msg.type == TMessageType.EXCEPTION) {
828
        TApplicationException x = TApplicationException.read(iprot_);
829
        iprot_.readMessageEnd();
830
        throw x;
831
      }
832
      markOrdersAsManifested_result result = new markOrdersAsManifested_result();
833
      result.read(iprot_);
834
      iprot_.readMessageEnd();
835
      if (result.isSetSuccess()) {
836
        return result.success;
837
      }
838
      if (result.ex != null) {
839
        throw result.ex;
840
      }
841
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "markOrdersAsManifested failed: unknown result");
842
    }
843
 
1114 chandransh 844
    public List<Order> markOrdersAsPickedUp(long providerId, Map<String,Long> pickupDetails) throws TransactionServiceException, TException
845
    {
846
      send_markOrdersAsPickedUp(providerId, pickupDetails);
847
      return recv_markOrdersAsPickedUp();
848
    }
849
 
850
    public void send_markOrdersAsPickedUp(long providerId, Map<String,Long> pickupDetails) throws TException
851
    {
852
      oprot_.writeMessageBegin(new TMessage("markOrdersAsPickedUp", TMessageType.CALL, seqid_));
853
      markOrdersAsPickedUp_args args = new markOrdersAsPickedUp_args();
854
      args.providerId = providerId;
855
      args.pickupDetails = pickupDetails;
856
      args.write(oprot_);
857
      oprot_.writeMessageEnd();
858
      oprot_.getTransport().flush();
859
    }
860
 
861
    public List<Order> recv_markOrdersAsPickedUp() throws TransactionServiceException, TException
862
    {
863
      TMessage msg = iprot_.readMessageBegin();
864
      if (msg.type == TMessageType.EXCEPTION) {
865
        TApplicationException x = TApplicationException.read(iprot_);
866
        iprot_.readMessageEnd();
867
        throw x;
868
      }
869
      markOrdersAsPickedUp_result result = new markOrdersAsPickedUp_result();
870
      result.read(iprot_);
871
      iprot_.readMessageEnd();
872
      if (result.isSetSuccess()) {
873
        return result.success;
874
      }
875
      if (result.ex != null) {
876
        throw result.ex;
877
      }
878
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "markOrdersAsPickedUp failed: unknown result");
879
    }
880
 
1133 chandransh 881
    public void markOrdersAsDelivered(long providerId, Map<String,String> deliveredOrders) throws TransactionServiceException, TException
882
    {
883
      send_markOrdersAsDelivered(providerId, deliveredOrders);
884
      recv_markOrdersAsDelivered();
885
    }
886
 
887
    public void send_markOrdersAsDelivered(long providerId, Map<String,String> deliveredOrders) throws TException
888
    {
889
      oprot_.writeMessageBegin(new TMessage("markOrdersAsDelivered", TMessageType.CALL, seqid_));
890
      markOrdersAsDelivered_args args = new markOrdersAsDelivered_args();
891
      args.providerId = providerId;
892
      args.deliveredOrders = deliveredOrders;
893
      args.write(oprot_);
894
      oprot_.writeMessageEnd();
895
      oprot_.getTransport().flush();
896
    }
897
 
898
    public void recv_markOrdersAsDelivered() throws TransactionServiceException, TException
899
    {
900
      TMessage msg = iprot_.readMessageBegin();
901
      if (msg.type == TMessageType.EXCEPTION) {
902
        TApplicationException x = TApplicationException.read(iprot_);
903
        iprot_.readMessageEnd();
904
        throw x;
905
      }
906
      markOrdersAsDelivered_result result = new markOrdersAsDelivered_result();
907
      result.read(iprot_);
908
      iprot_.readMessageEnd();
909
      if (result.ex != null) {
910
        throw result.ex;
911
      }
912
      return;
913
    }
914
 
915
    public void markOrdersAsFailed(long providerId, Map<String,String> returnedOrders) throws TransactionServiceException, TException
916
    {
917
      send_markOrdersAsFailed(providerId, returnedOrders);
918
      recv_markOrdersAsFailed();
919
    }
920
 
921
    public void send_markOrdersAsFailed(long providerId, Map<String,String> returnedOrders) throws TException
922
    {
923
      oprot_.writeMessageBegin(new TMessage("markOrdersAsFailed", TMessageType.CALL, seqid_));
924
      markOrdersAsFailed_args args = new markOrdersAsFailed_args();
925
      args.providerId = providerId;
926
      args.returnedOrders = returnedOrders;
927
      args.write(oprot_);
928
      oprot_.writeMessageEnd();
929
      oprot_.getTransport().flush();
930
    }
931
 
932
    public void recv_markOrdersAsFailed() throws TransactionServiceException, TException
933
    {
934
      TMessage msg = iprot_.readMessageBegin();
935
      if (msg.type == TMessageType.EXCEPTION) {
936
        TApplicationException x = TApplicationException.read(iprot_);
937
        iprot_.readMessageEnd();
938
        throw x;
939
      }
940
      markOrdersAsFailed_result result = new markOrdersAsFailed_result();
941
      result.read(iprot_);
942
      iprot_.readMessageEnd();
943
      if (result.ex != null) {
944
        throw result.ex;
945
      }
946
      return;
947
    }
948
 
483 rajveer 949
    public List<Alert> getAlerts(long orderId, boolean valid) throws TException
68 ashish 950
    {
483 rajveer 951
      send_getAlerts(orderId, valid);
305 ashish 952
      return recv_getAlerts();
953
    }
954
 
483 rajveer 955
    public void send_getAlerts(long orderId, boolean valid) throws TException
305 ashish 956
    {
957
      oprot_.writeMessageBegin(new TMessage("getAlerts", TMessageType.CALL, seqid_));
958
      getAlerts_args args = new getAlerts_args();
483 rajveer 959
      args.orderId = orderId;
305 ashish 960
      args.valid = valid;
961
      args.write(oprot_);
962
      oprot_.writeMessageEnd();
963
      oprot_.getTransport().flush();
964
    }
965
 
966
    public List<Alert> recv_getAlerts() throws TException
967
    {
968
      TMessage msg = iprot_.readMessageBegin();
969
      if (msg.type == TMessageType.EXCEPTION) {
970
        TApplicationException x = TApplicationException.read(iprot_);
971
        iprot_.readMessageEnd();
972
        throw x;
973
      }
974
      getAlerts_result result = new getAlerts_result();
975
      result.read(iprot_);
976
      iprot_.readMessageEnd();
977
      if (result.isSetSuccess()) {
978
        return result.success;
979
      }
980
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getAlerts failed: unknown result");
981
    }
982
 
483 rajveer 983
    public void setAlert(long orderId, boolean unset, long type, String comment) throws TException
305 ashish 984
    {
483 rajveer 985
      send_setAlert(orderId, unset, type, comment);
305 ashish 986
      recv_setAlert();
987
    }
988
 
483 rajveer 989
    public void send_setAlert(long orderId, boolean unset, long type, String comment) throws TException
305 ashish 990
    {
991
      oprot_.writeMessageBegin(new TMessage("setAlert", TMessageType.CALL, seqid_));
992
      setAlert_args args = new setAlert_args();
483 rajveer 993
      args.orderId = orderId;
305 ashish 994
      args.unset = unset;
995
      args.type = type;
996
      args.comment = comment;
997
      args.write(oprot_);
998
      oprot_.writeMessageEnd();
999
      oprot_.getTransport().flush();
1000
    }
1001
 
1002
    public void recv_setAlert() throws TException
1003
    {
1004
      TMessage msg = iprot_.readMessageBegin();
1005
      if (msg.type == TMessageType.EXCEPTION) {
1006
        TApplicationException x = TApplicationException.read(iprot_);
1007
        iprot_.readMessageEnd();
1008
        throw x;
1009
      }
1010
      setAlert_result result = new setAlert_result();
1011
      result.read(iprot_);
1012
      iprot_.readMessageEnd();
1013
      return;
1014
    }
1015
 
68 ashish 1016
  }
1017
  public static class Processor implements TProcessor {
1018
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
1019
    public Processor(Iface iface)
1020
    {
1021
      iface_ = iface;
764 rajveer 1022
      processMap_.put("closeSession", new closeSession());
68 ashish 1023
      processMap_.put("createTransaction", new createTransaction());
1024
      processMap_.put("getTransaction", new getTransaction());
1025
      processMap_.put("getTransactionsForCustomer", new getTransactionsForCustomer());
132 ashish 1026
      processMap_.put("getTransactionsForShoppingCartId", new getTransactionsForShoppingCartId());
68 ashish 1027
      processMap_.put("getTransactionStatus", new getTransactionStatus());
1028
      processMap_.put("changeTransactionStatus", new changeTransactionStatus());
483 rajveer 1029
      processMap_.put("getAllOrders", new getAllOrders());
1022 varun.gupt 1030
      processMap_.put("getOrdersByBillingDate", new getOrdersByBillingDate());
483 rajveer 1031
      processMap_.put("changeOrderStatus", new changeOrderStatus());
495 rajveer 1032
      processMap_.put("addBillingDetails", new addBillingDetails());
923 rajveer 1033
      processMap_.put("acceptOrder", new acceptOrder());
1034
      processMap_.put("billOrder", new billOrder());
483 rajveer 1035
      processMap_.put("getOrdersForTransaction", new getOrdersForTransaction());
1036
      processMap_.put("getOrdersForCustomer", new getOrdersForCustomer());
1037
      processMap_.put("createOrder", new createOrder());
1038
      processMap_.put("getOrder", new getOrder());
1039
      processMap_.put("getLineItemsForOrder", new getLineItemsForOrder());
758 chandransh 1040
      processMap_.put("markOrdersAsManifested", new markOrdersAsManifested());
1114 chandransh 1041
      processMap_.put("markOrdersAsPickedUp", new markOrdersAsPickedUp());
1133 chandransh 1042
      processMap_.put("markOrdersAsDelivered", new markOrdersAsDelivered());
1043
      processMap_.put("markOrdersAsFailed", new markOrdersAsFailed());
305 ashish 1044
      processMap_.put("getAlerts", new getAlerts());
1045
      processMap_.put("setAlert", new setAlert());
68 ashish 1046
    }
1047
 
1048
    protected static interface ProcessFunction {
1049
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException;
1050
    }
1051
 
1052
    private Iface iface_;
1053
    protected final HashMap<String,ProcessFunction> processMap_ = new HashMap<String,ProcessFunction>();
1054
 
1055
    public boolean process(TProtocol iprot, TProtocol oprot) throws TException
1056
    {
1057
      TMessage msg = iprot.readMessageBegin();
1058
      ProcessFunction fn = processMap_.get(msg.name);
1059
      if (fn == null) {
1060
        TProtocolUtil.skip(iprot, TType.STRUCT);
1061
        iprot.readMessageEnd();
1062
        TApplicationException x = new TApplicationException(TApplicationException.UNKNOWN_METHOD, "Invalid method name: '"+msg.name+"'");
1063
        oprot.writeMessageBegin(new TMessage(msg.name, TMessageType.EXCEPTION, msg.seqid));
1064
        x.write(oprot);
1065
        oprot.writeMessageEnd();
1066
        oprot.getTransport().flush();
1067
        return true;
1068
      }
1069
      fn.process(msg.seqid, iprot, oprot);
1070
      return true;
1071
    }
1072
 
764 rajveer 1073
    private class closeSession implements ProcessFunction {
1074
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1075
      {
1076
        closeSession_args args = new closeSession_args();
1077
        args.read(iprot);
1078
        iprot.readMessageEnd();
1079
        closeSession_result result = new closeSession_result();
1080
        iface_.closeSession();
1081
        oprot.writeMessageBegin(new TMessage("closeSession", TMessageType.REPLY, seqid));
1082
        result.write(oprot);
1083
        oprot.writeMessageEnd();
1084
        oprot.getTransport().flush();
1085
      }
1086
 
1087
    }
1088
 
68 ashish 1089
    private class createTransaction implements ProcessFunction {
1090
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1091
      {
1092
        createTransaction_args args = new createTransaction_args();
1093
        args.read(iprot);
1094
        iprot.readMessageEnd();
1095
        createTransaction_result result = new createTransaction_result();
1096
        try {
132 ashish 1097
          result.success = iface_.createTransaction(args.transaction);
1098
          result.setSuccessIsSet(true);
68 ashish 1099
        } catch (TransactionServiceException ex) {
1100
          result.ex = ex;
1101
        } catch (Throwable th) {
1102
          LOGGER.error("Internal error processing createTransaction", th);
1103
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing createTransaction");
1104
          oprot.writeMessageBegin(new TMessage("createTransaction", TMessageType.EXCEPTION, seqid));
1105
          x.write(oprot);
1106
          oprot.writeMessageEnd();
1107
          oprot.getTransport().flush();
1108
          return;
1109
        }
1110
        oprot.writeMessageBegin(new TMessage("createTransaction", TMessageType.REPLY, seqid));
1111
        result.write(oprot);
1112
        oprot.writeMessageEnd();
1113
        oprot.getTransport().flush();
1114
      }
1115
 
1116
    }
1117
 
1118
    private class getTransaction implements ProcessFunction {
1119
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1120
      {
1121
        getTransaction_args args = new getTransaction_args();
1122
        args.read(iprot);
1123
        iprot.readMessageEnd();
1124
        getTransaction_result result = new getTransaction_result();
1125
        try {
1126
          result.success = iface_.getTransaction(args.id);
1127
        } catch (TransactionServiceException ex) {
1128
          result.ex = ex;
1129
        } catch (Throwable th) {
1130
          LOGGER.error("Internal error processing getTransaction", th);
1131
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getTransaction");
1132
          oprot.writeMessageBegin(new TMessage("getTransaction", TMessageType.EXCEPTION, seqid));
1133
          x.write(oprot);
1134
          oprot.writeMessageEnd();
1135
          oprot.getTransport().flush();
1136
          return;
1137
        }
1138
        oprot.writeMessageBegin(new TMessage("getTransaction", TMessageType.REPLY, seqid));
1139
        result.write(oprot);
1140
        oprot.writeMessageEnd();
1141
        oprot.getTransport().flush();
1142
      }
1143
 
1144
    }
1145
 
1146
    private class getTransactionsForCustomer implements ProcessFunction {
1147
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1148
      {
1149
        getTransactionsForCustomer_args args = new getTransactionsForCustomer_args();
1150
        args.read(iprot);
1151
        iprot.readMessageEnd();
1152
        getTransactionsForCustomer_result result = new getTransactionsForCustomer_result();
1153
        try {
132 ashish 1154
          result.success = iface_.getTransactionsForCustomer(args.customerId, args.from_date, args.to_date, args.status);
68 ashish 1155
        } catch (TransactionServiceException ex) {
1156
          result.ex = ex;
1157
        } catch (Throwable th) {
1158
          LOGGER.error("Internal error processing getTransactionsForCustomer", th);
1159
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getTransactionsForCustomer");
1160
          oprot.writeMessageBegin(new TMessage("getTransactionsForCustomer", TMessageType.EXCEPTION, seqid));
1161
          x.write(oprot);
1162
          oprot.writeMessageEnd();
1163
          oprot.getTransport().flush();
1164
          return;
1165
        }
1166
        oprot.writeMessageBegin(new TMessage("getTransactionsForCustomer", TMessageType.REPLY, seqid));
1167
        result.write(oprot);
1168
        oprot.writeMessageEnd();
1169
        oprot.getTransport().flush();
1170
      }
1171
 
1172
    }
1173
 
132 ashish 1174
    private class getTransactionsForShoppingCartId implements ProcessFunction {
1175
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1176
      {
1177
        getTransactionsForShoppingCartId_args args = new getTransactionsForShoppingCartId_args();
1178
        args.read(iprot);
1179
        iprot.readMessageEnd();
1180
        getTransactionsForShoppingCartId_result result = new getTransactionsForShoppingCartId_result();
1181
        try {
1182
          result.success = iface_.getTransactionsForShoppingCartId(args.shoppingCartId);
1183
        } catch (TransactionServiceException ex) {
1184
          result.ex = ex;
1185
        } catch (Throwable th) {
1186
          LOGGER.error("Internal error processing getTransactionsForShoppingCartId", th);
1187
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getTransactionsForShoppingCartId");
1188
          oprot.writeMessageBegin(new TMessage("getTransactionsForShoppingCartId", TMessageType.EXCEPTION, seqid));
1189
          x.write(oprot);
1190
          oprot.writeMessageEnd();
1191
          oprot.getTransport().flush();
1192
          return;
1193
        }
1194
        oprot.writeMessageBegin(new TMessage("getTransactionsForShoppingCartId", TMessageType.REPLY, seqid));
1195
        result.write(oprot);
1196
        oprot.writeMessageEnd();
1197
        oprot.getTransport().flush();
1198
      }
1199
 
1200
    }
1201
 
68 ashish 1202
    private class getTransactionStatus implements ProcessFunction {
1203
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1204
      {
1205
        getTransactionStatus_args args = new getTransactionStatus_args();
1206
        args.read(iprot);
1207
        iprot.readMessageEnd();
1208
        getTransactionStatus_result result = new getTransactionStatus_result();
1209
        try {
1210
          result.success = iface_.getTransactionStatus(args.transactionId);
1211
        } catch (TransactionServiceException ex) {
1212
          result.ex = ex;
1213
        } catch (Throwable th) {
1214
          LOGGER.error("Internal error processing getTransactionStatus", th);
1215
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getTransactionStatus");
1216
          oprot.writeMessageBegin(new TMessage("getTransactionStatus", TMessageType.EXCEPTION, seqid));
1217
          x.write(oprot);
1218
          oprot.writeMessageEnd();
1219
          oprot.getTransport().flush();
1220
          return;
1221
        }
1222
        oprot.writeMessageBegin(new TMessage("getTransactionStatus", TMessageType.REPLY, seqid));
1223
        result.write(oprot);
1224
        oprot.writeMessageEnd();
1225
        oprot.getTransport().flush();
1226
      }
1227
 
1228
    }
1229
 
1230
    private class changeTransactionStatus implements ProcessFunction {
1231
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1232
      {
1233
        changeTransactionStatus_args args = new changeTransactionStatus_args();
1234
        args.read(iprot);
1235
        iprot.readMessageEnd();
1236
        changeTransactionStatus_result result = new changeTransactionStatus_result();
1237
        try {
1238
          result.success = iface_.changeTransactionStatus(args.transactionId, args.status, args.description);
1239
          result.setSuccessIsSet(true);
1240
        } catch (TransactionServiceException ex) {
1241
          result.ex = ex;
1242
        } catch (Throwable th) {
1243
          LOGGER.error("Internal error processing changeTransactionStatus", th);
1244
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing changeTransactionStatus");
1245
          oprot.writeMessageBegin(new TMessage("changeTransactionStatus", TMessageType.EXCEPTION, seqid));
1246
          x.write(oprot);
1247
          oprot.writeMessageEnd();
1248
          oprot.getTransport().flush();
1249
          return;
1250
        }
1251
        oprot.writeMessageBegin(new TMessage("changeTransactionStatus", TMessageType.REPLY, seqid));
1252
        result.write(oprot);
1253
        oprot.writeMessageEnd();
1254
        oprot.getTransport().flush();
1255
      }
1256
 
1257
    }
1258
 
483 rajveer 1259
    private class getAllOrders implements ProcessFunction {
68 ashish 1260
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1261
      {
483 rajveer 1262
        getAllOrders_args args = new getAllOrders_args();
68 ashish 1263
        args.read(iprot);
1264
        iprot.readMessageEnd();
483 rajveer 1265
        getAllOrders_result result = new getAllOrders_result();
68 ashish 1266
        try {
483 rajveer 1267
          result.success = iface_.getAllOrders(args.status, args.from_date, args.to_date, args.warehouse_id);
68 ashish 1268
        } catch (TransactionServiceException ex) {
1269
          result.ex = ex;
1270
        } catch (Throwable th) {
483 rajveer 1271
          LOGGER.error("Internal error processing getAllOrders", th);
1272
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getAllOrders");
1273
          oprot.writeMessageBegin(new TMessage("getAllOrders", TMessageType.EXCEPTION, seqid));
68 ashish 1274
          x.write(oprot);
1275
          oprot.writeMessageEnd();
1276
          oprot.getTransport().flush();
1277
          return;
1278
        }
483 rajveer 1279
        oprot.writeMessageBegin(new TMessage("getAllOrders", TMessageType.REPLY, seqid));
68 ashish 1280
        result.write(oprot);
1281
        oprot.writeMessageEnd();
1282
        oprot.getTransport().flush();
1283
      }
1284
 
1285
    }
1286
 
1022 varun.gupt 1287
    private class getOrdersByBillingDate implements ProcessFunction {
1288
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1289
      {
1290
        getOrdersByBillingDate_args args = new getOrdersByBillingDate_args();
1291
        args.read(iprot);
1292
        iprot.readMessageEnd();
1293
        getOrdersByBillingDate_result result = new getOrdersByBillingDate_result();
1294
        try {
1295
          result.success = iface_.getOrdersByBillingDate(args.status, args.start_billing_date, args.end_billing_date, args.warehouse_id);
1296
        } catch (TransactionServiceException ex) {
1297
          result.ex = ex;
1298
        } catch (Throwable th) {
1299
          LOGGER.error("Internal error processing getOrdersByBillingDate", th);
1300
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getOrdersByBillingDate");
1301
          oprot.writeMessageBegin(new TMessage("getOrdersByBillingDate", TMessageType.EXCEPTION, seqid));
1302
          x.write(oprot);
1303
          oprot.writeMessageEnd();
1304
          oprot.getTransport().flush();
1305
          return;
1306
        }
1307
        oprot.writeMessageBegin(new TMessage("getOrdersByBillingDate", TMessageType.REPLY, seqid));
1308
        result.write(oprot);
1309
        oprot.writeMessageEnd();
1310
        oprot.getTransport().flush();
1311
      }
1312
 
1313
    }
1314
 
483 rajveer 1315
    private class changeOrderStatus implements ProcessFunction {
68 ashish 1316
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1317
      {
483 rajveer 1318
        changeOrderStatus_args args = new changeOrderStatus_args();
68 ashish 1319
        args.read(iprot);
1320
        iprot.readMessageEnd();
483 rajveer 1321
        changeOrderStatus_result result = new changeOrderStatus_result();
68 ashish 1322
        try {
483 rajveer 1323
          result.success = iface_.changeOrderStatus(args.orderId, args.status, args.description);
68 ashish 1324
          result.setSuccessIsSet(true);
1325
        } catch (TransactionServiceException ex) {
1326
          result.ex = ex;
1327
        } catch (Throwable th) {
483 rajveer 1328
          LOGGER.error("Internal error processing changeOrderStatus", th);
1329
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing changeOrderStatus");
1330
          oprot.writeMessageBegin(new TMessage("changeOrderStatus", TMessageType.EXCEPTION, seqid));
68 ashish 1331
          x.write(oprot);
1332
          oprot.writeMessageEnd();
1333
          oprot.getTransport().flush();
1334
          return;
1335
        }
483 rajveer 1336
        oprot.writeMessageBegin(new TMessage("changeOrderStatus", TMessageType.REPLY, seqid));
68 ashish 1337
        result.write(oprot);
1338
        oprot.writeMessageEnd();
1339
        oprot.getTransport().flush();
1340
      }
1341
 
1342
    }
1343
 
495 rajveer 1344
    private class addBillingDetails implements ProcessFunction {
1345
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1346
      {
1347
        addBillingDetails_args args = new addBillingDetails_args();
1348
        args.read(iprot);
1349
        iprot.readMessageEnd();
1350
        addBillingDetails_result result = new addBillingDetails_result();
1351
        try {
640 chandransh 1352
          result.success = iface_.addBillingDetails(args.orderId, args.invoice_number, args.jacket_number, args.billed_by);
495 rajveer 1353
          result.setSuccessIsSet(true);
1354
        } catch (TransactionServiceException ex) {
1355
          result.ex = ex;
1356
        } catch (Throwable th) {
1357
          LOGGER.error("Internal error processing addBillingDetails", th);
1358
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing addBillingDetails");
1359
          oprot.writeMessageBegin(new TMessage("addBillingDetails", TMessageType.EXCEPTION, seqid));
1360
          x.write(oprot);
1361
          oprot.writeMessageEnd();
1362
          oprot.getTransport().flush();
1363
          return;
1364
        }
1365
        oprot.writeMessageBegin(new TMessage("addBillingDetails", TMessageType.REPLY, seqid));
1366
        result.write(oprot);
1367
        oprot.writeMessageEnd();
1368
        oprot.getTransport().flush();
1369
      }
1370
 
1371
    }
1372
 
923 rajveer 1373
    private class acceptOrder implements ProcessFunction {
1374
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1375
      {
1376
        acceptOrder_args args = new acceptOrder_args();
1377
        args.read(iprot);
1378
        iprot.readMessageEnd();
1379
        acceptOrder_result result = new acceptOrder_result();
1380
        try {
1381
          result.success = iface_.acceptOrder(args.orderId);
1382
          result.setSuccessIsSet(true);
1383
        } catch (TransactionServiceException ex) {
1384
          result.ex = ex;
1385
        } catch (Throwable th) {
1386
          LOGGER.error("Internal error processing acceptOrder", th);
1387
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing acceptOrder");
1388
          oprot.writeMessageBegin(new TMessage("acceptOrder", TMessageType.EXCEPTION, seqid));
1389
          x.write(oprot);
1390
          oprot.writeMessageEnd();
1391
          oprot.getTransport().flush();
1392
          return;
1393
        }
1394
        oprot.writeMessageBegin(new TMessage("acceptOrder", TMessageType.REPLY, seqid));
1395
        result.write(oprot);
1396
        oprot.writeMessageEnd();
1397
        oprot.getTransport().flush();
1398
      }
1399
 
1400
    }
1401
 
1402
    private class billOrder implements ProcessFunction {
1403
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1404
      {
1405
        billOrder_args args = new billOrder_args();
1406
        args.read(iprot);
1407
        iprot.readMessageEnd();
1408
        billOrder_result result = new billOrder_result();
1409
        try {
1410
          result.success = iface_.billOrder(args.orderId);
1411
          result.setSuccessIsSet(true);
1412
        } catch (TransactionServiceException ex) {
1413
          result.ex = ex;
1414
        } catch (Throwable th) {
1415
          LOGGER.error("Internal error processing billOrder", th);
1416
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing billOrder");
1417
          oprot.writeMessageBegin(new TMessage("billOrder", TMessageType.EXCEPTION, seqid));
1418
          x.write(oprot);
1419
          oprot.writeMessageEnd();
1420
          oprot.getTransport().flush();
1421
          return;
1422
        }
1423
        oprot.writeMessageBegin(new TMessage("billOrder", TMessageType.REPLY, seqid));
1424
        result.write(oprot);
1425
        oprot.writeMessageEnd();
1426
        oprot.getTransport().flush();
1427
      }
1428
 
1429
    }
1430
 
483 rajveer 1431
    private class getOrdersForTransaction implements ProcessFunction {
68 ashish 1432
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1433
      {
483 rajveer 1434
        getOrdersForTransaction_args args = new getOrdersForTransaction_args();
68 ashish 1435
        args.read(iprot);
1436
        iprot.readMessageEnd();
483 rajveer 1437
        getOrdersForTransaction_result result = new getOrdersForTransaction_result();
68 ashish 1438
        try {
483 rajveer 1439
          result.success = iface_.getOrdersForTransaction(args.transactionId);
68 ashish 1440
        } catch (TransactionServiceException ex) {
1441
          result.ex = ex;
1442
        } catch (Throwable th) {
483 rajveer 1443
          LOGGER.error("Internal error processing getOrdersForTransaction", th);
1444
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getOrdersForTransaction");
1445
          oprot.writeMessageBegin(new TMessage("getOrdersForTransaction", TMessageType.EXCEPTION, seqid));
68 ashish 1446
          x.write(oprot);
1447
          oprot.writeMessageEnd();
1448
          oprot.getTransport().flush();
1449
          return;
1450
        }
483 rajveer 1451
        oprot.writeMessageBegin(new TMessage("getOrdersForTransaction", TMessageType.REPLY, seqid));
68 ashish 1452
        result.write(oprot);
1453
        oprot.writeMessageEnd();
1454
        oprot.getTransport().flush();
1455
      }
1456
 
1457
    }
1458
 
483 rajveer 1459
    private class getOrdersForCustomer implements ProcessFunction {
68 ashish 1460
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1461
      {
483 rajveer 1462
        getOrdersForCustomer_args args = new getOrdersForCustomer_args();
68 ashish 1463
        args.read(iprot);
1464
        iprot.readMessageEnd();
483 rajveer 1465
        getOrdersForCustomer_result result = new getOrdersForCustomer_result();
68 ashish 1466
        try {
483 rajveer 1467
          result.success = iface_.getOrdersForCustomer(args.customerId, args.from_date, args.to_date, args.status);
68 ashish 1468
        } catch (TransactionServiceException ex) {
1469
          result.ex = ex;
1470
        } catch (Throwable th) {
483 rajveer 1471
          LOGGER.error("Internal error processing getOrdersForCustomer", th);
1472
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getOrdersForCustomer");
1473
          oprot.writeMessageBegin(new TMessage("getOrdersForCustomer", TMessageType.EXCEPTION, seqid));
68 ashish 1474
          x.write(oprot);
1475
          oprot.writeMessageEnd();
1476
          oprot.getTransport().flush();
1477
          return;
1478
        }
483 rajveer 1479
        oprot.writeMessageBegin(new TMessage("getOrdersForCustomer", TMessageType.REPLY, seqid));
68 ashish 1480
        result.write(oprot);
1481
        oprot.writeMessageEnd();
1482
        oprot.getTransport().flush();
1483
      }
1484
 
1485
    }
1486
 
483 rajveer 1487
    private class createOrder implements ProcessFunction {
68 ashish 1488
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1489
      {
483 rajveer 1490
        createOrder_args args = new createOrder_args();
68 ashish 1491
        args.read(iprot);
1492
        iprot.readMessageEnd();
483 rajveer 1493
        createOrder_result result = new createOrder_result();
68 ashish 1494
        try {
483 rajveer 1495
          result.success = iface_.createOrder(args.order);
68 ashish 1496
          result.setSuccessIsSet(true);
1497
        } catch (TransactionServiceException ex) {
1498
          result.ex = ex;
1499
        } catch (Throwable th) {
483 rajveer 1500
          LOGGER.error("Internal error processing createOrder", th);
1501
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing createOrder");
1502
          oprot.writeMessageBegin(new TMessage("createOrder", TMessageType.EXCEPTION, seqid));
68 ashish 1503
          x.write(oprot);
1504
          oprot.writeMessageEnd();
1505
          oprot.getTransport().flush();
1506
          return;
1507
        }
483 rajveer 1508
        oprot.writeMessageBegin(new TMessage("createOrder", TMessageType.REPLY, seqid));
68 ashish 1509
        result.write(oprot);
1510
        oprot.writeMessageEnd();
1511
        oprot.getTransport().flush();
1512
      }
1513
 
1514
    }
1515
 
483 rajveer 1516
    private class getOrder implements ProcessFunction {
68 ashish 1517
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1518
      {
483 rajveer 1519
        getOrder_args args = new getOrder_args();
68 ashish 1520
        args.read(iprot);
1521
        iprot.readMessageEnd();
483 rajveer 1522
        getOrder_result result = new getOrder_result();
68 ashish 1523
        try {
483 rajveer 1524
          result.success = iface_.getOrder(args.id);
68 ashish 1525
        } catch (TransactionServiceException ex) {
1526
          result.ex = ex;
1527
        } catch (Throwable th) {
483 rajveer 1528
          LOGGER.error("Internal error processing getOrder", th);
1529
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getOrder");
1530
          oprot.writeMessageBegin(new TMessage("getOrder", TMessageType.EXCEPTION, seqid));
68 ashish 1531
          x.write(oprot);
1532
          oprot.writeMessageEnd();
1533
          oprot.getTransport().flush();
1534
          return;
1535
        }
483 rajveer 1536
        oprot.writeMessageBegin(new TMessage("getOrder", TMessageType.REPLY, seqid));
68 ashish 1537
        result.write(oprot);
1538
        oprot.writeMessageEnd();
1539
        oprot.getTransport().flush();
1540
      }
1541
 
1542
    }
1543
 
483 rajveer 1544
    private class getLineItemsForOrder implements ProcessFunction {
68 ashish 1545
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1546
      {
483 rajveer 1547
        getLineItemsForOrder_args args = new getLineItemsForOrder_args();
68 ashish 1548
        args.read(iprot);
1549
        iprot.readMessageEnd();
483 rajveer 1550
        getLineItemsForOrder_result result = new getLineItemsForOrder_result();
68 ashish 1551
        try {
483 rajveer 1552
          result.success = iface_.getLineItemsForOrder(args.orderId);
68 ashish 1553
        } catch (TransactionServiceException ex) {
1554
          result.ex = ex;
1555
        } catch (Throwable th) {
483 rajveer 1556
          LOGGER.error("Internal error processing getLineItemsForOrder", th);
1557
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getLineItemsForOrder");
1558
          oprot.writeMessageBegin(new TMessage("getLineItemsForOrder", TMessageType.EXCEPTION, seqid));
68 ashish 1559
          x.write(oprot);
1560
          oprot.writeMessageEnd();
1561
          oprot.getTransport().flush();
1562
          return;
1563
        }
483 rajveer 1564
        oprot.writeMessageBegin(new TMessage("getLineItemsForOrder", TMessageType.REPLY, seqid));
68 ashish 1565
        result.write(oprot);
1566
        oprot.writeMessageEnd();
1567
        oprot.getTransport().flush();
1568
      }
1569
 
1570
    }
1571
 
758 chandransh 1572
    private class markOrdersAsManifested implements ProcessFunction {
1573
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1574
      {
1575
        markOrdersAsManifested_args args = new markOrdersAsManifested_args();
1576
        args.read(iprot);
1577
        iprot.readMessageEnd();
1578
        markOrdersAsManifested_result result = new markOrdersAsManifested_result();
1579
        try {
1580
          result.success = iface_.markOrdersAsManifested(args.warehouseId, args.providerId);
1581
          result.setSuccessIsSet(true);
1582
        } catch (TransactionServiceException ex) {
1583
          result.ex = ex;
1584
        } catch (Throwable th) {
1585
          LOGGER.error("Internal error processing markOrdersAsManifested", th);
1586
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing markOrdersAsManifested");
1587
          oprot.writeMessageBegin(new TMessage("markOrdersAsManifested", TMessageType.EXCEPTION, seqid));
1588
          x.write(oprot);
1589
          oprot.writeMessageEnd();
1590
          oprot.getTransport().flush();
1591
          return;
1592
        }
1593
        oprot.writeMessageBegin(new TMessage("markOrdersAsManifested", TMessageType.REPLY, seqid));
1594
        result.write(oprot);
1595
        oprot.writeMessageEnd();
1596
        oprot.getTransport().flush();
1597
      }
1598
 
1599
    }
1600
 
1114 chandransh 1601
    private class markOrdersAsPickedUp implements ProcessFunction {
1602
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1603
      {
1604
        markOrdersAsPickedUp_args args = new markOrdersAsPickedUp_args();
1605
        args.read(iprot);
1606
        iprot.readMessageEnd();
1607
        markOrdersAsPickedUp_result result = new markOrdersAsPickedUp_result();
1608
        try {
1609
          result.success = iface_.markOrdersAsPickedUp(args.providerId, args.pickupDetails);
1610
        } catch (TransactionServiceException ex) {
1611
          result.ex = ex;
1612
        } catch (Throwable th) {
1613
          LOGGER.error("Internal error processing markOrdersAsPickedUp", th);
1614
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing markOrdersAsPickedUp");
1615
          oprot.writeMessageBegin(new TMessage("markOrdersAsPickedUp", TMessageType.EXCEPTION, seqid));
1616
          x.write(oprot);
1617
          oprot.writeMessageEnd();
1618
          oprot.getTransport().flush();
1619
          return;
1620
        }
1621
        oprot.writeMessageBegin(new TMessage("markOrdersAsPickedUp", TMessageType.REPLY, seqid));
1622
        result.write(oprot);
1623
        oprot.writeMessageEnd();
1624
        oprot.getTransport().flush();
1625
      }
1626
 
1627
    }
1628
 
1133 chandransh 1629
    private class markOrdersAsDelivered implements ProcessFunction {
1630
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1631
      {
1632
        markOrdersAsDelivered_args args = new markOrdersAsDelivered_args();
1633
        args.read(iprot);
1634
        iprot.readMessageEnd();
1635
        markOrdersAsDelivered_result result = new markOrdersAsDelivered_result();
1636
        try {
1637
          iface_.markOrdersAsDelivered(args.providerId, args.deliveredOrders);
1638
        } catch (TransactionServiceException ex) {
1639
          result.ex = ex;
1640
        } catch (Throwable th) {
1641
          LOGGER.error("Internal error processing markOrdersAsDelivered", th);
1642
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing markOrdersAsDelivered");
1643
          oprot.writeMessageBegin(new TMessage("markOrdersAsDelivered", TMessageType.EXCEPTION, seqid));
1644
          x.write(oprot);
1645
          oprot.writeMessageEnd();
1646
          oprot.getTransport().flush();
1647
          return;
1648
        }
1649
        oprot.writeMessageBegin(new TMessage("markOrdersAsDelivered", TMessageType.REPLY, seqid));
1650
        result.write(oprot);
1651
        oprot.writeMessageEnd();
1652
        oprot.getTransport().flush();
1653
      }
1654
 
1655
    }
1656
 
1657
    private class markOrdersAsFailed implements ProcessFunction {
1658
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1659
      {
1660
        markOrdersAsFailed_args args = new markOrdersAsFailed_args();
1661
        args.read(iprot);
1662
        iprot.readMessageEnd();
1663
        markOrdersAsFailed_result result = new markOrdersAsFailed_result();
1664
        try {
1665
          iface_.markOrdersAsFailed(args.providerId, args.returnedOrders);
1666
        } catch (TransactionServiceException ex) {
1667
          result.ex = ex;
1668
        } catch (Throwable th) {
1669
          LOGGER.error("Internal error processing markOrdersAsFailed", th);
1670
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing markOrdersAsFailed");
1671
          oprot.writeMessageBegin(new TMessage("markOrdersAsFailed", TMessageType.EXCEPTION, seqid));
1672
          x.write(oprot);
1673
          oprot.writeMessageEnd();
1674
          oprot.getTransport().flush();
1675
          return;
1676
        }
1677
        oprot.writeMessageBegin(new TMessage("markOrdersAsFailed", TMessageType.REPLY, seqid));
1678
        result.write(oprot);
1679
        oprot.writeMessageEnd();
1680
        oprot.getTransport().flush();
1681
      }
1682
 
1683
    }
1684
 
305 ashish 1685
    private class getAlerts implements ProcessFunction {
1686
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1687
      {
1688
        getAlerts_args args = new getAlerts_args();
1689
        args.read(iprot);
1690
        iprot.readMessageEnd();
1691
        getAlerts_result result = new getAlerts_result();
483 rajveer 1692
        result.success = iface_.getAlerts(args.orderId, args.valid);
305 ashish 1693
        oprot.writeMessageBegin(new TMessage("getAlerts", TMessageType.REPLY, seqid));
1694
        result.write(oprot);
1695
        oprot.writeMessageEnd();
1696
        oprot.getTransport().flush();
1697
      }
1698
 
1699
    }
1700
 
1701
    private class setAlert implements ProcessFunction {
1702
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1703
      {
1704
        setAlert_args args = new setAlert_args();
1705
        args.read(iprot);
1706
        iprot.readMessageEnd();
1707
        setAlert_result result = new setAlert_result();
483 rajveer 1708
        iface_.setAlert(args.orderId, args.unset, args.type, args.comment);
305 ashish 1709
        oprot.writeMessageBegin(new TMessage("setAlert", TMessageType.REPLY, seqid));
1710
        result.write(oprot);
1711
        oprot.writeMessageEnd();
1712
        oprot.getTransport().flush();
1713
      }
1714
 
1715
    }
1716
 
68 ashish 1717
  }
1718
 
764 rajveer 1719
  public static class closeSession_args implements TBase<closeSession_args._Fields>, java.io.Serializable, Cloneable, Comparable<closeSession_args>   {
1720
    private static final TStruct STRUCT_DESC = new TStruct("closeSession_args");
1721
 
1722
 
1723
 
1724
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
1725
    public enum _Fields implements TFieldIdEnum {
1726
;
1727
 
1728
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
1729
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
1730
 
1731
      static {
1732
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
1733
          byId.put((int)field._thriftId, field);
1734
          byName.put(field.getFieldName(), field);
1735
        }
1736
      }
1737
 
1738
      /**
1739
       * Find the _Fields constant that matches fieldId, or null if its not found.
1740
       */
1741
      public static _Fields findByThriftId(int fieldId) {
1742
        return byId.get(fieldId);
1743
      }
1744
 
1745
      /**
1746
       * Find the _Fields constant that matches fieldId, throwing an exception
1747
       * if it is not found.
1748
       */
1749
      public static _Fields findByThriftIdOrThrow(int fieldId) {
1750
        _Fields fields = findByThriftId(fieldId);
1751
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
1752
        return fields;
1753
      }
1754
 
1755
      /**
1756
       * Find the _Fields constant that matches name, or null if its not found.
1757
       */
1758
      public static _Fields findByName(String name) {
1759
        return byName.get(name);
1760
      }
1761
 
1762
      private final short _thriftId;
1763
      private final String _fieldName;
1764
 
1765
      _Fields(short thriftId, String fieldName) {
1766
        _thriftId = thriftId;
1767
        _fieldName = fieldName;
1768
      }
1769
 
1770
      public short getThriftFieldId() {
1771
        return _thriftId;
1772
      }
1773
 
1774
      public String getFieldName() {
1775
        return _fieldName;
1776
      }
1777
    }
1778
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
1779
    }});
1780
 
1781
    static {
1782
      FieldMetaData.addStructMetaDataMap(closeSession_args.class, metaDataMap);
1783
    }
1784
 
1785
    public closeSession_args() {
1786
    }
1787
 
1788
    /**
1789
     * Performs a deep copy on <i>other</i>.
1790
     */
1791
    public closeSession_args(closeSession_args other) {
1792
    }
1793
 
1794
    public closeSession_args deepCopy() {
1795
      return new closeSession_args(this);
1796
    }
1797
 
1798
    @Deprecated
1799
    public closeSession_args clone() {
1800
      return new closeSession_args(this);
1801
    }
1802
 
1803
    public void setFieldValue(_Fields field, Object value) {
1804
      switch (field) {
1805
      }
1806
    }
1807
 
1808
    public void setFieldValue(int fieldID, Object value) {
1809
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
1810
    }
1811
 
1812
    public Object getFieldValue(_Fields field) {
1813
      switch (field) {
1814
      }
1815
      throw new IllegalStateException();
1816
    }
1817
 
1818
    public Object getFieldValue(int fieldId) {
1819
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
1820
    }
1821
 
1822
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
1823
    public boolean isSet(_Fields field) {
1824
      switch (field) {
1825
      }
1826
      throw new IllegalStateException();
1827
    }
1828
 
1829
    public boolean isSet(int fieldID) {
1830
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
1831
    }
1832
 
1833
    @Override
1834
    public boolean equals(Object that) {
1835
      if (that == null)
1836
        return false;
1837
      if (that instanceof closeSession_args)
1838
        return this.equals((closeSession_args)that);
1839
      return false;
1840
    }
1841
 
1842
    public boolean equals(closeSession_args that) {
1843
      if (that == null)
1844
        return false;
1845
 
1846
      return true;
1847
    }
1848
 
1849
    @Override
1850
    public int hashCode() {
1851
      return 0;
1852
    }
1853
 
1854
    public int compareTo(closeSession_args other) {
1855
      if (!getClass().equals(other.getClass())) {
1856
        return getClass().getName().compareTo(other.getClass().getName());
1857
      }
1858
 
1859
      int lastComparison = 0;
1860
      closeSession_args typedOther = (closeSession_args)other;
1861
 
1862
      return 0;
1863
    }
1864
 
1865
    public void read(TProtocol iprot) throws TException {
1866
      TField field;
1867
      iprot.readStructBegin();
1868
      while (true)
1869
      {
1870
        field = iprot.readFieldBegin();
1871
        if (field.type == TType.STOP) { 
1872
          break;
1873
        }
1874
        _Fields fieldId = _Fields.findByThriftId(field.id);
1875
        if (fieldId == null) {
1876
          TProtocolUtil.skip(iprot, field.type);
1877
        } else {
1878
          switch (fieldId) {
1879
          }
1880
          iprot.readFieldEnd();
1881
        }
1882
      }
1883
      iprot.readStructEnd();
1884
      validate();
1885
    }
1886
 
1887
    public void write(TProtocol oprot) throws TException {
1888
      validate();
1889
 
1890
      oprot.writeStructBegin(STRUCT_DESC);
1891
      oprot.writeFieldStop();
1892
      oprot.writeStructEnd();
1893
    }
1894
 
1895
    @Override
1896
    public String toString() {
1897
      StringBuilder sb = new StringBuilder("closeSession_args(");
1898
      boolean first = true;
1899
 
1900
      sb.append(")");
1901
      return sb.toString();
1902
    }
1903
 
1904
    public void validate() throws TException {
1905
      // check for required fields
1906
    }
1907
 
1908
  }
1909
 
1910
  public static class closeSession_result implements TBase<closeSession_result._Fields>, java.io.Serializable, Cloneable, Comparable<closeSession_result>   {
1911
    private static final TStruct STRUCT_DESC = new TStruct("closeSession_result");
1912
 
1913
 
1914
 
1915
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
1916
    public enum _Fields implements TFieldIdEnum {
1917
;
1918
 
1919
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
1920
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
1921
 
1922
      static {
1923
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
1924
          byId.put((int)field._thriftId, field);
1925
          byName.put(field.getFieldName(), field);
1926
        }
1927
      }
1928
 
1929
      /**
1930
       * Find the _Fields constant that matches fieldId, or null if its not found.
1931
       */
1932
      public static _Fields findByThriftId(int fieldId) {
1933
        return byId.get(fieldId);
1934
      }
1935
 
1936
      /**
1937
       * Find the _Fields constant that matches fieldId, throwing an exception
1938
       * if it is not found.
1939
       */
1940
      public static _Fields findByThriftIdOrThrow(int fieldId) {
1941
        _Fields fields = findByThriftId(fieldId);
1942
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
1943
        return fields;
1944
      }
1945
 
1946
      /**
1947
       * Find the _Fields constant that matches name, or null if its not found.
1948
       */
1949
      public static _Fields findByName(String name) {
1950
        return byName.get(name);
1951
      }
1952
 
1953
      private final short _thriftId;
1954
      private final String _fieldName;
1955
 
1956
      _Fields(short thriftId, String fieldName) {
1957
        _thriftId = thriftId;
1958
        _fieldName = fieldName;
1959
      }
1960
 
1961
      public short getThriftFieldId() {
1962
        return _thriftId;
1963
      }
1964
 
1965
      public String getFieldName() {
1966
        return _fieldName;
1967
      }
1968
    }
1969
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
1970
    }});
1971
 
1972
    static {
1973
      FieldMetaData.addStructMetaDataMap(closeSession_result.class, metaDataMap);
1974
    }
1975
 
1976
    public closeSession_result() {
1977
    }
1978
 
1979
    /**
1980
     * Performs a deep copy on <i>other</i>.
1981
     */
1982
    public closeSession_result(closeSession_result other) {
1983
    }
1984
 
1985
    public closeSession_result deepCopy() {
1986
      return new closeSession_result(this);
1987
    }
1988
 
1989
    @Deprecated
1990
    public closeSession_result clone() {
1991
      return new closeSession_result(this);
1992
    }
1993
 
1994
    public void setFieldValue(_Fields field, Object value) {
1995
      switch (field) {
1996
      }
1997
    }
1998
 
1999
    public void setFieldValue(int fieldID, Object value) {
2000
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
2001
    }
2002
 
2003
    public Object getFieldValue(_Fields field) {
2004
      switch (field) {
2005
      }
2006
      throw new IllegalStateException();
2007
    }
2008
 
2009
    public Object getFieldValue(int fieldId) {
2010
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
2011
    }
2012
 
2013
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
2014
    public boolean isSet(_Fields field) {
2015
      switch (field) {
2016
      }
2017
      throw new IllegalStateException();
2018
    }
2019
 
2020
    public boolean isSet(int fieldID) {
2021
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
2022
    }
2023
 
2024
    @Override
2025
    public boolean equals(Object that) {
2026
      if (that == null)
2027
        return false;
2028
      if (that instanceof closeSession_result)
2029
        return this.equals((closeSession_result)that);
2030
      return false;
2031
    }
2032
 
2033
    public boolean equals(closeSession_result that) {
2034
      if (that == null)
2035
        return false;
2036
 
2037
      return true;
2038
    }
2039
 
2040
    @Override
2041
    public int hashCode() {
2042
      return 0;
2043
    }
2044
 
2045
    public int compareTo(closeSession_result other) {
2046
      if (!getClass().equals(other.getClass())) {
2047
        return getClass().getName().compareTo(other.getClass().getName());
2048
      }
2049
 
2050
      int lastComparison = 0;
2051
      closeSession_result typedOther = (closeSession_result)other;
2052
 
2053
      return 0;
2054
    }
2055
 
2056
    public void read(TProtocol iprot) throws TException {
2057
      TField field;
2058
      iprot.readStructBegin();
2059
      while (true)
2060
      {
2061
        field = iprot.readFieldBegin();
2062
        if (field.type == TType.STOP) { 
2063
          break;
2064
        }
2065
        _Fields fieldId = _Fields.findByThriftId(field.id);
2066
        if (fieldId == null) {
2067
          TProtocolUtil.skip(iprot, field.type);
2068
        } else {
2069
          switch (fieldId) {
2070
          }
2071
          iprot.readFieldEnd();
2072
        }
2073
      }
2074
      iprot.readStructEnd();
2075
      validate();
2076
    }
2077
 
2078
    public void write(TProtocol oprot) throws TException {
2079
      oprot.writeStructBegin(STRUCT_DESC);
2080
 
2081
      oprot.writeFieldStop();
2082
      oprot.writeStructEnd();
2083
    }
2084
 
2085
    @Override
2086
    public String toString() {
2087
      StringBuilder sb = new StringBuilder("closeSession_result(");
2088
      boolean first = true;
2089
 
2090
      sb.append(")");
2091
      return sb.toString();
2092
    }
2093
 
2094
    public void validate() throws TException {
2095
      // check for required fields
2096
    }
2097
 
2098
  }
2099
 
684 chandransh 2100
  public static class createTransaction_args implements TBase<createTransaction_args._Fields>, java.io.Serializable, Cloneable, Comparable<createTransaction_args>   {
68 ashish 2101
    private static final TStruct STRUCT_DESC = new TStruct("createTransaction_args");
2102
 
2103
    private static final TField TRANSACTION_FIELD_DESC = new TField("transaction", TType.STRUCT, (short)1);
2104
 
2105
    private Transaction transaction;
2106
 
2107
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2108
    public enum _Fields implements TFieldIdEnum {
2109
      TRANSACTION((short)1, "transaction");
2110
 
2111
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
2112
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2113
 
2114
      static {
2115
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2116
          byId.put((int)field._thriftId, field);
2117
          byName.put(field.getFieldName(), field);
2118
        }
2119
      }
2120
 
2121
      /**
2122
       * Find the _Fields constant that matches fieldId, or null if its not found.
2123
       */
2124
      public static _Fields findByThriftId(int fieldId) {
2125
        return byId.get(fieldId);
2126
      }
2127
 
2128
      /**
2129
       * Find the _Fields constant that matches fieldId, throwing an exception
2130
       * if it is not found.
2131
       */
2132
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2133
        _Fields fields = findByThriftId(fieldId);
2134
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2135
        return fields;
2136
      }
2137
 
2138
      /**
2139
       * Find the _Fields constant that matches name, or null if its not found.
2140
       */
2141
      public static _Fields findByName(String name) {
2142
        return byName.get(name);
2143
      }
2144
 
2145
      private final short _thriftId;
2146
      private final String _fieldName;
2147
 
2148
      _Fields(short thriftId, String fieldName) {
2149
        _thriftId = thriftId;
2150
        _fieldName = fieldName;
2151
      }
2152
 
2153
      public short getThriftFieldId() {
2154
        return _thriftId;
2155
      }
2156
 
2157
      public String getFieldName() {
2158
        return _fieldName;
2159
      }
2160
    }
2161
 
2162
    // isset id assignments
2163
 
2164
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
2165
      put(_Fields.TRANSACTION, new FieldMetaData("transaction", TFieldRequirementType.DEFAULT, 
2166
          new StructMetaData(TType.STRUCT, Transaction.class)));
2167
    }});
2168
 
2169
    static {
2170
      FieldMetaData.addStructMetaDataMap(createTransaction_args.class, metaDataMap);
2171
    }
2172
 
2173
    public createTransaction_args() {
2174
    }
2175
 
2176
    public createTransaction_args(
2177
      Transaction transaction)
2178
    {
2179
      this();
2180
      this.transaction = transaction;
2181
    }
2182
 
2183
    /**
2184
     * Performs a deep copy on <i>other</i>.
2185
     */
2186
    public createTransaction_args(createTransaction_args other) {
2187
      if (other.isSetTransaction()) {
2188
        this.transaction = new Transaction(other.transaction);
2189
      }
2190
    }
2191
 
2192
    public createTransaction_args deepCopy() {
2193
      return new createTransaction_args(this);
2194
    }
2195
 
2196
    @Deprecated
2197
    public createTransaction_args clone() {
2198
      return new createTransaction_args(this);
2199
    }
2200
 
2201
    public Transaction getTransaction() {
2202
      return this.transaction;
2203
    }
2204
 
2205
    public createTransaction_args setTransaction(Transaction transaction) {
2206
      this.transaction = transaction;
2207
      return this;
2208
    }
2209
 
2210
    public void unsetTransaction() {
2211
      this.transaction = null;
2212
    }
2213
 
2214
    /** Returns true if field transaction is set (has been asigned a value) and false otherwise */
2215
    public boolean isSetTransaction() {
2216
      return this.transaction != null;
2217
    }
2218
 
2219
    public void setTransactionIsSet(boolean value) {
2220
      if (!value) {
2221
        this.transaction = null;
2222
      }
2223
    }
2224
 
2225
    public void setFieldValue(_Fields field, Object value) {
2226
      switch (field) {
2227
      case TRANSACTION:
2228
        if (value == null) {
2229
          unsetTransaction();
2230
        } else {
2231
          setTransaction((Transaction)value);
2232
        }
2233
        break;
2234
 
2235
      }
2236
    }
2237
 
2238
    public void setFieldValue(int fieldID, Object value) {
2239
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
2240
    }
2241
 
2242
    public Object getFieldValue(_Fields field) {
2243
      switch (field) {
2244
      case TRANSACTION:
2245
        return getTransaction();
2246
 
2247
      }
2248
      throw new IllegalStateException();
2249
    }
2250
 
2251
    public Object getFieldValue(int fieldId) {
2252
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
2253
    }
2254
 
2255
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
2256
    public boolean isSet(_Fields field) {
2257
      switch (field) {
2258
      case TRANSACTION:
2259
        return isSetTransaction();
2260
      }
2261
      throw new IllegalStateException();
2262
    }
2263
 
2264
    public boolean isSet(int fieldID) {
2265
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
2266
    }
2267
 
2268
    @Override
2269
    public boolean equals(Object that) {
2270
      if (that == null)
2271
        return false;
2272
      if (that instanceof createTransaction_args)
2273
        return this.equals((createTransaction_args)that);
2274
      return false;
2275
    }
2276
 
2277
    public boolean equals(createTransaction_args that) {
2278
      if (that == null)
2279
        return false;
2280
 
2281
      boolean this_present_transaction = true && this.isSetTransaction();
2282
      boolean that_present_transaction = true && that.isSetTransaction();
2283
      if (this_present_transaction || that_present_transaction) {
2284
        if (!(this_present_transaction && that_present_transaction))
2285
          return false;
2286
        if (!this.transaction.equals(that.transaction))
2287
          return false;
2288
      }
2289
 
2290
      return true;
2291
    }
2292
 
2293
    @Override
2294
    public int hashCode() {
2295
      return 0;
2296
    }
2297
 
684 chandransh 2298
    public int compareTo(createTransaction_args other) {
2299
      if (!getClass().equals(other.getClass())) {
2300
        return getClass().getName().compareTo(other.getClass().getName());
2301
      }
2302
 
2303
      int lastComparison = 0;
2304
      createTransaction_args typedOther = (createTransaction_args)other;
2305
 
2306
      lastComparison = Boolean.valueOf(isSetTransaction()).compareTo(isSetTransaction());
2307
      if (lastComparison != 0) {
2308
        return lastComparison;
2309
      }
2310
      lastComparison = TBaseHelper.compareTo(transaction, typedOther.transaction);
2311
      if (lastComparison != 0) {
2312
        return lastComparison;
2313
      }
2314
      return 0;
2315
    }
2316
 
68 ashish 2317
    public void read(TProtocol iprot) throws TException {
2318
      TField field;
2319
      iprot.readStructBegin();
2320
      while (true)
2321
      {
2322
        field = iprot.readFieldBegin();
2323
        if (field.type == TType.STOP) { 
2324
          break;
2325
        }
2326
        _Fields fieldId = _Fields.findByThriftId(field.id);
2327
        if (fieldId == null) {
2328
          TProtocolUtil.skip(iprot, field.type);
2329
        } else {
2330
          switch (fieldId) {
2331
            case TRANSACTION:
2332
              if (field.type == TType.STRUCT) {
2333
                this.transaction = new Transaction();
2334
                this.transaction.read(iprot);
2335
              } else { 
2336
                TProtocolUtil.skip(iprot, field.type);
2337
              }
2338
              break;
2339
          }
2340
          iprot.readFieldEnd();
2341
        }
2342
      }
2343
      iprot.readStructEnd();
2344
      validate();
2345
    }
2346
 
2347
    public void write(TProtocol oprot) throws TException {
2348
      validate();
2349
 
2350
      oprot.writeStructBegin(STRUCT_DESC);
2351
      if (this.transaction != null) {
2352
        oprot.writeFieldBegin(TRANSACTION_FIELD_DESC);
2353
        this.transaction.write(oprot);
2354
        oprot.writeFieldEnd();
2355
      }
2356
      oprot.writeFieldStop();
2357
      oprot.writeStructEnd();
2358
    }
2359
 
2360
    @Override
2361
    public String toString() {
2362
      StringBuilder sb = new StringBuilder("createTransaction_args(");
2363
      boolean first = true;
2364
 
2365
      sb.append("transaction:");
2366
      if (this.transaction == null) {
2367
        sb.append("null");
2368
      } else {
2369
        sb.append(this.transaction);
2370
      }
2371
      first = false;
2372
      sb.append(")");
2373
      return sb.toString();
2374
    }
2375
 
2376
    public void validate() throws TException {
2377
      // check for required fields
2378
    }
2379
 
2380
  }
2381
 
2382
  public static class createTransaction_result implements TBase<createTransaction_result._Fields>, java.io.Serializable, Cloneable, Comparable<createTransaction_result>   {
2383
    private static final TStruct STRUCT_DESC = new TStruct("createTransaction_result");
2384
 
132 ashish 2385
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
68 ashish 2386
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
2387
 
132 ashish 2388
    private long success;
68 ashish 2389
    private TransactionServiceException ex;
2390
 
2391
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2392
    public enum _Fields implements TFieldIdEnum {
132 ashish 2393
      SUCCESS((short)0, "success"),
68 ashish 2394
      EX((short)1, "ex");
2395
 
2396
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
2397
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2398
 
2399
      static {
2400
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2401
          byId.put((int)field._thriftId, field);
2402
          byName.put(field.getFieldName(), field);
2403
        }
2404
      }
2405
 
2406
      /**
2407
       * Find the _Fields constant that matches fieldId, or null if its not found.
2408
       */
2409
      public static _Fields findByThriftId(int fieldId) {
2410
        return byId.get(fieldId);
2411
      }
2412
 
2413
      /**
2414
       * Find the _Fields constant that matches fieldId, throwing an exception
2415
       * if it is not found.
2416
       */
2417
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2418
        _Fields fields = findByThriftId(fieldId);
2419
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2420
        return fields;
2421
      }
2422
 
2423
      /**
2424
       * Find the _Fields constant that matches name, or null if its not found.
2425
       */
2426
      public static _Fields findByName(String name) {
2427
        return byName.get(name);
2428
      }
2429
 
2430
      private final short _thriftId;
2431
      private final String _fieldName;
2432
 
2433
      _Fields(short thriftId, String fieldName) {
2434
        _thriftId = thriftId;
2435
        _fieldName = fieldName;
2436
      }
2437
 
2438
      public short getThriftFieldId() {
2439
        return _thriftId;
2440
      }
2441
 
2442
      public String getFieldName() {
2443
        return _fieldName;
2444
      }
2445
    }
2446
 
2447
    // isset id assignments
132 ashish 2448
    private static final int __SUCCESS_ISSET_ID = 0;
2449
    private BitSet __isset_bit_vector = new BitSet(1);
68 ashish 2450
 
2451
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
132 ashish 2452
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
2453
          new FieldValueMetaData(TType.I64)));
68 ashish 2454
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
2455
          new FieldValueMetaData(TType.STRUCT)));
2456
    }});
2457
 
2458
    static {
2459
      FieldMetaData.addStructMetaDataMap(createTransaction_result.class, metaDataMap);
2460
    }
2461
 
2462
    public createTransaction_result() {
2463
    }
2464
 
2465
    public createTransaction_result(
132 ashish 2466
      long success,
68 ashish 2467
      TransactionServiceException ex)
2468
    {
2469
      this();
132 ashish 2470
      this.success = success;
2471
      setSuccessIsSet(true);
68 ashish 2472
      this.ex = ex;
2473
    }
2474
 
2475
    /**
2476
     * Performs a deep copy on <i>other</i>.
2477
     */
2478
    public createTransaction_result(createTransaction_result other) {
132 ashish 2479
      __isset_bit_vector.clear();
2480
      __isset_bit_vector.or(other.__isset_bit_vector);
2481
      this.success = other.success;
68 ashish 2482
      if (other.isSetEx()) {
2483
        this.ex = new TransactionServiceException(other.ex);
2484
      }
2485
    }
2486
 
2487
    public createTransaction_result deepCopy() {
2488
      return new createTransaction_result(this);
2489
    }
2490
 
2491
    @Deprecated
2492
    public createTransaction_result clone() {
2493
      return new createTransaction_result(this);
2494
    }
2495
 
132 ashish 2496
    public long getSuccess() {
2497
      return this.success;
2498
    }
2499
 
2500
    public createTransaction_result setSuccess(long success) {
2501
      this.success = success;
2502
      setSuccessIsSet(true);
2503
      return this;
2504
    }
2505
 
2506
    public void unsetSuccess() {
2507
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
2508
    }
2509
 
2510
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
2511
    public boolean isSetSuccess() {
2512
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
2513
    }
2514
 
2515
    public void setSuccessIsSet(boolean value) {
2516
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
2517
    }
2518
 
68 ashish 2519
    public TransactionServiceException getEx() {
2520
      return this.ex;
2521
    }
2522
 
2523
    public createTransaction_result setEx(TransactionServiceException ex) {
2524
      this.ex = ex;
2525
      return this;
2526
    }
2527
 
2528
    public void unsetEx() {
2529
      this.ex = null;
2530
    }
2531
 
2532
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
2533
    public boolean isSetEx() {
2534
      return this.ex != null;
2535
    }
2536
 
2537
    public void setExIsSet(boolean value) {
2538
      if (!value) {
2539
        this.ex = null;
2540
      }
2541
    }
2542
 
2543
    public void setFieldValue(_Fields field, Object value) {
2544
      switch (field) {
132 ashish 2545
      case SUCCESS:
2546
        if (value == null) {
2547
          unsetSuccess();
2548
        } else {
2549
          setSuccess((Long)value);
2550
        }
2551
        break;
2552
 
68 ashish 2553
      case EX:
2554
        if (value == null) {
2555
          unsetEx();
2556
        } else {
2557
          setEx((TransactionServiceException)value);
2558
        }
2559
        break;
2560
 
2561
      }
2562
    }
2563
 
2564
    public void setFieldValue(int fieldID, Object value) {
2565
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
2566
    }
2567
 
2568
    public Object getFieldValue(_Fields field) {
2569
      switch (field) {
132 ashish 2570
      case SUCCESS:
2571
        return new Long(getSuccess());
2572
 
68 ashish 2573
      case EX:
2574
        return getEx();
2575
 
2576
      }
2577
      throw new IllegalStateException();
2578
    }
2579
 
2580
    public Object getFieldValue(int fieldId) {
2581
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
2582
    }
2583
 
2584
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
2585
    public boolean isSet(_Fields field) {
2586
      switch (field) {
132 ashish 2587
      case SUCCESS:
2588
        return isSetSuccess();
68 ashish 2589
      case EX:
2590
        return isSetEx();
2591
      }
2592
      throw new IllegalStateException();
2593
    }
2594
 
2595
    public boolean isSet(int fieldID) {
2596
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
2597
    }
2598
 
2599
    @Override
2600
    public boolean equals(Object that) {
2601
      if (that == null)
2602
        return false;
2603
      if (that instanceof createTransaction_result)
2604
        return this.equals((createTransaction_result)that);
2605
      return false;
2606
    }
2607
 
2608
    public boolean equals(createTransaction_result that) {
2609
      if (that == null)
2610
        return false;
2611
 
132 ashish 2612
      boolean this_present_success = true;
2613
      boolean that_present_success = true;
2614
      if (this_present_success || that_present_success) {
2615
        if (!(this_present_success && that_present_success))
2616
          return false;
2617
        if (this.success != that.success)
2618
          return false;
2619
      }
2620
 
68 ashish 2621
      boolean this_present_ex = true && this.isSetEx();
2622
      boolean that_present_ex = true && that.isSetEx();
2623
      if (this_present_ex || that_present_ex) {
2624
        if (!(this_present_ex && that_present_ex))
2625
          return false;
2626
        if (!this.ex.equals(that.ex))
2627
          return false;
2628
      }
2629
 
2630
      return true;
2631
    }
2632
 
2633
    @Override
2634
    public int hashCode() {
2635
      return 0;
2636
    }
2637
 
2638
    public int compareTo(createTransaction_result other) {
2639
      if (!getClass().equals(other.getClass())) {
2640
        return getClass().getName().compareTo(other.getClass().getName());
2641
      }
2642
 
2643
      int lastComparison = 0;
2644
      createTransaction_result typedOther = (createTransaction_result)other;
2645
 
132 ashish 2646
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
2647
      if (lastComparison != 0) {
2648
        return lastComparison;
2649
      }
2650
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
2651
      if (lastComparison != 0) {
2652
        return lastComparison;
2653
      }
68 ashish 2654
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
2655
      if (lastComparison != 0) {
2656
        return lastComparison;
2657
      }
2658
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
2659
      if (lastComparison != 0) {
2660
        return lastComparison;
2661
      }
2662
      return 0;
2663
    }
2664
 
2665
    public void read(TProtocol iprot) throws TException {
2666
      TField field;
2667
      iprot.readStructBegin();
2668
      while (true)
2669
      {
2670
        field = iprot.readFieldBegin();
2671
        if (field.type == TType.STOP) { 
2672
          break;
2673
        }
2674
        _Fields fieldId = _Fields.findByThriftId(field.id);
2675
        if (fieldId == null) {
2676
          TProtocolUtil.skip(iprot, field.type);
2677
        } else {
2678
          switch (fieldId) {
132 ashish 2679
            case SUCCESS:
2680
              if (field.type == TType.I64) {
2681
                this.success = iprot.readI64();
2682
                setSuccessIsSet(true);
2683
              } else { 
2684
                TProtocolUtil.skip(iprot, field.type);
2685
              }
2686
              break;
68 ashish 2687
            case EX:
2688
              if (field.type == TType.STRUCT) {
2689
                this.ex = new TransactionServiceException();
2690
                this.ex.read(iprot);
2691
              } else { 
2692
                TProtocolUtil.skip(iprot, field.type);
2693
              }
2694
              break;
2695
          }
2696
          iprot.readFieldEnd();
2697
        }
2698
      }
2699
      iprot.readStructEnd();
2700
      validate();
2701
    }
2702
 
2703
    public void write(TProtocol oprot) throws TException {
2704
      oprot.writeStructBegin(STRUCT_DESC);
2705
 
132 ashish 2706
      if (this.isSetSuccess()) {
2707
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
2708
        oprot.writeI64(this.success);
2709
        oprot.writeFieldEnd();
2710
      } else if (this.isSetEx()) {
68 ashish 2711
        oprot.writeFieldBegin(EX_FIELD_DESC);
2712
        this.ex.write(oprot);
2713
        oprot.writeFieldEnd();
2714
      }
2715
      oprot.writeFieldStop();
2716
      oprot.writeStructEnd();
2717
    }
2718
 
2719
    @Override
2720
    public String toString() {
2721
      StringBuilder sb = new StringBuilder("createTransaction_result(");
2722
      boolean first = true;
2723
 
132 ashish 2724
      sb.append("success:");
2725
      sb.append(this.success);
2726
      first = false;
2727
      if (!first) sb.append(", ");
68 ashish 2728
      sb.append("ex:");
2729
      if (this.ex == null) {
2730
        sb.append("null");
2731
      } else {
2732
        sb.append(this.ex);
2733
      }
2734
      first = false;
2735
      sb.append(")");
2736
      return sb.toString();
2737
    }
2738
 
2739
    public void validate() throws TException {
2740
      // check for required fields
2741
    }
2742
 
2743
  }
2744
 
2745
  public static class getTransaction_args implements TBase<getTransaction_args._Fields>, java.io.Serializable, Cloneable, Comparable<getTransaction_args>   {
2746
    private static final TStruct STRUCT_DESC = new TStruct("getTransaction_args");
2747
 
2748
    private static final TField ID_FIELD_DESC = new TField("id", TType.I64, (short)1);
2749
 
2750
    private long id;
2751
 
2752
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2753
    public enum _Fields implements TFieldIdEnum {
2754
      ID((short)1, "id");
2755
 
2756
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
2757
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2758
 
2759
      static {
2760
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2761
          byId.put((int)field._thriftId, field);
2762
          byName.put(field.getFieldName(), field);
2763
        }
2764
      }
2765
 
2766
      /**
2767
       * Find the _Fields constant that matches fieldId, or null if its not found.
2768
       */
2769
      public static _Fields findByThriftId(int fieldId) {
2770
        return byId.get(fieldId);
2771
      }
2772
 
2773
      /**
2774
       * Find the _Fields constant that matches fieldId, throwing an exception
2775
       * if it is not found.
2776
       */
2777
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2778
        _Fields fields = findByThriftId(fieldId);
2779
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2780
        return fields;
2781
      }
2782
 
2783
      /**
2784
       * Find the _Fields constant that matches name, or null if its not found.
2785
       */
2786
      public static _Fields findByName(String name) {
2787
        return byName.get(name);
2788
      }
2789
 
2790
      private final short _thriftId;
2791
      private final String _fieldName;
2792
 
2793
      _Fields(short thriftId, String fieldName) {
2794
        _thriftId = thriftId;
2795
        _fieldName = fieldName;
2796
      }
2797
 
2798
      public short getThriftFieldId() {
2799
        return _thriftId;
2800
      }
2801
 
2802
      public String getFieldName() {
2803
        return _fieldName;
2804
      }
2805
    }
2806
 
2807
    // isset id assignments
2808
    private static final int __ID_ISSET_ID = 0;
2809
    private BitSet __isset_bit_vector = new BitSet(1);
2810
 
2811
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
2812
      put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, 
2813
          new FieldValueMetaData(TType.I64)));
2814
    }});
2815
 
2816
    static {
2817
      FieldMetaData.addStructMetaDataMap(getTransaction_args.class, metaDataMap);
2818
    }
2819
 
2820
    public getTransaction_args() {
2821
    }
2822
 
2823
    public getTransaction_args(
2824
      long id)
2825
    {
2826
      this();
2827
      this.id = id;
2828
      setIdIsSet(true);
2829
    }
2830
 
2831
    /**
2832
     * Performs a deep copy on <i>other</i>.
2833
     */
2834
    public getTransaction_args(getTransaction_args other) {
2835
      __isset_bit_vector.clear();
2836
      __isset_bit_vector.or(other.__isset_bit_vector);
2837
      this.id = other.id;
2838
    }
2839
 
2840
    public getTransaction_args deepCopy() {
2841
      return new getTransaction_args(this);
2842
    }
2843
 
2844
    @Deprecated
2845
    public getTransaction_args clone() {
2846
      return new getTransaction_args(this);
2847
    }
2848
 
2849
    public long getId() {
2850
      return this.id;
2851
    }
2852
 
2853
    public getTransaction_args setId(long id) {
2854
      this.id = id;
2855
      setIdIsSet(true);
2856
      return this;
2857
    }
2858
 
2859
    public void unsetId() {
2860
      __isset_bit_vector.clear(__ID_ISSET_ID);
2861
    }
2862
 
2863
    /** Returns true if field id is set (has been asigned a value) and false otherwise */
2864
    public boolean isSetId() {
2865
      return __isset_bit_vector.get(__ID_ISSET_ID);
2866
    }
2867
 
2868
    public void setIdIsSet(boolean value) {
2869
      __isset_bit_vector.set(__ID_ISSET_ID, value);
2870
    }
2871
 
2872
    public void setFieldValue(_Fields field, Object value) {
2873
      switch (field) {
2874
      case ID:
2875
        if (value == null) {
2876
          unsetId();
2877
        } else {
2878
          setId((Long)value);
2879
        }
2880
        break;
2881
 
2882
      }
2883
    }
2884
 
2885
    public void setFieldValue(int fieldID, Object value) {
2886
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
2887
    }
2888
 
2889
    public Object getFieldValue(_Fields field) {
2890
      switch (field) {
2891
      case ID:
2892
        return new Long(getId());
2893
 
2894
      }
2895
      throw new IllegalStateException();
2896
    }
2897
 
2898
    public Object getFieldValue(int fieldId) {
2899
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
2900
    }
2901
 
2902
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
2903
    public boolean isSet(_Fields field) {
2904
      switch (field) {
2905
      case ID:
2906
        return isSetId();
2907
      }
2908
      throw new IllegalStateException();
2909
    }
2910
 
2911
    public boolean isSet(int fieldID) {
2912
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
2913
    }
2914
 
2915
    @Override
2916
    public boolean equals(Object that) {
2917
      if (that == null)
2918
        return false;
2919
      if (that instanceof getTransaction_args)
2920
        return this.equals((getTransaction_args)that);
2921
      return false;
2922
    }
2923
 
2924
    public boolean equals(getTransaction_args that) {
2925
      if (that == null)
2926
        return false;
2927
 
2928
      boolean this_present_id = true;
2929
      boolean that_present_id = true;
2930
      if (this_present_id || that_present_id) {
2931
        if (!(this_present_id && that_present_id))
2932
          return false;
2933
        if (this.id != that.id)
2934
          return false;
2935
      }
2936
 
2937
      return true;
2938
    }
2939
 
2940
    @Override
2941
    public int hashCode() {
2942
      return 0;
2943
    }
2944
 
2945
    public int compareTo(getTransaction_args other) {
2946
      if (!getClass().equals(other.getClass())) {
2947
        return getClass().getName().compareTo(other.getClass().getName());
2948
      }
2949
 
2950
      int lastComparison = 0;
2951
      getTransaction_args typedOther = (getTransaction_args)other;
2952
 
2953
      lastComparison = Boolean.valueOf(isSetId()).compareTo(isSetId());
2954
      if (lastComparison != 0) {
2955
        return lastComparison;
2956
      }
2957
      lastComparison = TBaseHelper.compareTo(id, typedOther.id);
2958
      if (lastComparison != 0) {
2959
        return lastComparison;
2960
      }
2961
      return 0;
2962
    }
2963
 
2964
    public void read(TProtocol iprot) throws TException {
2965
      TField field;
2966
      iprot.readStructBegin();
2967
      while (true)
2968
      {
2969
        field = iprot.readFieldBegin();
2970
        if (field.type == TType.STOP) { 
2971
          break;
2972
        }
2973
        _Fields fieldId = _Fields.findByThriftId(field.id);
2974
        if (fieldId == null) {
2975
          TProtocolUtil.skip(iprot, field.type);
2976
        } else {
2977
          switch (fieldId) {
2978
            case ID:
2979
              if (field.type == TType.I64) {
2980
                this.id = iprot.readI64();
2981
                setIdIsSet(true);
2982
              } else { 
2983
                TProtocolUtil.skip(iprot, field.type);
2984
              }
2985
              break;
2986
          }
2987
          iprot.readFieldEnd();
2988
        }
2989
      }
2990
      iprot.readStructEnd();
2991
      validate();
2992
    }
2993
 
2994
    public void write(TProtocol oprot) throws TException {
2995
      validate();
2996
 
2997
      oprot.writeStructBegin(STRUCT_DESC);
2998
      oprot.writeFieldBegin(ID_FIELD_DESC);
2999
      oprot.writeI64(this.id);
3000
      oprot.writeFieldEnd();
3001
      oprot.writeFieldStop();
3002
      oprot.writeStructEnd();
3003
    }
3004
 
3005
    @Override
3006
    public String toString() {
3007
      StringBuilder sb = new StringBuilder("getTransaction_args(");
3008
      boolean first = true;
3009
 
3010
      sb.append("id:");
3011
      sb.append(this.id);
3012
      first = false;
3013
      sb.append(")");
3014
      return sb.toString();
3015
    }
3016
 
3017
    public void validate() throws TException {
3018
      // check for required fields
3019
    }
3020
 
3021
  }
3022
 
684 chandransh 3023
  public static class getTransaction_result implements TBase<getTransaction_result._Fields>, java.io.Serializable, Cloneable, Comparable<getTransaction_result>   {
68 ashish 3024
    private static final TStruct STRUCT_DESC = new TStruct("getTransaction_result");
3025
 
3026
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
3027
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
3028
 
3029
    private Transaction success;
3030
    private TransactionServiceException ex;
3031
 
3032
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3033
    public enum _Fields implements TFieldIdEnum {
3034
      SUCCESS((short)0, "success"),
3035
      EX((short)1, "ex");
3036
 
3037
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3038
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3039
 
3040
      static {
3041
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3042
          byId.put((int)field._thriftId, field);
3043
          byName.put(field.getFieldName(), field);
3044
        }
3045
      }
3046
 
3047
      /**
3048
       * Find the _Fields constant that matches fieldId, or null if its not found.
3049
       */
3050
      public static _Fields findByThriftId(int fieldId) {
3051
        return byId.get(fieldId);
3052
      }
3053
 
3054
      /**
3055
       * Find the _Fields constant that matches fieldId, throwing an exception
3056
       * if it is not found.
3057
       */
3058
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3059
        _Fields fields = findByThriftId(fieldId);
3060
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3061
        return fields;
3062
      }
3063
 
3064
      /**
3065
       * Find the _Fields constant that matches name, or null if its not found.
3066
       */
3067
      public static _Fields findByName(String name) {
3068
        return byName.get(name);
3069
      }
3070
 
3071
      private final short _thriftId;
3072
      private final String _fieldName;
3073
 
3074
      _Fields(short thriftId, String fieldName) {
3075
        _thriftId = thriftId;
3076
        _fieldName = fieldName;
3077
      }
3078
 
3079
      public short getThriftFieldId() {
3080
        return _thriftId;
3081
      }
3082
 
3083
      public String getFieldName() {
3084
        return _fieldName;
3085
      }
3086
    }
3087
 
3088
    // isset id assignments
3089
 
3090
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3091
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
3092
          new StructMetaData(TType.STRUCT, Transaction.class)));
3093
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
3094
          new FieldValueMetaData(TType.STRUCT)));
3095
    }});
3096
 
3097
    static {
3098
      FieldMetaData.addStructMetaDataMap(getTransaction_result.class, metaDataMap);
3099
    }
3100
 
3101
    public getTransaction_result() {
3102
    }
3103
 
3104
    public getTransaction_result(
3105
      Transaction success,
3106
      TransactionServiceException ex)
3107
    {
3108
      this();
3109
      this.success = success;
3110
      this.ex = ex;
3111
    }
3112
 
3113
    /**
3114
     * Performs a deep copy on <i>other</i>.
3115
     */
3116
    public getTransaction_result(getTransaction_result other) {
3117
      if (other.isSetSuccess()) {
3118
        this.success = new Transaction(other.success);
3119
      }
3120
      if (other.isSetEx()) {
3121
        this.ex = new TransactionServiceException(other.ex);
3122
      }
3123
    }
3124
 
3125
    public getTransaction_result deepCopy() {
3126
      return new getTransaction_result(this);
3127
    }
3128
 
3129
    @Deprecated
3130
    public getTransaction_result clone() {
3131
      return new getTransaction_result(this);
3132
    }
3133
 
3134
    public Transaction getSuccess() {
3135
      return this.success;
3136
    }
3137
 
3138
    public getTransaction_result setSuccess(Transaction success) {
3139
      this.success = success;
3140
      return this;
3141
    }
3142
 
3143
    public void unsetSuccess() {
3144
      this.success = null;
3145
    }
3146
 
3147
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
3148
    public boolean isSetSuccess() {
3149
      return this.success != null;
3150
    }
3151
 
3152
    public void setSuccessIsSet(boolean value) {
3153
      if (!value) {
3154
        this.success = null;
3155
      }
3156
    }
3157
 
3158
    public TransactionServiceException getEx() {
3159
      return this.ex;
3160
    }
3161
 
3162
    public getTransaction_result setEx(TransactionServiceException ex) {
3163
      this.ex = ex;
3164
      return this;
3165
    }
3166
 
3167
    public void unsetEx() {
3168
      this.ex = null;
3169
    }
3170
 
3171
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
3172
    public boolean isSetEx() {
3173
      return this.ex != null;
3174
    }
3175
 
3176
    public void setExIsSet(boolean value) {
3177
      if (!value) {
3178
        this.ex = null;
3179
      }
3180
    }
3181
 
3182
    public void setFieldValue(_Fields field, Object value) {
3183
      switch (field) {
3184
      case SUCCESS:
3185
        if (value == null) {
3186
          unsetSuccess();
3187
        } else {
3188
          setSuccess((Transaction)value);
3189
        }
3190
        break;
3191
 
3192
      case EX:
3193
        if (value == null) {
3194
          unsetEx();
3195
        } else {
3196
          setEx((TransactionServiceException)value);
3197
        }
3198
        break;
3199
 
3200
      }
3201
    }
3202
 
3203
    public void setFieldValue(int fieldID, Object value) {
3204
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3205
    }
3206
 
3207
    public Object getFieldValue(_Fields field) {
3208
      switch (field) {
3209
      case SUCCESS:
3210
        return getSuccess();
3211
 
3212
      case EX:
3213
        return getEx();
3214
 
3215
      }
3216
      throw new IllegalStateException();
3217
    }
3218
 
3219
    public Object getFieldValue(int fieldId) {
3220
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3221
    }
3222
 
3223
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3224
    public boolean isSet(_Fields field) {
3225
      switch (field) {
3226
      case SUCCESS:
3227
        return isSetSuccess();
3228
      case EX:
3229
        return isSetEx();
3230
      }
3231
      throw new IllegalStateException();
3232
    }
3233
 
3234
    public boolean isSet(int fieldID) {
3235
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3236
    }
3237
 
3238
    @Override
3239
    public boolean equals(Object that) {
3240
      if (that == null)
3241
        return false;
3242
      if (that instanceof getTransaction_result)
3243
        return this.equals((getTransaction_result)that);
3244
      return false;
3245
    }
3246
 
3247
    public boolean equals(getTransaction_result that) {
3248
      if (that == null)
3249
        return false;
3250
 
3251
      boolean this_present_success = true && this.isSetSuccess();
3252
      boolean that_present_success = true && that.isSetSuccess();
3253
      if (this_present_success || that_present_success) {
3254
        if (!(this_present_success && that_present_success))
3255
          return false;
3256
        if (!this.success.equals(that.success))
3257
          return false;
3258
      }
3259
 
3260
      boolean this_present_ex = true && this.isSetEx();
3261
      boolean that_present_ex = true && that.isSetEx();
3262
      if (this_present_ex || that_present_ex) {
3263
        if (!(this_present_ex && that_present_ex))
3264
          return false;
3265
        if (!this.ex.equals(that.ex))
3266
          return false;
3267
      }
3268
 
3269
      return true;
3270
    }
3271
 
3272
    @Override
3273
    public int hashCode() {
3274
      return 0;
3275
    }
3276
 
684 chandransh 3277
    public int compareTo(getTransaction_result other) {
3278
      if (!getClass().equals(other.getClass())) {
3279
        return getClass().getName().compareTo(other.getClass().getName());
3280
      }
3281
 
3282
      int lastComparison = 0;
3283
      getTransaction_result typedOther = (getTransaction_result)other;
3284
 
3285
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
3286
      if (lastComparison != 0) {
3287
        return lastComparison;
3288
      }
3289
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
3290
      if (lastComparison != 0) {
3291
        return lastComparison;
3292
      }
3293
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
3294
      if (lastComparison != 0) {
3295
        return lastComparison;
3296
      }
3297
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
3298
      if (lastComparison != 0) {
3299
        return lastComparison;
3300
      }
3301
      return 0;
3302
    }
3303
 
68 ashish 3304
    public void read(TProtocol iprot) throws TException {
3305
      TField field;
3306
      iprot.readStructBegin();
3307
      while (true)
3308
      {
3309
        field = iprot.readFieldBegin();
3310
        if (field.type == TType.STOP) { 
3311
          break;
3312
        }
3313
        _Fields fieldId = _Fields.findByThriftId(field.id);
3314
        if (fieldId == null) {
3315
          TProtocolUtil.skip(iprot, field.type);
3316
        } else {
3317
          switch (fieldId) {
3318
            case SUCCESS:
3319
              if (field.type == TType.STRUCT) {
3320
                this.success = new Transaction();
3321
                this.success.read(iprot);
3322
              } else { 
3323
                TProtocolUtil.skip(iprot, field.type);
3324
              }
3325
              break;
3326
            case EX:
3327
              if (field.type == TType.STRUCT) {
3328
                this.ex = new TransactionServiceException();
3329
                this.ex.read(iprot);
3330
              } else { 
3331
                TProtocolUtil.skip(iprot, field.type);
3332
              }
3333
              break;
3334
          }
3335
          iprot.readFieldEnd();
3336
        }
3337
      }
3338
      iprot.readStructEnd();
3339
      validate();
3340
    }
3341
 
3342
    public void write(TProtocol oprot) throws TException {
3343
      oprot.writeStructBegin(STRUCT_DESC);
3344
 
3345
      if (this.isSetSuccess()) {
3346
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
3347
        this.success.write(oprot);
3348
        oprot.writeFieldEnd();
3349
      } else if (this.isSetEx()) {
3350
        oprot.writeFieldBegin(EX_FIELD_DESC);
3351
        this.ex.write(oprot);
3352
        oprot.writeFieldEnd();
3353
      }
3354
      oprot.writeFieldStop();
3355
      oprot.writeStructEnd();
3356
    }
3357
 
3358
    @Override
3359
    public String toString() {
3360
      StringBuilder sb = new StringBuilder("getTransaction_result(");
3361
      boolean first = true;
3362
 
3363
      sb.append("success:");
3364
      if (this.success == null) {
3365
        sb.append("null");
3366
      } else {
3367
        sb.append(this.success);
3368
      }
3369
      first = false;
3370
      if (!first) sb.append(", ");
3371
      sb.append("ex:");
3372
      if (this.ex == null) {
3373
        sb.append("null");
3374
      } else {
3375
        sb.append(this.ex);
3376
      }
3377
      first = false;
3378
      sb.append(")");
3379
      return sb.toString();
3380
    }
3381
 
3382
    public void validate() throws TException {
3383
      // check for required fields
3384
    }
3385
 
3386
  }
3387
 
3388
  public static class getTransactionsForCustomer_args implements TBase<getTransactionsForCustomer_args._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionsForCustomer_args>   {
3389
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionsForCustomer_args");
3390
 
3391
    private static final TField CUSTOMER_ID_FIELD_DESC = new TField("customerId", TType.I64, (short)1);
132 ashish 3392
    private static final TField FROM_DATE_FIELD_DESC = new TField("from_date", TType.I64, (short)2);
3393
    private static final TField TO_DATE_FIELD_DESC = new TField("to_date", TType.I64, (short)3);
68 ashish 3394
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)4);
3395
 
3396
    private long customerId;
132 ashish 3397
    private long from_date;
3398
    private long to_date;
68 ashish 3399
    private TransactionStatus status;
3400
 
3401
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3402
    public enum _Fields implements TFieldIdEnum {
3403
      CUSTOMER_ID((short)1, "customerId"),
132 ashish 3404
      FROM_DATE((short)2, "from_date"),
3405
      TO_DATE((short)3, "to_date"),
68 ashish 3406
      /**
3407
       * 
3408
       * @see TransactionStatus
3409
       */
3410
      STATUS((short)4, "status");
3411
 
3412
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3413
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3414
 
3415
      static {
3416
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3417
          byId.put((int)field._thriftId, field);
3418
          byName.put(field.getFieldName(), field);
3419
        }
3420
      }
3421
 
3422
      /**
3423
       * Find the _Fields constant that matches fieldId, or null if its not found.
3424
       */
3425
      public static _Fields findByThriftId(int fieldId) {
3426
        return byId.get(fieldId);
3427
      }
3428
 
3429
      /**
3430
       * Find the _Fields constant that matches fieldId, throwing an exception
3431
       * if it is not found.
3432
       */
3433
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3434
        _Fields fields = findByThriftId(fieldId);
3435
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3436
        return fields;
3437
      }
3438
 
3439
      /**
3440
       * Find the _Fields constant that matches name, or null if its not found.
3441
       */
3442
      public static _Fields findByName(String name) {
3443
        return byName.get(name);
3444
      }
3445
 
3446
      private final short _thriftId;
3447
      private final String _fieldName;
3448
 
3449
      _Fields(short thriftId, String fieldName) {
3450
        _thriftId = thriftId;
3451
        _fieldName = fieldName;
3452
      }
3453
 
3454
      public short getThriftFieldId() {
3455
        return _thriftId;
3456
      }
3457
 
3458
      public String getFieldName() {
3459
        return _fieldName;
3460
      }
3461
    }
3462
 
3463
    // isset id assignments
3464
    private static final int __CUSTOMERID_ISSET_ID = 0;
132 ashish 3465
    private static final int __FROM_DATE_ISSET_ID = 1;
3466
    private static final int __TO_DATE_ISSET_ID = 2;
68 ashish 3467
    private BitSet __isset_bit_vector = new BitSet(3);
3468
 
3469
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3470
      put(_Fields.CUSTOMER_ID, new FieldMetaData("customerId", TFieldRequirementType.DEFAULT, 
3471
          new FieldValueMetaData(TType.I64)));
132 ashish 3472
      put(_Fields.FROM_DATE, new FieldMetaData("from_date", TFieldRequirementType.DEFAULT, 
68 ashish 3473
          new FieldValueMetaData(TType.I64)));
132 ashish 3474
      put(_Fields.TO_DATE, new FieldMetaData("to_date", TFieldRequirementType.DEFAULT, 
68 ashish 3475
          new FieldValueMetaData(TType.I64)));
3476
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
3477
          new EnumMetaData(TType.ENUM, TransactionStatus.class)));
3478
    }});
3479
 
3480
    static {
3481
      FieldMetaData.addStructMetaDataMap(getTransactionsForCustomer_args.class, metaDataMap);
3482
    }
3483
 
3484
    public getTransactionsForCustomer_args() {
3485
    }
3486
 
3487
    public getTransactionsForCustomer_args(
3488
      long customerId,
132 ashish 3489
      long from_date,
3490
      long to_date,
68 ashish 3491
      TransactionStatus status)
3492
    {
3493
      this();
3494
      this.customerId = customerId;
3495
      setCustomerIdIsSet(true);
132 ashish 3496
      this.from_date = from_date;
3497
      setFrom_dateIsSet(true);
3498
      this.to_date = to_date;
3499
      setTo_dateIsSet(true);
68 ashish 3500
      this.status = status;
3501
    }
3502
 
3503
    /**
3504
     * Performs a deep copy on <i>other</i>.
3505
     */
3506
    public getTransactionsForCustomer_args(getTransactionsForCustomer_args other) {
3507
      __isset_bit_vector.clear();
3508
      __isset_bit_vector.or(other.__isset_bit_vector);
3509
      this.customerId = other.customerId;
132 ashish 3510
      this.from_date = other.from_date;
3511
      this.to_date = other.to_date;
68 ashish 3512
      if (other.isSetStatus()) {
3513
        this.status = other.status;
3514
      }
3515
    }
3516
 
3517
    public getTransactionsForCustomer_args deepCopy() {
3518
      return new getTransactionsForCustomer_args(this);
3519
    }
3520
 
3521
    @Deprecated
3522
    public getTransactionsForCustomer_args clone() {
3523
      return new getTransactionsForCustomer_args(this);
3524
    }
3525
 
3526
    public long getCustomerId() {
3527
      return this.customerId;
3528
    }
3529
 
3530
    public getTransactionsForCustomer_args setCustomerId(long customerId) {
3531
      this.customerId = customerId;
3532
      setCustomerIdIsSet(true);
3533
      return this;
3534
    }
3535
 
3536
    public void unsetCustomerId() {
3537
      __isset_bit_vector.clear(__CUSTOMERID_ISSET_ID);
3538
    }
3539
 
3540
    /** Returns true if field customerId is set (has been asigned a value) and false otherwise */
3541
    public boolean isSetCustomerId() {
3542
      return __isset_bit_vector.get(__CUSTOMERID_ISSET_ID);
3543
    }
3544
 
3545
    public void setCustomerIdIsSet(boolean value) {
3546
      __isset_bit_vector.set(__CUSTOMERID_ISSET_ID, value);
3547
    }
3548
 
132 ashish 3549
    public long getFrom_date() {
3550
      return this.from_date;
68 ashish 3551
    }
3552
 
132 ashish 3553
    public getTransactionsForCustomer_args setFrom_date(long from_date) {
3554
      this.from_date = from_date;
3555
      setFrom_dateIsSet(true);
68 ashish 3556
      return this;
3557
    }
3558
 
132 ashish 3559
    public void unsetFrom_date() {
3560
      __isset_bit_vector.clear(__FROM_DATE_ISSET_ID);
68 ashish 3561
    }
3562
 
132 ashish 3563
    /** Returns true if field from_date is set (has been asigned a value) and false otherwise */
3564
    public boolean isSetFrom_date() {
3565
      return __isset_bit_vector.get(__FROM_DATE_ISSET_ID);
68 ashish 3566
    }
3567
 
132 ashish 3568
    public void setFrom_dateIsSet(boolean value) {
3569
      __isset_bit_vector.set(__FROM_DATE_ISSET_ID, value);
68 ashish 3570
    }
3571
 
132 ashish 3572
    public long getTo_date() {
3573
      return this.to_date;
68 ashish 3574
    }
3575
 
132 ashish 3576
    public getTransactionsForCustomer_args setTo_date(long to_date) {
3577
      this.to_date = to_date;
3578
      setTo_dateIsSet(true);
68 ashish 3579
      return this;
3580
    }
3581
 
132 ashish 3582
    public void unsetTo_date() {
3583
      __isset_bit_vector.clear(__TO_DATE_ISSET_ID);
68 ashish 3584
    }
3585
 
132 ashish 3586
    /** Returns true if field to_date is set (has been asigned a value) and false otherwise */
3587
    public boolean isSetTo_date() {
3588
      return __isset_bit_vector.get(__TO_DATE_ISSET_ID);
68 ashish 3589
    }
3590
 
132 ashish 3591
    public void setTo_dateIsSet(boolean value) {
3592
      __isset_bit_vector.set(__TO_DATE_ISSET_ID, value);
68 ashish 3593
    }
3594
 
3595
    /**
3596
     * 
3597
     * @see TransactionStatus
3598
     */
3599
    public TransactionStatus getStatus() {
3600
      return this.status;
3601
    }
3602
 
3603
    /**
3604
     * 
3605
     * @see TransactionStatus
3606
     */
3607
    public getTransactionsForCustomer_args setStatus(TransactionStatus status) {
3608
      this.status = status;
3609
      return this;
3610
    }
3611
 
3612
    public void unsetStatus() {
3613
      this.status = null;
3614
    }
3615
 
3616
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
3617
    public boolean isSetStatus() {
3618
      return this.status != null;
3619
    }
3620
 
3621
    public void setStatusIsSet(boolean value) {
3622
      if (!value) {
3623
        this.status = null;
3624
      }
3625
    }
3626
 
3627
    public void setFieldValue(_Fields field, Object value) {
3628
      switch (field) {
3629
      case CUSTOMER_ID:
3630
        if (value == null) {
3631
          unsetCustomerId();
3632
        } else {
3633
          setCustomerId((Long)value);
3634
        }
3635
        break;
3636
 
132 ashish 3637
      case FROM_DATE:
68 ashish 3638
        if (value == null) {
132 ashish 3639
          unsetFrom_date();
68 ashish 3640
        } else {
132 ashish 3641
          setFrom_date((Long)value);
68 ashish 3642
        }
3643
        break;
3644
 
132 ashish 3645
      case TO_DATE:
68 ashish 3646
        if (value == null) {
132 ashish 3647
          unsetTo_date();
68 ashish 3648
        } else {
132 ashish 3649
          setTo_date((Long)value);
68 ashish 3650
        }
3651
        break;
3652
 
3653
      case STATUS:
3654
        if (value == null) {
3655
          unsetStatus();
3656
        } else {
3657
          setStatus((TransactionStatus)value);
3658
        }
3659
        break;
3660
 
3661
      }
3662
    }
3663
 
3664
    public void setFieldValue(int fieldID, Object value) {
3665
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3666
    }
3667
 
3668
    public Object getFieldValue(_Fields field) {
3669
      switch (field) {
3670
      case CUSTOMER_ID:
3671
        return new Long(getCustomerId());
3672
 
132 ashish 3673
      case FROM_DATE:
3674
        return new Long(getFrom_date());
68 ashish 3675
 
132 ashish 3676
      case TO_DATE:
3677
        return new Long(getTo_date());
68 ashish 3678
 
3679
      case STATUS:
3680
        return getStatus();
3681
 
3682
      }
3683
      throw new IllegalStateException();
3684
    }
3685
 
3686
    public Object getFieldValue(int fieldId) {
3687
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3688
    }
3689
 
3690
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3691
    public boolean isSet(_Fields field) {
3692
      switch (field) {
3693
      case CUSTOMER_ID:
3694
        return isSetCustomerId();
132 ashish 3695
      case FROM_DATE:
3696
        return isSetFrom_date();
3697
      case TO_DATE:
3698
        return isSetTo_date();
68 ashish 3699
      case STATUS:
3700
        return isSetStatus();
3701
      }
3702
      throw new IllegalStateException();
3703
    }
3704
 
3705
    public boolean isSet(int fieldID) {
3706
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3707
    }
3708
 
3709
    @Override
3710
    public boolean equals(Object that) {
3711
      if (that == null)
3712
        return false;
3713
      if (that instanceof getTransactionsForCustomer_args)
3714
        return this.equals((getTransactionsForCustomer_args)that);
3715
      return false;
3716
    }
3717
 
3718
    public boolean equals(getTransactionsForCustomer_args that) {
3719
      if (that == null)
3720
        return false;
3721
 
3722
      boolean this_present_customerId = true;
3723
      boolean that_present_customerId = true;
3724
      if (this_present_customerId || that_present_customerId) {
3725
        if (!(this_present_customerId && that_present_customerId))
3726
          return false;
3727
        if (this.customerId != that.customerId)
3728
          return false;
3729
      }
3730
 
132 ashish 3731
      boolean this_present_from_date = true;
3732
      boolean that_present_from_date = true;
3733
      if (this_present_from_date || that_present_from_date) {
3734
        if (!(this_present_from_date && that_present_from_date))
68 ashish 3735
          return false;
132 ashish 3736
        if (this.from_date != that.from_date)
68 ashish 3737
          return false;
3738
      }
3739
 
132 ashish 3740
      boolean this_present_to_date = true;
3741
      boolean that_present_to_date = true;
3742
      if (this_present_to_date || that_present_to_date) {
3743
        if (!(this_present_to_date && that_present_to_date))
68 ashish 3744
          return false;
132 ashish 3745
        if (this.to_date != that.to_date)
68 ashish 3746
          return false;
3747
      }
3748
 
3749
      boolean this_present_status = true && this.isSetStatus();
3750
      boolean that_present_status = true && that.isSetStatus();
3751
      if (this_present_status || that_present_status) {
3752
        if (!(this_present_status && that_present_status))
3753
          return false;
3754
        if (!this.status.equals(that.status))
3755
          return false;
3756
      }
3757
 
3758
      return true;
3759
    }
3760
 
3761
    @Override
3762
    public int hashCode() {
3763
      return 0;
3764
    }
3765
 
3766
    public int compareTo(getTransactionsForCustomer_args other) {
3767
      if (!getClass().equals(other.getClass())) {
3768
        return getClass().getName().compareTo(other.getClass().getName());
3769
      }
3770
 
3771
      int lastComparison = 0;
3772
      getTransactionsForCustomer_args typedOther = (getTransactionsForCustomer_args)other;
3773
 
3774
      lastComparison = Boolean.valueOf(isSetCustomerId()).compareTo(isSetCustomerId());
3775
      if (lastComparison != 0) {
3776
        return lastComparison;
3777
      }
3778
      lastComparison = TBaseHelper.compareTo(customerId, typedOther.customerId);
3779
      if (lastComparison != 0) {
3780
        return lastComparison;
3781
      }
132 ashish 3782
      lastComparison = Boolean.valueOf(isSetFrom_date()).compareTo(isSetFrom_date());
68 ashish 3783
      if (lastComparison != 0) {
3784
        return lastComparison;
3785
      }
132 ashish 3786
      lastComparison = TBaseHelper.compareTo(from_date, typedOther.from_date);
68 ashish 3787
      if (lastComparison != 0) {
3788
        return lastComparison;
3789
      }
132 ashish 3790
      lastComparison = Boolean.valueOf(isSetTo_date()).compareTo(isSetTo_date());
68 ashish 3791
      if (lastComparison != 0) {
3792
        return lastComparison;
3793
      }
132 ashish 3794
      lastComparison = TBaseHelper.compareTo(to_date, typedOther.to_date);
68 ashish 3795
      if (lastComparison != 0) {
3796
        return lastComparison;
3797
      }
3798
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
3799
      if (lastComparison != 0) {
3800
        return lastComparison;
3801
      }
3802
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
3803
      if (lastComparison != 0) {
3804
        return lastComparison;
3805
      }
3806
      return 0;
3807
    }
3808
 
3809
    public void read(TProtocol iprot) throws TException {
3810
      TField field;
3811
      iprot.readStructBegin();
3812
      while (true)
3813
      {
3814
        field = iprot.readFieldBegin();
3815
        if (field.type == TType.STOP) { 
3816
          break;
3817
        }
3818
        _Fields fieldId = _Fields.findByThriftId(field.id);
3819
        if (fieldId == null) {
3820
          TProtocolUtil.skip(iprot, field.type);
3821
        } else {
3822
          switch (fieldId) {
3823
            case CUSTOMER_ID:
3824
              if (field.type == TType.I64) {
3825
                this.customerId = iprot.readI64();
3826
                setCustomerIdIsSet(true);
3827
              } else { 
3828
                TProtocolUtil.skip(iprot, field.type);
3829
              }
3830
              break;
132 ashish 3831
            case FROM_DATE:
68 ashish 3832
              if (field.type == TType.I64) {
132 ashish 3833
                this.from_date = iprot.readI64();
3834
                setFrom_dateIsSet(true);
68 ashish 3835
              } else { 
3836
                TProtocolUtil.skip(iprot, field.type);
3837
              }
3838
              break;
132 ashish 3839
            case TO_DATE:
68 ashish 3840
              if (field.type == TType.I64) {
132 ashish 3841
                this.to_date = iprot.readI64();
3842
                setTo_dateIsSet(true);
68 ashish 3843
              } else { 
3844
                TProtocolUtil.skip(iprot, field.type);
3845
              }
3846
              break;
3847
            case STATUS:
3848
              if (field.type == TType.I32) {
3849
                this.status = TransactionStatus.findByValue(iprot.readI32());
3850
              } else { 
3851
                TProtocolUtil.skip(iprot, field.type);
3852
              }
3853
              break;
3854
          }
3855
          iprot.readFieldEnd();
3856
        }
3857
      }
3858
      iprot.readStructEnd();
3859
      validate();
3860
    }
3861
 
3862
    public void write(TProtocol oprot) throws TException {
3863
      validate();
3864
 
3865
      oprot.writeStructBegin(STRUCT_DESC);
3866
      oprot.writeFieldBegin(CUSTOMER_ID_FIELD_DESC);
3867
      oprot.writeI64(this.customerId);
3868
      oprot.writeFieldEnd();
132 ashish 3869
      oprot.writeFieldBegin(FROM_DATE_FIELD_DESC);
3870
      oprot.writeI64(this.from_date);
68 ashish 3871
      oprot.writeFieldEnd();
132 ashish 3872
      oprot.writeFieldBegin(TO_DATE_FIELD_DESC);
3873
      oprot.writeI64(this.to_date);
68 ashish 3874
      oprot.writeFieldEnd();
3875
      if (this.status != null) {
3876
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
3877
        oprot.writeI32(this.status.getValue());
3878
        oprot.writeFieldEnd();
3879
      }
3880
      oprot.writeFieldStop();
3881
      oprot.writeStructEnd();
3882
    }
3883
 
3884
    @Override
3885
    public String toString() {
3886
      StringBuilder sb = new StringBuilder("getTransactionsForCustomer_args(");
3887
      boolean first = true;
3888
 
3889
      sb.append("customerId:");
3890
      sb.append(this.customerId);
3891
      first = false;
3892
      if (!first) sb.append(", ");
132 ashish 3893
      sb.append("from_date:");
3894
      sb.append(this.from_date);
68 ashish 3895
      first = false;
3896
      if (!first) sb.append(", ");
132 ashish 3897
      sb.append("to_date:");
3898
      sb.append(this.to_date);
68 ashish 3899
      first = false;
3900
      if (!first) sb.append(", ");
3901
      sb.append("status:");
3902
      if (this.status == null) {
3903
        sb.append("null");
3904
      } else {
3905
        String status_name = status.name();
3906
        if (status_name != null) {
3907
          sb.append(status_name);
3908
          sb.append(" (");
3909
        }
3910
        sb.append(this.status);
3911
        if (status_name != null) {
3912
          sb.append(")");
3913
        }
3914
      }
3915
      first = false;
3916
      sb.append(")");
3917
      return sb.toString();
3918
    }
3919
 
3920
    public void validate() throws TException {
3921
      // check for required fields
3922
    }
3923
 
3924
  }
3925
 
684 chandransh 3926
  public static class getTransactionsForCustomer_result implements TBase<getTransactionsForCustomer_result._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionsForCustomer_result>   {
68 ashish 3927
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionsForCustomer_result");
3928
 
3929
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
3930
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
3931
 
3932
    private List<Transaction> success;
3933
    private TransactionServiceException ex;
3934
 
3935
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3936
    public enum _Fields implements TFieldIdEnum {
3937
      SUCCESS((short)0, "success"),
3938
      EX((short)1, "ex");
3939
 
3940
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3941
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3942
 
3943
      static {
3944
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3945
          byId.put((int)field._thriftId, field);
3946
          byName.put(field.getFieldName(), field);
3947
        }
3948
      }
3949
 
3950
      /**
3951
       * Find the _Fields constant that matches fieldId, or null if its not found.
3952
       */
3953
      public static _Fields findByThriftId(int fieldId) {
3954
        return byId.get(fieldId);
3955
      }
3956
 
3957
      /**
3958
       * Find the _Fields constant that matches fieldId, throwing an exception
3959
       * if it is not found.
3960
       */
3961
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3962
        _Fields fields = findByThriftId(fieldId);
3963
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3964
        return fields;
3965
      }
3966
 
3967
      /**
3968
       * Find the _Fields constant that matches name, or null if its not found.
3969
       */
3970
      public static _Fields findByName(String name) {
3971
        return byName.get(name);
3972
      }
3973
 
3974
      private final short _thriftId;
3975
      private final String _fieldName;
3976
 
3977
      _Fields(short thriftId, String fieldName) {
3978
        _thriftId = thriftId;
3979
        _fieldName = fieldName;
3980
      }
3981
 
3982
      public short getThriftFieldId() {
3983
        return _thriftId;
3984
      }
3985
 
3986
      public String getFieldName() {
3987
        return _fieldName;
3988
      }
3989
    }
3990
 
3991
    // isset id assignments
3992
 
3993
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3994
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
3995
          new ListMetaData(TType.LIST, 
3996
              new StructMetaData(TType.STRUCT, Transaction.class))));
3997
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
3998
          new FieldValueMetaData(TType.STRUCT)));
3999
    }});
4000
 
4001
    static {
4002
      FieldMetaData.addStructMetaDataMap(getTransactionsForCustomer_result.class, metaDataMap);
4003
    }
4004
 
4005
    public getTransactionsForCustomer_result() {
4006
    }
4007
 
4008
    public getTransactionsForCustomer_result(
4009
      List<Transaction> success,
4010
      TransactionServiceException ex)
4011
    {
4012
      this();
4013
      this.success = success;
4014
      this.ex = ex;
4015
    }
4016
 
4017
    /**
4018
     * Performs a deep copy on <i>other</i>.
4019
     */
4020
    public getTransactionsForCustomer_result(getTransactionsForCustomer_result other) {
4021
      if (other.isSetSuccess()) {
4022
        List<Transaction> __this__success = new ArrayList<Transaction>();
4023
        for (Transaction other_element : other.success) {
4024
          __this__success.add(new Transaction(other_element));
4025
        }
4026
        this.success = __this__success;
4027
      }
4028
      if (other.isSetEx()) {
4029
        this.ex = new TransactionServiceException(other.ex);
4030
      }
4031
    }
4032
 
4033
    public getTransactionsForCustomer_result deepCopy() {
4034
      return new getTransactionsForCustomer_result(this);
4035
    }
4036
 
4037
    @Deprecated
4038
    public getTransactionsForCustomer_result clone() {
4039
      return new getTransactionsForCustomer_result(this);
4040
    }
4041
 
4042
    public int getSuccessSize() {
4043
      return (this.success == null) ? 0 : this.success.size();
4044
    }
4045
 
4046
    public java.util.Iterator<Transaction> getSuccessIterator() {
4047
      return (this.success == null) ? null : this.success.iterator();
4048
    }
4049
 
4050
    public void addToSuccess(Transaction elem) {
4051
      if (this.success == null) {
4052
        this.success = new ArrayList<Transaction>();
4053
      }
4054
      this.success.add(elem);
4055
    }
4056
 
4057
    public List<Transaction> getSuccess() {
4058
      return this.success;
4059
    }
4060
 
4061
    public getTransactionsForCustomer_result setSuccess(List<Transaction> success) {
4062
      this.success = success;
4063
      return this;
4064
    }
4065
 
4066
    public void unsetSuccess() {
4067
      this.success = null;
4068
    }
4069
 
4070
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
4071
    public boolean isSetSuccess() {
4072
      return this.success != null;
4073
    }
4074
 
4075
    public void setSuccessIsSet(boolean value) {
4076
      if (!value) {
4077
        this.success = null;
4078
      }
4079
    }
4080
 
4081
    public TransactionServiceException getEx() {
4082
      return this.ex;
4083
    }
4084
 
4085
    public getTransactionsForCustomer_result setEx(TransactionServiceException ex) {
4086
      this.ex = ex;
4087
      return this;
4088
    }
4089
 
4090
    public void unsetEx() {
4091
      this.ex = null;
4092
    }
4093
 
4094
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
4095
    public boolean isSetEx() {
4096
      return this.ex != null;
4097
    }
4098
 
4099
    public void setExIsSet(boolean value) {
4100
      if (!value) {
4101
        this.ex = null;
4102
      }
4103
    }
4104
 
4105
    public void setFieldValue(_Fields field, Object value) {
4106
      switch (field) {
4107
      case SUCCESS:
4108
        if (value == null) {
4109
          unsetSuccess();
4110
        } else {
4111
          setSuccess((List<Transaction>)value);
4112
        }
4113
        break;
4114
 
4115
      case EX:
4116
        if (value == null) {
4117
          unsetEx();
4118
        } else {
4119
          setEx((TransactionServiceException)value);
4120
        }
4121
        break;
4122
 
4123
      }
4124
    }
4125
 
4126
    public void setFieldValue(int fieldID, Object value) {
4127
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4128
    }
4129
 
4130
    public Object getFieldValue(_Fields field) {
4131
      switch (field) {
4132
      case SUCCESS:
4133
        return getSuccess();
4134
 
4135
      case EX:
4136
        return getEx();
4137
 
4138
      }
4139
      throw new IllegalStateException();
4140
    }
4141
 
4142
    public Object getFieldValue(int fieldId) {
4143
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4144
    }
4145
 
4146
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4147
    public boolean isSet(_Fields field) {
4148
      switch (field) {
4149
      case SUCCESS:
4150
        return isSetSuccess();
4151
      case EX:
4152
        return isSetEx();
4153
      }
4154
      throw new IllegalStateException();
4155
    }
4156
 
4157
    public boolean isSet(int fieldID) {
4158
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4159
    }
4160
 
4161
    @Override
4162
    public boolean equals(Object that) {
4163
      if (that == null)
4164
        return false;
4165
      if (that instanceof getTransactionsForCustomer_result)
4166
        return this.equals((getTransactionsForCustomer_result)that);
4167
      return false;
4168
    }
4169
 
4170
    public boolean equals(getTransactionsForCustomer_result that) {
4171
      if (that == null)
4172
        return false;
4173
 
4174
      boolean this_present_success = true && this.isSetSuccess();
4175
      boolean that_present_success = true && that.isSetSuccess();
4176
      if (this_present_success || that_present_success) {
4177
        if (!(this_present_success && that_present_success))
4178
          return false;
4179
        if (!this.success.equals(that.success))
4180
          return false;
4181
      }
4182
 
4183
      boolean this_present_ex = true && this.isSetEx();
4184
      boolean that_present_ex = true && that.isSetEx();
4185
      if (this_present_ex || that_present_ex) {
4186
        if (!(this_present_ex && that_present_ex))
4187
          return false;
4188
        if (!this.ex.equals(that.ex))
4189
          return false;
4190
      }
4191
 
4192
      return true;
4193
    }
4194
 
4195
    @Override
4196
    public int hashCode() {
4197
      return 0;
4198
    }
4199
 
684 chandransh 4200
    public int compareTo(getTransactionsForCustomer_result other) {
4201
      if (!getClass().equals(other.getClass())) {
4202
        return getClass().getName().compareTo(other.getClass().getName());
4203
      }
4204
 
4205
      int lastComparison = 0;
4206
      getTransactionsForCustomer_result typedOther = (getTransactionsForCustomer_result)other;
4207
 
4208
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
4209
      if (lastComparison != 0) {
4210
        return lastComparison;
4211
      }
4212
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
4213
      if (lastComparison != 0) {
4214
        return lastComparison;
4215
      }
4216
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
4217
      if (lastComparison != 0) {
4218
        return lastComparison;
4219
      }
4220
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
4221
      if (lastComparison != 0) {
4222
        return lastComparison;
4223
      }
4224
      return 0;
4225
    }
4226
 
68 ashish 4227
    public void read(TProtocol iprot) throws TException {
4228
      TField field;
4229
      iprot.readStructBegin();
4230
      while (true)
4231
      {
4232
        field = iprot.readFieldBegin();
4233
        if (field.type == TType.STOP) { 
4234
          break;
4235
        }
4236
        _Fields fieldId = _Fields.findByThriftId(field.id);
4237
        if (fieldId == null) {
4238
          TProtocolUtil.skip(iprot, field.type);
4239
        } else {
4240
          switch (fieldId) {
4241
            case SUCCESS:
4242
              if (field.type == TType.LIST) {
4243
                {
684 chandransh 4244
                  TList _list8 = iprot.readListBegin();
4245
                  this.success = new ArrayList<Transaction>(_list8.size);
4246
                  for (int _i9 = 0; _i9 < _list8.size; ++_i9)
68 ashish 4247
                  {
684 chandransh 4248
                    Transaction _elem10;
4249
                    _elem10 = new Transaction();
4250
                    _elem10.read(iprot);
4251
                    this.success.add(_elem10);
68 ashish 4252
                  }
4253
                  iprot.readListEnd();
4254
                }
4255
              } else { 
4256
                TProtocolUtil.skip(iprot, field.type);
4257
              }
4258
              break;
4259
            case EX:
4260
              if (field.type == TType.STRUCT) {
4261
                this.ex = new TransactionServiceException();
4262
                this.ex.read(iprot);
4263
              } else { 
4264
                TProtocolUtil.skip(iprot, field.type);
4265
              }
4266
              break;
4267
          }
4268
          iprot.readFieldEnd();
4269
        }
4270
      }
4271
      iprot.readStructEnd();
4272
      validate();
4273
    }
4274
 
4275
    public void write(TProtocol oprot) throws TException {
4276
      oprot.writeStructBegin(STRUCT_DESC);
4277
 
4278
      if (this.isSetSuccess()) {
4279
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
4280
        {
4281
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
684 chandransh 4282
          for (Transaction _iter11 : this.success)
68 ashish 4283
          {
684 chandransh 4284
            _iter11.write(oprot);
68 ashish 4285
          }
4286
          oprot.writeListEnd();
4287
        }
4288
        oprot.writeFieldEnd();
4289
      } else if (this.isSetEx()) {
4290
        oprot.writeFieldBegin(EX_FIELD_DESC);
4291
        this.ex.write(oprot);
4292
        oprot.writeFieldEnd();
4293
      }
4294
      oprot.writeFieldStop();
4295
      oprot.writeStructEnd();
4296
    }
4297
 
4298
    @Override
4299
    public String toString() {
4300
      StringBuilder sb = new StringBuilder("getTransactionsForCustomer_result(");
4301
      boolean first = true;
4302
 
4303
      sb.append("success:");
4304
      if (this.success == null) {
4305
        sb.append("null");
4306
      } else {
4307
        sb.append(this.success);
4308
      }
4309
      first = false;
4310
      if (!first) sb.append(", ");
4311
      sb.append("ex:");
4312
      if (this.ex == null) {
4313
        sb.append("null");
4314
      } else {
4315
        sb.append(this.ex);
4316
      }
4317
      first = false;
4318
      sb.append(")");
4319
      return sb.toString();
4320
    }
4321
 
4322
    public void validate() throws TException {
4323
      // check for required fields
4324
    }
4325
 
4326
  }
4327
 
132 ashish 4328
  public static class getTransactionsForShoppingCartId_args implements TBase<getTransactionsForShoppingCartId_args._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionsForShoppingCartId_args>   {
4329
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionsForShoppingCartId_args");
4330
 
4331
    private static final TField SHOPPING_CART_ID_FIELD_DESC = new TField("shoppingCartId", TType.I64, (short)1);
4332
 
4333
    private long shoppingCartId;
4334
 
4335
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4336
    public enum _Fields implements TFieldIdEnum {
4337
      SHOPPING_CART_ID((short)1, "shoppingCartId");
4338
 
4339
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4340
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4341
 
4342
      static {
4343
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4344
          byId.put((int)field._thriftId, field);
4345
          byName.put(field.getFieldName(), field);
4346
        }
4347
      }
4348
 
4349
      /**
4350
       * Find the _Fields constant that matches fieldId, or null if its not found.
4351
       */
4352
      public static _Fields findByThriftId(int fieldId) {
4353
        return byId.get(fieldId);
4354
      }
4355
 
4356
      /**
4357
       * Find the _Fields constant that matches fieldId, throwing an exception
4358
       * if it is not found.
4359
       */
4360
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4361
        _Fields fields = findByThriftId(fieldId);
4362
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4363
        return fields;
4364
      }
4365
 
4366
      /**
4367
       * Find the _Fields constant that matches name, or null if its not found.
4368
       */
4369
      public static _Fields findByName(String name) {
4370
        return byName.get(name);
4371
      }
4372
 
4373
      private final short _thriftId;
4374
      private final String _fieldName;
4375
 
4376
      _Fields(short thriftId, String fieldName) {
4377
        _thriftId = thriftId;
4378
        _fieldName = fieldName;
4379
      }
4380
 
4381
      public short getThriftFieldId() {
4382
        return _thriftId;
4383
      }
4384
 
4385
      public String getFieldName() {
4386
        return _fieldName;
4387
      }
4388
    }
4389
 
4390
    // isset id assignments
4391
    private static final int __SHOPPINGCARTID_ISSET_ID = 0;
4392
    private BitSet __isset_bit_vector = new BitSet(1);
4393
 
4394
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
4395
      put(_Fields.SHOPPING_CART_ID, new FieldMetaData("shoppingCartId", TFieldRequirementType.DEFAULT, 
4396
          new FieldValueMetaData(TType.I64)));
4397
    }});
4398
 
4399
    static {
4400
      FieldMetaData.addStructMetaDataMap(getTransactionsForShoppingCartId_args.class, metaDataMap);
4401
    }
4402
 
4403
    public getTransactionsForShoppingCartId_args() {
4404
    }
4405
 
4406
    public getTransactionsForShoppingCartId_args(
4407
      long shoppingCartId)
4408
    {
4409
      this();
4410
      this.shoppingCartId = shoppingCartId;
4411
      setShoppingCartIdIsSet(true);
4412
    }
4413
 
4414
    /**
4415
     * Performs a deep copy on <i>other</i>.
4416
     */
4417
    public getTransactionsForShoppingCartId_args(getTransactionsForShoppingCartId_args other) {
4418
      __isset_bit_vector.clear();
4419
      __isset_bit_vector.or(other.__isset_bit_vector);
4420
      this.shoppingCartId = other.shoppingCartId;
4421
    }
4422
 
4423
    public getTransactionsForShoppingCartId_args deepCopy() {
4424
      return new getTransactionsForShoppingCartId_args(this);
4425
    }
4426
 
4427
    @Deprecated
4428
    public getTransactionsForShoppingCartId_args clone() {
4429
      return new getTransactionsForShoppingCartId_args(this);
4430
    }
4431
 
4432
    public long getShoppingCartId() {
4433
      return this.shoppingCartId;
4434
    }
4435
 
4436
    public getTransactionsForShoppingCartId_args setShoppingCartId(long shoppingCartId) {
4437
      this.shoppingCartId = shoppingCartId;
4438
      setShoppingCartIdIsSet(true);
4439
      return this;
4440
    }
4441
 
4442
    public void unsetShoppingCartId() {
4443
      __isset_bit_vector.clear(__SHOPPINGCARTID_ISSET_ID);
4444
    }
4445
 
4446
    /** Returns true if field shoppingCartId is set (has been asigned a value) and false otherwise */
4447
    public boolean isSetShoppingCartId() {
4448
      return __isset_bit_vector.get(__SHOPPINGCARTID_ISSET_ID);
4449
    }
4450
 
4451
    public void setShoppingCartIdIsSet(boolean value) {
4452
      __isset_bit_vector.set(__SHOPPINGCARTID_ISSET_ID, value);
4453
    }
4454
 
4455
    public void setFieldValue(_Fields field, Object value) {
4456
      switch (field) {
4457
      case SHOPPING_CART_ID:
4458
        if (value == null) {
4459
          unsetShoppingCartId();
4460
        } else {
4461
          setShoppingCartId((Long)value);
4462
        }
4463
        break;
4464
 
4465
      }
4466
    }
4467
 
4468
    public void setFieldValue(int fieldID, Object value) {
4469
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4470
    }
4471
 
4472
    public Object getFieldValue(_Fields field) {
4473
      switch (field) {
4474
      case SHOPPING_CART_ID:
4475
        return new Long(getShoppingCartId());
4476
 
4477
      }
4478
      throw new IllegalStateException();
4479
    }
4480
 
4481
    public Object getFieldValue(int fieldId) {
4482
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4483
    }
4484
 
4485
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4486
    public boolean isSet(_Fields field) {
4487
      switch (field) {
4488
      case SHOPPING_CART_ID:
4489
        return isSetShoppingCartId();
4490
      }
4491
      throw new IllegalStateException();
4492
    }
4493
 
4494
    public boolean isSet(int fieldID) {
4495
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4496
    }
4497
 
4498
    @Override
4499
    public boolean equals(Object that) {
4500
      if (that == null)
4501
        return false;
4502
      if (that instanceof getTransactionsForShoppingCartId_args)
4503
        return this.equals((getTransactionsForShoppingCartId_args)that);
4504
      return false;
4505
    }
4506
 
4507
    public boolean equals(getTransactionsForShoppingCartId_args that) {
4508
      if (that == null)
4509
        return false;
4510
 
4511
      boolean this_present_shoppingCartId = true;
4512
      boolean that_present_shoppingCartId = true;
4513
      if (this_present_shoppingCartId || that_present_shoppingCartId) {
4514
        if (!(this_present_shoppingCartId && that_present_shoppingCartId))
4515
          return false;
4516
        if (this.shoppingCartId != that.shoppingCartId)
4517
          return false;
4518
      }
4519
 
4520
      return true;
4521
    }
4522
 
4523
    @Override
4524
    public int hashCode() {
4525
      return 0;
4526
    }
4527
 
4528
    public int compareTo(getTransactionsForShoppingCartId_args other) {
4529
      if (!getClass().equals(other.getClass())) {
4530
        return getClass().getName().compareTo(other.getClass().getName());
4531
      }
4532
 
4533
      int lastComparison = 0;
4534
      getTransactionsForShoppingCartId_args typedOther = (getTransactionsForShoppingCartId_args)other;
4535
 
4536
      lastComparison = Boolean.valueOf(isSetShoppingCartId()).compareTo(isSetShoppingCartId());
4537
      if (lastComparison != 0) {
4538
        return lastComparison;
4539
      }
4540
      lastComparison = TBaseHelper.compareTo(shoppingCartId, typedOther.shoppingCartId);
4541
      if (lastComparison != 0) {
4542
        return lastComparison;
4543
      }
4544
      return 0;
4545
    }
4546
 
4547
    public void read(TProtocol iprot) throws TException {
4548
      TField field;
4549
      iprot.readStructBegin();
4550
      while (true)
4551
      {
4552
        field = iprot.readFieldBegin();
4553
        if (field.type == TType.STOP) { 
4554
          break;
4555
        }
4556
        _Fields fieldId = _Fields.findByThriftId(field.id);
4557
        if (fieldId == null) {
4558
          TProtocolUtil.skip(iprot, field.type);
4559
        } else {
4560
          switch (fieldId) {
4561
            case SHOPPING_CART_ID:
4562
              if (field.type == TType.I64) {
4563
                this.shoppingCartId = iprot.readI64();
4564
                setShoppingCartIdIsSet(true);
4565
              } else { 
4566
                TProtocolUtil.skip(iprot, field.type);
4567
              }
4568
              break;
4569
          }
4570
          iprot.readFieldEnd();
4571
        }
4572
      }
4573
      iprot.readStructEnd();
4574
      validate();
4575
    }
4576
 
4577
    public void write(TProtocol oprot) throws TException {
4578
      validate();
4579
 
4580
      oprot.writeStructBegin(STRUCT_DESC);
4581
      oprot.writeFieldBegin(SHOPPING_CART_ID_FIELD_DESC);
4582
      oprot.writeI64(this.shoppingCartId);
4583
      oprot.writeFieldEnd();
4584
      oprot.writeFieldStop();
4585
      oprot.writeStructEnd();
4586
    }
4587
 
4588
    @Override
4589
    public String toString() {
4590
      StringBuilder sb = new StringBuilder("getTransactionsForShoppingCartId_args(");
4591
      boolean first = true;
4592
 
4593
      sb.append("shoppingCartId:");
4594
      sb.append(this.shoppingCartId);
4595
      first = false;
4596
      sb.append(")");
4597
      return sb.toString();
4598
    }
4599
 
4600
    public void validate() throws TException {
4601
      // check for required fields
4602
    }
4603
 
4604
  }
4605
 
684 chandransh 4606
  public static class getTransactionsForShoppingCartId_result implements TBase<getTransactionsForShoppingCartId_result._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionsForShoppingCartId_result>   {
132 ashish 4607
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionsForShoppingCartId_result");
4608
 
4609
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
4610
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
4611
 
4612
    private List<Transaction> success;
4613
    private TransactionServiceException ex;
4614
 
4615
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4616
    public enum _Fields implements TFieldIdEnum {
4617
      SUCCESS((short)0, "success"),
4618
      EX((short)1, "ex");
4619
 
4620
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4621
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4622
 
4623
      static {
4624
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4625
          byId.put((int)field._thriftId, field);
4626
          byName.put(field.getFieldName(), field);
4627
        }
4628
      }
4629
 
4630
      /**
4631
       * Find the _Fields constant that matches fieldId, or null if its not found.
4632
       */
4633
      public static _Fields findByThriftId(int fieldId) {
4634
        return byId.get(fieldId);
4635
      }
4636
 
4637
      /**
4638
       * Find the _Fields constant that matches fieldId, throwing an exception
4639
       * if it is not found.
4640
       */
4641
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4642
        _Fields fields = findByThriftId(fieldId);
4643
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4644
        return fields;
4645
      }
4646
 
4647
      /**
4648
       * Find the _Fields constant that matches name, or null if its not found.
4649
       */
4650
      public static _Fields findByName(String name) {
4651
        return byName.get(name);
4652
      }
4653
 
4654
      private final short _thriftId;
4655
      private final String _fieldName;
4656
 
4657
      _Fields(short thriftId, String fieldName) {
4658
        _thriftId = thriftId;
4659
        _fieldName = fieldName;
4660
      }
4661
 
4662
      public short getThriftFieldId() {
4663
        return _thriftId;
4664
      }
4665
 
4666
      public String getFieldName() {
4667
        return _fieldName;
4668
      }
4669
    }
4670
 
4671
    // isset id assignments
4672
 
4673
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
4674
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
4675
          new ListMetaData(TType.LIST, 
4676
              new StructMetaData(TType.STRUCT, Transaction.class))));
4677
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
4678
          new FieldValueMetaData(TType.STRUCT)));
4679
    }});
4680
 
4681
    static {
4682
      FieldMetaData.addStructMetaDataMap(getTransactionsForShoppingCartId_result.class, metaDataMap);
4683
    }
4684
 
4685
    public getTransactionsForShoppingCartId_result() {
4686
    }
4687
 
4688
    public getTransactionsForShoppingCartId_result(
4689
      List<Transaction> success,
4690
      TransactionServiceException ex)
4691
    {
4692
      this();
4693
      this.success = success;
4694
      this.ex = ex;
4695
    }
4696
 
4697
    /**
4698
     * Performs a deep copy on <i>other</i>.
4699
     */
4700
    public getTransactionsForShoppingCartId_result(getTransactionsForShoppingCartId_result other) {
4701
      if (other.isSetSuccess()) {
4702
        List<Transaction> __this__success = new ArrayList<Transaction>();
4703
        for (Transaction other_element : other.success) {
4704
          __this__success.add(new Transaction(other_element));
4705
        }
4706
        this.success = __this__success;
4707
      }
4708
      if (other.isSetEx()) {
4709
        this.ex = new TransactionServiceException(other.ex);
4710
      }
4711
    }
4712
 
4713
    public getTransactionsForShoppingCartId_result deepCopy() {
4714
      return new getTransactionsForShoppingCartId_result(this);
4715
    }
4716
 
4717
    @Deprecated
4718
    public getTransactionsForShoppingCartId_result clone() {
4719
      return new getTransactionsForShoppingCartId_result(this);
4720
    }
4721
 
4722
    public int getSuccessSize() {
4723
      return (this.success == null) ? 0 : this.success.size();
4724
    }
4725
 
4726
    public java.util.Iterator<Transaction> getSuccessIterator() {
4727
      return (this.success == null) ? null : this.success.iterator();
4728
    }
4729
 
4730
    public void addToSuccess(Transaction elem) {
4731
      if (this.success == null) {
4732
        this.success = new ArrayList<Transaction>();
4733
      }
4734
      this.success.add(elem);
4735
    }
4736
 
4737
    public List<Transaction> getSuccess() {
4738
      return this.success;
4739
    }
4740
 
4741
    public getTransactionsForShoppingCartId_result setSuccess(List<Transaction> success) {
4742
      this.success = success;
4743
      return this;
4744
    }
4745
 
4746
    public void unsetSuccess() {
4747
      this.success = null;
4748
    }
4749
 
4750
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
4751
    public boolean isSetSuccess() {
4752
      return this.success != null;
4753
    }
4754
 
4755
    public void setSuccessIsSet(boolean value) {
4756
      if (!value) {
4757
        this.success = null;
4758
      }
4759
    }
4760
 
4761
    public TransactionServiceException getEx() {
4762
      return this.ex;
4763
    }
4764
 
4765
    public getTransactionsForShoppingCartId_result setEx(TransactionServiceException ex) {
4766
      this.ex = ex;
4767
      return this;
4768
    }
4769
 
4770
    public void unsetEx() {
4771
      this.ex = null;
4772
    }
4773
 
4774
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
4775
    public boolean isSetEx() {
4776
      return this.ex != null;
4777
    }
4778
 
4779
    public void setExIsSet(boolean value) {
4780
      if (!value) {
4781
        this.ex = null;
4782
      }
4783
    }
4784
 
4785
    public void setFieldValue(_Fields field, Object value) {
4786
      switch (field) {
4787
      case SUCCESS:
4788
        if (value == null) {
4789
          unsetSuccess();
4790
        } else {
4791
          setSuccess((List<Transaction>)value);
4792
        }
4793
        break;
4794
 
4795
      case EX:
4796
        if (value == null) {
4797
          unsetEx();
4798
        } else {
4799
          setEx((TransactionServiceException)value);
4800
        }
4801
        break;
4802
 
4803
      }
4804
    }
4805
 
4806
    public void setFieldValue(int fieldID, Object value) {
4807
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4808
    }
4809
 
4810
    public Object getFieldValue(_Fields field) {
4811
      switch (field) {
4812
      case SUCCESS:
4813
        return getSuccess();
4814
 
4815
      case EX:
4816
        return getEx();
4817
 
4818
      }
4819
      throw new IllegalStateException();
4820
    }
4821
 
4822
    public Object getFieldValue(int fieldId) {
4823
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4824
    }
4825
 
4826
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4827
    public boolean isSet(_Fields field) {
4828
      switch (field) {
4829
      case SUCCESS:
4830
        return isSetSuccess();
4831
      case EX:
4832
        return isSetEx();
4833
      }
4834
      throw new IllegalStateException();
4835
    }
4836
 
4837
    public boolean isSet(int fieldID) {
4838
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4839
    }
4840
 
4841
    @Override
4842
    public boolean equals(Object that) {
4843
      if (that == null)
4844
        return false;
4845
      if (that instanceof getTransactionsForShoppingCartId_result)
4846
        return this.equals((getTransactionsForShoppingCartId_result)that);
4847
      return false;
4848
    }
4849
 
4850
    public boolean equals(getTransactionsForShoppingCartId_result that) {
4851
      if (that == null)
4852
        return false;
4853
 
4854
      boolean this_present_success = true && this.isSetSuccess();
4855
      boolean that_present_success = true && that.isSetSuccess();
4856
      if (this_present_success || that_present_success) {
4857
        if (!(this_present_success && that_present_success))
4858
          return false;
4859
        if (!this.success.equals(that.success))
4860
          return false;
4861
      }
4862
 
4863
      boolean this_present_ex = true && this.isSetEx();
4864
      boolean that_present_ex = true && that.isSetEx();
4865
      if (this_present_ex || that_present_ex) {
4866
        if (!(this_present_ex && that_present_ex))
4867
          return false;
4868
        if (!this.ex.equals(that.ex))
4869
          return false;
4870
      }
4871
 
4872
      return true;
4873
    }
4874
 
4875
    @Override
4876
    public int hashCode() {
4877
      return 0;
4878
    }
4879
 
684 chandransh 4880
    public int compareTo(getTransactionsForShoppingCartId_result other) {
4881
      if (!getClass().equals(other.getClass())) {
4882
        return getClass().getName().compareTo(other.getClass().getName());
4883
      }
4884
 
4885
      int lastComparison = 0;
4886
      getTransactionsForShoppingCartId_result typedOther = (getTransactionsForShoppingCartId_result)other;
4887
 
4888
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
4889
      if (lastComparison != 0) {
4890
        return lastComparison;
4891
      }
4892
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
4893
      if (lastComparison != 0) {
4894
        return lastComparison;
4895
      }
4896
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
4897
      if (lastComparison != 0) {
4898
        return lastComparison;
4899
      }
4900
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
4901
      if (lastComparison != 0) {
4902
        return lastComparison;
4903
      }
4904
      return 0;
4905
    }
4906
 
132 ashish 4907
    public void read(TProtocol iprot) throws TException {
4908
      TField field;
4909
      iprot.readStructBegin();
4910
      while (true)
4911
      {
4912
        field = iprot.readFieldBegin();
4913
        if (field.type == TType.STOP) { 
4914
          break;
4915
        }
4916
        _Fields fieldId = _Fields.findByThriftId(field.id);
4917
        if (fieldId == null) {
4918
          TProtocolUtil.skip(iprot, field.type);
4919
        } else {
4920
          switch (fieldId) {
4921
            case SUCCESS:
4922
              if (field.type == TType.LIST) {
4923
                {
684 chandransh 4924
                  TList _list12 = iprot.readListBegin();
4925
                  this.success = new ArrayList<Transaction>(_list12.size);
4926
                  for (int _i13 = 0; _i13 < _list12.size; ++_i13)
132 ashish 4927
                  {
684 chandransh 4928
                    Transaction _elem14;
4929
                    _elem14 = new Transaction();
4930
                    _elem14.read(iprot);
4931
                    this.success.add(_elem14);
132 ashish 4932
                  }
4933
                  iprot.readListEnd();
4934
                }
4935
              } else { 
4936
                TProtocolUtil.skip(iprot, field.type);
4937
              }
4938
              break;
4939
            case EX:
4940
              if (field.type == TType.STRUCT) {
4941
                this.ex = new TransactionServiceException();
4942
                this.ex.read(iprot);
4943
              } else { 
4944
                TProtocolUtil.skip(iprot, field.type);
4945
              }
4946
              break;
4947
          }
4948
          iprot.readFieldEnd();
4949
        }
4950
      }
4951
      iprot.readStructEnd();
4952
      validate();
4953
    }
4954
 
4955
    public void write(TProtocol oprot) throws TException {
4956
      oprot.writeStructBegin(STRUCT_DESC);
4957
 
4958
      if (this.isSetSuccess()) {
4959
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
4960
        {
4961
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
684 chandransh 4962
          for (Transaction _iter15 : this.success)
132 ashish 4963
          {
684 chandransh 4964
            _iter15.write(oprot);
132 ashish 4965
          }
4966
          oprot.writeListEnd();
4967
        }
4968
        oprot.writeFieldEnd();
4969
      } else if (this.isSetEx()) {
4970
        oprot.writeFieldBegin(EX_FIELD_DESC);
4971
        this.ex.write(oprot);
4972
        oprot.writeFieldEnd();
4973
      }
4974
      oprot.writeFieldStop();
4975
      oprot.writeStructEnd();
4976
    }
4977
 
4978
    @Override
4979
    public String toString() {
4980
      StringBuilder sb = new StringBuilder("getTransactionsForShoppingCartId_result(");
4981
      boolean first = true;
4982
 
4983
      sb.append("success:");
4984
      if (this.success == null) {
4985
        sb.append("null");
4986
      } else {
4987
        sb.append(this.success);
4988
      }
4989
      first = false;
4990
      if (!first) sb.append(", ");
4991
      sb.append("ex:");
4992
      if (this.ex == null) {
4993
        sb.append("null");
4994
      } else {
4995
        sb.append(this.ex);
4996
      }
4997
      first = false;
4998
      sb.append(")");
4999
      return sb.toString();
5000
    }
5001
 
5002
    public void validate() throws TException {
5003
      // check for required fields
5004
    }
5005
 
5006
  }
5007
 
68 ashish 5008
  public static class getTransactionStatus_args implements TBase<getTransactionStatus_args._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionStatus_args>   {
5009
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionStatus_args");
5010
 
5011
    private static final TField TRANSACTION_ID_FIELD_DESC = new TField("transactionId", TType.I64, (short)1);
5012
 
5013
    private long transactionId;
5014
 
5015
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5016
    public enum _Fields implements TFieldIdEnum {
5017
      TRANSACTION_ID((short)1, "transactionId");
5018
 
5019
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5020
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5021
 
5022
      static {
5023
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5024
          byId.put((int)field._thriftId, field);
5025
          byName.put(field.getFieldName(), field);
5026
        }
5027
      }
5028
 
5029
      /**
5030
       * Find the _Fields constant that matches fieldId, or null if its not found.
5031
       */
5032
      public static _Fields findByThriftId(int fieldId) {
5033
        return byId.get(fieldId);
5034
      }
5035
 
5036
      /**
5037
       * Find the _Fields constant that matches fieldId, throwing an exception
5038
       * if it is not found.
5039
       */
5040
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5041
        _Fields fields = findByThriftId(fieldId);
5042
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5043
        return fields;
5044
      }
5045
 
5046
      /**
5047
       * Find the _Fields constant that matches name, or null if its not found.
5048
       */
5049
      public static _Fields findByName(String name) {
5050
        return byName.get(name);
5051
      }
5052
 
5053
      private final short _thriftId;
5054
      private final String _fieldName;
5055
 
5056
      _Fields(short thriftId, String fieldName) {
5057
        _thriftId = thriftId;
5058
        _fieldName = fieldName;
5059
      }
5060
 
5061
      public short getThriftFieldId() {
5062
        return _thriftId;
5063
      }
5064
 
5065
      public String getFieldName() {
5066
        return _fieldName;
5067
      }
5068
    }
5069
 
5070
    // isset id assignments
5071
    private static final int __TRANSACTIONID_ISSET_ID = 0;
5072
    private BitSet __isset_bit_vector = new BitSet(1);
5073
 
5074
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
5075
      put(_Fields.TRANSACTION_ID, new FieldMetaData("transactionId", TFieldRequirementType.DEFAULT, 
5076
          new FieldValueMetaData(TType.I64)));
5077
    }});
5078
 
5079
    static {
5080
      FieldMetaData.addStructMetaDataMap(getTransactionStatus_args.class, metaDataMap);
5081
    }
5082
 
5083
    public getTransactionStatus_args() {
5084
    }
5085
 
5086
    public getTransactionStatus_args(
5087
      long transactionId)
5088
    {
5089
      this();
5090
      this.transactionId = transactionId;
5091
      setTransactionIdIsSet(true);
5092
    }
5093
 
5094
    /**
5095
     * Performs a deep copy on <i>other</i>.
5096
     */
5097
    public getTransactionStatus_args(getTransactionStatus_args other) {
5098
      __isset_bit_vector.clear();
5099
      __isset_bit_vector.or(other.__isset_bit_vector);
5100
      this.transactionId = other.transactionId;
5101
    }
5102
 
5103
    public getTransactionStatus_args deepCopy() {
5104
      return new getTransactionStatus_args(this);
5105
    }
5106
 
5107
    @Deprecated
5108
    public getTransactionStatus_args clone() {
5109
      return new getTransactionStatus_args(this);
5110
    }
5111
 
5112
    public long getTransactionId() {
5113
      return this.transactionId;
5114
    }
5115
 
5116
    public getTransactionStatus_args setTransactionId(long transactionId) {
5117
      this.transactionId = transactionId;
5118
      setTransactionIdIsSet(true);
5119
      return this;
5120
    }
5121
 
5122
    public void unsetTransactionId() {
5123
      __isset_bit_vector.clear(__TRANSACTIONID_ISSET_ID);
5124
    }
5125
 
5126
    /** Returns true if field transactionId is set (has been asigned a value) and false otherwise */
5127
    public boolean isSetTransactionId() {
5128
      return __isset_bit_vector.get(__TRANSACTIONID_ISSET_ID);
5129
    }
5130
 
5131
    public void setTransactionIdIsSet(boolean value) {
5132
      __isset_bit_vector.set(__TRANSACTIONID_ISSET_ID, value);
5133
    }
5134
 
5135
    public void setFieldValue(_Fields field, Object value) {
5136
      switch (field) {
5137
      case TRANSACTION_ID:
5138
        if (value == null) {
5139
          unsetTransactionId();
5140
        } else {
5141
          setTransactionId((Long)value);
5142
        }
5143
        break;
5144
 
5145
      }
5146
    }
5147
 
5148
    public void setFieldValue(int fieldID, Object value) {
5149
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5150
    }
5151
 
5152
    public Object getFieldValue(_Fields field) {
5153
      switch (field) {
5154
      case TRANSACTION_ID:
5155
        return new Long(getTransactionId());
5156
 
5157
      }
5158
      throw new IllegalStateException();
5159
    }
5160
 
5161
    public Object getFieldValue(int fieldId) {
5162
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5163
    }
5164
 
5165
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5166
    public boolean isSet(_Fields field) {
5167
      switch (field) {
5168
      case TRANSACTION_ID:
5169
        return isSetTransactionId();
5170
      }
5171
      throw new IllegalStateException();
5172
    }
5173
 
5174
    public boolean isSet(int fieldID) {
5175
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5176
    }
5177
 
5178
    @Override
5179
    public boolean equals(Object that) {
5180
      if (that == null)
5181
        return false;
5182
      if (that instanceof getTransactionStatus_args)
5183
        return this.equals((getTransactionStatus_args)that);
5184
      return false;
5185
    }
5186
 
5187
    public boolean equals(getTransactionStatus_args that) {
5188
      if (that == null)
5189
        return false;
5190
 
5191
      boolean this_present_transactionId = true;
5192
      boolean that_present_transactionId = true;
5193
      if (this_present_transactionId || that_present_transactionId) {
5194
        if (!(this_present_transactionId && that_present_transactionId))
5195
          return false;
5196
        if (this.transactionId != that.transactionId)
5197
          return false;
5198
      }
5199
 
5200
      return true;
5201
    }
5202
 
5203
    @Override
5204
    public int hashCode() {
5205
      return 0;
5206
    }
5207
 
5208
    public int compareTo(getTransactionStatus_args other) {
5209
      if (!getClass().equals(other.getClass())) {
5210
        return getClass().getName().compareTo(other.getClass().getName());
5211
      }
5212
 
5213
      int lastComparison = 0;
5214
      getTransactionStatus_args typedOther = (getTransactionStatus_args)other;
5215
 
5216
      lastComparison = Boolean.valueOf(isSetTransactionId()).compareTo(isSetTransactionId());
5217
      if (lastComparison != 0) {
5218
        return lastComparison;
5219
      }
5220
      lastComparison = TBaseHelper.compareTo(transactionId, typedOther.transactionId);
5221
      if (lastComparison != 0) {
5222
        return lastComparison;
5223
      }
5224
      return 0;
5225
    }
5226
 
5227
    public void read(TProtocol iprot) throws TException {
5228
      TField field;
5229
      iprot.readStructBegin();
5230
      while (true)
5231
      {
5232
        field = iprot.readFieldBegin();
5233
        if (field.type == TType.STOP) { 
5234
          break;
5235
        }
5236
        _Fields fieldId = _Fields.findByThriftId(field.id);
5237
        if (fieldId == null) {
5238
          TProtocolUtil.skip(iprot, field.type);
5239
        } else {
5240
          switch (fieldId) {
5241
            case TRANSACTION_ID:
5242
              if (field.type == TType.I64) {
5243
                this.transactionId = iprot.readI64();
5244
                setTransactionIdIsSet(true);
5245
              } else { 
5246
                TProtocolUtil.skip(iprot, field.type);
5247
              }
5248
              break;
5249
          }
5250
          iprot.readFieldEnd();
5251
        }
5252
      }
5253
      iprot.readStructEnd();
5254
      validate();
5255
    }
5256
 
5257
    public void write(TProtocol oprot) throws TException {
5258
      validate();
5259
 
5260
      oprot.writeStructBegin(STRUCT_DESC);
5261
      oprot.writeFieldBegin(TRANSACTION_ID_FIELD_DESC);
5262
      oprot.writeI64(this.transactionId);
5263
      oprot.writeFieldEnd();
5264
      oprot.writeFieldStop();
5265
      oprot.writeStructEnd();
5266
    }
5267
 
5268
    @Override
5269
    public String toString() {
5270
      StringBuilder sb = new StringBuilder("getTransactionStatus_args(");
5271
      boolean first = true;
5272
 
5273
      sb.append("transactionId:");
5274
      sb.append(this.transactionId);
5275
      first = false;
5276
      sb.append(")");
5277
      return sb.toString();
5278
    }
5279
 
5280
    public void validate() throws TException {
5281
      // check for required fields
5282
    }
5283
 
5284
  }
5285
 
5286
  public static class getTransactionStatus_result implements TBase<getTransactionStatus_result._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionStatus_result>   {
5287
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionStatus_result");
5288
 
5289
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I32, (short)0);
5290
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
5291
 
5292
    private TransactionStatus success;
5293
    private TransactionServiceException ex;
5294
 
5295
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5296
    public enum _Fields implements TFieldIdEnum {
5297
      /**
5298
       * 
5299
       * @see TransactionStatus
5300
       */
5301
      SUCCESS((short)0, "success"),
5302
      EX((short)1, "ex");
5303
 
5304
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5305
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5306
 
5307
      static {
5308
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5309
          byId.put((int)field._thriftId, field);
5310
          byName.put(field.getFieldName(), field);
5311
        }
5312
      }
5313
 
5314
      /**
5315
       * Find the _Fields constant that matches fieldId, or null if its not found.
5316
       */
5317
      public static _Fields findByThriftId(int fieldId) {
5318
        return byId.get(fieldId);
5319
      }
5320
 
5321
      /**
5322
       * Find the _Fields constant that matches fieldId, throwing an exception
5323
       * if it is not found.
5324
       */
5325
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5326
        _Fields fields = findByThriftId(fieldId);
5327
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5328
        return fields;
5329
      }
5330
 
5331
      /**
5332
       * Find the _Fields constant that matches name, or null if its not found.
5333
       */
5334
      public static _Fields findByName(String name) {
5335
        return byName.get(name);
5336
      }
5337
 
5338
      private final short _thriftId;
5339
      private final String _fieldName;
5340
 
5341
      _Fields(short thriftId, String fieldName) {
5342
        _thriftId = thriftId;
5343
        _fieldName = fieldName;
5344
      }
5345
 
5346
      public short getThriftFieldId() {
5347
        return _thriftId;
5348
      }
5349
 
5350
      public String getFieldName() {
5351
        return _fieldName;
5352
      }
5353
    }
5354
 
5355
    // isset id assignments
5356
 
5357
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
5358
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
5359
          new EnumMetaData(TType.ENUM, TransactionStatus.class)));
5360
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
5361
          new FieldValueMetaData(TType.STRUCT)));
5362
    }});
5363
 
5364
    static {
5365
      FieldMetaData.addStructMetaDataMap(getTransactionStatus_result.class, metaDataMap);
5366
    }
5367
 
5368
    public getTransactionStatus_result() {
5369
    }
5370
 
5371
    public getTransactionStatus_result(
5372
      TransactionStatus success,
5373
      TransactionServiceException ex)
5374
    {
5375
      this();
5376
      this.success = success;
5377
      this.ex = ex;
5378
    }
5379
 
5380
    /**
5381
     * Performs a deep copy on <i>other</i>.
5382
     */
5383
    public getTransactionStatus_result(getTransactionStatus_result other) {
5384
      if (other.isSetSuccess()) {
5385
        this.success = other.success;
5386
      }
5387
      if (other.isSetEx()) {
5388
        this.ex = new TransactionServiceException(other.ex);
5389
      }
5390
    }
5391
 
5392
    public getTransactionStatus_result deepCopy() {
5393
      return new getTransactionStatus_result(this);
5394
    }
5395
 
5396
    @Deprecated
5397
    public getTransactionStatus_result clone() {
5398
      return new getTransactionStatus_result(this);
5399
    }
5400
 
5401
    /**
5402
     * 
5403
     * @see TransactionStatus
5404
     */
5405
    public TransactionStatus getSuccess() {
5406
      return this.success;
5407
    }
5408
 
5409
    /**
5410
     * 
5411
     * @see TransactionStatus
5412
     */
5413
    public getTransactionStatus_result setSuccess(TransactionStatus success) {
5414
      this.success = success;
5415
      return this;
5416
    }
5417
 
5418
    public void unsetSuccess() {
5419
      this.success = null;
5420
    }
5421
 
5422
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
5423
    public boolean isSetSuccess() {
5424
      return this.success != null;
5425
    }
5426
 
5427
    public void setSuccessIsSet(boolean value) {
5428
      if (!value) {
5429
        this.success = null;
5430
      }
5431
    }
5432
 
5433
    public TransactionServiceException getEx() {
5434
      return this.ex;
5435
    }
5436
 
5437
    public getTransactionStatus_result setEx(TransactionServiceException ex) {
5438
      this.ex = ex;
5439
      return this;
5440
    }
5441
 
5442
    public void unsetEx() {
5443
      this.ex = null;
5444
    }
5445
 
5446
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
5447
    public boolean isSetEx() {
5448
      return this.ex != null;
5449
    }
5450
 
5451
    public void setExIsSet(boolean value) {
5452
      if (!value) {
5453
        this.ex = null;
5454
      }
5455
    }
5456
 
5457
    public void setFieldValue(_Fields field, Object value) {
5458
      switch (field) {
5459
      case SUCCESS:
5460
        if (value == null) {
5461
          unsetSuccess();
5462
        } else {
5463
          setSuccess((TransactionStatus)value);
5464
        }
5465
        break;
5466
 
5467
      case EX:
5468
        if (value == null) {
5469
          unsetEx();
5470
        } else {
5471
          setEx((TransactionServiceException)value);
5472
        }
5473
        break;
5474
 
5475
      }
5476
    }
5477
 
5478
    public void setFieldValue(int fieldID, Object value) {
5479
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5480
    }
5481
 
5482
    public Object getFieldValue(_Fields field) {
5483
      switch (field) {
5484
      case SUCCESS:
5485
        return getSuccess();
5486
 
5487
      case EX:
5488
        return getEx();
5489
 
5490
      }
5491
      throw new IllegalStateException();
5492
    }
5493
 
5494
    public Object getFieldValue(int fieldId) {
5495
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5496
    }
5497
 
5498
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5499
    public boolean isSet(_Fields field) {
5500
      switch (field) {
5501
      case SUCCESS:
5502
        return isSetSuccess();
5503
      case EX:
5504
        return isSetEx();
5505
      }
5506
      throw new IllegalStateException();
5507
    }
5508
 
5509
    public boolean isSet(int fieldID) {
5510
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5511
    }
5512
 
5513
    @Override
5514
    public boolean equals(Object that) {
5515
      if (that == null)
5516
        return false;
5517
      if (that instanceof getTransactionStatus_result)
5518
        return this.equals((getTransactionStatus_result)that);
5519
      return false;
5520
    }
5521
 
5522
    public boolean equals(getTransactionStatus_result that) {
5523
      if (that == null)
5524
        return false;
5525
 
5526
      boolean this_present_success = true && this.isSetSuccess();
5527
      boolean that_present_success = true && that.isSetSuccess();
5528
      if (this_present_success || that_present_success) {
5529
        if (!(this_present_success && that_present_success))
5530
          return false;
5531
        if (!this.success.equals(that.success))
5532
          return false;
5533
      }
5534
 
5535
      boolean this_present_ex = true && this.isSetEx();
5536
      boolean that_present_ex = true && that.isSetEx();
5537
      if (this_present_ex || that_present_ex) {
5538
        if (!(this_present_ex && that_present_ex))
5539
          return false;
5540
        if (!this.ex.equals(that.ex))
5541
          return false;
5542
      }
5543
 
5544
      return true;
5545
    }
5546
 
5547
    @Override
5548
    public int hashCode() {
5549
      return 0;
5550
    }
5551
 
5552
    public int compareTo(getTransactionStatus_result other) {
5553
      if (!getClass().equals(other.getClass())) {
5554
        return getClass().getName().compareTo(other.getClass().getName());
5555
      }
5556
 
5557
      int lastComparison = 0;
5558
      getTransactionStatus_result typedOther = (getTransactionStatus_result)other;
5559
 
5560
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
5561
      if (lastComparison != 0) {
5562
        return lastComparison;
5563
      }
5564
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
5565
      if (lastComparison != 0) {
5566
        return lastComparison;
5567
      }
5568
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
5569
      if (lastComparison != 0) {
5570
        return lastComparison;
5571
      }
5572
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
5573
      if (lastComparison != 0) {
5574
        return lastComparison;
5575
      }
5576
      return 0;
5577
    }
5578
 
5579
    public void read(TProtocol iprot) throws TException {
5580
      TField field;
5581
      iprot.readStructBegin();
5582
      while (true)
5583
      {
5584
        field = iprot.readFieldBegin();
5585
        if (field.type == TType.STOP) { 
5586
          break;
5587
        }
5588
        _Fields fieldId = _Fields.findByThriftId(field.id);
5589
        if (fieldId == null) {
5590
          TProtocolUtil.skip(iprot, field.type);
5591
        } else {
5592
          switch (fieldId) {
5593
            case SUCCESS:
5594
              if (field.type == TType.I32) {
5595
                this.success = TransactionStatus.findByValue(iprot.readI32());
5596
              } else { 
5597
                TProtocolUtil.skip(iprot, field.type);
5598
              }
5599
              break;
5600
            case EX:
5601
              if (field.type == TType.STRUCT) {
5602
                this.ex = new TransactionServiceException();
5603
                this.ex.read(iprot);
5604
              } else { 
5605
                TProtocolUtil.skip(iprot, field.type);
5606
              }
5607
              break;
5608
          }
5609
          iprot.readFieldEnd();
5610
        }
5611
      }
5612
      iprot.readStructEnd();
5613
      validate();
5614
    }
5615
 
5616
    public void write(TProtocol oprot) throws TException {
5617
      oprot.writeStructBegin(STRUCT_DESC);
5618
 
5619
      if (this.isSetSuccess()) {
5620
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
5621
        oprot.writeI32(this.success.getValue());
5622
        oprot.writeFieldEnd();
5623
      } else if (this.isSetEx()) {
5624
        oprot.writeFieldBegin(EX_FIELD_DESC);
5625
        this.ex.write(oprot);
5626
        oprot.writeFieldEnd();
5627
      }
5628
      oprot.writeFieldStop();
5629
      oprot.writeStructEnd();
5630
    }
5631
 
5632
    @Override
5633
    public String toString() {
5634
      StringBuilder sb = new StringBuilder("getTransactionStatus_result(");
5635
      boolean first = true;
5636
 
5637
      sb.append("success:");
5638
      if (this.success == null) {
5639
        sb.append("null");
5640
      } else {
5641
        String success_name = success.name();
5642
        if (success_name != null) {
5643
          sb.append(success_name);
5644
          sb.append(" (");
5645
        }
5646
        sb.append(this.success);
5647
        if (success_name != null) {
5648
          sb.append(")");
5649
        }
5650
      }
5651
      first = false;
5652
      if (!first) sb.append(", ");
5653
      sb.append("ex:");
5654
      if (this.ex == null) {
5655
        sb.append("null");
5656
      } else {
5657
        sb.append(this.ex);
5658
      }
5659
      first = false;
5660
      sb.append(")");
5661
      return sb.toString();
5662
    }
5663
 
5664
    public void validate() throws TException {
5665
      // check for required fields
5666
    }
5667
 
5668
  }
5669
 
5670
  public static class changeTransactionStatus_args implements TBase<changeTransactionStatus_args._Fields>, java.io.Serializable, Cloneable, Comparable<changeTransactionStatus_args>   {
5671
    private static final TStruct STRUCT_DESC = new TStruct("changeTransactionStatus_args");
5672
 
5673
    private static final TField TRANSACTION_ID_FIELD_DESC = new TField("transactionId", TType.I64, (short)1);
5674
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)2);
5675
    private static final TField DESCRIPTION_FIELD_DESC = new TField("description", TType.STRING, (short)3);
5676
 
5677
    private long transactionId;
5678
    private TransactionStatus status;
5679
    private String description;
5680
 
5681
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5682
    public enum _Fields implements TFieldIdEnum {
5683
      TRANSACTION_ID((short)1, "transactionId"),
5684
      /**
5685
       * 
5686
       * @see TransactionStatus
5687
       */
5688
      STATUS((short)2, "status"),
5689
      DESCRIPTION((short)3, "description");
5690
 
5691
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5692
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5693
 
5694
      static {
5695
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5696
          byId.put((int)field._thriftId, field);
5697
          byName.put(field.getFieldName(), field);
5698
        }
5699
      }
5700
 
5701
      /**
5702
       * Find the _Fields constant that matches fieldId, or null if its not found.
5703
       */
5704
      public static _Fields findByThriftId(int fieldId) {
5705
        return byId.get(fieldId);
5706
      }
5707
 
5708
      /**
5709
       * Find the _Fields constant that matches fieldId, throwing an exception
5710
       * if it is not found.
5711
       */
5712
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5713
        _Fields fields = findByThriftId(fieldId);
5714
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5715
        return fields;
5716
      }
5717
 
5718
      /**
5719
       * Find the _Fields constant that matches name, or null if its not found.
5720
       */
5721
      public static _Fields findByName(String name) {
5722
        return byName.get(name);
5723
      }
5724
 
5725
      private final short _thriftId;
5726
      private final String _fieldName;
5727
 
5728
      _Fields(short thriftId, String fieldName) {
5729
        _thriftId = thriftId;
5730
        _fieldName = fieldName;
5731
      }
5732
 
5733
      public short getThriftFieldId() {
5734
        return _thriftId;
5735
      }
5736
 
5737
      public String getFieldName() {
5738
        return _fieldName;
5739
      }
5740
    }
5741
 
5742
    // isset id assignments
5743
    private static final int __TRANSACTIONID_ISSET_ID = 0;
5744
    private BitSet __isset_bit_vector = new BitSet(1);
5745
 
5746
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
5747
      put(_Fields.TRANSACTION_ID, new FieldMetaData("transactionId", TFieldRequirementType.DEFAULT, 
5748
          new FieldValueMetaData(TType.I64)));
5749
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
5750
          new EnumMetaData(TType.ENUM, TransactionStatus.class)));
5751
      put(_Fields.DESCRIPTION, new FieldMetaData("description", TFieldRequirementType.DEFAULT, 
5752
          new FieldValueMetaData(TType.STRING)));
5753
    }});
5754
 
5755
    static {
5756
      FieldMetaData.addStructMetaDataMap(changeTransactionStatus_args.class, metaDataMap);
5757
    }
5758
 
5759
    public changeTransactionStatus_args() {
5760
    }
5761
 
5762
    public changeTransactionStatus_args(
5763
      long transactionId,
5764
      TransactionStatus status,
5765
      String description)
5766
    {
5767
      this();
5768
      this.transactionId = transactionId;
5769
      setTransactionIdIsSet(true);
5770
      this.status = status;
5771
      this.description = description;
5772
    }
5773
 
5774
    /**
5775
     * Performs a deep copy on <i>other</i>.
5776
     */
5777
    public changeTransactionStatus_args(changeTransactionStatus_args other) {
5778
      __isset_bit_vector.clear();
5779
      __isset_bit_vector.or(other.__isset_bit_vector);
5780
      this.transactionId = other.transactionId;
5781
      if (other.isSetStatus()) {
5782
        this.status = other.status;
5783
      }
5784
      if (other.isSetDescription()) {
5785
        this.description = other.description;
5786
      }
5787
    }
5788
 
5789
    public changeTransactionStatus_args deepCopy() {
5790
      return new changeTransactionStatus_args(this);
5791
    }
5792
 
5793
    @Deprecated
5794
    public changeTransactionStatus_args clone() {
5795
      return new changeTransactionStatus_args(this);
5796
    }
5797
 
5798
    public long getTransactionId() {
5799
      return this.transactionId;
5800
    }
5801
 
5802
    public changeTransactionStatus_args setTransactionId(long transactionId) {
5803
      this.transactionId = transactionId;
5804
      setTransactionIdIsSet(true);
5805
      return this;
5806
    }
5807
 
5808
    public void unsetTransactionId() {
5809
      __isset_bit_vector.clear(__TRANSACTIONID_ISSET_ID);
5810
    }
5811
 
5812
    /** Returns true if field transactionId is set (has been asigned a value) and false otherwise */
5813
    public boolean isSetTransactionId() {
5814
      return __isset_bit_vector.get(__TRANSACTIONID_ISSET_ID);
5815
    }
5816
 
5817
    public void setTransactionIdIsSet(boolean value) {
5818
      __isset_bit_vector.set(__TRANSACTIONID_ISSET_ID, value);
5819
    }
5820
 
5821
    /**
5822
     * 
5823
     * @see TransactionStatus
5824
     */
5825
    public TransactionStatus getStatus() {
5826
      return this.status;
5827
    }
5828
 
5829
    /**
5830
     * 
5831
     * @see TransactionStatus
5832
     */
5833
    public changeTransactionStatus_args setStatus(TransactionStatus status) {
5834
      this.status = status;
5835
      return this;
5836
    }
5837
 
5838
    public void unsetStatus() {
5839
      this.status = null;
5840
    }
5841
 
5842
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
5843
    public boolean isSetStatus() {
5844
      return this.status != null;
5845
    }
5846
 
5847
    public void setStatusIsSet(boolean value) {
5848
      if (!value) {
5849
        this.status = null;
5850
      }
5851
    }
5852
 
5853
    public String getDescription() {
5854
      return this.description;
5855
    }
5856
 
5857
    public changeTransactionStatus_args setDescription(String description) {
5858
      this.description = description;
5859
      return this;
5860
    }
5861
 
5862
    public void unsetDescription() {
5863
      this.description = null;
5864
    }
5865
 
5866
    /** Returns true if field description is set (has been asigned a value) and false otherwise */
5867
    public boolean isSetDescription() {
5868
      return this.description != null;
5869
    }
5870
 
5871
    public void setDescriptionIsSet(boolean value) {
5872
      if (!value) {
5873
        this.description = null;
5874
      }
5875
    }
5876
 
5877
    public void setFieldValue(_Fields field, Object value) {
5878
      switch (field) {
5879
      case TRANSACTION_ID:
5880
        if (value == null) {
5881
          unsetTransactionId();
5882
        } else {
5883
          setTransactionId((Long)value);
5884
        }
5885
        break;
5886
 
5887
      case STATUS:
5888
        if (value == null) {
5889
          unsetStatus();
5890
        } else {
5891
          setStatus((TransactionStatus)value);
5892
        }
5893
        break;
5894
 
5895
      case DESCRIPTION:
5896
        if (value == null) {
5897
          unsetDescription();
5898
        } else {
5899
          setDescription((String)value);
5900
        }
5901
        break;
5902
 
5903
      }
5904
    }
5905
 
5906
    public void setFieldValue(int fieldID, Object value) {
5907
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5908
    }
5909
 
5910
    public Object getFieldValue(_Fields field) {
5911
      switch (field) {
5912
      case TRANSACTION_ID:
5913
        return new Long(getTransactionId());
5914
 
5915
      case STATUS:
5916
        return getStatus();
5917
 
5918
      case DESCRIPTION:
5919
        return getDescription();
5920
 
5921
      }
5922
      throw new IllegalStateException();
5923
    }
5924
 
5925
    public Object getFieldValue(int fieldId) {
5926
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5927
    }
5928
 
5929
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5930
    public boolean isSet(_Fields field) {
5931
      switch (field) {
5932
      case TRANSACTION_ID:
5933
        return isSetTransactionId();
5934
      case STATUS:
5935
        return isSetStatus();
5936
      case DESCRIPTION:
5937
        return isSetDescription();
5938
      }
5939
      throw new IllegalStateException();
5940
    }
5941
 
5942
    public boolean isSet(int fieldID) {
5943
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5944
    }
5945
 
5946
    @Override
5947
    public boolean equals(Object that) {
5948
      if (that == null)
5949
        return false;
5950
      if (that instanceof changeTransactionStatus_args)
5951
        return this.equals((changeTransactionStatus_args)that);
5952
      return false;
5953
    }
5954
 
5955
    public boolean equals(changeTransactionStatus_args that) {
5956
      if (that == null)
5957
        return false;
5958
 
5959
      boolean this_present_transactionId = true;
5960
      boolean that_present_transactionId = true;
5961
      if (this_present_transactionId || that_present_transactionId) {
5962
        if (!(this_present_transactionId && that_present_transactionId))
5963
          return false;
5964
        if (this.transactionId != that.transactionId)
5965
          return false;
5966
      }
5967
 
5968
      boolean this_present_status = true && this.isSetStatus();
5969
      boolean that_present_status = true && that.isSetStatus();
5970
      if (this_present_status || that_present_status) {
5971
        if (!(this_present_status && that_present_status))
5972
          return false;
5973
        if (!this.status.equals(that.status))
5974
          return false;
5975
      }
5976
 
5977
      boolean this_present_description = true && this.isSetDescription();
5978
      boolean that_present_description = true && that.isSetDescription();
5979
      if (this_present_description || that_present_description) {
5980
        if (!(this_present_description && that_present_description))
5981
          return false;
5982
        if (!this.description.equals(that.description))
5983
          return false;
5984
      }
5985
 
5986
      return true;
5987
    }
5988
 
5989
    @Override
5990
    public int hashCode() {
5991
      return 0;
5992
    }
5993
 
5994
    public int compareTo(changeTransactionStatus_args other) {
5995
      if (!getClass().equals(other.getClass())) {
5996
        return getClass().getName().compareTo(other.getClass().getName());
5997
      }
5998
 
5999
      int lastComparison = 0;
6000
      changeTransactionStatus_args typedOther = (changeTransactionStatus_args)other;
6001
 
6002
      lastComparison = Boolean.valueOf(isSetTransactionId()).compareTo(isSetTransactionId());
6003
      if (lastComparison != 0) {
6004
        return lastComparison;
6005
      }
6006
      lastComparison = TBaseHelper.compareTo(transactionId, typedOther.transactionId);
6007
      if (lastComparison != 0) {
6008
        return lastComparison;
6009
      }
6010
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
6011
      if (lastComparison != 0) {
6012
        return lastComparison;
6013
      }
6014
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
6015
      if (lastComparison != 0) {
6016
        return lastComparison;
6017
      }
6018
      lastComparison = Boolean.valueOf(isSetDescription()).compareTo(isSetDescription());
6019
      if (lastComparison != 0) {
6020
        return lastComparison;
6021
      }
6022
      lastComparison = TBaseHelper.compareTo(description, typedOther.description);
6023
      if (lastComparison != 0) {
6024
        return lastComparison;
6025
      }
6026
      return 0;
6027
    }
6028
 
6029
    public void read(TProtocol iprot) throws TException {
6030
      TField field;
6031
      iprot.readStructBegin();
6032
      while (true)
6033
      {
6034
        field = iprot.readFieldBegin();
6035
        if (field.type == TType.STOP) { 
6036
          break;
6037
        }
6038
        _Fields fieldId = _Fields.findByThriftId(field.id);
6039
        if (fieldId == null) {
6040
          TProtocolUtil.skip(iprot, field.type);
6041
        } else {
6042
          switch (fieldId) {
6043
            case TRANSACTION_ID:
6044
              if (field.type == TType.I64) {
6045
                this.transactionId = iprot.readI64();
6046
                setTransactionIdIsSet(true);
6047
              } else { 
6048
                TProtocolUtil.skip(iprot, field.type);
6049
              }
6050
              break;
6051
            case STATUS:
6052
              if (field.type == TType.I32) {
6053
                this.status = TransactionStatus.findByValue(iprot.readI32());
6054
              } else { 
6055
                TProtocolUtil.skip(iprot, field.type);
6056
              }
6057
              break;
6058
            case DESCRIPTION:
6059
              if (field.type == TType.STRING) {
6060
                this.description = iprot.readString();
6061
              } else { 
6062
                TProtocolUtil.skip(iprot, field.type);
6063
              }
6064
              break;
6065
          }
6066
          iprot.readFieldEnd();
6067
        }
6068
      }
6069
      iprot.readStructEnd();
6070
      validate();
6071
    }
6072
 
6073
    public void write(TProtocol oprot) throws TException {
6074
      validate();
6075
 
6076
      oprot.writeStructBegin(STRUCT_DESC);
6077
      oprot.writeFieldBegin(TRANSACTION_ID_FIELD_DESC);
6078
      oprot.writeI64(this.transactionId);
6079
      oprot.writeFieldEnd();
6080
      if (this.status != null) {
6081
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
6082
        oprot.writeI32(this.status.getValue());
6083
        oprot.writeFieldEnd();
6084
      }
6085
      if (this.description != null) {
6086
        oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC);
6087
        oprot.writeString(this.description);
6088
        oprot.writeFieldEnd();
6089
      }
6090
      oprot.writeFieldStop();
6091
      oprot.writeStructEnd();
6092
    }
6093
 
6094
    @Override
6095
    public String toString() {
6096
      StringBuilder sb = new StringBuilder("changeTransactionStatus_args(");
6097
      boolean first = true;
6098
 
6099
      sb.append("transactionId:");
6100
      sb.append(this.transactionId);
6101
      first = false;
6102
      if (!first) sb.append(", ");
6103
      sb.append("status:");
6104
      if (this.status == null) {
6105
        sb.append("null");
6106
      } else {
6107
        String status_name = status.name();
6108
        if (status_name != null) {
6109
          sb.append(status_name);
6110
          sb.append(" (");
6111
        }
6112
        sb.append(this.status);
6113
        if (status_name != null) {
6114
          sb.append(")");
6115
        }
6116
      }
6117
      first = false;
6118
      if (!first) sb.append(", ");
6119
      sb.append("description:");
6120
      if (this.description == null) {
6121
        sb.append("null");
6122
      } else {
6123
        sb.append(this.description);
6124
      }
6125
      first = false;
6126
      sb.append(")");
6127
      return sb.toString();
6128
    }
6129
 
6130
    public void validate() throws TException {
6131
      // check for required fields
6132
    }
6133
 
6134
  }
6135
 
6136
  public static class changeTransactionStatus_result implements TBase<changeTransactionStatus_result._Fields>, java.io.Serializable, Cloneable, Comparable<changeTransactionStatus_result>   {
6137
    private static final TStruct STRUCT_DESC = new TStruct("changeTransactionStatus_result");
6138
 
6139
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
6140
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
6141
 
6142
    private boolean success;
6143
    private TransactionServiceException ex;
6144
 
6145
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6146
    public enum _Fields implements TFieldIdEnum {
6147
      SUCCESS((short)0, "success"),
6148
      EX((short)1, "ex");
6149
 
6150
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
6151
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6152
 
6153
      static {
6154
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6155
          byId.put((int)field._thriftId, field);
6156
          byName.put(field.getFieldName(), field);
6157
        }
6158
      }
6159
 
6160
      /**
6161
       * Find the _Fields constant that matches fieldId, or null if its not found.
6162
       */
6163
      public static _Fields findByThriftId(int fieldId) {
6164
        return byId.get(fieldId);
6165
      }
6166
 
6167
      /**
6168
       * Find the _Fields constant that matches fieldId, throwing an exception
6169
       * if it is not found.
6170
       */
6171
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6172
        _Fields fields = findByThriftId(fieldId);
6173
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6174
        return fields;
6175
      }
6176
 
6177
      /**
6178
       * Find the _Fields constant that matches name, or null if its not found.
6179
       */
6180
      public static _Fields findByName(String name) {
6181
        return byName.get(name);
6182
      }
6183
 
6184
      private final short _thriftId;
6185
      private final String _fieldName;
6186
 
6187
      _Fields(short thriftId, String fieldName) {
6188
        _thriftId = thriftId;
6189
        _fieldName = fieldName;
6190
      }
6191
 
6192
      public short getThriftFieldId() {
6193
        return _thriftId;
6194
      }
6195
 
6196
      public String getFieldName() {
6197
        return _fieldName;
6198
      }
6199
    }
6200
 
6201
    // isset id assignments
6202
    private static final int __SUCCESS_ISSET_ID = 0;
6203
    private BitSet __isset_bit_vector = new BitSet(1);
6204
 
6205
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
6206
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
6207
          new FieldValueMetaData(TType.BOOL)));
6208
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
6209
          new FieldValueMetaData(TType.STRUCT)));
6210
    }});
6211
 
6212
    static {
6213
      FieldMetaData.addStructMetaDataMap(changeTransactionStatus_result.class, metaDataMap);
6214
    }
6215
 
6216
    public changeTransactionStatus_result() {
6217
    }
6218
 
6219
    public changeTransactionStatus_result(
6220
      boolean success,
6221
      TransactionServiceException ex)
6222
    {
6223
      this();
6224
      this.success = success;
6225
      setSuccessIsSet(true);
6226
      this.ex = ex;
6227
    }
6228
 
6229
    /**
6230
     * Performs a deep copy on <i>other</i>.
6231
     */
6232
    public changeTransactionStatus_result(changeTransactionStatus_result other) {
6233
      __isset_bit_vector.clear();
6234
      __isset_bit_vector.or(other.__isset_bit_vector);
6235
      this.success = other.success;
6236
      if (other.isSetEx()) {
6237
        this.ex = new TransactionServiceException(other.ex);
6238
      }
6239
    }
6240
 
6241
    public changeTransactionStatus_result deepCopy() {
6242
      return new changeTransactionStatus_result(this);
6243
    }
6244
 
6245
    @Deprecated
6246
    public changeTransactionStatus_result clone() {
6247
      return new changeTransactionStatus_result(this);
6248
    }
6249
 
6250
    public boolean isSuccess() {
6251
      return this.success;
6252
    }
6253
 
6254
    public changeTransactionStatus_result setSuccess(boolean success) {
6255
      this.success = success;
6256
      setSuccessIsSet(true);
6257
      return this;
6258
    }
6259
 
6260
    public void unsetSuccess() {
6261
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
6262
    }
6263
 
6264
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
6265
    public boolean isSetSuccess() {
6266
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
6267
    }
6268
 
6269
    public void setSuccessIsSet(boolean value) {
6270
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
6271
    }
6272
 
6273
    public TransactionServiceException getEx() {
6274
      return this.ex;
6275
    }
6276
 
6277
    public changeTransactionStatus_result setEx(TransactionServiceException ex) {
6278
      this.ex = ex;
6279
      return this;
6280
    }
6281
 
6282
    public void unsetEx() {
6283
      this.ex = null;
6284
    }
6285
 
6286
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
6287
    public boolean isSetEx() {
6288
      return this.ex != null;
6289
    }
6290
 
6291
    public void setExIsSet(boolean value) {
6292
      if (!value) {
6293
        this.ex = null;
6294
      }
6295
    }
6296
 
6297
    public void setFieldValue(_Fields field, Object value) {
6298
      switch (field) {
6299
      case SUCCESS:
6300
        if (value == null) {
6301
          unsetSuccess();
6302
        } else {
6303
          setSuccess((Boolean)value);
6304
        }
6305
        break;
6306
 
6307
      case EX:
6308
        if (value == null) {
6309
          unsetEx();
6310
        } else {
6311
          setEx((TransactionServiceException)value);
6312
        }
6313
        break;
6314
 
6315
      }
6316
    }
6317
 
6318
    public void setFieldValue(int fieldID, Object value) {
6319
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
6320
    }
6321
 
6322
    public Object getFieldValue(_Fields field) {
6323
      switch (field) {
6324
      case SUCCESS:
6325
        return new Boolean(isSuccess());
6326
 
6327
      case EX:
6328
        return getEx();
6329
 
6330
      }
6331
      throw new IllegalStateException();
6332
    }
6333
 
6334
    public Object getFieldValue(int fieldId) {
6335
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
6336
    }
6337
 
6338
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
6339
    public boolean isSet(_Fields field) {
6340
      switch (field) {
6341
      case SUCCESS:
6342
        return isSetSuccess();
6343
      case EX:
6344
        return isSetEx();
6345
      }
6346
      throw new IllegalStateException();
6347
    }
6348
 
6349
    public boolean isSet(int fieldID) {
6350
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
6351
    }
6352
 
6353
    @Override
6354
    public boolean equals(Object that) {
6355
      if (that == null)
6356
        return false;
6357
      if (that instanceof changeTransactionStatus_result)
6358
        return this.equals((changeTransactionStatus_result)that);
6359
      return false;
6360
    }
6361
 
6362
    public boolean equals(changeTransactionStatus_result that) {
6363
      if (that == null)
6364
        return false;
6365
 
6366
      boolean this_present_success = true;
6367
      boolean that_present_success = true;
6368
      if (this_present_success || that_present_success) {
6369
        if (!(this_present_success && that_present_success))
6370
          return false;
6371
        if (this.success != that.success)
6372
          return false;
6373
      }
6374
 
6375
      boolean this_present_ex = true && this.isSetEx();
6376
      boolean that_present_ex = true && that.isSetEx();
6377
      if (this_present_ex || that_present_ex) {
6378
        if (!(this_present_ex && that_present_ex))
6379
          return false;
6380
        if (!this.ex.equals(that.ex))
6381
          return false;
6382
      }
6383
 
6384
      return true;
6385
    }
6386
 
6387
    @Override
6388
    public int hashCode() {
6389
      return 0;
6390
    }
6391
 
6392
    public int compareTo(changeTransactionStatus_result other) {
6393
      if (!getClass().equals(other.getClass())) {
6394
        return getClass().getName().compareTo(other.getClass().getName());
6395
      }
6396
 
6397
      int lastComparison = 0;
6398
      changeTransactionStatus_result typedOther = (changeTransactionStatus_result)other;
6399
 
6400
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
6401
      if (lastComparison != 0) {
6402
        return lastComparison;
6403
      }
6404
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
6405
      if (lastComparison != 0) {
6406
        return lastComparison;
6407
      }
6408
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
6409
      if (lastComparison != 0) {
6410
        return lastComparison;
6411
      }
6412
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
6413
      if (lastComparison != 0) {
6414
        return lastComparison;
6415
      }
6416
      return 0;
6417
    }
6418
 
6419
    public void read(TProtocol iprot) throws TException {
6420
      TField field;
6421
      iprot.readStructBegin();
6422
      while (true)
6423
      {
6424
        field = iprot.readFieldBegin();
6425
        if (field.type == TType.STOP) { 
6426
          break;
6427
        }
6428
        _Fields fieldId = _Fields.findByThriftId(field.id);
6429
        if (fieldId == null) {
6430
          TProtocolUtil.skip(iprot, field.type);
6431
        } else {
6432
          switch (fieldId) {
6433
            case SUCCESS:
6434
              if (field.type == TType.BOOL) {
6435
                this.success = iprot.readBool();
6436
                setSuccessIsSet(true);
6437
              } else { 
6438
                TProtocolUtil.skip(iprot, field.type);
6439
              }
6440
              break;
6441
            case EX:
6442
              if (field.type == TType.STRUCT) {
6443
                this.ex = new TransactionServiceException();
6444
                this.ex.read(iprot);
6445
              } else { 
6446
                TProtocolUtil.skip(iprot, field.type);
6447
              }
6448
              break;
6449
          }
6450
          iprot.readFieldEnd();
6451
        }
6452
      }
6453
      iprot.readStructEnd();
6454
      validate();
6455
    }
6456
 
6457
    public void write(TProtocol oprot) throws TException {
6458
      oprot.writeStructBegin(STRUCT_DESC);
6459
 
6460
      if (this.isSetSuccess()) {
6461
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
6462
        oprot.writeBool(this.success);
6463
        oprot.writeFieldEnd();
6464
      } else if (this.isSetEx()) {
6465
        oprot.writeFieldBegin(EX_FIELD_DESC);
6466
        this.ex.write(oprot);
6467
        oprot.writeFieldEnd();
6468
      }
6469
      oprot.writeFieldStop();
6470
      oprot.writeStructEnd();
6471
    }
6472
 
6473
    @Override
6474
    public String toString() {
6475
      StringBuilder sb = new StringBuilder("changeTransactionStatus_result(");
6476
      boolean first = true;
6477
 
6478
      sb.append("success:");
6479
      sb.append(this.success);
6480
      first = false;
6481
      if (!first) sb.append(", ");
6482
      sb.append("ex:");
6483
      if (this.ex == null) {
6484
        sb.append("null");
6485
      } else {
6486
        sb.append(this.ex);
6487
      }
6488
      first = false;
6489
      sb.append(")");
6490
      return sb.toString();
6491
    }
6492
 
6493
    public void validate() throws TException {
6494
      // check for required fields
6495
    }
6496
 
6497
  }
6498
 
483 rajveer 6499
  public static class getAllOrders_args implements TBase<getAllOrders_args._Fields>, java.io.Serializable, Cloneable, Comparable<getAllOrders_args>   {
6500
    private static final TStruct STRUCT_DESC = new TStruct("getAllOrders_args");
68 ashish 6501
 
483 rajveer 6502
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)1);
6503
    private static final TField FROM_DATE_FIELD_DESC = new TField("from_date", TType.I64, (short)2);
6504
    private static final TField TO_DATE_FIELD_DESC = new TField("to_date", TType.I64, (short)3);
6505
    private static final TField WAREHOUSE_ID_FIELD_DESC = new TField("warehouse_id", TType.I64, (short)4);
68 ashish 6506
 
483 rajveer 6507
    private OrderStatus status;
6508
    private long from_date;
6509
    private long to_date;
6510
    private long warehouse_id;
68 ashish 6511
 
6512
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6513
    public enum _Fields implements TFieldIdEnum {
483 rajveer 6514
      /**
6515
       * 
6516
       * @see OrderStatus
6517
       */
6518
      STATUS((short)1, "status"),
6519
      FROM_DATE((short)2, "from_date"),
6520
      TO_DATE((short)3, "to_date"),
6521
      WAREHOUSE_ID((short)4, "warehouse_id");
68 ashish 6522
 
6523
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
6524
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6525
 
6526
      static {
6527
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6528
          byId.put((int)field._thriftId, field);
6529
          byName.put(field.getFieldName(), field);
6530
        }
6531
      }
6532
 
6533
      /**
6534
       * Find the _Fields constant that matches fieldId, or null if its not found.
6535
       */
6536
      public static _Fields findByThriftId(int fieldId) {
6537
        return byId.get(fieldId);
6538
      }
6539
 
6540
      /**
6541
       * Find the _Fields constant that matches fieldId, throwing an exception
6542
       * if it is not found.
6543
       */
6544
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6545
        _Fields fields = findByThriftId(fieldId);
6546
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6547
        return fields;
6548
      }
6549
 
6550
      /**
6551
       * Find the _Fields constant that matches name, or null if its not found.
6552
       */
6553
      public static _Fields findByName(String name) {
6554
        return byName.get(name);
6555
      }
6556
 
6557
      private final short _thriftId;
6558
      private final String _fieldName;
6559
 
6560
      _Fields(short thriftId, String fieldName) {
6561
        _thriftId = thriftId;
6562
        _fieldName = fieldName;
6563
      }
6564
 
6565
      public short getThriftFieldId() {
6566
        return _thriftId;
6567
      }
6568
 
6569
      public String getFieldName() {
6570
        return _fieldName;
6571
      }
6572
    }
6573
 
6574
    // isset id assignments
483 rajveer 6575
    private static final int __FROM_DATE_ISSET_ID = 0;
6576
    private static final int __TO_DATE_ISSET_ID = 1;
6577
    private static final int __WAREHOUSE_ID_ISSET_ID = 2;
6578
    private BitSet __isset_bit_vector = new BitSet(3);
68 ashish 6579
 
6580
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 6581
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
6582
          new EnumMetaData(TType.ENUM, OrderStatus.class)));
6583
      put(_Fields.FROM_DATE, new FieldMetaData("from_date", TFieldRequirementType.DEFAULT, 
68 ashish 6584
          new FieldValueMetaData(TType.I64)));
483 rajveer 6585
      put(_Fields.TO_DATE, new FieldMetaData("to_date", TFieldRequirementType.DEFAULT, 
6586
          new FieldValueMetaData(TType.I64)));
6587
      put(_Fields.WAREHOUSE_ID, new FieldMetaData("warehouse_id", TFieldRequirementType.DEFAULT, 
6588
          new FieldValueMetaData(TType.I64)));
68 ashish 6589
    }});
6590
 
6591
    static {
483 rajveer 6592
      FieldMetaData.addStructMetaDataMap(getAllOrders_args.class, metaDataMap);
68 ashish 6593
    }
6594
 
483 rajveer 6595
    public getAllOrders_args() {
68 ashish 6596
    }
6597
 
483 rajveer 6598
    public getAllOrders_args(
6599
      OrderStatus status,
6600
      long from_date,
6601
      long to_date,
6602
      long warehouse_id)
68 ashish 6603
    {
6604
      this();
483 rajveer 6605
      this.status = status;
6606
      this.from_date = from_date;
6607
      setFrom_dateIsSet(true);
6608
      this.to_date = to_date;
6609
      setTo_dateIsSet(true);
6610
      this.warehouse_id = warehouse_id;
6611
      setWarehouse_idIsSet(true);
68 ashish 6612
    }
6613
 
6614
    /**
6615
     * Performs a deep copy on <i>other</i>.
6616
     */
483 rajveer 6617
    public getAllOrders_args(getAllOrders_args other) {
68 ashish 6618
      __isset_bit_vector.clear();
6619
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 6620
      if (other.isSetStatus()) {
6621
        this.status = other.status;
6622
      }
6623
      this.from_date = other.from_date;
6624
      this.to_date = other.to_date;
6625
      this.warehouse_id = other.warehouse_id;
68 ashish 6626
    }
6627
 
483 rajveer 6628
    public getAllOrders_args deepCopy() {
6629
      return new getAllOrders_args(this);
68 ashish 6630
    }
6631
 
6632
    @Deprecated
483 rajveer 6633
    public getAllOrders_args clone() {
6634
      return new getAllOrders_args(this);
68 ashish 6635
    }
6636
 
483 rajveer 6637
    /**
6638
     * 
6639
     * @see OrderStatus
6640
     */
6641
    public OrderStatus getStatus() {
6642
      return this.status;
68 ashish 6643
    }
6644
 
483 rajveer 6645
    /**
6646
     * 
6647
     * @see OrderStatus
6648
     */
6649
    public getAllOrders_args setStatus(OrderStatus status) {
6650
      this.status = status;
68 ashish 6651
      return this;
6652
    }
6653
 
483 rajveer 6654
    public void unsetStatus() {
6655
      this.status = null;
68 ashish 6656
    }
6657
 
483 rajveer 6658
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
6659
    public boolean isSetStatus() {
6660
      return this.status != null;
68 ashish 6661
    }
6662
 
483 rajveer 6663
    public void setStatusIsSet(boolean value) {
6664
      if (!value) {
6665
        this.status = null;
68 ashish 6666
      }
6667
    }
6668
 
483 rajveer 6669
    public long getFrom_date() {
6670
      return this.from_date;
68 ashish 6671
    }
6672
 
483 rajveer 6673
    public getAllOrders_args setFrom_date(long from_date) {
6674
      this.from_date = from_date;
6675
      setFrom_dateIsSet(true);
6676
      return this;
68 ashish 6677
    }
6678
 
483 rajveer 6679
    public void unsetFrom_date() {
6680
      __isset_bit_vector.clear(__FROM_DATE_ISSET_ID);
68 ashish 6681
    }
6682
 
483 rajveer 6683
    /** Returns true if field from_date is set (has been asigned a value) and false otherwise */
6684
    public boolean isSetFrom_date() {
6685
      return __isset_bit_vector.get(__FROM_DATE_ISSET_ID);
68 ashish 6686
    }
6687
 
483 rajveer 6688
    public void setFrom_dateIsSet(boolean value) {
6689
      __isset_bit_vector.set(__FROM_DATE_ISSET_ID, value);
68 ashish 6690
    }
6691
 
483 rajveer 6692
    public long getTo_date() {
6693
      return this.to_date;
68 ashish 6694
    }
6695
 
483 rajveer 6696
    public getAllOrders_args setTo_date(long to_date) {
6697
      this.to_date = to_date;
6698
      setTo_dateIsSet(true);
68 ashish 6699
      return this;
6700
    }
6701
 
483 rajveer 6702
    public void unsetTo_date() {
6703
      __isset_bit_vector.clear(__TO_DATE_ISSET_ID);
68 ashish 6704
    }
6705
 
483 rajveer 6706
    /** Returns true if field to_date is set (has been asigned a value) and false otherwise */
6707
    public boolean isSetTo_date() {
6708
      return __isset_bit_vector.get(__TO_DATE_ISSET_ID);
68 ashish 6709
    }
6710
 
483 rajveer 6711
    public void setTo_dateIsSet(boolean value) {
6712
      __isset_bit_vector.set(__TO_DATE_ISSET_ID, value);
68 ashish 6713
    }
6714
 
483 rajveer 6715
    public long getWarehouse_id() {
6716
      return this.warehouse_id;
68 ashish 6717
    }
6718
 
483 rajveer 6719
    public getAllOrders_args setWarehouse_id(long warehouse_id) {
6720
      this.warehouse_id = warehouse_id;
6721
      setWarehouse_idIsSet(true);
68 ashish 6722
      return this;
6723
    }
6724
 
483 rajveer 6725
    public void unsetWarehouse_id() {
6726
      __isset_bit_vector.clear(__WAREHOUSE_ID_ISSET_ID);
68 ashish 6727
    }
6728
 
483 rajveer 6729
    /** Returns true if field warehouse_id is set (has been asigned a value) and false otherwise */
6730
    public boolean isSetWarehouse_id() {
6731
      return __isset_bit_vector.get(__WAREHOUSE_ID_ISSET_ID);
68 ashish 6732
    }
6733
 
483 rajveer 6734
    public void setWarehouse_idIsSet(boolean value) {
6735
      __isset_bit_vector.set(__WAREHOUSE_ID_ISSET_ID, value);
68 ashish 6736
    }
6737
 
6738
    public void setFieldValue(_Fields field, Object value) {
6739
      switch (field) {
483 rajveer 6740
      case STATUS:
68 ashish 6741
        if (value == null) {
483 rajveer 6742
          unsetStatus();
68 ashish 6743
        } else {
483 rajveer 6744
          setStatus((OrderStatus)value);
68 ashish 6745
        }
6746
        break;
6747
 
483 rajveer 6748
      case FROM_DATE:
68 ashish 6749
        if (value == null) {
483 rajveer 6750
          unsetFrom_date();
68 ashish 6751
        } else {
483 rajveer 6752
          setFrom_date((Long)value);
68 ashish 6753
        }
6754
        break;
6755
 
483 rajveer 6756
      case TO_DATE:
6757
        if (value == null) {
6758
          unsetTo_date();
6759
        } else {
6760
          setTo_date((Long)value);
6761
        }
6762
        break;
6763
 
6764
      case WAREHOUSE_ID:
6765
        if (value == null) {
6766
          unsetWarehouse_id();
6767
        } else {
6768
          setWarehouse_id((Long)value);
6769
        }
6770
        break;
6771
 
68 ashish 6772
      }
6773
    }
6774
 
6775
    public void setFieldValue(int fieldID, Object value) {
6776
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
6777
    }
6778
 
6779
    public Object getFieldValue(_Fields field) {
6780
      switch (field) {
483 rajveer 6781
      case STATUS:
6782
        return getStatus();
68 ashish 6783
 
483 rajveer 6784
      case FROM_DATE:
6785
        return new Long(getFrom_date());
68 ashish 6786
 
483 rajveer 6787
      case TO_DATE:
6788
        return new Long(getTo_date());
6789
 
6790
      case WAREHOUSE_ID:
6791
        return new Long(getWarehouse_id());
6792
 
68 ashish 6793
      }
6794
      throw new IllegalStateException();
6795
    }
6796
 
6797
    public Object getFieldValue(int fieldId) {
6798
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
6799
    }
6800
 
6801
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
6802
    public boolean isSet(_Fields field) {
6803
      switch (field) {
483 rajveer 6804
      case STATUS:
6805
        return isSetStatus();
6806
      case FROM_DATE:
6807
        return isSetFrom_date();
6808
      case TO_DATE:
6809
        return isSetTo_date();
6810
      case WAREHOUSE_ID:
6811
        return isSetWarehouse_id();
68 ashish 6812
      }
6813
      throw new IllegalStateException();
6814
    }
6815
 
6816
    public boolean isSet(int fieldID) {
6817
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
6818
    }
6819
 
6820
    @Override
6821
    public boolean equals(Object that) {
6822
      if (that == null)
6823
        return false;
483 rajveer 6824
      if (that instanceof getAllOrders_args)
6825
        return this.equals((getAllOrders_args)that);
68 ashish 6826
      return false;
6827
    }
6828
 
483 rajveer 6829
    public boolean equals(getAllOrders_args that) {
68 ashish 6830
      if (that == null)
6831
        return false;
6832
 
483 rajveer 6833
      boolean this_present_status = true && this.isSetStatus();
6834
      boolean that_present_status = true && that.isSetStatus();
6835
      if (this_present_status || that_present_status) {
6836
        if (!(this_present_status && that_present_status))
68 ashish 6837
          return false;
483 rajveer 6838
        if (!this.status.equals(that.status))
68 ashish 6839
          return false;
6840
      }
6841
 
483 rajveer 6842
      boolean this_present_from_date = true;
6843
      boolean that_present_from_date = true;
6844
      if (this_present_from_date || that_present_from_date) {
6845
        if (!(this_present_from_date && that_present_from_date))
68 ashish 6846
          return false;
483 rajveer 6847
        if (this.from_date != that.from_date)
68 ashish 6848
          return false;
6849
      }
6850
 
483 rajveer 6851
      boolean this_present_to_date = true;
6852
      boolean that_present_to_date = true;
6853
      if (this_present_to_date || that_present_to_date) {
6854
        if (!(this_present_to_date && that_present_to_date))
6855
          return false;
6856
        if (this.to_date != that.to_date)
6857
          return false;
68 ashish 6858
      }
6859
 
483 rajveer 6860
      boolean this_present_warehouse_id = true;
6861
      boolean that_present_warehouse_id = true;
6862
      if (this_present_warehouse_id || that_present_warehouse_id) {
6863
        if (!(this_present_warehouse_id && that_present_warehouse_id))
68 ashish 6864
          return false;
483 rajveer 6865
        if (this.warehouse_id != that.warehouse_id)
68 ashish 6866
          return false;
6867
      }
6868
 
6869
      return true;
6870
    }
6871
 
6872
    @Override
6873
    public int hashCode() {
6874
      return 0;
6875
    }
6876
 
483 rajveer 6877
    public int compareTo(getAllOrders_args other) {
68 ashish 6878
      if (!getClass().equals(other.getClass())) {
6879
        return getClass().getName().compareTo(other.getClass().getName());
6880
      }
6881
 
6882
      int lastComparison = 0;
483 rajveer 6883
      getAllOrders_args typedOther = (getAllOrders_args)other;
68 ashish 6884
 
483 rajveer 6885
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
68 ashish 6886
      if (lastComparison != 0) {
6887
        return lastComparison;
6888
      }
483 rajveer 6889
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
68 ashish 6890
      if (lastComparison != 0) {
6891
        return lastComparison;
6892
      }
483 rajveer 6893
      lastComparison = Boolean.valueOf(isSetFrom_date()).compareTo(isSetFrom_date());
6894
      if (lastComparison != 0) {
6895
        return lastComparison;
6896
      }
6897
      lastComparison = TBaseHelper.compareTo(from_date, typedOther.from_date);
6898
      if (lastComparison != 0) {
6899
        return lastComparison;
6900
      }
6901
      lastComparison = Boolean.valueOf(isSetTo_date()).compareTo(isSetTo_date());
6902
      if (lastComparison != 0) {
6903
        return lastComparison;
6904
      }
6905
      lastComparison = TBaseHelper.compareTo(to_date, typedOther.to_date);
6906
      if (lastComparison != 0) {
6907
        return lastComparison;
6908
      }
6909
      lastComparison = Boolean.valueOf(isSetWarehouse_id()).compareTo(isSetWarehouse_id());
6910
      if (lastComparison != 0) {
6911
        return lastComparison;
6912
      }
6913
      lastComparison = TBaseHelper.compareTo(warehouse_id, typedOther.warehouse_id);
6914
      if (lastComparison != 0) {
6915
        return lastComparison;
6916
      }
68 ashish 6917
      return 0;
6918
    }
6919
 
6920
    public void read(TProtocol iprot) throws TException {
6921
      TField field;
6922
      iprot.readStructBegin();
6923
      while (true)
6924
      {
6925
        field = iprot.readFieldBegin();
6926
        if (field.type == TType.STOP) { 
6927
          break;
6928
        }
6929
        _Fields fieldId = _Fields.findByThriftId(field.id);
6930
        if (fieldId == null) {
6931
          TProtocolUtil.skip(iprot, field.type);
6932
        } else {
6933
          switch (fieldId) {
483 rajveer 6934
            case STATUS:
6935
              if (field.type == TType.I32) {
6936
                this.status = OrderStatus.findByValue(iprot.readI32());
6937
              } else { 
6938
                TProtocolUtil.skip(iprot, field.type);
6939
              }
6940
              break;
6941
            case FROM_DATE:
68 ashish 6942
              if (field.type == TType.I64) {
483 rajveer 6943
                this.from_date = iprot.readI64();
6944
                setFrom_dateIsSet(true);
68 ashish 6945
              } else { 
6946
                TProtocolUtil.skip(iprot, field.type);
6947
              }
6948
              break;
483 rajveer 6949
            case TO_DATE:
6950
              if (field.type == TType.I64) {
6951
                this.to_date = iprot.readI64();
6952
                setTo_dateIsSet(true);
6953
              } else { 
6954
                TProtocolUtil.skip(iprot, field.type);
6955
              }
6956
              break;
6957
            case WAREHOUSE_ID:
6958
              if (field.type == TType.I64) {
6959
                this.warehouse_id = iprot.readI64();
6960
                setWarehouse_idIsSet(true);
6961
              } else { 
6962
                TProtocolUtil.skip(iprot, field.type);
6963
              }
6964
              break;
68 ashish 6965
          }
6966
          iprot.readFieldEnd();
6967
        }
6968
      }
6969
      iprot.readStructEnd();
6970
      validate();
6971
    }
6972
 
6973
    public void write(TProtocol oprot) throws TException {
6974
      validate();
6975
 
6976
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 6977
      if (this.status != null) {
6978
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
6979
        oprot.writeI32(this.status.getValue());
6980
        oprot.writeFieldEnd();
6981
      }
6982
      oprot.writeFieldBegin(FROM_DATE_FIELD_DESC);
6983
      oprot.writeI64(this.from_date);
68 ashish 6984
      oprot.writeFieldEnd();
483 rajveer 6985
      oprot.writeFieldBegin(TO_DATE_FIELD_DESC);
6986
      oprot.writeI64(this.to_date);
6987
      oprot.writeFieldEnd();
6988
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
6989
      oprot.writeI64(this.warehouse_id);
6990
      oprot.writeFieldEnd();
68 ashish 6991
      oprot.writeFieldStop();
6992
      oprot.writeStructEnd();
6993
    }
6994
 
6995
    @Override
6996
    public String toString() {
483 rajveer 6997
      StringBuilder sb = new StringBuilder("getAllOrders_args(");
68 ashish 6998
      boolean first = true;
6999
 
483 rajveer 7000
      sb.append("status:");
7001
      if (this.status == null) {
7002
        sb.append("null");
7003
      } else {
7004
        String status_name = status.name();
7005
        if (status_name != null) {
7006
          sb.append(status_name);
7007
          sb.append(" (");
7008
        }
7009
        sb.append(this.status);
7010
        if (status_name != null) {
7011
          sb.append(")");
7012
        }
7013
      }
68 ashish 7014
      first = false;
483 rajveer 7015
      if (!first) sb.append(", ");
7016
      sb.append("from_date:");
7017
      sb.append(this.from_date);
7018
      first = false;
7019
      if (!first) sb.append(", ");
7020
      sb.append("to_date:");
7021
      sb.append(this.to_date);
7022
      first = false;
7023
      if (!first) sb.append(", ");
7024
      sb.append("warehouse_id:");
7025
      sb.append(this.warehouse_id);
7026
      first = false;
68 ashish 7027
      sb.append(")");
7028
      return sb.toString();
7029
    }
7030
 
7031
    public void validate() throws TException {
7032
      // check for required fields
7033
    }
7034
 
7035
  }
7036
 
483 rajveer 7037
  public static class getAllOrders_result implements TBase<getAllOrders_result._Fields>, java.io.Serializable, Cloneable, Comparable<getAllOrders_result>   {
7038
    private static final TStruct STRUCT_DESC = new TStruct("getAllOrders_result");
68 ashish 7039
 
483 rajveer 7040
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
68 ashish 7041
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
7042
 
483 rajveer 7043
    private List<Order> success;
68 ashish 7044
    private TransactionServiceException ex;
7045
 
7046
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7047
    public enum _Fields implements TFieldIdEnum {
7048
      SUCCESS((short)0, "success"),
7049
      EX((short)1, "ex");
7050
 
7051
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
7052
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7053
 
7054
      static {
7055
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7056
          byId.put((int)field._thriftId, field);
7057
          byName.put(field.getFieldName(), field);
7058
        }
7059
      }
7060
 
7061
      /**
7062
       * Find the _Fields constant that matches fieldId, or null if its not found.
7063
       */
7064
      public static _Fields findByThriftId(int fieldId) {
7065
        return byId.get(fieldId);
7066
      }
7067
 
7068
      /**
7069
       * Find the _Fields constant that matches fieldId, throwing an exception
7070
       * if it is not found.
7071
       */
7072
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7073
        _Fields fields = findByThriftId(fieldId);
7074
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7075
        return fields;
7076
      }
7077
 
7078
      /**
7079
       * Find the _Fields constant that matches name, or null if its not found.
7080
       */
7081
      public static _Fields findByName(String name) {
7082
        return byName.get(name);
7083
      }
7084
 
7085
      private final short _thriftId;
7086
      private final String _fieldName;
7087
 
7088
      _Fields(short thriftId, String fieldName) {
7089
        _thriftId = thriftId;
7090
        _fieldName = fieldName;
7091
      }
7092
 
7093
      public short getThriftFieldId() {
7094
        return _thriftId;
7095
      }
7096
 
7097
      public String getFieldName() {
7098
        return _fieldName;
7099
      }
7100
    }
7101
 
7102
    // isset id assignments
7103
 
7104
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
7105
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
483 rajveer 7106
          new ListMetaData(TType.LIST, 
7107
              new StructMetaData(TType.STRUCT, Order.class))));
68 ashish 7108
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
7109
          new FieldValueMetaData(TType.STRUCT)));
7110
    }});
7111
 
7112
    static {
483 rajveer 7113
      FieldMetaData.addStructMetaDataMap(getAllOrders_result.class, metaDataMap);
68 ashish 7114
    }
7115
 
483 rajveer 7116
    public getAllOrders_result() {
68 ashish 7117
    }
7118
 
483 rajveer 7119
    public getAllOrders_result(
7120
      List<Order> success,
68 ashish 7121
      TransactionServiceException ex)
7122
    {
7123
      this();
7124
      this.success = success;
7125
      this.ex = ex;
7126
    }
7127
 
7128
    /**
7129
     * Performs a deep copy on <i>other</i>.
7130
     */
483 rajveer 7131
    public getAllOrders_result(getAllOrders_result other) {
68 ashish 7132
      if (other.isSetSuccess()) {
483 rajveer 7133
        List<Order> __this__success = new ArrayList<Order>();
7134
        for (Order other_element : other.success) {
7135
          __this__success.add(new Order(other_element));
7136
        }
7137
        this.success = __this__success;
68 ashish 7138
      }
7139
      if (other.isSetEx()) {
7140
        this.ex = new TransactionServiceException(other.ex);
7141
      }
7142
    }
7143
 
483 rajveer 7144
    public getAllOrders_result deepCopy() {
7145
      return new getAllOrders_result(this);
68 ashish 7146
    }
7147
 
7148
    @Deprecated
483 rajveer 7149
    public getAllOrders_result clone() {
7150
      return new getAllOrders_result(this);
68 ashish 7151
    }
7152
 
483 rajveer 7153
    public int getSuccessSize() {
7154
      return (this.success == null) ? 0 : this.success.size();
7155
    }
7156
 
7157
    public java.util.Iterator<Order> getSuccessIterator() {
7158
      return (this.success == null) ? null : this.success.iterator();
7159
    }
7160
 
7161
    public void addToSuccess(Order elem) {
7162
      if (this.success == null) {
7163
        this.success = new ArrayList<Order>();
7164
      }
7165
      this.success.add(elem);
7166
    }
7167
 
7168
    public List<Order> getSuccess() {
68 ashish 7169
      return this.success;
7170
    }
7171
 
483 rajveer 7172
    public getAllOrders_result setSuccess(List<Order> success) {
68 ashish 7173
      this.success = success;
7174
      return this;
7175
    }
7176
 
7177
    public void unsetSuccess() {
7178
      this.success = null;
7179
    }
7180
 
7181
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
7182
    public boolean isSetSuccess() {
7183
      return this.success != null;
7184
    }
7185
 
7186
    public void setSuccessIsSet(boolean value) {
7187
      if (!value) {
7188
        this.success = null;
7189
      }
7190
    }
7191
 
7192
    public TransactionServiceException getEx() {
7193
      return this.ex;
7194
    }
7195
 
483 rajveer 7196
    public getAllOrders_result setEx(TransactionServiceException ex) {
68 ashish 7197
      this.ex = ex;
7198
      return this;
7199
    }
7200
 
7201
    public void unsetEx() {
7202
      this.ex = null;
7203
    }
7204
 
7205
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
7206
    public boolean isSetEx() {
7207
      return this.ex != null;
7208
    }
7209
 
7210
    public void setExIsSet(boolean value) {
7211
      if (!value) {
7212
        this.ex = null;
7213
      }
7214
    }
7215
 
7216
    public void setFieldValue(_Fields field, Object value) {
7217
      switch (field) {
7218
      case SUCCESS:
7219
        if (value == null) {
7220
          unsetSuccess();
7221
        } else {
483 rajveer 7222
          setSuccess((List<Order>)value);
68 ashish 7223
        }
7224
        break;
7225
 
7226
      case EX:
7227
        if (value == null) {
7228
          unsetEx();
7229
        } else {
7230
          setEx((TransactionServiceException)value);
7231
        }
7232
        break;
7233
 
7234
      }
7235
    }
7236
 
7237
    public void setFieldValue(int fieldID, Object value) {
7238
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
7239
    }
7240
 
7241
    public Object getFieldValue(_Fields field) {
7242
      switch (field) {
7243
      case SUCCESS:
7244
        return getSuccess();
7245
 
7246
      case EX:
7247
        return getEx();
7248
 
7249
      }
7250
      throw new IllegalStateException();
7251
    }
7252
 
7253
    public Object getFieldValue(int fieldId) {
7254
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
7255
    }
7256
 
7257
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
7258
    public boolean isSet(_Fields field) {
7259
      switch (field) {
7260
      case SUCCESS:
7261
        return isSetSuccess();
7262
      case EX:
7263
        return isSetEx();
7264
      }
7265
      throw new IllegalStateException();
7266
    }
7267
 
7268
    public boolean isSet(int fieldID) {
7269
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
7270
    }
7271
 
7272
    @Override
7273
    public boolean equals(Object that) {
7274
      if (that == null)
7275
        return false;
483 rajveer 7276
      if (that instanceof getAllOrders_result)
7277
        return this.equals((getAllOrders_result)that);
68 ashish 7278
      return false;
7279
    }
7280
 
483 rajveer 7281
    public boolean equals(getAllOrders_result that) {
68 ashish 7282
      if (that == null)
7283
        return false;
7284
 
7285
      boolean this_present_success = true && this.isSetSuccess();
7286
      boolean that_present_success = true && that.isSetSuccess();
7287
      if (this_present_success || that_present_success) {
7288
        if (!(this_present_success && that_present_success))
7289
          return false;
7290
        if (!this.success.equals(that.success))
7291
          return false;
7292
      }
7293
 
7294
      boolean this_present_ex = true && this.isSetEx();
7295
      boolean that_present_ex = true && that.isSetEx();
7296
      if (this_present_ex || that_present_ex) {
7297
        if (!(this_present_ex && that_present_ex))
7298
          return false;
7299
        if (!this.ex.equals(that.ex))
7300
          return false;
7301
      }
7302
 
7303
      return true;
7304
    }
7305
 
7306
    @Override
7307
    public int hashCode() {
7308
      return 0;
7309
    }
7310
 
483 rajveer 7311
    public int compareTo(getAllOrders_result other) {
7312
      if (!getClass().equals(other.getClass())) {
7313
        return getClass().getName().compareTo(other.getClass().getName());
7314
      }
7315
 
7316
      int lastComparison = 0;
7317
      getAllOrders_result typedOther = (getAllOrders_result)other;
7318
 
7319
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
7320
      if (lastComparison != 0) {
7321
        return lastComparison;
7322
      }
7323
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
7324
      if (lastComparison != 0) {
7325
        return lastComparison;
7326
      }
7327
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
7328
      if (lastComparison != 0) {
7329
        return lastComparison;
7330
      }
7331
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
7332
      if (lastComparison != 0) {
7333
        return lastComparison;
7334
      }
7335
      return 0;
7336
    }
7337
 
68 ashish 7338
    public void read(TProtocol iprot) throws TException {
7339
      TField field;
7340
      iprot.readStructBegin();
7341
      while (true)
7342
      {
7343
        field = iprot.readFieldBegin();
7344
        if (field.type == TType.STOP) { 
7345
          break;
7346
        }
7347
        _Fields fieldId = _Fields.findByThriftId(field.id);
7348
        if (fieldId == null) {
7349
          TProtocolUtil.skip(iprot, field.type);
7350
        } else {
7351
          switch (fieldId) {
7352
            case SUCCESS:
483 rajveer 7353
              if (field.type == TType.LIST) {
7354
                {
684 chandransh 7355
                  TList _list16 = iprot.readListBegin();
7356
                  this.success = new ArrayList<Order>(_list16.size);
7357
                  for (int _i17 = 0; _i17 < _list16.size; ++_i17)
483 rajveer 7358
                  {
684 chandransh 7359
                    Order _elem18;
7360
                    _elem18 = new Order();
7361
                    _elem18.read(iprot);
7362
                    this.success.add(_elem18);
483 rajveer 7363
                  }
7364
                  iprot.readListEnd();
7365
                }
68 ashish 7366
              } else { 
7367
                TProtocolUtil.skip(iprot, field.type);
7368
              }
7369
              break;
7370
            case EX:
7371
              if (field.type == TType.STRUCT) {
7372
                this.ex = new TransactionServiceException();
7373
                this.ex.read(iprot);
7374
              } else { 
7375
                TProtocolUtil.skip(iprot, field.type);
7376
              }
7377
              break;
7378
          }
7379
          iprot.readFieldEnd();
7380
        }
7381
      }
7382
      iprot.readStructEnd();
7383
      validate();
7384
    }
7385
 
7386
    public void write(TProtocol oprot) throws TException {
7387
      oprot.writeStructBegin(STRUCT_DESC);
7388
 
7389
      if (this.isSetSuccess()) {
7390
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
483 rajveer 7391
        {
7392
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
684 chandransh 7393
          for (Order _iter19 : this.success)
483 rajveer 7394
          {
684 chandransh 7395
            _iter19.write(oprot);
483 rajveer 7396
          }
7397
          oprot.writeListEnd();
7398
        }
68 ashish 7399
        oprot.writeFieldEnd();
7400
      } else if (this.isSetEx()) {
7401
        oprot.writeFieldBegin(EX_FIELD_DESC);
7402
        this.ex.write(oprot);
7403
        oprot.writeFieldEnd();
7404
      }
7405
      oprot.writeFieldStop();
7406
      oprot.writeStructEnd();
7407
    }
7408
 
7409
    @Override
7410
    public String toString() {
483 rajveer 7411
      StringBuilder sb = new StringBuilder("getAllOrders_result(");
68 ashish 7412
      boolean first = true;
7413
 
7414
      sb.append("success:");
7415
      if (this.success == null) {
7416
        sb.append("null");
7417
      } else {
7418
        sb.append(this.success);
7419
      }
7420
      first = false;
7421
      if (!first) sb.append(", ");
7422
      sb.append("ex:");
7423
      if (this.ex == null) {
7424
        sb.append("null");
7425
      } else {
7426
        sb.append(this.ex);
7427
      }
7428
      first = false;
7429
      sb.append(")");
7430
      return sb.toString();
7431
    }
7432
 
7433
    public void validate() throws TException {
7434
      // check for required fields
7435
    }
7436
 
7437
  }
7438
 
1022 varun.gupt 7439
  public static class getOrdersByBillingDate_args implements TBase<getOrdersByBillingDate_args._Fields>, java.io.Serializable, Cloneable, Comparable<getOrdersByBillingDate_args>   {
7440
    private static final TStruct STRUCT_DESC = new TStruct("getOrdersByBillingDate_args");
7441
 
7442
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)1);
7443
    private static final TField START_BILLING_DATE_FIELD_DESC = new TField("start_billing_date", TType.I64, (short)2);
7444
    private static final TField END_BILLING_DATE_FIELD_DESC = new TField("end_billing_date", TType.I64, (short)3);
7445
    private static final TField WAREHOUSE_ID_FIELD_DESC = new TField("warehouse_id", TType.I64, (short)4);
7446
 
7447
    private OrderStatus status;
7448
    private long start_billing_date;
7449
    private long end_billing_date;
7450
    private long warehouse_id;
7451
 
7452
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7453
    public enum _Fields implements TFieldIdEnum {
7454
      /**
7455
       * 
7456
       * @see OrderStatus
7457
       */
7458
      STATUS((short)1, "status"),
7459
      START_BILLING_DATE((short)2, "start_billing_date"),
7460
      END_BILLING_DATE((short)3, "end_billing_date"),
7461
      WAREHOUSE_ID((short)4, "warehouse_id");
7462
 
7463
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
7464
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7465
 
7466
      static {
7467
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7468
          byId.put((int)field._thriftId, field);
7469
          byName.put(field.getFieldName(), field);
7470
        }
7471
      }
7472
 
7473
      /**
7474
       * Find the _Fields constant that matches fieldId, or null if its not found.
7475
       */
7476
      public static _Fields findByThriftId(int fieldId) {
7477
        return byId.get(fieldId);
7478
      }
7479
 
7480
      /**
7481
       * Find the _Fields constant that matches fieldId, throwing an exception
7482
       * if it is not found.
7483
       */
7484
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7485
        _Fields fields = findByThriftId(fieldId);
7486
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7487
        return fields;
7488
      }
7489
 
7490
      /**
7491
       * Find the _Fields constant that matches name, or null if its not found.
7492
       */
7493
      public static _Fields findByName(String name) {
7494
        return byName.get(name);
7495
      }
7496
 
7497
      private final short _thriftId;
7498
      private final String _fieldName;
7499
 
7500
      _Fields(short thriftId, String fieldName) {
7501
        _thriftId = thriftId;
7502
        _fieldName = fieldName;
7503
      }
7504
 
7505
      public short getThriftFieldId() {
7506
        return _thriftId;
7507
      }
7508
 
7509
      public String getFieldName() {
7510
        return _fieldName;
7511
      }
7512
    }
7513
 
7514
    // isset id assignments
7515
    private static final int __START_BILLING_DATE_ISSET_ID = 0;
7516
    private static final int __END_BILLING_DATE_ISSET_ID = 1;
7517
    private static final int __WAREHOUSE_ID_ISSET_ID = 2;
7518
    private BitSet __isset_bit_vector = new BitSet(3);
7519
 
7520
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
7521
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
7522
          new EnumMetaData(TType.ENUM, OrderStatus.class)));
7523
      put(_Fields.START_BILLING_DATE, new FieldMetaData("start_billing_date", TFieldRequirementType.DEFAULT, 
7524
          new FieldValueMetaData(TType.I64)));
7525
      put(_Fields.END_BILLING_DATE, new FieldMetaData("end_billing_date", TFieldRequirementType.DEFAULT, 
7526
          new FieldValueMetaData(TType.I64)));
7527
      put(_Fields.WAREHOUSE_ID, new FieldMetaData("warehouse_id", TFieldRequirementType.DEFAULT, 
7528
          new FieldValueMetaData(TType.I64)));
7529
    }});
7530
 
7531
    static {
7532
      FieldMetaData.addStructMetaDataMap(getOrdersByBillingDate_args.class, metaDataMap);
7533
    }
7534
 
7535
    public getOrdersByBillingDate_args() {
7536
    }
7537
 
7538
    public getOrdersByBillingDate_args(
7539
      OrderStatus status,
7540
      long start_billing_date,
7541
      long end_billing_date,
7542
      long warehouse_id)
7543
    {
7544
      this();
7545
      this.status = status;
7546
      this.start_billing_date = start_billing_date;
7547
      setStart_billing_dateIsSet(true);
7548
      this.end_billing_date = end_billing_date;
7549
      setEnd_billing_dateIsSet(true);
7550
      this.warehouse_id = warehouse_id;
7551
      setWarehouse_idIsSet(true);
7552
    }
7553
 
7554
    /**
7555
     * Performs a deep copy on <i>other</i>.
7556
     */
7557
    public getOrdersByBillingDate_args(getOrdersByBillingDate_args other) {
7558
      __isset_bit_vector.clear();
7559
      __isset_bit_vector.or(other.__isset_bit_vector);
7560
      if (other.isSetStatus()) {
7561
        this.status = other.status;
7562
      }
7563
      this.start_billing_date = other.start_billing_date;
7564
      this.end_billing_date = other.end_billing_date;
7565
      this.warehouse_id = other.warehouse_id;
7566
    }
7567
 
7568
    public getOrdersByBillingDate_args deepCopy() {
7569
      return new getOrdersByBillingDate_args(this);
7570
    }
7571
 
7572
    @Deprecated
7573
    public getOrdersByBillingDate_args clone() {
7574
      return new getOrdersByBillingDate_args(this);
7575
    }
7576
 
7577
    /**
7578
     * 
7579
     * @see OrderStatus
7580
     */
7581
    public OrderStatus getStatus() {
7582
      return this.status;
7583
    }
7584
 
7585
    /**
7586
     * 
7587
     * @see OrderStatus
7588
     */
7589
    public getOrdersByBillingDate_args setStatus(OrderStatus status) {
7590
      this.status = status;
7591
      return this;
7592
    }
7593
 
7594
    public void unsetStatus() {
7595
      this.status = null;
7596
    }
7597
 
7598
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
7599
    public boolean isSetStatus() {
7600
      return this.status != null;
7601
    }
7602
 
7603
    public void setStatusIsSet(boolean value) {
7604
      if (!value) {
7605
        this.status = null;
7606
      }
7607
    }
7608
 
7609
    public long getStart_billing_date() {
7610
      return this.start_billing_date;
7611
    }
7612
 
7613
    public getOrdersByBillingDate_args setStart_billing_date(long start_billing_date) {
7614
      this.start_billing_date = start_billing_date;
7615
      setStart_billing_dateIsSet(true);
7616
      return this;
7617
    }
7618
 
7619
    public void unsetStart_billing_date() {
7620
      __isset_bit_vector.clear(__START_BILLING_DATE_ISSET_ID);
7621
    }
7622
 
7623
    /** Returns true if field start_billing_date is set (has been asigned a value) and false otherwise */
7624
    public boolean isSetStart_billing_date() {
7625
      return __isset_bit_vector.get(__START_BILLING_DATE_ISSET_ID);
7626
    }
7627
 
7628
    public void setStart_billing_dateIsSet(boolean value) {
7629
      __isset_bit_vector.set(__START_BILLING_DATE_ISSET_ID, value);
7630
    }
7631
 
7632
    public long getEnd_billing_date() {
7633
      return this.end_billing_date;
7634
    }
7635
 
7636
    public getOrdersByBillingDate_args setEnd_billing_date(long end_billing_date) {
7637
      this.end_billing_date = end_billing_date;
7638
      setEnd_billing_dateIsSet(true);
7639
      return this;
7640
    }
7641
 
7642
    public void unsetEnd_billing_date() {
7643
      __isset_bit_vector.clear(__END_BILLING_DATE_ISSET_ID);
7644
    }
7645
 
7646
    /** Returns true if field end_billing_date is set (has been asigned a value) and false otherwise */
7647
    public boolean isSetEnd_billing_date() {
7648
      return __isset_bit_vector.get(__END_BILLING_DATE_ISSET_ID);
7649
    }
7650
 
7651
    public void setEnd_billing_dateIsSet(boolean value) {
7652
      __isset_bit_vector.set(__END_BILLING_DATE_ISSET_ID, value);
7653
    }
7654
 
7655
    public long getWarehouse_id() {
7656
      return this.warehouse_id;
7657
    }
7658
 
7659
    public getOrdersByBillingDate_args setWarehouse_id(long warehouse_id) {
7660
      this.warehouse_id = warehouse_id;
7661
      setWarehouse_idIsSet(true);
7662
      return this;
7663
    }
7664
 
7665
    public void unsetWarehouse_id() {
7666
      __isset_bit_vector.clear(__WAREHOUSE_ID_ISSET_ID);
7667
    }
7668
 
7669
    /** Returns true if field warehouse_id is set (has been asigned a value) and false otherwise */
7670
    public boolean isSetWarehouse_id() {
7671
      return __isset_bit_vector.get(__WAREHOUSE_ID_ISSET_ID);
7672
    }
7673
 
7674
    public void setWarehouse_idIsSet(boolean value) {
7675
      __isset_bit_vector.set(__WAREHOUSE_ID_ISSET_ID, value);
7676
    }
7677
 
7678
    public void setFieldValue(_Fields field, Object value) {
7679
      switch (field) {
7680
      case STATUS:
7681
        if (value == null) {
7682
          unsetStatus();
7683
        } else {
7684
          setStatus((OrderStatus)value);
7685
        }
7686
        break;
7687
 
7688
      case START_BILLING_DATE:
7689
        if (value == null) {
7690
          unsetStart_billing_date();
7691
        } else {
7692
          setStart_billing_date((Long)value);
7693
        }
7694
        break;
7695
 
7696
      case END_BILLING_DATE:
7697
        if (value == null) {
7698
          unsetEnd_billing_date();
7699
        } else {
7700
          setEnd_billing_date((Long)value);
7701
        }
7702
        break;
7703
 
7704
      case WAREHOUSE_ID:
7705
        if (value == null) {
7706
          unsetWarehouse_id();
7707
        } else {
7708
          setWarehouse_id((Long)value);
7709
        }
7710
        break;
7711
 
7712
      }
7713
    }
7714
 
7715
    public void setFieldValue(int fieldID, Object value) {
7716
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
7717
    }
7718
 
7719
    public Object getFieldValue(_Fields field) {
7720
      switch (field) {
7721
      case STATUS:
7722
        return getStatus();
7723
 
7724
      case START_BILLING_DATE:
7725
        return new Long(getStart_billing_date());
7726
 
7727
      case END_BILLING_DATE:
7728
        return new Long(getEnd_billing_date());
7729
 
7730
      case WAREHOUSE_ID:
7731
        return new Long(getWarehouse_id());
7732
 
7733
      }
7734
      throw new IllegalStateException();
7735
    }
7736
 
7737
    public Object getFieldValue(int fieldId) {
7738
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
7739
    }
7740
 
7741
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
7742
    public boolean isSet(_Fields field) {
7743
      switch (field) {
7744
      case STATUS:
7745
        return isSetStatus();
7746
      case START_BILLING_DATE:
7747
        return isSetStart_billing_date();
7748
      case END_BILLING_DATE:
7749
        return isSetEnd_billing_date();
7750
      case WAREHOUSE_ID:
7751
        return isSetWarehouse_id();
7752
      }
7753
      throw new IllegalStateException();
7754
    }
7755
 
7756
    public boolean isSet(int fieldID) {
7757
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
7758
    }
7759
 
7760
    @Override
7761
    public boolean equals(Object that) {
7762
      if (that == null)
7763
        return false;
7764
      if (that instanceof getOrdersByBillingDate_args)
7765
        return this.equals((getOrdersByBillingDate_args)that);
7766
      return false;
7767
    }
7768
 
7769
    public boolean equals(getOrdersByBillingDate_args that) {
7770
      if (that == null)
7771
        return false;
7772
 
7773
      boolean this_present_status = true && this.isSetStatus();
7774
      boolean that_present_status = true && that.isSetStatus();
7775
      if (this_present_status || that_present_status) {
7776
        if (!(this_present_status && that_present_status))
7777
          return false;
7778
        if (!this.status.equals(that.status))
7779
          return false;
7780
      }
7781
 
7782
      boolean this_present_start_billing_date = true;
7783
      boolean that_present_start_billing_date = true;
7784
      if (this_present_start_billing_date || that_present_start_billing_date) {
7785
        if (!(this_present_start_billing_date && that_present_start_billing_date))
7786
          return false;
7787
        if (this.start_billing_date != that.start_billing_date)
7788
          return false;
7789
      }
7790
 
7791
      boolean this_present_end_billing_date = true;
7792
      boolean that_present_end_billing_date = true;
7793
      if (this_present_end_billing_date || that_present_end_billing_date) {
7794
        if (!(this_present_end_billing_date && that_present_end_billing_date))
7795
          return false;
7796
        if (this.end_billing_date != that.end_billing_date)
7797
          return false;
7798
      }
7799
 
7800
      boolean this_present_warehouse_id = true;
7801
      boolean that_present_warehouse_id = true;
7802
      if (this_present_warehouse_id || that_present_warehouse_id) {
7803
        if (!(this_present_warehouse_id && that_present_warehouse_id))
7804
          return false;
7805
        if (this.warehouse_id != that.warehouse_id)
7806
          return false;
7807
      }
7808
 
7809
      return true;
7810
    }
7811
 
7812
    @Override
7813
    public int hashCode() {
7814
      return 0;
7815
    }
7816
 
7817
    public int compareTo(getOrdersByBillingDate_args other) {
7818
      if (!getClass().equals(other.getClass())) {
7819
        return getClass().getName().compareTo(other.getClass().getName());
7820
      }
7821
 
7822
      int lastComparison = 0;
7823
      getOrdersByBillingDate_args typedOther = (getOrdersByBillingDate_args)other;
7824
 
7825
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
7826
      if (lastComparison != 0) {
7827
        return lastComparison;
7828
      }
7829
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
7830
      if (lastComparison != 0) {
7831
        return lastComparison;
7832
      }
7833
      lastComparison = Boolean.valueOf(isSetStart_billing_date()).compareTo(isSetStart_billing_date());
7834
      if (lastComparison != 0) {
7835
        return lastComparison;
7836
      }
7837
      lastComparison = TBaseHelper.compareTo(start_billing_date, typedOther.start_billing_date);
7838
      if (lastComparison != 0) {
7839
        return lastComparison;
7840
      }
7841
      lastComparison = Boolean.valueOf(isSetEnd_billing_date()).compareTo(isSetEnd_billing_date());
7842
      if (lastComparison != 0) {
7843
        return lastComparison;
7844
      }
7845
      lastComparison = TBaseHelper.compareTo(end_billing_date, typedOther.end_billing_date);
7846
      if (lastComparison != 0) {
7847
        return lastComparison;
7848
      }
7849
      lastComparison = Boolean.valueOf(isSetWarehouse_id()).compareTo(isSetWarehouse_id());
7850
      if (lastComparison != 0) {
7851
        return lastComparison;
7852
      }
7853
      lastComparison = TBaseHelper.compareTo(warehouse_id, typedOther.warehouse_id);
7854
      if (lastComparison != 0) {
7855
        return lastComparison;
7856
      }
7857
      return 0;
7858
    }
7859
 
7860
    public void read(TProtocol iprot) throws TException {
7861
      TField field;
7862
      iprot.readStructBegin();
7863
      while (true)
7864
      {
7865
        field = iprot.readFieldBegin();
7866
        if (field.type == TType.STOP) { 
7867
          break;
7868
        }
7869
        _Fields fieldId = _Fields.findByThriftId(field.id);
7870
        if (fieldId == null) {
7871
          TProtocolUtil.skip(iprot, field.type);
7872
        } else {
7873
          switch (fieldId) {
7874
            case STATUS:
7875
              if (field.type == TType.I32) {
7876
                this.status = OrderStatus.findByValue(iprot.readI32());
7877
              } else { 
7878
                TProtocolUtil.skip(iprot, field.type);
7879
              }
7880
              break;
7881
            case START_BILLING_DATE:
7882
              if (field.type == TType.I64) {
7883
                this.start_billing_date = iprot.readI64();
7884
                setStart_billing_dateIsSet(true);
7885
              } else { 
7886
                TProtocolUtil.skip(iprot, field.type);
7887
              }
7888
              break;
7889
            case END_BILLING_DATE:
7890
              if (field.type == TType.I64) {
7891
                this.end_billing_date = iprot.readI64();
7892
                setEnd_billing_dateIsSet(true);
7893
              } else { 
7894
                TProtocolUtil.skip(iprot, field.type);
7895
              }
7896
              break;
7897
            case WAREHOUSE_ID:
7898
              if (field.type == TType.I64) {
7899
                this.warehouse_id = iprot.readI64();
7900
                setWarehouse_idIsSet(true);
7901
              } else { 
7902
                TProtocolUtil.skip(iprot, field.type);
7903
              }
7904
              break;
7905
          }
7906
          iprot.readFieldEnd();
7907
        }
7908
      }
7909
      iprot.readStructEnd();
7910
      validate();
7911
    }
7912
 
7913
    public void write(TProtocol oprot) throws TException {
7914
      validate();
7915
 
7916
      oprot.writeStructBegin(STRUCT_DESC);
7917
      if (this.status != null) {
7918
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
7919
        oprot.writeI32(this.status.getValue());
7920
        oprot.writeFieldEnd();
7921
      }
7922
      oprot.writeFieldBegin(START_BILLING_DATE_FIELD_DESC);
7923
      oprot.writeI64(this.start_billing_date);
7924
      oprot.writeFieldEnd();
7925
      oprot.writeFieldBegin(END_BILLING_DATE_FIELD_DESC);
7926
      oprot.writeI64(this.end_billing_date);
7927
      oprot.writeFieldEnd();
7928
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
7929
      oprot.writeI64(this.warehouse_id);
7930
      oprot.writeFieldEnd();
7931
      oprot.writeFieldStop();
7932
      oprot.writeStructEnd();
7933
    }
7934
 
7935
    @Override
7936
    public String toString() {
7937
      StringBuilder sb = new StringBuilder("getOrdersByBillingDate_args(");
7938
      boolean first = true;
7939
 
7940
      sb.append("status:");
7941
      if (this.status == null) {
7942
        sb.append("null");
7943
      } else {
7944
        String status_name = status.name();
7945
        if (status_name != null) {
7946
          sb.append(status_name);
7947
          sb.append(" (");
7948
        }
7949
        sb.append(this.status);
7950
        if (status_name != null) {
7951
          sb.append(")");
7952
        }
7953
      }
7954
      first = false;
7955
      if (!first) sb.append(", ");
7956
      sb.append("start_billing_date:");
7957
      sb.append(this.start_billing_date);
7958
      first = false;
7959
      if (!first) sb.append(", ");
7960
      sb.append("end_billing_date:");
7961
      sb.append(this.end_billing_date);
7962
      first = false;
7963
      if (!first) sb.append(", ");
7964
      sb.append("warehouse_id:");
7965
      sb.append(this.warehouse_id);
7966
      first = false;
7967
      sb.append(")");
7968
      return sb.toString();
7969
    }
7970
 
7971
    public void validate() throws TException {
7972
      // check for required fields
7973
    }
7974
 
7975
  }
7976
 
7977
  public static class getOrdersByBillingDate_result implements TBase<getOrdersByBillingDate_result._Fields>, java.io.Serializable, Cloneable, Comparable<getOrdersByBillingDate_result>   {
7978
    private static final TStruct STRUCT_DESC = new TStruct("getOrdersByBillingDate_result");
7979
 
7980
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
7981
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
7982
 
7983
    private List<Order> success;
7984
    private TransactionServiceException ex;
7985
 
7986
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7987
    public enum _Fields implements TFieldIdEnum {
7988
      SUCCESS((short)0, "success"),
7989
      EX((short)1, "ex");
7990
 
7991
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
7992
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7993
 
7994
      static {
7995
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7996
          byId.put((int)field._thriftId, field);
7997
          byName.put(field.getFieldName(), field);
7998
        }
7999
      }
8000
 
8001
      /**
8002
       * Find the _Fields constant that matches fieldId, or null if its not found.
8003
       */
8004
      public static _Fields findByThriftId(int fieldId) {
8005
        return byId.get(fieldId);
8006
      }
8007
 
8008
      /**
8009
       * Find the _Fields constant that matches fieldId, throwing an exception
8010
       * if it is not found.
8011
       */
8012
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8013
        _Fields fields = findByThriftId(fieldId);
8014
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8015
        return fields;
8016
      }
8017
 
8018
      /**
8019
       * Find the _Fields constant that matches name, or null if its not found.
8020
       */
8021
      public static _Fields findByName(String name) {
8022
        return byName.get(name);
8023
      }
8024
 
8025
      private final short _thriftId;
8026
      private final String _fieldName;
8027
 
8028
      _Fields(short thriftId, String fieldName) {
8029
        _thriftId = thriftId;
8030
        _fieldName = fieldName;
8031
      }
8032
 
8033
      public short getThriftFieldId() {
8034
        return _thriftId;
8035
      }
8036
 
8037
      public String getFieldName() {
8038
        return _fieldName;
8039
      }
8040
    }
8041
 
8042
    // isset id assignments
8043
 
8044
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
8045
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
8046
          new ListMetaData(TType.LIST, 
8047
              new StructMetaData(TType.STRUCT, Order.class))));
8048
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
8049
          new FieldValueMetaData(TType.STRUCT)));
8050
    }});
8051
 
8052
    static {
8053
      FieldMetaData.addStructMetaDataMap(getOrdersByBillingDate_result.class, metaDataMap);
8054
    }
8055
 
8056
    public getOrdersByBillingDate_result() {
8057
    }
8058
 
8059
    public getOrdersByBillingDate_result(
8060
      List<Order> success,
8061
      TransactionServiceException ex)
8062
    {
8063
      this();
8064
      this.success = success;
8065
      this.ex = ex;
8066
    }
8067
 
8068
    /**
8069
     * Performs a deep copy on <i>other</i>.
8070
     */
8071
    public getOrdersByBillingDate_result(getOrdersByBillingDate_result other) {
8072
      if (other.isSetSuccess()) {
8073
        List<Order> __this__success = new ArrayList<Order>();
8074
        for (Order other_element : other.success) {
8075
          __this__success.add(new Order(other_element));
8076
        }
8077
        this.success = __this__success;
8078
      }
8079
      if (other.isSetEx()) {
8080
        this.ex = new TransactionServiceException(other.ex);
8081
      }
8082
    }
8083
 
8084
    public getOrdersByBillingDate_result deepCopy() {
8085
      return new getOrdersByBillingDate_result(this);
8086
    }
8087
 
8088
    @Deprecated
8089
    public getOrdersByBillingDate_result clone() {
8090
      return new getOrdersByBillingDate_result(this);
8091
    }
8092
 
8093
    public int getSuccessSize() {
8094
      return (this.success == null) ? 0 : this.success.size();
8095
    }
8096
 
8097
    public java.util.Iterator<Order> getSuccessIterator() {
8098
      return (this.success == null) ? null : this.success.iterator();
8099
    }
8100
 
8101
    public void addToSuccess(Order elem) {
8102
      if (this.success == null) {
8103
        this.success = new ArrayList<Order>();
8104
      }
8105
      this.success.add(elem);
8106
    }
8107
 
8108
    public List<Order> getSuccess() {
8109
      return this.success;
8110
    }
8111
 
8112
    public getOrdersByBillingDate_result setSuccess(List<Order> success) {
8113
      this.success = success;
8114
      return this;
8115
    }
8116
 
8117
    public void unsetSuccess() {
8118
      this.success = null;
8119
    }
8120
 
8121
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
8122
    public boolean isSetSuccess() {
8123
      return this.success != null;
8124
    }
8125
 
8126
    public void setSuccessIsSet(boolean value) {
8127
      if (!value) {
8128
        this.success = null;
8129
      }
8130
    }
8131
 
8132
    public TransactionServiceException getEx() {
8133
      return this.ex;
8134
    }
8135
 
8136
    public getOrdersByBillingDate_result setEx(TransactionServiceException ex) {
8137
      this.ex = ex;
8138
      return this;
8139
    }
8140
 
8141
    public void unsetEx() {
8142
      this.ex = null;
8143
    }
8144
 
8145
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
8146
    public boolean isSetEx() {
8147
      return this.ex != null;
8148
    }
8149
 
8150
    public void setExIsSet(boolean value) {
8151
      if (!value) {
8152
        this.ex = null;
8153
      }
8154
    }
8155
 
8156
    public void setFieldValue(_Fields field, Object value) {
8157
      switch (field) {
8158
      case SUCCESS:
8159
        if (value == null) {
8160
          unsetSuccess();
8161
        } else {
8162
          setSuccess((List<Order>)value);
8163
        }
8164
        break;
8165
 
8166
      case EX:
8167
        if (value == null) {
8168
          unsetEx();
8169
        } else {
8170
          setEx((TransactionServiceException)value);
8171
        }
8172
        break;
8173
 
8174
      }
8175
    }
8176
 
8177
    public void setFieldValue(int fieldID, Object value) {
8178
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
8179
    }
8180
 
8181
    public Object getFieldValue(_Fields field) {
8182
      switch (field) {
8183
      case SUCCESS:
8184
        return getSuccess();
8185
 
8186
      case EX:
8187
        return getEx();
8188
 
8189
      }
8190
      throw new IllegalStateException();
8191
    }
8192
 
8193
    public Object getFieldValue(int fieldId) {
8194
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
8195
    }
8196
 
8197
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
8198
    public boolean isSet(_Fields field) {
8199
      switch (field) {
8200
      case SUCCESS:
8201
        return isSetSuccess();
8202
      case EX:
8203
        return isSetEx();
8204
      }
8205
      throw new IllegalStateException();
8206
    }
8207
 
8208
    public boolean isSet(int fieldID) {
8209
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
8210
    }
8211
 
8212
    @Override
8213
    public boolean equals(Object that) {
8214
      if (that == null)
8215
        return false;
8216
      if (that instanceof getOrdersByBillingDate_result)
8217
        return this.equals((getOrdersByBillingDate_result)that);
8218
      return false;
8219
    }
8220
 
8221
    public boolean equals(getOrdersByBillingDate_result that) {
8222
      if (that == null)
8223
        return false;
8224
 
8225
      boolean this_present_success = true && this.isSetSuccess();
8226
      boolean that_present_success = true && that.isSetSuccess();
8227
      if (this_present_success || that_present_success) {
8228
        if (!(this_present_success && that_present_success))
8229
          return false;
8230
        if (!this.success.equals(that.success))
8231
          return false;
8232
      }
8233
 
8234
      boolean this_present_ex = true && this.isSetEx();
8235
      boolean that_present_ex = true && that.isSetEx();
8236
      if (this_present_ex || that_present_ex) {
8237
        if (!(this_present_ex && that_present_ex))
8238
          return false;
8239
        if (!this.ex.equals(that.ex))
8240
          return false;
8241
      }
8242
 
8243
      return true;
8244
    }
8245
 
8246
    @Override
8247
    public int hashCode() {
8248
      return 0;
8249
    }
8250
 
8251
    public int compareTo(getOrdersByBillingDate_result other) {
8252
      if (!getClass().equals(other.getClass())) {
8253
        return getClass().getName().compareTo(other.getClass().getName());
8254
      }
8255
 
8256
      int lastComparison = 0;
8257
      getOrdersByBillingDate_result typedOther = (getOrdersByBillingDate_result)other;
8258
 
8259
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
8260
      if (lastComparison != 0) {
8261
        return lastComparison;
8262
      }
8263
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
8264
      if (lastComparison != 0) {
8265
        return lastComparison;
8266
      }
8267
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
8268
      if (lastComparison != 0) {
8269
        return lastComparison;
8270
      }
8271
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
8272
      if (lastComparison != 0) {
8273
        return lastComparison;
8274
      }
8275
      return 0;
8276
    }
8277
 
8278
    public void read(TProtocol iprot) throws TException {
8279
      TField field;
8280
      iprot.readStructBegin();
8281
      while (true)
8282
      {
8283
        field = iprot.readFieldBegin();
8284
        if (field.type == TType.STOP) { 
8285
          break;
8286
        }
8287
        _Fields fieldId = _Fields.findByThriftId(field.id);
8288
        if (fieldId == null) {
8289
          TProtocolUtil.skip(iprot, field.type);
8290
        } else {
8291
          switch (fieldId) {
8292
            case SUCCESS:
8293
              if (field.type == TType.LIST) {
8294
                {
8295
                  TList _list20 = iprot.readListBegin();
8296
                  this.success = new ArrayList<Order>(_list20.size);
8297
                  for (int _i21 = 0; _i21 < _list20.size; ++_i21)
8298
                  {
8299
                    Order _elem22;
8300
                    _elem22 = new Order();
8301
                    _elem22.read(iprot);
8302
                    this.success.add(_elem22);
8303
                  }
8304
                  iprot.readListEnd();
8305
                }
8306
              } else { 
8307
                TProtocolUtil.skip(iprot, field.type);
8308
              }
8309
              break;
8310
            case EX:
8311
              if (field.type == TType.STRUCT) {
8312
                this.ex = new TransactionServiceException();
8313
                this.ex.read(iprot);
8314
              } else { 
8315
                TProtocolUtil.skip(iprot, field.type);
8316
              }
8317
              break;
8318
          }
8319
          iprot.readFieldEnd();
8320
        }
8321
      }
8322
      iprot.readStructEnd();
8323
      validate();
8324
    }
8325
 
8326
    public void write(TProtocol oprot) throws TException {
8327
      oprot.writeStructBegin(STRUCT_DESC);
8328
 
8329
      if (this.isSetSuccess()) {
8330
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
8331
        {
8332
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
8333
          for (Order _iter23 : this.success)
8334
          {
8335
            _iter23.write(oprot);
8336
          }
8337
          oprot.writeListEnd();
8338
        }
8339
        oprot.writeFieldEnd();
8340
      } else if (this.isSetEx()) {
8341
        oprot.writeFieldBegin(EX_FIELD_DESC);
8342
        this.ex.write(oprot);
8343
        oprot.writeFieldEnd();
8344
      }
8345
      oprot.writeFieldStop();
8346
      oprot.writeStructEnd();
8347
    }
8348
 
8349
    @Override
8350
    public String toString() {
8351
      StringBuilder sb = new StringBuilder("getOrdersByBillingDate_result(");
8352
      boolean first = true;
8353
 
8354
      sb.append("success:");
8355
      if (this.success == null) {
8356
        sb.append("null");
8357
      } else {
8358
        sb.append(this.success);
8359
      }
8360
      first = false;
8361
      if (!first) sb.append(", ");
8362
      sb.append("ex:");
8363
      if (this.ex == null) {
8364
        sb.append("null");
8365
      } else {
8366
        sb.append(this.ex);
8367
      }
8368
      first = false;
8369
      sb.append(")");
8370
      return sb.toString();
8371
    }
8372
 
8373
    public void validate() throws TException {
8374
      // check for required fields
8375
    }
8376
 
8377
  }
8378
 
483 rajveer 8379
  public static class changeOrderStatus_args implements TBase<changeOrderStatus_args._Fields>, java.io.Serializable, Cloneable, Comparable<changeOrderStatus_args>   {
8380
    private static final TStruct STRUCT_DESC = new TStruct("changeOrderStatus_args");
68 ashish 8381
 
483 rajveer 8382
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
8383
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)2);
8384
    private static final TField DESCRIPTION_FIELD_DESC = new TField("description", TType.STRING, (short)3);
68 ashish 8385
 
483 rajveer 8386
    private long orderId;
8387
    private OrderStatus status;
8388
    private String description;
68 ashish 8389
 
8390
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8391
    public enum _Fields implements TFieldIdEnum {
483 rajveer 8392
      ORDER_ID((short)1, "orderId"),
8393
      /**
8394
       * 
8395
       * @see OrderStatus
8396
       */
8397
      STATUS((short)2, "status"),
8398
      DESCRIPTION((short)3, "description");
68 ashish 8399
 
8400
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
8401
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8402
 
8403
      static {
8404
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8405
          byId.put((int)field._thriftId, field);
8406
          byName.put(field.getFieldName(), field);
8407
        }
8408
      }
8409
 
8410
      /**
8411
       * Find the _Fields constant that matches fieldId, or null if its not found.
8412
       */
8413
      public static _Fields findByThriftId(int fieldId) {
8414
        return byId.get(fieldId);
8415
      }
8416
 
8417
      /**
8418
       * Find the _Fields constant that matches fieldId, throwing an exception
8419
       * if it is not found.
8420
       */
8421
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8422
        _Fields fields = findByThriftId(fieldId);
8423
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8424
        return fields;
8425
      }
8426
 
8427
      /**
8428
       * Find the _Fields constant that matches name, or null if its not found.
8429
       */
8430
      public static _Fields findByName(String name) {
8431
        return byName.get(name);
8432
      }
8433
 
8434
      private final short _thriftId;
8435
      private final String _fieldName;
8436
 
8437
      _Fields(short thriftId, String fieldName) {
8438
        _thriftId = thriftId;
8439
        _fieldName = fieldName;
8440
      }
8441
 
8442
      public short getThriftFieldId() {
8443
        return _thriftId;
8444
      }
8445
 
8446
      public String getFieldName() {
8447
        return _fieldName;
8448
      }
8449
    }
8450
 
8451
    // isset id assignments
483 rajveer 8452
    private static final int __ORDERID_ISSET_ID = 0;
68 ashish 8453
    private BitSet __isset_bit_vector = new BitSet(1);
8454
 
8455
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 8456
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
68 ashish 8457
          new FieldValueMetaData(TType.I64)));
483 rajveer 8458
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
8459
          new EnumMetaData(TType.ENUM, OrderStatus.class)));
8460
      put(_Fields.DESCRIPTION, new FieldMetaData("description", TFieldRequirementType.DEFAULT, 
8461
          new FieldValueMetaData(TType.STRING)));
68 ashish 8462
    }});
8463
 
8464
    static {
483 rajveer 8465
      FieldMetaData.addStructMetaDataMap(changeOrderStatus_args.class, metaDataMap);
68 ashish 8466
    }
8467
 
483 rajveer 8468
    public changeOrderStatus_args() {
68 ashish 8469
    }
8470
 
483 rajveer 8471
    public changeOrderStatus_args(
8472
      long orderId,
8473
      OrderStatus status,
8474
      String description)
68 ashish 8475
    {
8476
      this();
483 rajveer 8477
      this.orderId = orderId;
8478
      setOrderIdIsSet(true);
8479
      this.status = status;
8480
      this.description = description;
68 ashish 8481
    }
8482
 
8483
    /**
8484
     * Performs a deep copy on <i>other</i>.
8485
     */
483 rajveer 8486
    public changeOrderStatus_args(changeOrderStatus_args other) {
68 ashish 8487
      __isset_bit_vector.clear();
8488
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 8489
      this.orderId = other.orderId;
8490
      if (other.isSetStatus()) {
8491
        this.status = other.status;
8492
      }
8493
      if (other.isSetDescription()) {
8494
        this.description = other.description;
8495
      }
68 ashish 8496
    }
8497
 
483 rajveer 8498
    public changeOrderStatus_args deepCopy() {
8499
      return new changeOrderStatus_args(this);
68 ashish 8500
    }
8501
 
8502
    @Deprecated
483 rajveer 8503
    public changeOrderStatus_args clone() {
8504
      return new changeOrderStatus_args(this);
68 ashish 8505
    }
8506
 
483 rajveer 8507
    public long getOrderId() {
8508
      return this.orderId;
68 ashish 8509
    }
8510
 
483 rajveer 8511
    public changeOrderStatus_args setOrderId(long orderId) {
8512
      this.orderId = orderId;
8513
      setOrderIdIsSet(true);
68 ashish 8514
      return this;
8515
    }
8516
 
483 rajveer 8517
    public void unsetOrderId() {
8518
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
68 ashish 8519
    }
8520
 
483 rajveer 8521
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
8522
    public boolean isSetOrderId() {
8523
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
68 ashish 8524
    }
8525
 
483 rajveer 8526
    public void setOrderIdIsSet(boolean value) {
8527
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
68 ashish 8528
    }
8529
 
483 rajveer 8530
    /**
8531
     * 
8532
     * @see OrderStatus
8533
     */
8534
    public OrderStatus getStatus() {
8535
      return this.status;
68 ashish 8536
    }
8537
 
8538
    /**
483 rajveer 8539
     * 
8540
     * @see OrderStatus
68 ashish 8541
     */
483 rajveer 8542
    public changeOrderStatus_args setStatus(OrderStatus status) {
8543
      this.status = status;
68 ashish 8544
      return this;
8545
    }
8546
 
483 rajveer 8547
    public void unsetStatus() {
8548
      this.status = null;
68 ashish 8549
    }
8550
 
483 rajveer 8551
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
8552
    public boolean isSetStatus() {
8553
      return this.status != null;
68 ashish 8554
    }
8555
 
483 rajveer 8556
    public void setStatusIsSet(boolean value) {
68 ashish 8557
      if (!value) {
483 rajveer 8558
        this.status = null;
68 ashish 8559
      }
8560
    }
8561
 
483 rajveer 8562
    public String getDescription() {
8563
      return this.description;
68 ashish 8564
    }
8565
 
483 rajveer 8566
    public changeOrderStatus_args setDescription(String description) {
8567
      this.description = description;
68 ashish 8568
      return this;
8569
    }
8570
 
483 rajveer 8571
    public void unsetDescription() {
8572
      this.description = null;
68 ashish 8573
    }
8574
 
483 rajveer 8575
    /** Returns true if field description is set (has been asigned a value) and false otherwise */
8576
    public boolean isSetDescription() {
8577
      return this.description != null;
68 ashish 8578
    }
8579
 
483 rajveer 8580
    public void setDescriptionIsSet(boolean value) {
68 ashish 8581
      if (!value) {
483 rajveer 8582
        this.description = null;
68 ashish 8583
      }
8584
    }
8585
 
8586
    public void setFieldValue(_Fields field, Object value) {
8587
      switch (field) {
483 rajveer 8588
      case ORDER_ID:
68 ashish 8589
        if (value == null) {
483 rajveer 8590
          unsetOrderId();
68 ashish 8591
        } else {
483 rajveer 8592
          setOrderId((Long)value);
68 ashish 8593
        }
8594
        break;
8595
 
483 rajveer 8596
      case STATUS:
68 ashish 8597
        if (value == null) {
483 rajveer 8598
          unsetStatus();
68 ashish 8599
        } else {
483 rajveer 8600
          setStatus((OrderStatus)value);
68 ashish 8601
        }
8602
        break;
8603
 
483 rajveer 8604
      case DESCRIPTION:
8605
        if (value == null) {
8606
          unsetDescription();
8607
        } else {
8608
          setDescription((String)value);
8609
        }
8610
        break;
8611
 
68 ashish 8612
      }
8613
    }
8614
 
8615
    public void setFieldValue(int fieldID, Object value) {
8616
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
8617
    }
8618
 
8619
    public Object getFieldValue(_Fields field) {
8620
      switch (field) {
483 rajveer 8621
      case ORDER_ID:
8622
        return new Long(getOrderId());
68 ashish 8623
 
483 rajveer 8624
      case STATUS:
8625
        return getStatus();
68 ashish 8626
 
483 rajveer 8627
      case DESCRIPTION:
8628
        return getDescription();
8629
 
68 ashish 8630
      }
8631
      throw new IllegalStateException();
8632
    }
8633
 
8634
    public Object getFieldValue(int fieldId) {
8635
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
8636
    }
8637
 
8638
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
8639
    public boolean isSet(_Fields field) {
8640
      switch (field) {
483 rajveer 8641
      case ORDER_ID:
8642
        return isSetOrderId();
8643
      case STATUS:
8644
        return isSetStatus();
8645
      case DESCRIPTION:
8646
        return isSetDescription();
68 ashish 8647
      }
8648
      throw new IllegalStateException();
8649
    }
8650
 
8651
    public boolean isSet(int fieldID) {
8652
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
8653
    }
8654
 
8655
    @Override
8656
    public boolean equals(Object that) {
8657
      if (that == null)
8658
        return false;
483 rajveer 8659
      if (that instanceof changeOrderStatus_args)
8660
        return this.equals((changeOrderStatus_args)that);
68 ashish 8661
      return false;
8662
    }
8663
 
483 rajveer 8664
    public boolean equals(changeOrderStatus_args that) {
68 ashish 8665
      if (that == null)
8666
        return false;
8667
 
483 rajveer 8668
      boolean this_present_orderId = true;
8669
      boolean that_present_orderId = true;
8670
      if (this_present_orderId || that_present_orderId) {
8671
        if (!(this_present_orderId && that_present_orderId))
68 ashish 8672
          return false;
483 rajveer 8673
        if (this.orderId != that.orderId)
68 ashish 8674
          return false;
8675
      }
8676
 
483 rajveer 8677
      boolean this_present_status = true && this.isSetStatus();
8678
      boolean that_present_status = true && that.isSetStatus();
8679
      if (this_present_status || that_present_status) {
8680
        if (!(this_present_status && that_present_status))
68 ashish 8681
          return false;
483 rajveer 8682
        if (!this.status.equals(that.status))
68 ashish 8683
          return false;
8684
      }
8685
 
483 rajveer 8686
      boolean this_present_description = true && this.isSetDescription();
8687
      boolean that_present_description = true && that.isSetDescription();
8688
      if (this_present_description || that_present_description) {
8689
        if (!(this_present_description && that_present_description))
8690
          return false;
8691
        if (!this.description.equals(that.description))
8692
          return false;
8693
      }
8694
 
68 ashish 8695
      return true;
8696
    }
8697
 
8698
    @Override
8699
    public int hashCode() {
8700
      return 0;
8701
    }
8702
 
483 rajveer 8703
    public int compareTo(changeOrderStatus_args other) {
8704
      if (!getClass().equals(other.getClass())) {
8705
        return getClass().getName().compareTo(other.getClass().getName());
68 ashish 8706
      }
8707
 
483 rajveer 8708
      int lastComparison = 0;
8709
      changeOrderStatus_args typedOther = (changeOrderStatus_args)other;
68 ashish 8710
 
483 rajveer 8711
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
8712
      if (lastComparison != 0) {
8713
        return lastComparison;
68 ashish 8714
      }
483 rajveer 8715
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
8716
      if (lastComparison != 0) {
8717
        return lastComparison;
68 ashish 8718
      }
483 rajveer 8719
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
8720
      if (lastComparison != 0) {
8721
        return lastComparison;
68 ashish 8722
      }
483 rajveer 8723
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
8724
      if (lastComparison != 0) {
8725
        return lastComparison;
68 ashish 8726
      }
483 rajveer 8727
      lastComparison = Boolean.valueOf(isSetDescription()).compareTo(isSetDescription());
8728
      if (lastComparison != 0) {
8729
        return lastComparison;
68 ashish 8730
      }
483 rajveer 8731
      lastComparison = TBaseHelper.compareTo(description, typedOther.description);
8732
      if (lastComparison != 0) {
8733
        return lastComparison;
68 ashish 8734
      }
8735
      return 0;
8736
    }
8737
 
8738
    public void read(TProtocol iprot) throws TException {
8739
      TField field;
8740
      iprot.readStructBegin();
8741
      while (true)
8742
      {
8743
        field = iprot.readFieldBegin();
8744
        if (field.type == TType.STOP) { 
8745
          break;
8746
        }
8747
        _Fields fieldId = _Fields.findByThriftId(field.id);
8748
        if (fieldId == null) {
8749
          TProtocolUtil.skip(iprot, field.type);
8750
        } else {
8751
          switch (fieldId) {
483 rajveer 8752
            case ORDER_ID:
68 ashish 8753
              if (field.type == TType.I64) {
483 rajveer 8754
                this.orderId = iprot.readI64();
8755
                setOrderIdIsSet(true);
68 ashish 8756
              } else { 
8757
                TProtocolUtil.skip(iprot, field.type);
8758
              }
8759
              break;
483 rajveer 8760
            case STATUS:
8761
              if (field.type == TType.I32) {
8762
                this.status = OrderStatus.findByValue(iprot.readI32());
68 ashish 8763
              } else { 
8764
                TProtocolUtil.skip(iprot, field.type);
8765
              }
8766
              break;
483 rajveer 8767
            case DESCRIPTION:
8768
              if (field.type == TType.STRING) {
8769
                this.description = iprot.readString();
8770
              } else { 
8771
                TProtocolUtil.skip(iprot, field.type);
8772
              }
8773
              break;
68 ashish 8774
          }
8775
          iprot.readFieldEnd();
8776
        }
8777
      }
8778
      iprot.readStructEnd();
8779
      validate();
8780
    }
8781
 
8782
    public void write(TProtocol oprot) throws TException {
8783
      validate();
8784
 
8785
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 8786
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
8787
      oprot.writeI64(this.orderId);
68 ashish 8788
      oprot.writeFieldEnd();
483 rajveer 8789
      if (this.status != null) {
8790
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
8791
        oprot.writeI32(this.status.getValue());
68 ashish 8792
        oprot.writeFieldEnd();
8793
      }
483 rajveer 8794
      if (this.description != null) {
8795
        oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC);
8796
        oprot.writeString(this.description);
8797
        oprot.writeFieldEnd();
8798
      }
68 ashish 8799
      oprot.writeFieldStop();
8800
      oprot.writeStructEnd();
8801
    }
8802
 
8803
    @Override
8804
    public String toString() {
483 rajveer 8805
      StringBuilder sb = new StringBuilder("changeOrderStatus_args(");
68 ashish 8806
      boolean first = true;
8807
 
483 rajveer 8808
      sb.append("orderId:");
8809
      sb.append(this.orderId);
68 ashish 8810
      first = false;
8811
      if (!first) sb.append(", ");
483 rajveer 8812
      sb.append("status:");
8813
      if (this.status == null) {
68 ashish 8814
        sb.append("null");
8815
      } else {
483 rajveer 8816
        String status_name = status.name();
8817
        if (status_name != null) {
8818
          sb.append(status_name);
8819
          sb.append(" (");
8820
        }
8821
        sb.append(this.status);
8822
        if (status_name != null) {
8823
          sb.append(")");
8824
        }
68 ashish 8825
      }
8826
      first = false;
483 rajveer 8827
      if (!first) sb.append(", ");
8828
      sb.append("description:");
8829
      if (this.description == null) {
8830
        sb.append("null");
8831
      } else {
8832
        sb.append(this.description);
8833
      }
8834
      first = false;
68 ashish 8835
      sb.append(")");
8836
      return sb.toString();
8837
    }
8838
 
8839
    public void validate() throws TException {
8840
      // check for required fields
8841
    }
8842
 
8843
  }
8844
 
483 rajveer 8845
  public static class changeOrderStatus_result implements TBase<changeOrderStatus_result._Fields>, java.io.Serializable, Cloneable, Comparable<changeOrderStatus_result>   {
8846
    private static final TStruct STRUCT_DESC = new TStruct("changeOrderStatus_result");
68 ashish 8847
 
8848
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
8849
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
8850
 
8851
    private boolean success;
8852
    private TransactionServiceException ex;
8853
 
8854
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8855
    public enum _Fields implements TFieldIdEnum {
8856
      SUCCESS((short)0, "success"),
8857
      EX((short)1, "ex");
8858
 
8859
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
8860
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8861
 
8862
      static {
8863
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8864
          byId.put((int)field._thriftId, field);
8865
          byName.put(field.getFieldName(), field);
8866
        }
8867
      }
8868
 
8869
      /**
8870
       * Find the _Fields constant that matches fieldId, or null if its not found.
8871
       */
8872
      public static _Fields findByThriftId(int fieldId) {
8873
        return byId.get(fieldId);
8874
      }
8875
 
8876
      /**
8877
       * Find the _Fields constant that matches fieldId, throwing an exception
8878
       * if it is not found.
8879
       */
8880
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8881
        _Fields fields = findByThriftId(fieldId);
8882
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8883
        return fields;
8884
      }
8885
 
8886
      /**
8887
       * Find the _Fields constant that matches name, or null if its not found.
8888
       */
8889
      public static _Fields findByName(String name) {
8890
        return byName.get(name);
8891
      }
8892
 
8893
      private final short _thriftId;
8894
      private final String _fieldName;
8895
 
8896
      _Fields(short thriftId, String fieldName) {
8897
        _thriftId = thriftId;
8898
        _fieldName = fieldName;
8899
      }
8900
 
8901
      public short getThriftFieldId() {
8902
        return _thriftId;
8903
      }
8904
 
8905
      public String getFieldName() {
8906
        return _fieldName;
8907
      }
8908
    }
8909
 
8910
    // isset id assignments
8911
    private static final int __SUCCESS_ISSET_ID = 0;
8912
    private BitSet __isset_bit_vector = new BitSet(1);
8913
 
8914
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
8915
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
8916
          new FieldValueMetaData(TType.BOOL)));
8917
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
8918
          new FieldValueMetaData(TType.STRUCT)));
8919
    }});
8920
 
8921
    static {
483 rajveer 8922
      FieldMetaData.addStructMetaDataMap(changeOrderStatus_result.class, metaDataMap);
68 ashish 8923
    }
8924
 
483 rajveer 8925
    public changeOrderStatus_result() {
68 ashish 8926
    }
8927
 
483 rajveer 8928
    public changeOrderStatus_result(
68 ashish 8929
      boolean success,
8930
      TransactionServiceException ex)
8931
    {
8932
      this();
8933
      this.success = success;
8934
      setSuccessIsSet(true);
8935
      this.ex = ex;
8936
    }
8937
 
8938
    /**
8939
     * Performs a deep copy on <i>other</i>.
8940
     */
483 rajveer 8941
    public changeOrderStatus_result(changeOrderStatus_result other) {
68 ashish 8942
      __isset_bit_vector.clear();
8943
      __isset_bit_vector.or(other.__isset_bit_vector);
8944
      this.success = other.success;
8945
      if (other.isSetEx()) {
8946
        this.ex = new TransactionServiceException(other.ex);
8947
      }
8948
    }
8949
 
483 rajveer 8950
    public changeOrderStatus_result deepCopy() {
8951
      return new changeOrderStatus_result(this);
68 ashish 8952
    }
8953
 
8954
    @Deprecated
483 rajveer 8955
    public changeOrderStatus_result clone() {
8956
      return new changeOrderStatus_result(this);
68 ashish 8957
    }
8958
 
8959
    public boolean isSuccess() {
8960
      return this.success;
8961
    }
8962
 
483 rajveer 8963
    public changeOrderStatus_result setSuccess(boolean success) {
68 ashish 8964
      this.success = success;
8965
      setSuccessIsSet(true);
8966
      return this;
8967
    }
8968
 
8969
    public void unsetSuccess() {
8970
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
8971
    }
8972
 
8973
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
8974
    public boolean isSetSuccess() {
8975
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
8976
    }
8977
 
8978
    public void setSuccessIsSet(boolean value) {
8979
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
8980
    }
8981
 
8982
    public TransactionServiceException getEx() {
8983
      return this.ex;
8984
    }
8985
 
483 rajveer 8986
    public changeOrderStatus_result setEx(TransactionServiceException ex) {
68 ashish 8987
      this.ex = ex;
8988
      return this;
8989
    }
8990
 
8991
    public void unsetEx() {
8992
      this.ex = null;
8993
    }
8994
 
8995
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
8996
    public boolean isSetEx() {
8997
      return this.ex != null;
8998
    }
8999
 
9000
    public void setExIsSet(boolean value) {
9001
      if (!value) {
9002
        this.ex = null;
9003
      }
9004
    }
9005
 
9006
    public void setFieldValue(_Fields field, Object value) {
9007
      switch (field) {
9008
      case SUCCESS:
9009
        if (value == null) {
9010
          unsetSuccess();
9011
        } else {
9012
          setSuccess((Boolean)value);
9013
        }
9014
        break;
9015
 
9016
      case EX:
9017
        if (value == null) {
9018
          unsetEx();
9019
        } else {
9020
          setEx((TransactionServiceException)value);
9021
        }
9022
        break;
9023
 
9024
      }
9025
    }
9026
 
9027
    public void setFieldValue(int fieldID, Object value) {
9028
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
9029
    }
9030
 
9031
    public Object getFieldValue(_Fields field) {
9032
      switch (field) {
9033
      case SUCCESS:
9034
        return new Boolean(isSuccess());
9035
 
9036
      case EX:
9037
        return getEx();
9038
 
9039
      }
9040
      throw new IllegalStateException();
9041
    }
9042
 
9043
    public Object getFieldValue(int fieldId) {
9044
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
9045
    }
9046
 
9047
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
9048
    public boolean isSet(_Fields field) {
9049
      switch (field) {
9050
      case SUCCESS:
9051
        return isSetSuccess();
9052
      case EX:
9053
        return isSetEx();
9054
      }
9055
      throw new IllegalStateException();
9056
    }
9057
 
9058
    public boolean isSet(int fieldID) {
9059
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
9060
    }
9061
 
9062
    @Override
9063
    public boolean equals(Object that) {
9064
      if (that == null)
9065
        return false;
483 rajveer 9066
      if (that instanceof changeOrderStatus_result)
9067
        return this.equals((changeOrderStatus_result)that);
68 ashish 9068
      return false;
9069
    }
9070
 
483 rajveer 9071
    public boolean equals(changeOrderStatus_result that) {
68 ashish 9072
      if (that == null)
9073
        return false;
9074
 
9075
      boolean this_present_success = true;
9076
      boolean that_present_success = true;
9077
      if (this_present_success || that_present_success) {
9078
        if (!(this_present_success && that_present_success))
9079
          return false;
9080
        if (this.success != that.success)
9081
          return false;
9082
      }
9083
 
9084
      boolean this_present_ex = true && this.isSetEx();
9085
      boolean that_present_ex = true && that.isSetEx();
9086
      if (this_present_ex || that_present_ex) {
9087
        if (!(this_present_ex && that_present_ex))
9088
          return false;
9089
        if (!this.ex.equals(that.ex))
9090
          return false;
9091
      }
9092
 
9093
      return true;
9094
    }
9095
 
9096
    @Override
9097
    public int hashCode() {
9098
      return 0;
9099
    }
9100
 
483 rajveer 9101
    public int compareTo(changeOrderStatus_result other) {
68 ashish 9102
      if (!getClass().equals(other.getClass())) {
9103
        return getClass().getName().compareTo(other.getClass().getName());
9104
      }
9105
 
9106
      int lastComparison = 0;
483 rajveer 9107
      changeOrderStatus_result typedOther = (changeOrderStatus_result)other;
68 ashish 9108
 
9109
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
9110
      if (lastComparison != 0) {
9111
        return lastComparison;
9112
      }
9113
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
9114
      if (lastComparison != 0) {
9115
        return lastComparison;
9116
      }
9117
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
9118
      if (lastComparison != 0) {
9119
        return lastComparison;
9120
      }
9121
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
9122
      if (lastComparison != 0) {
9123
        return lastComparison;
9124
      }
9125
      return 0;
9126
    }
9127
 
9128
    public void read(TProtocol iprot) throws TException {
9129
      TField field;
9130
      iprot.readStructBegin();
9131
      while (true)
9132
      {
9133
        field = iprot.readFieldBegin();
9134
        if (field.type == TType.STOP) { 
9135
          break;
9136
        }
9137
        _Fields fieldId = _Fields.findByThriftId(field.id);
9138
        if (fieldId == null) {
9139
          TProtocolUtil.skip(iprot, field.type);
9140
        } else {
9141
          switch (fieldId) {
9142
            case SUCCESS:
9143
              if (field.type == TType.BOOL) {
9144
                this.success = iprot.readBool();
9145
                setSuccessIsSet(true);
9146
              } else { 
9147
                TProtocolUtil.skip(iprot, field.type);
9148
              }
9149
              break;
9150
            case EX:
9151
              if (field.type == TType.STRUCT) {
9152
                this.ex = new TransactionServiceException();
9153
                this.ex.read(iprot);
9154
              } else { 
9155
                TProtocolUtil.skip(iprot, field.type);
9156
              }
9157
              break;
9158
          }
9159
          iprot.readFieldEnd();
9160
        }
9161
      }
9162
      iprot.readStructEnd();
9163
      validate();
9164
    }
9165
 
9166
    public void write(TProtocol oprot) throws TException {
9167
      oprot.writeStructBegin(STRUCT_DESC);
9168
 
9169
      if (this.isSetSuccess()) {
9170
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
9171
        oprot.writeBool(this.success);
9172
        oprot.writeFieldEnd();
9173
      } else if (this.isSetEx()) {
9174
        oprot.writeFieldBegin(EX_FIELD_DESC);
9175
        this.ex.write(oprot);
9176
        oprot.writeFieldEnd();
9177
      }
9178
      oprot.writeFieldStop();
9179
      oprot.writeStructEnd();
9180
    }
9181
 
9182
    @Override
9183
    public String toString() {
483 rajveer 9184
      StringBuilder sb = new StringBuilder("changeOrderStatus_result(");
68 ashish 9185
      boolean first = true;
9186
 
9187
      sb.append("success:");
9188
      sb.append(this.success);
9189
      first = false;
9190
      if (!first) sb.append(", ");
9191
      sb.append("ex:");
9192
      if (this.ex == null) {
9193
        sb.append("null");
9194
      } else {
9195
        sb.append(this.ex);
9196
      }
9197
      first = false;
9198
      sb.append(")");
9199
      return sb.toString();
9200
    }
9201
 
9202
    public void validate() throws TException {
9203
      // check for required fields
9204
    }
9205
 
9206
  }
9207
 
495 rajveer 9208
  public static class addBillingDetails_args implements TBase<addBillingDetails_args._Fields>, java.io.Serializable, Cloneable, Comparable<addBillingDetails_args>   {
9209
    private static final TStruct STRUCT_DESC = new TStruct("addBillingDetails_args");
9210
 
9211
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
9212
    private static final TField INVOICE_NUMBER_FIELD_DESC = new TField("invoice_number", TType.STRING, (short)2);
640 chandransh 9213
    private static final TField JACKET_NUMBER_FIELD_DESC = new TField("jacket_number", TType.I64, (short)3);
9214
    private static final TField BILLED_BY_FIELD_DESC = new TField("billed_by", TType.STRING, (short)4);
495 rajveer 9215
 
9216
    private long orderId;
9217
    private String invoice_number;
640 chandransh 9218
    private long jacket_number;
495 rajveer 9219
    private String billed_by;
9220
 
9221
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9222
    public enum _Fields implements TFieldIdEnum {
9223
      ORDER_ID((short)1, "orderId"),
9224
      INVOICE_NUMBER((short)2, "invoice_number"),
640 chandransh 9225
      JACKET_NUMBER((short)3, "jacket_number"),
9226
      BILLED_BY((short)4, "billed_by");
495 rajveer 9227
 
9228
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
9229
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9230
 
9231
      static {
9232
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9233
          byId.put((int)field._thriftId, field);
9234
          byName.put(field.getFieldName(), field);
9235
        }
9236
      }
9237
 
9238
      /**
9239
       * Find the _Fields constant that matches fieldId, or null if its not found.
9240
       */
9241
      public static _Fields findByThriftId(int fieldId) {
9242
        return byId.get(fieldId);
9243
      }
9244
 
9245
      /**
9246
       * Find the _Fields constant that matches fieldId, throwing an exception
9247
       * if it is not found.
9248
       */
9249
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9250
        _Fields fields = findByThriftId(fieldId);
9251
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9252
        return fields;
9253
      }
9254
 
9255
      /**
9256
       * Find the _Fields constant that matches name, or null if its not found.
9257
       */
9258
      public static _Fields findByName(String name) {
9259
        return byName.get(name);
9260
      }
9261
 
9262
      private final short _thriftId;
9263
      private final String _fieldName;
9264
 
9265
      _Fields(short thriftId, String fieldName) {
9266
        _thriftId = thriftId;
9267
        _fieldName = fieldName;
9268
      }
9269
 
9270
      public short getThriftFieldId() {
9271
        return _thriftId;
9272
      }
9273
 
9274
      public String getFieldName() {
9275
        return _fieldName;
9276
      }
9277
    }
9278
 
9279
    // isset id assignments
9280
    private static final int __ORDERID_ISSET_ID = 0;
640 chandransh 9281
    private static final int __JACKET_NUMBER_ISSET_ID = 1;
9282
    private BitSet __isset_bit_vector = new BitSet(2);
495 rajveer 9283
 
9284
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
9285
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
9286
          new FieldValueMetaData(TType.I64)));
9287
      put(_Fields.INVOICE_NUMBER, new FieldMetaData("invoice_number", TFieldRequirementType.DEFAULT, 
9288
          new FieldValueMetaData(TType.STRING)));
640 chandransh 9289
      put(_Fields.JACKET_NUMBER, new FieldMetaData("jacket_number", TFieldRequirementType.DEFAULT, 
9290
          new FieldValueMetaData(TType.I64)));
495 rajveer 9291
      put(_Fields.BILLED_BY, new FieldMetaData("billed_by", TFieldRequirementType.DEFAULT, 
9292
          new FieldValueMetaData(TType.STRING)));
9293
    }});
9294
 
9295
    static {
9296
      FieldMetaData.addStructMetaDataMap(addBillingDetails_args.class, metaDataMap);
9297
    }
9298
 
9299
    public addBillingDetails_args() {
9300
    }
9301
 
9302
    public addBillingDetails_args(
9303
      long orderId,
9304
      String invoice_number,
640 chandransh 9305
      long jacket_number,
495 rajveer 9306
      String billed_by)
9307
    {
9308
      this();
9309
      this.orderId = orderId;
9310
      setOrderIdIsSet(true);
9311
      this.invoice_number = invoice_number;
640 chandransh 9312
      this.jacket_number = jacket_number;
9313
      setJacket_numberIsSet(true);
495 rajveer 9314
      this.billed_by = billed_by;
9315
    }
9316
 
9317
    /**
9318
     * Performs a deep copy on <i>other</i>.
9319
     */
9320
    public addBillingDetails_args(addBillingDetails_args other) {
9321
      __isset_bit_vector.clear();
9322
      __isset_bit_vector.or(other.__isset_bit_vector);
9323
      this.orderId = other.orderId;
9324
      if (other.isSetInvoice_number()) {
9325
        this.invoice_number = other.invoice_number;
9326
      }
640 chandransh 9327
      this.jacket_number = other.jacket_number;
495 rajveer 9328
      if (other.isSetBilled_by()) {
9329
        this.billed_by = other.billed_by;
9330
      }
9331
    }
9332
 
9333
    public addBillingDetails_args deepCopy() {
9334
      return new addBillingDetails_args(this);
9335
    }
9336
 
9337
    @Deprecated
9338
    public addBillingDetails_args clone() {
9339
      return new addBillingDetails_args(this);
9340
    }
9341
 
9342
    public long getOrderId() {
9343
      return this.orderId;
9344
    }
9345
 
9346
    public addBillingDetails_args setOrderId(long orderId) {
9347
      this.orderId = orderId;
9348
      setOrderIdIsSet(true);
9349
      return this;
9350
    }
9351
 
9352
    public void unsetOrderId() {
9353
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
9354
    }
9355
 
9356
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
9357
    public boolean isSetOrderId() {
9358
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
9359
    }
9360
 
9361
    public void setOrderIdIsSet(boolean value) {
9362
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
9363
    }
9364
 
9365
    public String getInvoice_number() {
9366
      return this.invoice_number;
9367
    }
9368
 
9369
    public addBillingDetails_args setInvoice_number(String invoice_number) {
9370
      this.invoice_number = invoice_number;
9371
      return this;
9372
    }
9373
 
9374
    public void unsetInvoice_number() {
9375
      this.invoice_number = null;
9376
    }
9377
 
9378
    /** Returns true if field invoice_number is set (has been asigned a value) and false otherwise */
9379
    public boolean isSetInvoice_number() {
9380
      return this.invoice_number != null;
9381
    }
9382
 
9383
    public void setInvoice_numberIsSet(boolean value) {
9384
      if (!value) {
9385
        this.invoice_number = null;
9386
      }
9387
    }
9388
 
640 chandransh 9389
    public long getJacket_number() {
9390
      return this.jacket_number;
9391
    }
9392
 
9393
    public addBillingDetails_args setJacket_number(long jacket_number) {
9394
      this.jacket_number = jacket_number;
9395
      setJacket_numberIsSet(true);
9396
      return this;
9397
    }
9398
 
9399
    public void unsetJacket_number() {
9400
      __isset_bit_vector.clear(__JACKET_NUMBER_ISSET_ID);
9401
    }
9402
 
9403
    /** Returns true if field jacket_number is set (has been asigned a value) and false otherwise */
9404
    public boolean isSetJacket_number() {
9405
      return __isset_bit_vector.get(__JACKET_NUMBER_ISSET_ID);
9406
    }
9407
 
9408
    public void setJacket_numberIsSet(boolean value) {
9409
      __isset_bit_vector.set(__JACKET_NUMBER_ISSET_ID, value);
9410
    }
9411
 
495 rajveer 9412
    public String getBilled_by() {
9413
      return this.billed_by;
9414
    }
9415
 
9416
    public addBillingDetails_args setBilled_by(String billed_by) {
9417
      this.billed_by = billed_by;
9418
      return this;
9419
    }
9420
 
9421
    public void unsetBilled_by() {
9422
      this.billed_by = null;
9423
    }
9424
 
9425
    /** Returns true if field billed_by is set (has been asigned a value) and false otherwise */
9426
    public boolean isSetBilled_by() {
9427
      return this.billed_by != null;
9428
    }
9429
 
9430
    public void setBilled_byIsSet(boolean value) {
9431
      if (!value) {
9432
        this.billed_by = null;
9433
      }
9434
    }
9435
 
9436
    public void setFieldValue(_Fields field, Object value) {
9437
      switch (field) {
9438
      case ORDER_ID:
9439
        if (value == null) {
9440
          unsetOrderId();
9441
        } else {
9442
          setOrderId((Long)value);
9443
        }
9444
        break;
9445
 
9446
      case INVOICE_NUMBER:
9447
        if (value == null) {
9448
          unsetInvoice_number();
9449
        } else {
9450
          setInvoice_number((String)value);
9451
        }
9452
        break;
9453
 
640 chandransh 9454
      case JACKET_NUMBER:
9455
        if (value == null) {
9456
          unsetJacket_number();
9457
        } else {
9458
          setJacket_number((Long)value);
9459
        }
9460
        break;
9461
 
495 rajveer 9462
      case BILLED_BY:
9463
        if (value == null) {
9464
          unsetBilled_by();
9465
        } else {
9466
          setBilled_by((String)value);
9467
        }
9468
        break;
9469
 
9470
      }
9471
    }
9472
 
9473
    public void setFieldValue(int fieldID, Object value) {
9474
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
9475
    }
9476
 
9477
    public Object getFieldValue(_Fields field) {
9478
      switch (field) {
9479
      case ORDER_ID:
9480
        return new Long(getOrderId());
9481
 
9482
      case INVOICE_NUMBER:
9483
        return getInvoice_number();
9484
 
640 chandransh 9485
      case JACKET_NUMBER:
9486
        return new Long(getJacket_number());
9487
 
495 rajveer 9488
      case BILLED_BY:
9489
        return getBilled_by();
9490
 
9491
      }
9492
      throw new IllegalStateException();
9493
    }
9494
 
9495
    public Object getFieldValue(int fieldId) {
9496
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
9497
    }
9498
 
9499
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
9500
    public boolean isSet(_Fields field) {
9501
      switch (field) {
9502
      case ORDER_ID:
9503
        return isSetOrderId();
9504
      case INVOICE_NUMBER:
9505
        return isSetInvoice_number();
640 chandransh 9506
      case JACKET_NUMBER:
9507
        return isSetJacket_number();
495 rajveer 9508
      case BILLED_BY:
9509
        return isSetBilled_by();
9510
      }
9511
      throw new IllegalStateException();
9512
    }
9513
 
9514
    public boolean isSet(int fieldID) {
9515
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
9516
    }
9517
 
9518
    @Override
9519
    public boolean equals(Object that) {
9520
      if (that == null)
9521
        return false;
9522
      if (that instanceof addBillingDetails_args)
9523
        return this.equals((addBillingDetails_args)that);
9524
      return false;
9525
    }
9526
 
9527
    public boolean equals(addBillingDetails_args that) {
9528
      if (that == null)
9529
        return false;
9530
 
9531
      boolean this_present_orderId = true;
9532
      boolean that_present_orderId = true;
9533
      if (this_present_orderId || that_present_orderId) {
9534
        if (!(this_present_orderId && that_present_orderId))
9535
          return false;
9536
        if (this.orderId != that.orderId)
9537
          return false;
9538
      }
9539
 
9540
      boolean this_present_invoice_number = true && this.isSetInvoice_number();
9541
      boolean that_present_invoice_number = true && that.isSetInvoice_number();
9542
      if (this_present_invoice_number || that_present_invoice_number) {
9543
        if (!(this_present_invoice_number && that_present_invoice_number))
9544
          return false;
9545
        if (!this.invoice_number.equals(that.invoice_number))
9546
          return false;
9547
      }
9548
 
640 chandransh 9549
      boolean this_present_jacket_number = true;
9550
      boolean that_present_jacket_number = true;
9551
      if (this_present_jacket_number || that_present_jacket_number) {
9552
        if (!(this_present_jacket_number && that_present_jacket_number))
9553
          return false;
9554
        if (this.jacket_number != that.jacket_number)
9555
          return false;
9556
      }
9557
 
495 rajveer 9558
      boolean this_present_billed_by = true && this.isSetBilled_by();
9559
      boolean that_present_billed_by = true && that.isSetBilled_by();
9560
      if (this_present_billed_by || that_present_billed_by) {
9561
        if (!(this_present_billed_by && that_present_billed_by))
9562
          return false;
9563
        if (!this.billed_by.equals(that.billed_by))
9564
          return false;
9565
      }
9566
 
9567
      return true;
9568
    }
9569
 
9570
    @Override
9571
    public int hashCode() {
9572
      return 0;
9573
    }
9574
 
9575
    public int compareTo(addBillingDetails_args other) {
9576
      if (!getClass().equals(other.getClass())) {
9577
        return getClass().getName().compareTo(other.getClass().getName());
9578
      }
9579
 
9580
      int lastComparison = 0;
9581
      addBillingDetails_args typedOther = (addBillingDetails_args)other;
9582
 
9583
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
9584
      if (lastComparison != 0) {
9585
        return lastComparison;
9586
      }
9587
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
9588
      if (lastComparison != 0) {
9589
        return lastComparison;
9590
      }
9591
      lastComparison = Boolean.valueOf(isSetInvoice_number()).compareTo(isSetInvoice_number());
9592
      if (lastComparison != 0) {
9593
        return lastComparison;
9594
      }
9595
      lastComparison = TBaseHelper.compareTo(invoice_number, typedOther.invoice_number);
9596
      if (lastComparison != 0) {
9597
        return lastComparison;
9598
      }
640 chandransh 9599
      lastComparison = Boolean.valueOf(isSetJacket_number()).compareTo(isSetJacket_number());
9600
      if (lastComparison != 0) {
9601
        return lastComparison;
9602
      }
9603
      lastComparison = TBaseHelper.compareTo(jacket_number, typedOther.jacket_number);
9604
      if (lastComparison != 0) {
9605
        return lastComparison;
9606
      }
495 rajveer 9607
      lastComparison = Boolean.valueOf(isSetBilled_by()).compareTo(isSetBilled_by());
9608
      if (lastComparison != 0) {
9609
        return lastComparison;
9610
      }
9611
      lastComparison = TBaseHelper.compareTo(billed_by, typedOther.billed_by);
9612
      if (lastComparison != 0) {
9613
        return lastComparison;
9614
      }
9615
      return 0;
9616
    }
9617
 
9618
    public void read(TProtocol iprot) throws TException {
9619
      TField field;
9620
      iprot.readStructBegin();
9621
      while (true)
9622
      {
9623
        field = iprot.readFieldBegin();
9624
        if (field.type == TType.STOP) { 
9625
          break;
9626
        }
9627
        _Fields fieldId = _Fields.findByThriftId(field.id);
9628
        if (fieldId == null) {
9629
          TProtocolUtil.skip(iprot, field.type);
9630
        } else {
9631
          switch (fieldId) {
9632
            case ORDER_ID:
9633
              if (field.type == TType.I64) {
9634
                this.orderId = iprot.readI64();
9635
                setOrderIdIsSet(true);
9636
              } else { 
9637
                TProtocolUtil.skip(iprot, field.type);
9638
              }
9639
              break;
9640
            case INVOICE_NUMBER:
9641
              if (field.type == TType.STRING) {
9642
                this.invoice_number = iprot.readString();
9643
              } else { 
9644
                TProtocolUtil.skip(iprot, field.type);
9645
              }
9646
              break;
640 chandransh 9647
            case JACKET_NUMBER:
9648
              if (field.type == TType.I64) {
9649
                this.jacket_number = iprot.readI64();
9650
                setJacket_numberIsSet(true);
9651
              } else { 
9652
                TProtocolUtil.skip(iprot, field.type);
9653
              }
9654
              break;
495 rajveer 9655
            case BILLED_BY:
9656
              if (field.type == TType.STRING) {
9657
                this.billed_by = iprot.readString();
9658
              } else { 
9659
                TProtocolUtil.skip(iprot, field.type);
9660
              }
9661
              break;
9662
          }
9663
          iprot.readFieldEnd();
9664
        }
9665
      }
9666
      iprot.readStructEnd();
9667
      validate();
9668
    }
9669
 
9670
    public void write(TProtocol oprot) throws TException {
9671
      validate();
9672
 
9673
      oprot.writeStructBegin(STRUCT_DESC);
9674
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
9675
      oprot.writeI64(this.orderId);
9676
      oprot.writeFieldEnd();
9677
      if (this.invoice_number != null) {
9678
        oprot.writeFieldBegin(INVOICE_NUMBER_FIELD_DESC);
9679
        oprot.writeString(this.invoice_number);
9680
        oprot.writeFieldEnd();
9681
      }
640 chandransh 9682
      oprot.writeFieldBegin(JACKET_NUMBER_FIELD_DESC);
9683
      oprot.writeI64(this.jacket_number);
9684
      oprot.writeFieldEnd();
495 rajveer 9685
      if (this.billed_by != null) {
9686
        oprot.writeFieldBegin(BILLED_BY_FIELD_DESC);
9687
        oprot.writeString(this.billed_by);
9688
        oprot.writeFieldEnd();
9689
      }
9690
      oprot.writeFieldStop();
9691
      oprot.writeStructEnd();
9692
    }
9693
 
9694
    @Override
9695
    public String toString() {
9696
      StringBuilder sb = new StringBuilder("addBillingDetails_args(");
9697
      boolean first = true;
9698
 
9699
      sb.append("orderId:");
9700
      sb.append(this.orderId);
9701
      first = false;
9702
      if (!first) sb.append(", ");
9703
      sb.append("invoice_number:");
9704
      if (this.invoice_number == null) {
9705
        sb.append("null");
9706
      } else {
9707
        sb.append(this.invoice_number);
9708
      }
9709
      first = false;
9710
      if (!first) sb.append(", ");
640 chandransh 9711
      sb.append("jacket_number:");
9712
      sb.append(this.jacket_number);
9713
      first = false;
9714
      if (!first) sb.append(", ");
495 rajveer 9715
      sb.append("billed_by:");
9716
      if (this.billed_by == null) {
9717
        sb.append("null");
9718
      } else {
9719
        sb.append(this.billed_by);
9720
      }
9721
      first = false;
9722
      sb.append(")");
9723
      return sb.toString();
9724
    }
9725
 
9726
    public void validate() throws TException {
9727
      // check for required fields
9728
    }
9729
 
9730
  }
9731
 
9732
  public static class addBillingDetails_result implements TBase<addBillingDetails_result._Fields>, java.io.Serializable, Cloneable, Comparable<addBillingDetails_result>   {
9733
    private static final TStruct STRUCT_DESC = new TStruct("addBillingDetails_result");
9734
 
9735
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
9736
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
9737
 
9738
    private boolean success;
9739
    private TransactionServiceException ex;
9740
 
9741
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9742
    public enum _Fields implements TFieldIdEnum {
9743
      SUCCESS((short)0, "success"),
9744
      EX((short)1, "ex");
9745
 
9746
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
9747
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9748
 
9749
      static {
9750
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9751
          byId.put((int)field._thriftId, field);
9752
          byName.put(field.getFieldName(), field);
9753
        }
9754
      }
9755
 
9756
      /**
9757
       * Find the _Fields constant that matches fieldId, or null if its not found.
9758
       */
9759
      public static _Fields findByThriftId(int fieldId) {
9760
        return byId.get(fieldId);
9761
      }
9762
 
9763
      /**
9764
       * Find the _Fields constant that matches fieldId, throwing an exception
9765
       * if it is not found.
9766
       */
9767
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9768
        _Fields fields = findByThriftId(fieldId);
9769
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9770
        return fields;
9771
      }
9772
 
9773
      /**
9774
       * Find the _Fields constant that matches name, or null if its not found.
9775
       */
9776
      public static _Fields findByName(String name) {
9777
        return byName.get(name);
9778
      }
9779
 
9780
      private final short _thriftId;
9781
      private final String _fieldName;
9782
 
9783
      _Fields(short thriftId, String fieldName) {
9784
        _thriftId = thriftId;
9785
        _fieldName = fieldName;
9786
      }
9787
 
9788
      public short getThriftFieldId() {
9789
        return _thriftId;
9790
      }
9791
 
9792
      public String getFieldName() {
9793
        return _fieldName;
9794
      }
9795
    }
9796
 
9797
    // isset id assignments
9798
    private static final int __SUCCESS_ISSET_ID = 0;
9799
    private BitSet __isset_bit_vector = new BitSet(1);
9800
 
9801
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
9802
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
9803
          new FieldValueMetaData(TType.BOOL)));
9804
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
9805
          new FieldValueMetaData(TType.STRUCT)));
9806
    }});
9807
 
9808
    static {
9809
      FieldMetaData.addStructMetaDataMap(addBillingDetails_result.class, metaDataMap);
9810
    }
9811
 
9812
    public addBillingDetails_result() {
9813
    }
9814
 
9815
    public addBillingDetails_result(
9816
      boolean success,
9817
      TransactionServiceException ex)
9818
    {
9819
      this();
9820
      this.success = success;
9821
      setSuccessIsSet(true);
9822
      this.ex = ex;
9823
    }
9824
 
9825
    /**
9826
     * Performs a deep copy on <i>other</i>.
9827
     */
9828
    public addBillingDetails_result(addBillingDetails_result other) {
9829
      __isset_bit_vector.clear();
9830
      __isset_bit_vector.or(other.__isset_bit_vector);
9831
      this.success = other.success;
9832
      if (other.isSetEx()) {
9833
        this.ex = new TransactionServiceException(other.ex);
9834
      }
9835
    }
9836
 
9837
    public addBillingDetails_result deepCopy() {
9838
      return new addBillingDetails_result(this);
9839
    }
9840
 
9841
    @Deprecated
9842
    public addBillingDetails_result clone() {
9843
      return new addBillingDetails_result(this);
9844
    }
9845
 
9846
    public boolean isSuccess() {
9847
      return this.success;
9848
    }
9849
 
9850
    public addBillingDetails_result setSuccess(boolean success) {
9851
      this.success = success;
9852
      setSuccessIsSet(true);
9853
      return this;
9854
    }
9855
 
9856
    public void unsetSuccess() {
9857
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
9858
    }
9859
 
9860
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
9861
    public boolean isSetSuccess() {
9862
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
9863
    }
9864
 
9865
    public void setSuccessIsSet(boolean value) {
9866
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
9867
    }
9868
 
9869
    public TransactionServiceException getEx() {
9870
      return this.ex;
9871
    }
9872
 
9873
    public addBillingDetails_result setEx(TransactionServiceException ex) {
9874
      this.ex = ex;
9875
      return this;
9876
    }
9877
 
9878
    public void unsetEx() {
9879
      this.ex = null;
9880
    }
9881
 
9882
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
9883
    public boolean isSetEx() {
9884
      return this.ex != null;
9885
    }
9886
 
9887
    public void setExIsSet(boolean value) {
9888
      if (!value) {
9889
        this.ex = null;
9890
      }
9891
    }
9892
 
9893
    public void setFieldValue(_Fields field, Object value) {
9894
      switch (field) {
9895
      case SUCCESS:
9896
        if (value == null) {
9897
          unsetSuccess();
9898
        } else {
9899
          setSuccess((Boolean)value);
9900
        }
9901
        break;
9902
 
9903
      case EX:
9904
        if (value == null) {
9905
          unsetEx();
9906
        } else {
9907
          setEx((TransactionServiceException)value);
9908
        }
9909
        break;
9910
 
9911
      }
9912
    }
9913
 
9914
    public void setFieldValue(int fieldID, Object value) {
9915
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
9916
    }
9917
 
9918
    public Object getFieldValue(_Fields field) {
9919
      switch (field) {
9920
      case SUCCESS:
9921
        return new Boolean(isSuccess());
9922
 
9923
      case EX:
9924
        return getEx();
9925
 
9926
      }
9927
      throw new IllegalStateException();
9928
    }
9929
 
9930
    public Object getFieldValue(int fieldId) {
9931
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
9932
    }
9933
 
9934
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
9935
    public boolean isSet(_Fields field) {
9936
      switch (field) {
9937
      case SUCCESS:
9938
        return isSetSuccess();
9939
      case EX:
9940
        return isSetEx();
9941
      }
9942
      throw new IllegalStateException();
9943
    }
9944
 
9945
    public boolean isSet(int fieldID) {
9946
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
9947
    }
9948
 
9949
    @Override
9950
    public boolean equals(Object that) {
9951
      if (that == null)
9952
        return false;
9953
      if (that instanceof addBillingDetails_result)
9954
        return this.equals((addBillingDetails_result)that);
9955
      return false;
9956
    }
9957
 
9958
    public boolean equals(addBillingDetails_result that) {
9959
      if (that == null)
9960
        return false;
9961
 
9962
      boolean this_present_success = true;
9963
      boolean that_present_success = true;
9964
      if (this_present_success || that_present_success) {
9965
        if (!(this_present_success && that_present_success))
9966
          return false;
9967
        if (this.success != that.success)
9968
          return false;
9969
      }
9970
 
9971
      boolean this_present_ex = true && this.isSetEx();
9972
      boolean that_present_ex = true && that.isSetEx();
9973
      if (this_present_ex || that_present_ex) {
9974
        if (!(this_present_ex && that_present_ex))
9975
          return false;
9976
        if (!this.ex.equals(that.ex))
9977
          return false;
9978
      }
9979
 
9980
      return true;
9981
    }
9982
 
9983
    @Override
9984
    public int hashCode() {
9985
      return 0;
9986
    }
9987
 
9988
    public int compareTo(addBillingDetails_result other) {
9989
      if (!getClass().equals(other.getClass())) {
9990
        return getClass().getName().compareTo(other.getClass().getName());
9991
      }
9992
 
9993
      int lastComparison = 0;
9994
      addBillingDetails_result typedOther = (addBillingDetails_result)other;
9995
 
9996
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
9997
      if (lastComparison != 0) {
9998
        return lastComparison;
9999
      }
10000
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
10001
      if (lastComparison != 0) {
10002
        return lastComparison;
10003
      }
10004
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
10005
      if (lastComparison != 0) {
10006
        return lastComparison;
10007
      }
10008
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
10009
      if (lastComparison != 0) {
10010
        return lastComparison;
10011
      }
10012
      return 0;
10013
    }
10014
 
10015
    public void read(TProtocol iprot) throws TException {
10016
      TField field;
10017
      iprot.readStructBegin();
10018
      while (true)
10019
      {
10020
        field = iprot.readFieldBegin();
10021
        if (field.type == TType.STOP) { 
10022
          break;
10023
        }
10024
        _Fields fieldId = _Fields.findByThriftId(field.id);
10025
        if (fieldId == null) {
10026
          TProtocolUtil.skip(iprot, field.type);
10027
        } else {
10028
          switch (fieldId) {
10029
            case SUCCESS:
10030
              if (field.type == TType.BOOL) {
10031
                this.success = iprot.readBool();
10032
                setSuccessIsSet(true);
10033
              } else { 
10034
                TProtocolUtil.skip(iprot, field.type);
10035
              }
10036
              break;
10037
            case EX:
10038
              if (field.type == TType.STRUCT) {
10039
                this.ex = new TransactionServiceException();
10040
                this.ex.read(iprot);
10041
              } else { 
10042
                TProtocolUtil.skip(iprot, field.type);
10043
              }
10044
              break;
10045
          }
10046
          iprot.readFieldEnd();
10047
        }
10048
      }
10049
      iprot.readStructEnd();
10050
      validate();
10051
    }
10052
 
10053
    public void write(TProtocol oprot) throws TException {
10054
      oprot.writeStructBegin(STRUCT_DESC);
10055
 
10056
      if (this.isSetSuccess()) {
10057
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
10058
        oprot.writeBool(this.success);
10059
        oprot.writeFieldEnd();
10060
      } else if (this.isSetEx()) {
10061
        oprot.writeFieldBegin(EX_FIELD_DESC);
10062
        this.ex.write(oprot);
10063
        oprot.writeFieldEnd();
10064
      }
10065
      oprot.writeFieldStop();
10066
      oprot.writeStructEnd();
10067
    }
10068
 
10069
    @Override
10070
    public String toString() {
10071
      StringBuilder sb = new StringBuilder("addBillingDetails_result(");
10072
      boolean first = true;
10073
 
10074
      sb.append("success:");
10075
      sb.append(this.success);
10076
      first = false;
10077
      if (!first) sb.append(", ");
10078
      sb.append("ex:");
10079
      if (this.ex == null) {
10080
        sb.append("null");
10081
      } else {
10082
        sb.append(this.ex);
10083
      }
10084
      first = false;
10085
      sb.append(")");
10086
      return sb.toString();
10087
    }
10088
 
10089
    public void validate() throws TException {
10090
      // check for required fields
10091
    }
10092
 
10093
  }
10094
 
923 rajveer 10095
  public static class acceptOrder_args implements TBase<acceptOrder_args._Fields>, java.io.Serializable, Cloneable, Comparable<acceptOrder_args>   {
10096
    private static final TStruct STRUCT_DESC = new TStruct("acceptOrder_args");
10097
 
10098
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
10099
 
10100
    private long orderId;
10101
 
10102
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10103
    public enum _Fields implements TFieldIdEnum {
10104
      ORDER_ID((short)1, "orderId");
10105
 
10106
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
10107
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10108
 
10109
      static {
10110
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10111
          byId.put((int)field._thriftId, field);
10112
          byName.put(field.getFieldName(), field);
10113
        }
10114
      }
10115
 
10116
      /**
10117
       * Find the _Fields constant that matches fieldId, or null if its not found.
10118
       */
10119
      public static _Fields findByThriftId(int fieldId) {
10120
        return byId.get(fieldId);
10121
      }
10122
 
10123
      /**
10124
       * Find the _Fields constant that matches fieldId, throwing an exception
10125
       * if it is not found.
10126
       */
10127
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10128
        _Fields fields = findByThriftId(fieldId);
10129
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10130
        return fields;
10131
      }
10132
 
10133
      /**
10134
       * Find the _Fields constant that matches name, or null if its not found.
10135
       */
10136
      public static _Fields findByName(String name) {
10137
        return byName.get(name);
10138
      }
10139
 
10140
      private final short _thriftId;
10141
      private final String _fieldName;
10142
 
10143
      _Fields(short thriftId, String fieldName) {
10144
        _thriftId = thriftId;
10145
        _fieldName = fieldName;
10146
      }
10147
 
10148
      public short getThriftFieldId() {
10149
        return _thriftId;
10150
      }
10151
 
10152
      public String getFieldName() {
10153
        return _fieldName;
10154
      }
10155
    }
10156
 
10157
    // isset id assignments
10158
    private static final int __ORDERID_ISSET_ID = 0;
10159
    private BitSet __isset_bit_vector = new BitSet(1);
10160
 
10161
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
10162
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
10163
          new FieldValueMetaData(TType.I64)));
10164
    }});
10165
 
10166
    static {
10167
      FieldMetaData.addStructMetaDataMap(acceptOrder_args.class, metaDataMap);
10168
    }
10169
 
10170
    public acceptOrder_args() {
10171
    }
10172
 
10173
    public acceptOrder_args(
10174
      long orderId)
10175
    {
10176
      this();
10177
      this.orderId = orderId;
10178
      setOrderIdIsSet(true);
10179
    }
10180
 
10181
    /**
10182
     * Performs a deep copy on <i>other</i>.
10183
     */
10184
    public acceptOrder_args(acceptOrder_args other) {
10185
      __isset_bit_vector.clear();
10186
      __isset_bit_vector.or(other.__isset_bit_vector);
10187
      this.orderId = other.orderId;
10188
    }
10189
 
10190
    public acceptOrder_args deepCopy() {
10191
      return new acceptOrder_args(this);
10192
    }
10193
 
10194
    @Deprecated
10195
    public acceptOrder_args clone() {
10196
      return new acceptOrder_args(this);
10197
    }
10198
 
10199
    public long getOrderId() {
10200
      return this.orderId;
10201
    }
10202
 
10203
    public acceptOrder_args setOrderId(long orderId) {
10204
      this.orderId = orderId;
10205
      setOrderIdIsSet(true);
10206
      return this;
10207
    }
10208
 
10209
    public void unsetOrderId() {
10210
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
10211
    }
10212
 
10213
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
10214
    public boolean isSetOrderId() {
10215
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
10216
    }
10217
 
10218
    public void setOrderIdIsSet(boolean value) {
10219
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
10220
    }
10221
 
10222
    public void setFieldValue(_Fields field, Object value) {
10223
      switch (field) {
10224
      case ORDER_ID:
10225
        if (value == null) {
10226
          unsetOrderId();
10227
        } else {
10228
          setOrderId((Long)value);
10229
        }
10230
        break;
10231
 
10232
      }
10233
    }
10234
 
10235
    public void setFieldValue(int fieldID, Object value) {
10236
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
10237
    }
10238
 
10239
    public Object getFieldValue(_Fields field) {
10240
      switch (field) {
10241
      case ORDER_ID:
10242
        return new Long(getOrderId());
10243
 
10244
      }
10245
      throw new IllegalStateException();
10246
    }
10247
 
10248
    public Object getFieldValue(int fieldId) {
10249
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
10250
    }
10251
 
10252
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
10253
    public boolean isSet(_Fields field) {
10254
      switch (field) {
10255
      case ORDER_ID:
10256
        return isSetOrderId();
10257
      }
10258
      throw new IllegalStateException();
10259
    }
10260
 
10261
    public boolean isSet(int fieldID) {
10262
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
10263
    }
10264
 
10265
    @Override
10266
    public boolean equals(Object that) {
10267
      if (that == null)
10268
        return false;
10269
      if (that instanceof acceptOrder_args)
10270
        return this.equals((acceptOrder_args)that);
10271
      return false;
10272
    }
10273
 
10274
    public boolean equals(acceptOrder_args that) {
10275
      if (that == null)
10276
        return false;
10277
 
10278
      boolean this_present_orderId = true;
10279
      boolean that_present_orderId = true;
10280
      if (this_present_orderId || that_present_orderId) {
10281
        if (!(this_present_orderId && that_present_orderId))
10282
          return false;
10283
        if (this.orderId != that.orderId)
10284
          return false;
10285
      }
10286
 
10287
      return true;
10288
    }
10289
 
10290
    @Override
10291
    public int hashCode() {
10292
      return 0;
10293
    }
10294
 
10295
    public int compareTo(acceptOrder_args other) {
10296
      if (!getClass().equals(other.getClass())) {
10297
        return getClass().getName().compareTo(other.getClass().getName());
10298
      }
10299
 
10300
      int lastComparison = 0;
10301
      acceptOrder_args typedOther = (acceptOrder_args)other;
10302
 
10303
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
10304
      if (lastComparison != 0) {
10305
        return lastComparison;
10306
      }
10307
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
10308
      if (lastComparison != 0) {
10309
        return lastComparison;
10310
      }
10311
      return 0;
10312
    }
10313
 
10314
    public void read(TProtocol iprot) throws TException {
10315
      TField field;
10316
      iprot.readStructBegin();
10317
      while (true)
10318
      {
10319
        field = iprot.readFieldBegin();
10320
        if (field.type == TType.STOP) { 
10321
          break;
10322
        }
10323
        _Fields fieldId = _Fields.findByThriftId(field.id);
10324
        if (fieldId == null) {
10325
          TProtocolUtil.skip(iprot, field.type);
10326
        } else {
10327
          switch (fieldId) {
10328
            case ORDER_ID:
10329
              if (field.type == TType.I64) {
10330
                this.orderId = iprot.readI64();
10331
                setOrderIdIsSet(true);
10332
              } else { 
10333
                TProtocolUtil.skip(iprot, field.type);
10334
              }
10335
              break;
10336
          }
10337
          iprot.readFieldEnd();
10338
        }
10339
      }
10340
      iprot.readStructEnd();
10341
      validate();
10342
    }
10343
 
10344
    public void write(TProtocol oprot) throws TException {
10345
      validate();
10346
 
10347
      oprot.writeStructBegin(STRUCT_DESC);
10348
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
10349
      oprot.writeI64(this.orderId);
10350
      oprot.writeFieldEnd();
10351
      oprot.writeFieldStop();
10352
      oprot.writeStructEnd();
10353
    }
10354
 
10355
    @Override
10356
    public String toString() {
10357
      StringBuilder sb = new StringBuilder("acceptOrder_args(");
10358
      boolean first = true;
10359
 
10360
      sb.append("orderId:");
10361
      sb.append(this.orderId);
10362
      first = false;
10363
      sb.append(")");
10364
      return sb.toString();
10365
    }
10366
 
10367
    public void validate() throws TException {
10368
      // check for required fields
10369
    }
10370
 
10371
  }
10372
 
10373
  public static class acceptOrder_result implements TBase<acceptOrder_result._Fields>, java.io.Serializable, Cloneable, Comparable<acceptOrder_result>   {
10374
    private static final TStruct STRUCT_DESC = new TStruct("acceptOrder_result");
10375
 
10376
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
10377
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
10378
 
10379
    private boolean success;
10380
    private TransactionServiceException ex;
10381
 
10382
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10383
    public enum _Fields implements TFieldIdEnum {
10384
      SUCCESS((short)0, "success"),
10385
      EX((short)1, "ex");
10386
 
10387
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
10388
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10389
 
10390
      static {
10391
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10392
          byId.put((int)field._thriftId, field);
10393
          byName.put(field.getFieldName(), field);
10394
        }
10395
      }
10396
 
10397
      /**
10398
       * Find the _Fields constant that matches fieldId, or null if its not found.
10399
       */
10400
      public static _Fields findByThriftId(int fieldId) {
10401
        return byId.get(fieldId);
10402
      }
10403
 
10404
      /**
10405
       * Find the _Fields constant that matches fieldId, throwing an exception
10406
       * if it is not found.
10407
       */
10408
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10409
        _Fields fields = findByThriftId(fieldId);
10410
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10411
        return fields;
10412
      }
10413
 
10414
      /**
10415
       * Find the _Fields constant that matches name, or null if its not found.
10416
       */
10417
      public static _Fields findByName(String name) {
10418
        return byName.get(name);
10419
      }
10420
 
10421
      private final short _thriftId;
10422
      private final String _fieldName;
10423
 
10424
      _Fields(short thriftId, String fieldName) {
10425
        _thriftId = thriftId;
10426
        _fieldName = fieldName;
10427
      }
10428
 
10429
      public short getThriftFieldId() {
10430
        return _thriftId;
10431
      }
10432
 
10433
      public String getFieldName() {
10434
        return _fieldName;
10435
      }
10436
    }
10437
 
10438
    // isset id assignments
10439
    private static final int __SUCCESS_ISSET_ID = 0;
10440
    private BitSet __isset_bit_vector = new BitSet(1);
10441
 
10442
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
10443
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
10444
          new FieldValueMetaData(TType.BOOL)));
10445
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
10446
          new FieldValueMetaData(TType.STRUCT)));
10447
    }});
10448
 
10449
    static {
10450
      FieldMetaData.addStructMetaDataMap(acceptOrder_result.class, metaDataMap);
10451
    }
10452
 
10453
    public acceptOrder_result() {
10454
    }
10455
 
10456
    public acceptOrder_result(
10457
      boolean success,
10458
      TransactionServiceException ex)
10459
    {
10460
      this();
10461
      this.success = success;
10462
      setSuccessIsSet(true);
10463
      this.ex = ex;
10464
    }
10465
 
10466
    /**
10467
     * Performs a deep copy on <i>other</i>.
10468
     */
10469
    public acceptOrder_result(acceptOrder_result other) {
10470
      __isset_bit_vector.clear();
10471
      __isset_bit_vector.or(other.__isset_bit_vector);
10472
      this.success = other.success;
10473
      if (other.isSetEx()) {
10474
        this.ex = new TransactionServiceException(other.ex);
10475
      }
10476
    }
10477
 
10478
    public acceptOrder_result deepCopy() {
10479
      return new acceptOrder_result(this);
10480
    }
10481
 
10482
    @Deprecated
10483
    public acceptOrder_result clone() {
10484
      return new acceptOrder_result(this);
10485
    }
10486
 
10487
    public boolean isSuccess() {
10488
      return this.success;
10489
    }
10490
 
10491
    public acceptOrder_result setSuccess(boolean success) {
10492
      this.success = success;
10493
      setSuccessIsSet(true);
10494
      return this;
10495
    }
10496
 
10497
    public void unsetSuccess() {
10498
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
10499
    }
10500
 
10501
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
10502
    public boolean isSetSuccess() {
10503
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
10504
    }
10505
 
10506
    public void setSuccessIsSet(boolean value) {
10507
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
10508
    }
10509
 
10510
    public TransactionServiceException getEx() {
10511
      return this.ex;
10512
    }
10513
 
10514
    public acceptOrder_result setEx(TransactionServiceException ex) {
10515
      this.ex = ex;
10516
      return this;
10517
    }
10518
 
10519
    public void unsetEx() {
10520
      this.ex = null;
10521
    }
10522
 
10523
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
10524
    public boolean isSetEx() {
10525
      return this.ex != null;
10526
    }
10527
 
10528
    public void setExIsSet(boolean value) {
10529
      if (!value) {
10530
        this.ex = null;
10531
      }
10532
    }
10533
 
10534
    public void setFieldValue(_Fields field, Object value) {
10535
      switch (field) {
10536
      case SUCCESS:
10537
        if (value == null) {
10538
          unsetSuccess();
10539
        } else {
10540
          setSuccess((Boolean)value);
10541
        }
10542
        break;
10543
 
10544
      case EX:
10545
        if (value == null) {
10546
          unsetEx();
10547
        } else {
10548
          setEx((TransactionServiceException)value);
10549
        }
10550
        break;
10551
 
10552
      }
10553
    }
10554
 
10555
    public void setFieldValue(int fieldID, Object value) {
10556
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
10557
    }
10558
 
10559
    public Object getFieldValue(_Fields field) {
10560
      switch (field) {
10561
      case SUCCESS:
10562
        return new Boolean(isSuccess());
10563
 
10564
      case EX:
10565
        return getEx();
10566
 
10567
      }
10568
      throw new IllegalStateException();
10569
    }
10570
 
10571
    public Object getFieldValue(int fieldId) {
10572
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
10573
    }
10574
 
10575
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
10576
    public boolean isSet(_Fields field) {
10577
      switch (field) {
10578
      case SUCCESS:
10579
        return isSetSuccess();
10580
      case EX:
10581
        return isSetEx();
10582
      }
10583
      throw new IllegalStateException();
10584
    }
10585
 
10586
    public boolean isSet(int fieldID) {
10587
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
10588
    }
10589
 
10590
    @Override
10591
    public boolean equals(Object that) {
10592
      if (that == null)
10593
        return false;
10594
      if (that instanceof acceptOrder_result)
10595
        return this.equals((acceptOrder_result)that);
10596
      return false;
10597
    }
10598
 
10599
    public boolean equals(acceptOrder_result that) {
10600
      if (that == null)
10601
        return false;
10602
 
10603
      boolean this_present_success = true;
10604
      boolean that_present_success = true;
10605
      if (this_present_success || that_present_success) {
10606
        if (!(this_present_success && that_present_success))
10607
          return false;
10608
        if (this.success != that.success)
10609
          return false;
10610
      }
10611
 
10612
      boolean this_present_ex = true && this.isSetEx();
10613
      boolean that_present_ex = true && that.isSetEx();
10614
      if (this_present_ex || that_present_ex) {
10615
        if (!(this_present_ex && that_present_ex))
10616
          return false;
10617
        if (!this.ex.equals(that.ex))
10618
          return false;
10619
      }
10620
 
10621
      return true;
10622
    }
10623
 
10624
    @Override
10625
    public int hashCode() {
10626
      return 0;
10627
    }
10628
 
10629
    public int compareTo(acceptOrder_result other) {
10630
      if (!getClass().equals(other.getClass())) {
10631
        return getClass().getName().compareTo(other.getClass().getName());
10632
      }
10633
 
10634
      int lastComparison = 0;
10635
      acceptOrder_result typedOther = (acceptOrder_result)other;
10636
 
10637
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
10638
      if (lastComparison != 0) {
10639
        return lastComparison;
10640
      }
10641
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
10642
      if (lastComparison != 0) {
10643
        return lastComparison;
10644
      }
10645
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
10646
      if (lastComparison != 0) {
10647
        return lastComparison;
10648
      }
10649
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
10650
      if (lastComparison != 0) {
10651
        return lastComparison;
10652
      }
10653
      return 0;
10654
    }
10655
 
10656
    public void read(TProtocol iprot) throws TException {
10657
      TField field;
10658
      iprot.readStructBegin();
10659
      while (true)
10660
      {
10661
        field = iprot.readFieldBegin();
10662
        if (field.type == TType.STOP) { 
10663
          break;
10664
        }
10665
        _Fields fieldId = _Fields.findByThriftId(field.id);
10666
        if (fieldId == null) {
10667
          TProtocolUtil.skip(iprot, field.type);
10668
        } else {
10669
          switch (fieldId) {
10670
            case SUCCESS:
10671
              if (field.type == TType.BOOL) {
10672
                this.success = iprot.readBool();
10673
                setSuccessIsSet(true);
10674
              } else { 
10675
                TProtocolUtil.skip(iprot, field.type);
10676
              }
10677
              break;
10678
            case EX:
10679
              if (field.type == TType.STRUCT) {
10680
                this.ex = new TransactionServiceException();
10681
                this.ex.read(iprot);
10682
              } else { 
10683
                TProtocolUtil.skip(iprot, field.type);
10684
              }
10685
              break;
10686
          }
10687
          iprot.readFieldEnd();
10688
        }
10689
      }
10690
      iprot.readStructEnd();
10691
      validate();
10692
    }
10693
 
10694
    public void write(TProtocol oprot) throws TException {
10695
      oprot.writeStructBegin(STRUCT_DESC);
10696
 
10697
      if (this.isSetSuccess()) {
10698
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
10699
        oprot.writeBool(this.success);
10700
        oprot.writeFieldEnd();
10701
      } else if (this.isSetEx()) {
10702
        oprot.writeFieldBegin(EX_FIELD_DESC);
10703
        this.ex.write(oprot);
10704
        oprot.writeFieldEnd();
10705
      }
10706
      oprot.writeFieldStop();
10707
      oprot.writeStructEnd();
10708
    }
10709
 
10710
    @Override
10711
    public String toString() {
10712
      StringBuilder sb = new StringBuilder("acceptOrder_result(");
10713
      boolean first = true;
10714
 
10715
      sb.append("success:");
10716
      sb.append(this.success);
10717
      first = false;
10718
      if (!first) sb.append(", ");
10719
      sb.append("ex:");
10720
      if (this.ex == null) {
10721
        sb.append("null");
10722
      } else {
10723
        sb.append(this.ex);
10724
      }
10725
      first = false;
10726
      sb.append(")");
10727
      return sb.toString();
10728
    }
10729
 
10730
    public void validate() throws TException {
10731
      // check for required fields
10732
    }
10733
 
10734
  }
10735
 
10736
  public static class billOrder_args implements TBase<billOrder_args._Fields>, java.io.Serializable, Cloneable, Comparable<billOrder_args>   {
10737
    private static final TStruct STRUCT_DESC = new TStruct("billOrder_args");
10738
 
10739
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
10740
 
10741
    private long orderId;
10742
 
10743
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10744
    public enum _Fields implements TFieldIdEnum {
10745
      ORDER_ID((short)1, "orderId");
10746
 
10747
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
10748
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10749
 
10750
      static {
10751
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10752
          byId.put((int)field._thriftId, field);
10753
          byName.put(field.getFieldName(), field);
10754
        }
10755
      }
10756
 
10757
      /**
10758
       * Find the _Fields constant that matches fieldId, or null if its not found.
10759
       */
10760
      public static _Fields findByThriftId(int fieldId) {
10761
        return byId.get(fieldId);
10762
      }
10763
 
10764
      /**
10765
       * Find the _Fields constant that matches fieldId, throwing an exception
10766
       * if it is not found.
10767
       */
10768
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10769
        _Fields fields = findByThriftId(fieldId);
10770
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10771
        return fields;
10772
      }
10773
 
10774
      /**
10775
       * Find the _Fields constant that matches name, or null if its not found.
10776
       */
10777
      public static _Fields findByName(String name) {
10778
        return byName.get(name);
10779
      }
10780
 
10781
      private final short _thriftId;
10782
      private final String _fieldName;
10783
 
10784
      _Fields(short thriftId, String fieldName) {
10785
        _thriftId = thriftId;
10786
        _fieldName = fieldName;
10787
      }
10788
 
10789
      public short getThriftFieldId() {
10790
        return _thriftId;
10791
      }
10792
 
10793
      public String getFieldName() {
10794
        return _fieldName;
10795
      }
10796
    }
10797
 
10798
    // isset id assignments
10799
    private static final int __ORDERID_ISSET_ID = 0;
10800
    private BitSet __isset_bit_vector = new BitSet(1);
10801
 
10802
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
10803
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
10804
          new FieldValueMetaData(TType.I64)));
10805
    }});
10806
 
10807
    static {
10808
      FieldMetaData.addStructMetaDataMap(billOrder_args.class, metaDataMap);
10809
    }
10810
 
10811
    public billOrder_args() {
10812
    }
10813
 
10814
    public billOrder_args(
10815
      long orderId)
10816
    {
10817
      this();
10818
      this.orderId = orderId;
10819
      setOrderIdIsSet(true);
10820
    }
10821
 
10822
    /**
10823
     * Performs a deep copy on <i>other</i>.
10824
     */
10825
    public billOrder_args(billOrder_args other) {
10826
      __isset_bit_vector.clear();
10827
      __isset_bit_vector.or(other.__isset_bit_vector);
10828
      this.orderId = other.orderId;
10829
    }
10830
 
10831
    public billOrder_args deepCopy() {
10832
      return new billOrder_args(this);
10833
    }
10834
 
10835
    @Deprecated
10836
    public billOrder_args clone() {
10837
      return new billOrder_args(this);
10838
    }
10839
 
10840
    public long getOrderId() {
10841
      return this.orderId;
10842
    }
10843
 
10844
    public billOrder_args setOrderId(long orderId) {
10845
      this.orderId = orderId;
10846
      setOrderIdIsSet(true);
10847
      return this;
10848
    }
10849
 
10850
    public void unsetOrderId() {
10851
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
10852
    }
10853
 
10854
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
10855
    public boolean isSetOrderId() {
10856
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
10857
    }
10858
 
10859
    public void setOrderIdIsSet(boolean value) {
10860
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
10861
    }
10862
 
10863
    public void setFieldValue(_Fields field, Object value) {
10864
      switch (field) {
10865
      case ORDER_ID:
10866
        if (value == null) {
10867
          unsetOrderId();
10868
        } else {
10869
          setOrderId((Long)value);
10870
        }
10871
        break;
10872
 
10873
      }
10874
    }
10875
 
10876
    public void setFieldValue(int fieldID, Object value) {
10877
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
10878
    }
10879
 
10880
    public Object getFieldValue(_Fields field) {
10881
      switch (field) {
10882
      case ORDER_ID:
10883
        return new Long(getOrderId());
10884
 
10885
      }
10886
      throw new IllegalStateException();
10887
    }
10888
 
10889
    public Object getFieldValue(int fieldId) {
10890
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
10891
    }
10892
 
10893
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
10894
    public boolean isSet(_Fields field) {
10895
      switch (field) {
10896
      case ORDER_ID:
10897
        return isSetOrderId();
10898
      }
10899
      throw new IllegalStateException();
10900
    }
10901
 
10902
    public boolean isSet(int fieldID) {
10903
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
10904
    }
10905
 
10906
    @Override
10907
    public boolean equals(Object that) {
10908
      if (that == null)
10909
        return false;
10910
      if (that instanceof billOrder_args)
10911
        return this.equals((billOrder_args)that);
10912
      return false;
10913
    }
10914
 
10915
    public boolean equals(billOrder_args that) {
10916
      if (that == null)
10917
        return false;
10918
 
10919
      boolean this_present_orderId = true;
10920
      boolean that_present_orderId = true;
10921
      if (this_present_orderId || that_present_orderId) {
10922
        if (!(this_present_orderId && that_present_orderId))
10923
          return false;
10924
        if (this.orderId != that.orderId)
10925
          return false;
10926
      }
10927
 
10928
      return true;
10929
    }
10930
 
10931
    @Override
10932
    public int hashCode() {
10933
      return 0;
10934
    }
10935
 
10936
    public int compareTo(billOrder_args other) {
10937
      if (!getClass().equals(other.getClass())) {
10938
        return getClass().getName().compareTo(other.getClass().getName());
10939
      }
10940
 
10941
      int lastComparison = 0;
10942
      billOrder_args typedOther = (billOrder_args)other;
10943
 
10944
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
10945
      if (lastComparison != 0) {
10946
        return lastComparison;
10947
      }
10948
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
10949
      if (lastComparison != 0) {
10950
        return lastComparison;
10951
      }
10952
      return 0;
10953
    }
10954
 
10955
    public void read(TProtocol iprot) throws TException {
10956
      TField field;
10957
      iprot.readStructBegin();
10958
      while (true)
10959
      {
10960
        field = iprot.readFieldBegin();
10961
        if (field.type == TType.STOP) { 
10962
          break;
10963
        }
10964
        _Fields fieldId = _Fields.findByThriftId(field.id);
10965
        if (fieldId == null) {
10966
          TProtocolUtil.skip(iprot, field.type);
10967
        } else {
10968
          switch (fieldId) {
10969
            case ORDER_ID:
10970
              if (field.type == TType.I64) {
10971
                this.orderId = iprot.readI64();
10972
                setOrderIdIsSet(true);
10973
              } else { 
10974
                TProtocolUtil.skip(iprot, field.type);
10975
              }
10976
              break;
10977
          }
10978
          iprot.readFieldEnd();
10979
        }
10980
      }
10981
      iprot.readStructEnd();
10982
      validate();
10983
    }
10984
 
10985
    public void write(TProtocol oprot) throws TException {
10986
      validate();
10987
 
10988
      oprot.writeStructBegin(STRUCT_DESC);
10989
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
10990
      oprot.writeI64(this.orderId);
10991
      oprot.writeFieldEnd();
10992
      oprot.writeFieldStop();
10993
      oprot.writeStructEnd();
10994
    }
10995
 
10996
    @Override
10997
    public String toString() {
10998
      StringBuilder sb = new StringBuilder("billOrder_args(");
10999
      boolean first = true;
11000
 
11001
      sb.append("orderId:");
11002
      sb.append(this.orderId);
11003
      first = false;
11004
      sb.append(")");
11005
      return sb.toString();
11006
    }
11007
 
11008
    public void validate() throws TException {
11009
      // check for required fields
11010
    }
11011
 
11012
  }
11013
 
11014
  public static class billOrder_result implements TBase<billOrder_result._Fields>, java.io.Serializable, Cloneable, Comparable<billOrder_result>   {
11015
    private static final TStruct STRUCT_DESC = new TStruct("billOrder_result");
11016
 
11017
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
11018
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
11019
 
11020
    private boolean success;
11021
    private TransactionServiceException ex;
11022
 
11023
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11024
    public enum _Fields implements TFieldIdEnum {
11025
      SUCCESS((short)0, "success"),
11026
      EX((short)1, "ex");
11027
 
11028
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
11029
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11030
 
11031
      static {
11032
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11033
          byId.put((int)field._thriftId, field);
11034
          byName.put(field.getFieldName(), field);
11035
        }
11036
      }
11037
 
11038
      /**
11039
       * Find the _Fields constant that matches fieldId, or null if its not found.
11040
       */
11041
      public static _Fields findByThriftId(int fieldId) {
11042
        return byId.get(fieldId);
11043
      }
11044
 
11045
      /**
11046
       * Find the _Fields constant that matches fieldId, throwing an exception
11047
       * if it is not found.
11048
       */
11049
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11050
        _Fields fields = findByThriftId(fieldId);
11051
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11052
        return fields;
11053
      }
11054
 
11055
      /**
11056
       * Find the _Fields constant that matches name, or null if its not found.
11057
       */
11058
      public static _Fields findByName(String name) {
11059
        return byName.get(name);
11060
      }
11061
 
11062
      private final short _thriftId;
11063
      private final String _fieldName;
11064
 
11065
      _Fields(short thriftId, String fieldName) {
11066
        _thriftId = thriftId;
11067
        _fieldName = fieldName;
11068
      }
11069
 
11070
      public short getThriftFieldId() {
11071
        return _thriftId;
11072
      }
11073
 
11074
      public String getFieldName() {
11075
        return _fieldName;
11076
      }
11077
    }
11078
 
11079
    // isset id assignments
11080
    private static final int __SUCCESS_ISSET_ID = 0;
11081
    private BitSet __isset_bit_vector = new BitSet(1);
11082
 
11083
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
11084
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
11085
          new FieldValueMetaData(TType.BOOL)));
11086
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
11087
          new FieldValueMetaData(TType.STRUCT)));
11088
    }});
11089
 
11090
    static {
11091
      FieldMetaData.addStructMetaDataMap(billOrder_result.class, metaDataMap);
11092
    }
11093
 
11094
    public billOrder_result() {
11095
    }
11096
 
11097
    public billOrder_result(
11098
      boolean success,
11099
      TransactionServiceException ex)
11100
    {
11101
      this();
11102
      this.success = success;
11103
      setSuccessIsSet(true);
11104
      this.ex = ex;
11105
    }
11106
 
11107
    /**
11108
     * Performs a deep copy on <i>other</i>.
11109
     */
11110
    public billOrder_result(billOrder_result other) {
11111
      __isset_bit_vector.clear();
11112
      __isset_bit_vector.or(other.__isset_bit_vector);
11113
      this.success = other.success;
11114
      if (other.isSetEx()) {
11115
        this.ex = new TransactionServiceException(other.ex);
11116
      }
11117
    }
11118
 
11119
    public billOrder_result deepCopy() {
11120
      return new billOrder_result(this);
11121
    }
11122
 
11123
    @Deprecated
11124
    public billOrder_result clone() {
11125
      return new billOrder_result(this);
11126
    }
11127
 
11128
    public boolean isSuccess() {
11129
      return this.success;
11130
    }
11131
 
11132
    public billOrder_result setSuccess(boolean success) {
11133
      this.success = success;
11134
      setSuccessIsSet(true);
11135
      return this;
11136
    }
11137
 
11138
    public void unsetSuccess() {
11139
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
11140
    }
11141
 
11142
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
11143
    public boolean isSetSuccess() {
11144
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
11145
    }
11146
 
11147
    public void setSuccessIsSet(boolean value) {
11148
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
11149
    }
11150
 
11151
    public TransactionServiceException getEx() {
11152
      return this.ex;
11153
    }
11154
 
11155
    public billOrder_result setEx(TransactionServiceException ex) {
11156
      this.ex = ex;
11157
      return this;
11158
    }
11159
 
11160
    public void unsetEx() {
11161
      this.ex = null;
11162
    }
11163
 
11164
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
11165
    public boolean isSetEx() {
11166
      return this.ex != null;
11167
    }
11168
 
11169
    public void setExIsSet(boolean value) {
11170
      if (!value) {
11171
        this.ex = null;
11172
      }
11173
    }
11174
 
11175
    public void setFieldValue(_Fields field, Object value) {
11176
      switch (field) {
11177
      case SUCCESS:
11178
        if (value == null) {
11179
          unsetSuccess();
11180
        } else {
11181
          setSuccess((Boolean)value);
11182
        }
11183
        break;
11184
 
11185
      case EX:
11186
        if (value == null) {
11187
          unsetEx();
11188
        } else {
11189
          setEx((TransactionServiceException)value);
11190
        }
11191
        break;
11192
 
11193
      }
11194
    }
11195
 
11196
    public void setFieldValue(int fieldID, Object value) {
11197
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
11198
    }
11199
 
11200
    public Object getFieldValue(_Fields field) {
11201
      switch (field) {
11202
      case SUCCESS:
11203
        return new Boolean(isSuccess());
11204
 
11205
      case EX:
11206
        return getEx();
11207
 
11208
      }
11209
      throw new IllegalStateException();
11210
    }
11211
 
11212
    public Object getFieldValue(int fieldId) {
11213
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
11214
    }
11215
 
11216
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
11217
    public boolean isSet(_Fields field) {
11218
      switch (field) {
11219
      case SUCCESS:
11220
        return isSetSuccess();
11221
      case EX:
11222
        return isSetEx();
11223
      }
11224
      throw new IllegalStateException();
11225
    }
11226
 
11227
    public boolean isSet(int fieldID) {
11228
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
11229
    }
11230
 
11231
    @Override
11232
    public boolean equals(Object that) {
11233
      if (that == null)
11234
        return false;
11235
      if (that instanceof billOrder_result)
11236
        return this.equals((billOrder_result)that);
11237
      return false;
11238
    }
11239
 
11240
    public boolean equals(billOrder_result that) {
11241
      if (that == null)
11242
        return false;
11243
 
11244
      boolean this_present_success = true;
11245
      boolean that_present_success = true;
11246
      if (this_present_success || that_present_success) {
11247
        if (!(this_present_success && that_present_success))
11248
          return false;
11249
        if (this.success != that.success)
11250
          return false;
11251
      }
11252
 
11253
      boolean this_present_ex = true && this.isSetEx();
11254
      boolean that_present_ex = true && that.isSetEx();
11255
      if (this_present_ex || that_present_ex) {
11256
        if (!(this_present_ex && that_present_ex))
11257
          return false;
11258
        if (!this.ex.equals(that.ex))
11259
          return false;
11260
      }
11261
 
11262
      return true;
11263
    }
11264
 
11265
    @Override
11266
    public int hashCode() {
11267
      return 0;
11268
    }
11269
 
11270
    public int compareTo(billOrder_result other) {
11271
      if (!getClass().equals(other.getClass())) {
11272
        return getClass().getName().compareTo(other.getClass().getName());
11273
      }
11274
 
11275
      int lastComparison = 0;
11276
      billOrder_result typedOther = (billOrder_result)other;
11277
 
11278
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
11279
      if (lastComparison != 0) {
11280
        return lastComparison;
11281
      }
11282
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
11283
      if (lastComparison != 0) {
11284
        return lastComparison;
11285
      }
11286
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
11287
      if (lastComparison != 0) {
11288
        return lastComparison;
11289
      }
11290
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
11291
      if (lastComparison != 0) {
11292
        return lastComparison;
11293
      }
11294
      return 0;
11295
    }
11296
 
11297
    public void read(TProtocol iprot) throws TException {
11298
      TField field;
11299
      iprot.readStructBegin();
11300
      while (true)
11301
      {
11302
        field = iprot.readFieldBegin();
11303
        if (field.type == TType.STOP) { 
11304
          break;
11305
        }
11306
        _Fields fieldId = _Fields.findByThriftId(field.id);
11307
        if (fieldId == null) {
11308
          TProtocolUtil.skip(iprot, field.type);
11309
        } else {
11310
          switch (fieldId) {
11311
            case SUCCESS:
11312
              if (field.type == TType.BOOL) {
11313
                this.success = iprot.readBool();
11314
                setSuccessIsSet(true);
11315
              } else { 
11316
                TProtocolUtil.skip(iprot, field.type);
11317
              }
11318
              break;
11319
            case EX:
11320
              if (field.type == TType.STRUCT) {
11321
                this.ex = new TransactionServiceException();
11322
                this.ex.read(iprot);
11323
              } else { 
11324
                TProtocolUtil.skip(iprot, field.type);
11325
              }
11326
              break;
11327
          }
11328
          iprot.readFieldEnd();
11329
        }
11330
      }
11331
      iprot.readStructEnd();
11332
      validate();
11333
    }
11334
 
11335
    public void write(TProtocol oprot) throws TException {
11336
      oprot.writeStructBegin(STRUCT_DESC);
11337
 
11338
      if (this.isSetSuccess()) {
11339
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
11340
        oprot.writeBool(this.success);
11341
        oprot.writeFieldEnd();
11342
      } else if (this.isSetEx()) {
11343
        oprot.writeFieldBegin(EX_FIELD_DESC);
11344
        this.ex.write(oprot);
11345
        oprot.writeFieldEnd();
11346
      }
11347
      oprot.writeFieldStop();
11348
      oprot.writeStructEnd();
11349
    }
11350
 
11351
    @Override
11352
    public String toString() {
11353
      StringBuilder sb = new StringBuilder("billOrder_result(");
11354
      boolean first = true;
11355
 
11356
      sb.append("success:");
11357
      sb.append(this.success);
11358
      first = false;
11359
      if (!first) sb.append(", ");
11360
      sb.append("ex:");
11361
      if (this.ex == null) {
11362
        sb.append("null");
11363
      } else {
11364
        sb.append(this.ex);
11365
      }
11366
      first = false;
11367
      sb.append(")");
11368
      return sb.toString();
11369
    }
11370
 
11371
    public void validate() throws TException {
11372
      // check for required fields
11373
    }
11374
 
11375
  }
11376
 
483 rajveer 11377
  public static class getOrdersForTransaction_args implements TBase<getOrdersForTransaction_args._Fields>, java.io.Serializable, Cloneable, Comparable<getOrdersForTransaction_args>   {
11378
    private static final TStruct STRUCT_DESC = new TStruct("getOrdersForTransaction_args");
68 ashish 11379
 
11380
    private static final TField TRANSACTION_ID_FIELD_DESC = new TField("transactionId", TType.I64, (short)1);
11381
 
11382
    private long transactionId;
11383
 
11384
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11385
    public enum _Fields implements TFieldIdEnum {
483 rajveer 11386
      TRANSACTION_ID((short)1, "transactionId");
68 ashish 11387
 
11388
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
11389
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11390
 
11391
      static {
11392
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11393
          byId.put((int)field._thriftId, field);
11394
          byName.put(field.getFieldName(), field);
11395
        }
11396
      }
11397
 
11398
      /**
11399
       * Find the _Fields constant that matches fieldId, or null if its not found.
11400
       */
11401
      public static _Fields findByThriftId(int fieldId) {
11402
        return byId.get(fieldId);
11403
      }
11404
 
11405
      /**
11406
       * Find the _Fields constant that matches fieldId, throwing an exception
11407
       * if it is not found.
11408
       */
11409
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11410
        _Fields fields = findByThriftId(fieldId);
11411
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11412
        return fields;
11413
      }
11414
 
11415
      /**
11416
       * Find the _Fields constant that matches name, or null if its not found.
11417
       */
11418
      public static _Fields findByName(String name) {
11419
        return byName.get(name);
11420
      }
11421
 
11422
      private final short _thriftId;
11423
      private final String _fieldName;
11424
 
11425
      _Fields(short thriftId, String fieldName) {
11426
        _thriftId = thriftId;
11427
        _fieldName = fieldName;
11428
      }
11429
 
11430
      public short getThriftFieldId() {
11431
        return _thriftId;
11432
      }
11433
 
11434
      public String getFieldName() {
11435
        return _fieldName;
11436
      }
11437
    }
11438
 
11439
    // isset id assignments
11440
    private static final int __TRANSACTIONID_ISSET_ID = 0;
483 rajveer 11441
    private BitSet __isset_bit_vector = new BitSet(1);
68 ashish 11442
 
11443
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
11444
      put(_Fields.TRANSACTION_ID, new FieldMetaData("transactionId", TFieldRequirementType.DEFAULT, 
11445
          new FieldValueMetaData(TType.I64)));
11446
    }});
11447
 
11448
    static {
483 rajveer 11449
      FieldMetaData.addStructMetaDataMap(getOrdersForTransaction_args.class, metaDataMap);
68 ashish 11450
    }
11451
 
483 rajveer 11452
    public getOrdersForTransaction_args() {
68 ashish 11453
    }
11454
 
483 rajveer 11455
    public getOrdersForTransaction_args(
11456
      long transactionId)
68 ashish 11457
    {
11458
      this();
11459
      this.transactionId = transactionId;
11460
      setTransactionIdIsSet(true);
11461
    }
11462
 
11463
    /**
11464
     * Performs a deep copy on <i>other</i>.
11465
     */
483 rajveer 11466
    public getOrdersForTransaction_args(getOrdersForTransaction_args other) {
68 ashish 11467
      __isset_bit_vector.clear();
11468
      __isset_bit_vector.or(other.__isset_bit_vector);
11469
      this.transactionId = other.transactionId;
11470
    }
11471
 
483 rajveer 11472
    public getOrdersForTransaction_args deepCopy() {
11473
      return new getOrdersForTransaction_args(this);
68 ashish 11474
    }
11475
 
11476
    @Deprecated
483 rajveer 11477
    public getOrdersForTransaction_args clone() {
11478
      return new getOrdersForTransaction_args(this);
68 ashish 11479
    }
11480
 
11481
    public long getTransactionId() {
11482
      return this.transactionId;
11483
    }
11484
 
483 rajveer 11485
    public getOrdersForTransaction_args setTransactionId(long transactionId) {
68 ashish 11486
      this.transactionId = transactionId;
11487
      setTransactionIdIsSet(true);
11488
      return this;
11489
    }
11490
 
11491
    public void unsetTransactionId() {
11492
      __isset_bit_vector.clear(__TRANSACTIONID_ISSET_ID);
11493
    }
11494
 
11495
    /** Returns true if field transactionId is set (has been asigned a value) and false otherwise */
11496
    public boolean isSetTransactionId() {
11497
      return __isset_bit_vector.get(__TRANSACTIONID_ISSET_ID);
11498
    }
11499
 
11500
    public void setTransactionIdIsSet(boolean value) {
11501
      __isset_bit_vector.set(__TRANSACTIONID_ISSET_ID, value);
11502
    }
11503
 
11504
    public void setFieldValue(_Fields field, Object value) {
11505
      switch (field) {
11506
      case TRANSACTION_ID:
11507
        if (value == null) {
11508
          unsetTransactionId();
11509
        } else {
11510
          setTransactionId((Long)value);
11511
        }
11512
        break;
11513
 
11514
      }
11515
    }
11516
 
11517
    public void setFieldValue(int fieldID, Object value) {
11518
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
11519
    }
11520
 
11521
    public Object getFieldValue(_Fields field) {
11522
      switch (field) {
11523
      case TRANSACTION_ID:
11524
        return new Long(getTransactionId());
11525
 
11526
      }
11527
      throw new IllegalStateException();
11528
    }
11529
 
11530
    public Object getFieldValue(int fieldId) {
11531
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
11532
    }
11533
 
11534
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
11535
    public boolean isSet(_Fields field) {
11536
      switch (field) {
11537
      case TRANSACTION_ID:
11538
        return isSetTransactionId();
11539
      }
11540
      throw new IllegalStateException();
11541
    }
11542
 
11543
    public boolean isSet(int fieldID) {
11544
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
11545
    }
11546
 
11547
    @Override
11548
    public boolean equals(Object that) {
11549
      if (that == null)
11550
        return false;
483 rajveer 11551
      if (that instanceof getOrdersForTransaction_args)
11552
        return this.equals((getOrdersForTransaction_args)that);
68 ashish 11553
      return false;
11554
    }
11555
 
483 rajveer 11556
    public boolean equals(getOrdersForTransaction_args that) {
68 ashish 11557
      if (that == null)
11558
        return false;
11559
 
11560
      boolean this_present_transactionId = true;
11561
      boolean that_present_transactionId = true;
11562
      if (this_present_transactionId || that_present_transactionId) {
11563
        if (!(this_present_transactionId && that_present_transactionId))
11564
          return false;
11565
        if (this.transactionId != that.transactionId)
11566
          return false;
11567
      }
11568
 
11569
      return true;
11570
    }
11571
 
11572
    @Override
11573
    public int hashCode() {
11574
      return 0;
11575
    }
11576
 
483 rajveer 11577
    public int compareTo(getOrdersForTransaction_args other) {
68 ashish 11578
      if (!getClass().equals(other.getClass())) {
11579
        return getClass().getName().compareTo(other.getClass().getName());
11580
      }
11581
 
11582
      int lastComparison = 0;
483 rajveer 11583
      getOrdersForTransaction_args typedOther = (getOrdersForTransaction_args)other;
68 ashish 11584
 
11585
      lastComparison = Boolean.valueOf(isSetTransactionId()).compareTo(isSetTransactionId());
11586
      if (lastComparison != 0) {
11587
        return lastComparison;
11588
      }
11589
      lastComparison = TBaseHelper.compareTo(transactionId, typedOther.transactionId);
11590
      if (lastComparison != 0) {
11591
        return lastComparison;
11592
      }
11593
      return 0;
11594
    }
11595
 
11596
    public void read(TProtocol iprot) throws TException {
11597
      TField field;
11598
      iprot.readStructBegin();
11599
      while (true)
11600
      {
11601
        field = iprot.readFieldBegin();
11602
        if (field.type == TType.STOP) { 
11603
          break;
11604
        }
11605
        _Fields fieldId = _Fields.findByThriftId(field.id);
11606
        if (fieldId == null) {
11607
          TProtocolUtil.skip(iprot, field.type);
11608
        } else {
11609
          switch (fieldId) {
11610
            case TRANSACTION_ID:
11611
              if (field.type == TType.I64) {
11612
                this.transactionId = iprot.readI64();
11613
                setTransactionIdIsSet(true);
11614
              } else { 
11615
                TProtocolUtil.skip(iprot, field.type);
11616
              }
11617
              break;
11618
          }
11619
          iprot.readFieldEnd();
11620
        }
11621
      }
11622
      iprot.readStructEnd();
11623
      validate();
11624
    }
11625
 
11626
    public void write(TProtocol oprot) throws TException {
11627
      validate();
11628
 
11629
      oprot.writeStructBegin(STRUCT_DESC);
11630
      oprot.writeFieldBegin(TRANSACTION_ID_FIELD_DESC);
11631
      oprot.writeI64(this.transactionId);
11632
      oprot.writeFieldEnd();
11633
      oprot.writeFieldStop();
11634
      oprot.writeStructEnd();
11635
    }
11636
 
11637
    @Override
11638
    public String toString() {
483 rajveer 11639
      StringBuilder sb = new StringBuilder("getOrdersForTransaction_args(");
68 ashish 11640
      boolean first = true;
11641
 
11642
      sb.append("transactionId:");
11643
      sb.append(this.transactionId);
11644
      first = false;
11645
      sb.append(")");
11646
      return sb.toString();
11647
    }
11648
 
11649
    public void validate() throws TException {
11650
      // check for required fields
11651
    }
11652
 
11653
  }
11654
 
483 rajveer 11655
  public static class getOrdersForTransaction_result implements TBase<getOrdersForTransaction_result._Fields>, java.io.Serializable, Cloneable, Comparable<getOrdersForTransaction_result>   {
11656
    private static final TStruct STRUCT_DESC = new TStruct("getOrdersForTransaction_result");
68 ashish 11657
 
483 rajveer 11658
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
68 ashish 11659
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
11660
 
483 rajveer 11661
    private List<Order> success;
68 ashish 11662
    private TransactionServiceException ex;
11663
 
11664
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11665
    public enum _Fields implements TFieldIdEnum {
11666
      SUCCESS((short)0, "success"),
11667
      EX((short)1, "ex");
11668
 
11669
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
11670
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11671
 
11672
      static {
11673
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11674
          byId.put((int)field._thriftId, field);
11675
          byName.put(field.getFieldName(), field);
11676
        }
11677
      }
11678
 
11679
      /**
11680
       * Find the _Fields constant that matches fieldId, or null if its not found.
11681
       */
11682
      public static _Fields findByThriftId(int fieldId) {
11683
        return byId.get(fieldId);
11684
      }
11685
 
11686
      /**
11687
       * Find the _Fields constant that matches fieldId, throwing an exception
11688
       * if it is not found.
11689
       */
11690
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11691
        _Fields fields = findByThriftId(fieldId);
11692
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11693
        return fields;
11694
      }
11695
 
11696
      /**
11697
       * Find the _Fields constant that matches name, or null if its not found.
11698
       */
11699
      public static _Fields findByName(String name) {
11700
        return byName.get(name);
11701
      }
11702
 
11703
      private final short _thriftId;
11704
      private final String _fieldName;
11705
 
11706
      _Fields(short thriftId, String fieldName) {
11707
        _thriftId = thriftId;
11708
        _fieldName = fieldName;
11709
      }
11710
 
11711
      public short getThriftFieldId() {
11712
        return _thriftId;
11713
      }
11714
 
11715
      public String getFieldName() {
11716
        return _fieldName;
11717
      }
11718
    }
11719
 
11720
    // isset id assignments
11721
 
11722
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
11723
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
483 rajveer 11724
          new ListMetaData(TType.LIST, 
11725
              new StructMetaData(TType.STRUCT, Order.class))));
68 ashish 11726
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
11727
          new FieldValueMetaData(TType.STRUCT)));
11728
    }});
11729
 
11730
    static {
483 rajveer 11731
      FieldMetaData.addStructMetaDataMap(getOrdersForTransaction_result.class, metaDataMap);
68 ashish 11732
    }
11733
 
483 rajveer 11734
    public getOrdersForTransaction_result() {
68 ashish 11735
    }
11736
 
483 rajveer 11737
    public getOrdersForTransaction_result(
11738
      List<Order> success,
68 ashish 11739
      TransactionServiceException ex)
11740
    {
11741
      this();
11742
      this.success = success;
11743
      this.ex = ex;
11744
    }
11745
 
11746
    /**
11747
     * Performs a deep copy on <i>other</i>.
11748
     */
483 rajveer 11749
    public getOrdersForTransaction_result(getOrdersForTransaction_result other) {
11750
      if (other.isSetSuccess()) {
11751
        List<Order> __this__success = new ArrayList<Order>();
11752
        for (Order other_element : other.success) {
11753
          __this__success.add(new Order(other_element));
11754
        }
11755
        this.success = __this__success;
11756
      }
68 ashish 11757
      if (other.isSetEx()) {
11758
        this.ex = new TransactionServiceException(other.ex);
11759
      }
11760
    }
11761
 
483 rajveer 11762
    public getOrdersForTransaction_result deepCopy() {
11763
      return new getOrdersForTransaction_result(this);
68 ashish 11764
    }
11765
 
11766
    @Deprecated
483 rajveer 11767
    public getOrdersForTransaction_result clone() {
11768
      return new getOrdersForTransaction_result(this);
68 ashish 11769
    }
11770
 
483 rajveer 11771
    public int getSuccessSize() {
11772
      return (this.success == null) ? 0 : this.success.size();
11773
    }
11774
 
11775
    public java.util.Iterator<Order> getSuccessIterator() {
11776
      return (this.success == null) ? null : this.success.iterator();
11777
    }
11778
 
11779
    public void addToSuccess(Order elem) {
11780
      if (this.success == null) {
11781
        this.success = new ArrayList<Order>();
11782
      }
11783
      this.success.add(elem);
11784
    }
11785
 
11786
    public List<Order> getSuccess() {
68 ashish 11787
      return this.success;
11788
    }
11789
 
483 rajveer 11790
    public getOrdersForTransaction_result setSuccess(List<Order> success) {
68 ashish 11791
      this.success = success;
11792
      return this;
11793
    }
11794
 
11795
    public void unsetSuccess() {
483 rajveer 11796
      this.success = null;
68 ashish 11797
    }
11798
 
11799
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
11800
    public boolean isSetSuccess() {
483 rajveer 11801
      return this.success != null;
68 ashish 11802
    }
11803
 
11804
    public void setSuccessIsSet(boolean value) {
483 rajveer 11805
      if (!value) {
11806
        this.success = null;
11807
      }
68 ashish 11808
    }
11809
 
11810
    public TransactionServiceException getEx() {
11811
      return this.ex;
11812
    }
11813
 
483 rajveer 11814
    public getOrdersForTransaction_result setEx(TransactionServiceException ex) {
68 ashish 11815
      this.ex = ex;
11816
      return this;
11817
    }
11818
 
11819
    public void unsetEx() {
11820
      this.ex = null;
11821
    }
11822
 
11823
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
11824
    public boolean isSetEx() {
11825
      return this.ex != null;
11826
    }
11827
 
11828
    public void setExIsSet(boolean value) {
11829
      if (!value) {
11830
        this.ex = null;
11831
      }
11832
    }
11833
 
11834
    public void setFieldValue(_Fields field, Object value) {
11835
      switch (field) {
11836
      case SUCCESS:
11837
        if (value == null) {
11838
          unsetSuccess();
11839
        } else {
483 rajveer 11840
          setSuccess((List<Order>)value);
68 ashish 11841
        }
11842
        break;
11843
 
11844
      case EX:
11845
        if (value == null) {
11846
          unsetEx();
11847
        } else {
11848
          setEx((TransactionServiceException)value);
11849
        }
11850
        break;
11851
 
11852
      }
11853
    }
11854
 
11855
    public void setFieldValue(int fieldID, Object value) {
11856
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
11857
    }
11858
 
11859
    public Object getFieldValue(_Fields field) {
11860
      switch (field) {
11861
      case SUCCESS:
483 rajveer 11862
        return getSuccess();
68 ashish 11863
 
11864
      case EX:
11865
        return getEx();
11866
 
11867
      }
11868
      throw new IllegalStateException();
11869
    }
11870
 
11871
    public Object getFieldValue(int fieldId) {
11872
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
11873
    }
11874
 
11875
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
11876
    public boolean isSet(_Fields field) {
11877
      switch (field) {
11878
      case SUCCESS:
11879
        return isSetSuccess();
11880
      case EX:
11881
        return isSetEx();
11882
      }
11883
      throw new IllegalStateException();
11884
    }
11885
 
11886
    public boolean isSet(int fieldID) {
11887
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
11888
    }
11889
 
11890
    @Override
11891
    public boolean equals(Object that) {
11892
      if (that == null)
11893
        return false;
483 rajveer 11894
      if (that instanceof getOrdersForTransaction_result)
11895
        return this.equals((getOrdersForTransaction_result)that);
68 ashish 11896
      return false;
11897
    }
11898
 
483 rajveer 11899
    public boolean equals(getOrdersForTransaction_result that) {
68 ashish 11900
      if (that == null)
11901
        return false;
11902
 
483 rajveer 11903
      boolean this_present_success = true && this.isSetSuccess();
11904
      boolean that_present_success = true && that.isSetSuccess();
68 ashish 11905
      if (this_present_success || that_present_success) {
11906
        if (!(this_present_success && that_present_success))
11907
          return false;
483 rajveer 11908
        if (!this.success.equals(that.success))
68 ashish 11909
          return false;
11910
      }
11911
 
11912
      boolean this_present_ex = true && this.isSetEx();
11913
      boolean that_present_ex = true && that.isSetEx();
11914
      if (this_present_ex || that_present_ex) {
11915
        if (!(this_present_ex && that_present_ex))
11916
          return false;
11917
        if (!this.ex.equals(that.ex))
11918
          return false;
11919
      }
11920
 
11921
      return true;
11922
    }
11923
 
11924
    @Override
11925
    public int hashCode() {
11926
      return 0;
11927
    }
11928
 
483 rajveer 11929
    public int compareTo(getOrdersForTransaction_result other) {
68 ashish 11930
      if (!getClass().equals(other.getClass())) {
11931
        return getClass().getName().compareTo(other.getClass().getName());
11932
      }
11933
 
11934
      int lastComparison = 0;
483 rajveer 11935
      getOrdersForTransaction_result typedOther = (getOrdersForTransaction_result)other;
68 ashish 11936
 
11937
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
11938
      if (lastComparison != 0) {
11939
        return lastComparison;
11940
      }
11941
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
11942
      if (lastComparison != 0) {
11943
        return lastComparison;
11944
      }
11945
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
11946
      if (lastComparison != 0) {
11947
        return lastComparison;
11948
      }
11949
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
11950
      if (lastComparison != 0) {
11951
        return lastComparison;
11952
      }
11953
      return 0;
11954
    }
11955
 
11956
    public void read(TProtocol iprot) throws TException {
11957
      TField field;
11958
      iprot.readStructBegin();
11959
      while (true)
11960
      {
11961
        field = iprot.readFieldBegin();
11962
        if (field.type == TType.STOP) { 
11963
          break;
11964
        }
11965
        _Fields fieldId = _Fields.findByThriftId(field.id);
11966
        if (fieldId == null) {
11967
          TProtocolUtil.skip(iprot, field.type);
11968
        } else {
11969
          switch (fieldId) {
11970
            case SUCCESS:
483 rajveer 11971
              if (field.type == TType.LIST) {
11972
                {
1022 varun.gupt 11973
                  TList _list24 = iprot.readListBegin();
11974
                  this.success = new ArrayList<Order>(_list24.size);
11975
                  for (int _i25 = 0; _i25 < _list24.size; ++_i25)
483 rajveer 11976
                  {
1022 varun.gupt 11977
                    Order _elem26;
11978
                    _elem26 = new Order();
11979
                    _elem26.read(iprot);
11980
                    this.success.add(_elem26);
483 rajveer 11981
                  }
11982
                  iprot.readListEnd();
11983
                }
68 ashish 11984
              } else { 
11985
                TProtocolUtil.skip(iprot, field.type);
11986
              }
11987
              break;
11988
            case EX:
11989
              if (field.type == TType.STRUCT) {
11990
                this.ex = new TransactionServiceException();
11991
                this.ex.read(iprot);
11992
              } else { 
11993
                TProtocolUtil.skip(iprot, field.type);
11994
              }
11995
              break;
11996
          }
11997
          iprot.readFieldEnd();
11998
        }
11999
      }
12000
      iprot.readStructEnd();
12001
      validate();
12002
    }
12003
 
12004
    public void write(TProtocol oprot) throws TException {
12005
      oprot.writeStructBegin(STRUCT_DESC);
12006
 
12007
      if (this.isSetSuccess()) {
12008
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
483 rajveer 12009
        {
12010
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
1022 varun.gupt 12011
          for (Order _iter27 : this.success)
483 rajveer 12012
          {
1022 varun.gupt 12013
            _iter27.write(oprot);
483 rajveer 12014
          }
12015
          oprot.writeListEnd();
12016
        }
68 ashish 12017
        oprot.writeFieldEnd();
12018
      } else if (this.isSetEx()) {
12019
        oprot.writeFieldBegin(EX_FIELD_DESC);
12020
        this.ex.write(oprot);
12021
        oprot.writeFieldEnd();
12022
      }
12023
      oprot.writeFieldStop();
12024
      oprot.writeStructEnd();
12025
    }
12026
 
12027
    @Override
12028
    public String toString() {
483 rajveer 12029
      StringBuilder sb = new StringBuilder("getOrdersForTransaction_result(");
68 ashish 12030
      boolean first = true;
12031
 
12032
      sb.append("success:");
483 rajveer 12033
      if (this.success == null) {
12034
        sb.append("null");
12035
      } else {
12036
        sb.append(this.success);
12037
      }
68 ashish 12038
      first = false;
12039
      if (!first) sb.append(", ");
12040
      sb.append("ex:");
12041
      if (this.ex == null) {
12042
        sb.append("null");
12043
      } else {
12044
        sb.append(this.ex);
12045
      }
12046
      first = false;
12047
      sb.append(")");
12048
      return sb.toString();
12049
    }
12050
 
12051
    public void validate() throws TException {
12052
      // check for required fields
12053
    }
12054
 
12055
  }
12056
 
483 rajveer 12057
  public static class getOrdersForCustomer_args implements TBase<getOrdersForCustomer_args._Fields>, java.io.Serializable, Cloneable, Comparable<getOrdersForCustomer_args>   {
12058
    private static final TStruct STRUCT_DESC = new TStruct("getOrdersForCustomer_args");
68 ashish 12059
 
483 rajveer 12060
    private static final TField CUSTOMER_ID_FIELD_DESC = new TField("customerId", TType.I64, (short)1);
12061
    private static final TField FROM_DATE_FIELD_DESC = new TField("from_date", TType.I64, (short)2);
12062
    private static final TField TO_DATE_FIELD_DESC = new TField("to_date", TType.I64, (short)3);
12063
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)4);
68 ashish 12064
 
483 rajveer 12065
    private long customerId;
12066
    private long from_date;
12067
    private long to_date;
12068
    private OrderStatus status;
68 ashish 12069
 
12070
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12071
    public enum _Fields implements TFieldIdEnum {
483 rajveer 12072
      CUSTOMER_ID((short)1, "customerId"),
12073
      FROM_DATE((short)2, "from_date"),
12074
      TO_DATE((short)3, "to_date"),
12075
      /**
12076
       * 
12077
       * @see OrderStatus
12078
       */
12079
      STATUS((short)4, "status");
68 ashish 12080
 
12081
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
12082
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12083
 
12084
      static {
12085
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12086
          byId.put((int)field._thriftId, field);
12087
          byName.put(field.getFieldName(), field);
12088
        }
12089
      }
12090
 
12091
      /**
12092
       * Find the _Fields constant that matches fieldId, or null if its not found.
12093
       */
12094
      public static _Fields findByThriftId(int fieldId) {
12095
        return byId.get(fieldId);
12096
      }
12097
 
12098
      /**
12099
       * Find the _Fields constant that matches fieldId, throwing an exception
12100
       * if it is not found.
12101
       */
12102
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12103
        _Fields fields = findByThriftId(fieldId);
12104
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12105
        return fields;
12106
      }
12107
 
12108
      /**
12109
       * Find the _Fields constant that matches name, or null if its not found.
12110
       */
12111
      public static _Fields findByName(String name) {
12112
        return byName.get(name);
12113
      }
12114
 
12115
      private final short _thriftId;
12116
      private final String _fieldName;
12117
 
12118
      _Fields(short thriftId, String fieldName) {
12119
        _thriftId = thriftId;
12120
        _fieldName = fieldName;
12121
      }
12122
 
12123
      public short getThriftFieldId() {
12124
        return _thriftId;
12125
      }
12126
 
12127
      public String getFieldName() {
12128
        return _fieldName;
12129
      }
12130
    }
12131
 
12132
    // isset id assignments
483 rajveer 12133
    private static final int __CUSTOMERID_ISSET_ID = 0;
12134
    private static final int __FROM_DATE_ISSET_ID = 1;
12135
    private static final int __TO_DATE_ISSET_ID = 2;
68 ashish 12136
    private BitSet __isset_bit_vector = new BitSet(3);
12137
 
12138
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 12139
      put(_Fields.CUSTOMER_ID, new FieldMetaData("customerId", TFieldRequirementType.DEFAULT, 
68 ashish 12140
          new FieldValueMetaData(TType.I64)));
483 rajveer 12141
      put(_Fields.FROM_DATE, new FieldMetaData("from_date", TFieldRequirementType.DEFAULT, 
68 ashish 12142
          new FieldValueMetaData(TType.I64)));
483 rajveer 12143
      put(_Fields.TO_DATE, new FieldMetaData("to_date", TFieldRequirementType.DEFAULT, 
68 ashish 12144
          new FieldValueMetaData(TType.I64)));
483 rajveer 12145
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
12146
          new EnumMetaData(TType.ENUM, OrderStatus.class)));
68 ashish 12147
    }});
12148
 
12149
    static {
483 rajveer 12150
      FieldMetaData.addStructMetaDataMap(getOrdersForCustomer_args.class, metaDataMap);
68 ashish 12151
    }
12152
 
483 rajveer 12153
    public getOrdersForCustomer_args() {
68 ashish 12154
    }
12155
 
483 rajveer 12156
    public getOrdersForCustomer_args(
12157
      long customerId,
12158
      long from_date,
12159
      long to_date,
12160
      OrderStatus status)
68 ashish 12161
    {
12162
      this();
483 rajveer 12163
      this.customerId = customerId;
12164
      setCustomerIdIsSet(true);
12165
      this.from_date = from_date;
12166
      setFrom_dateIsSet(true);
12167
      this.to_date = to_date;
12168
      setTo_dateIsSet(true);
12169
      this.status = status;
68 ashish 12170
    }
12171
 
12172
    /**
12173
     * Performs a deep copy on <i>other</i>.
12174
     */
483 rajveer 12175
    public getOrdersForCustomer_args(getOrdersForCustomer_args other) {
68 ashish 12176
      __isset_bit_vector.clear();
12177
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 12178
      this.customerId = other.customerId;
12179
      this.from_date = other.from_date;
12180
      this.to_date = other.to_date;
12181
      if (other.isSetStatus()) {
12182
        this.status = other.status;
12183
      }
68 ashish 12184
    }
12185
 
483 rajveer 12186
    public getOrdersForCustomer_args deepCopy() {
12187
      return new getOrdersForCustomer_args(this);
68 ashish 12188
    }
12189
 
12190
    @Deprecated
483 rajveer 12191
    public getOrdersForCustomer_args clone() {
12192
      return new getOrdersForCustomer_args(this);
68 ashish 12193
    }
12194
 
483 rajveer 12195
    public long getCustomerId() {
12196
      return this.customerId;
68 ashish 12197
    }
12198
 
483 rajveer 12199
    public getOrdersForCustomer_args setCustomerId(long customerId) {
12200
      this.customerId = customerId;
12201
      setCustomerIdIsSet(true);
68 ashish 12202
      return this;
12203
    }
12204
 
483 rajveer 12205
    public void unsetCustomerId() {
12206
      __isset_bit_vector.clear(__CUSTOMERID_ISSET_ID);
68 ashish 12207
    }
12208
 
483 rajveer 12209
    /** Returns true if field customerId is set (has been asigned a value) and false otherwise */
12210
    public boolean isSetCustomerId() {
12211
      return __isset_bit_vector.get(__CUSTOMERID_ISSET_ID);
68 ashish 12212
    }
12213
 
483 rajveer 12214
    public void setCustomerIdIsSet(boolean value) {
12215
      __isset_bit_vector.set(__CUSTOMERID_ISSET_ID, value);
68 ashish 12216
    }
12217
 
483 rajveer 12218
    public long getFrom_date() {
12219
      return this.from_date;
68 ashish 12220
    }
12221
 
483 rajveer 12222
    public getOrdersForCustomer_args setFrom_date(long from_date) {
12223
      this.from_date = from_date;
12224
      setFrom_dateIsSet(true);
68 ashish 12225
      return this;
12226
    }
12227
 
483 rajveer 12228
    public void unsetFrom_date() {
12229
      __isset_bit_vector.clear(__FROM_DATE_ISSET_ID);
68 ashish 12230
    }
12231
 
483 rajveer 12232
    /** Returns true if field from_date is set (has been asigned a value) and false otherwise */
12233
    public boolean isSetFrom_date() {
12234
      return __isset_bit_vector.get(__FROM_DATE_ISSET_ID);
68 ashish 12235
    }
12236
 
483 rajveer 12237
    public void setFrom_dateIsSet(boolean value) {
12238
      __isset_bit_vector.set(__FROM_DATE_ISSET_ID, value);
68 ashish 12239
    }
12240
 
483 rajveer 12241
    public long getTo_date() {
12242
      return this.to_date;
68 ashish 12243
    }
12244
 
483 rajveer 12245
    public getOrdersForCustomer_args setTo_date(long to_date) {
12246
      this.to_date = to_date;
12247
      setTo_dateIsSet(true);
68 ashish 12248
      return this;
12249
    }
12250
 
483 rajveer 12251
    public void unsetTo_date() {
12252
      __isset_bit_vector.clear(__TO_DATE_ISSET_ID);
68 ashish 12253
    }
12254
 
483 rajveer 12255
    /** Returns true if field to_date is set (has been asigned a value) and false otherwise */
12256
    public boolean isSetTo_date() {
12257
      return __isset_bit_vector.get(__TO_DATE_ISSET_ID);
68 ashish 12258
    }
12259
 
483 rajveer 12260
    public void setTo_dateIsSet(boolean value) {
12261
      __isset_bit_vector.set(__TO_DATE_ISSET_ID, value);
68 ashish 12262
    }
12263
 
483 rajveer 12264
    /**
12265
     * 
12266
     * @see OrderStatus
12267
     */
12268
    public OrderStatus getStatus() {
12269
      return this.status;
12270
    }
12271
 
12272
    /**
12273
     * 
12274
     * @see OrderStatus
12275
     */
12276
    public getOrdersForCustomer_args setStatus(OrderStatus status) {
12277
      this.status = status;
12278
      return this;
12279
    }
12280
 
12281
    public void unsetStatus() {
12282
      this.status = null;
12283
    }
12284
 
12285
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
12286
    public boolean isSetStatus() {
12287
      return this.status != null;
12288
    }
12289
 
12290
    public void setStatusIsSet(boolean value) {
12291
      if (!value) {
12292
        this.status = null;
12293
      }
12294
    }
12295
 
68 ashish 12296
    public void setFieldValue(_Fields field, Object value) {
12297
      switch (field) {
483 rajveer 12298
      case CUSTOMER_ID:
68 ashish 12299
        if (value == null) {
483 rajveer 12300
          unsetCustomerId();
68 ashish 12301
        } else {
483 rajveer 12302
          setCustomerId((Long)value);
68 ashish 12303
        }
12304
        break;
12305
 
483 rajveer 12306
      case FROM_DATE:
68 ashish 12307
        if (value == null) {
483 rajveer 12308
          unsetFrom_date();
68 ashish 12309
        } else {
483 rajveer 12310
          setFrom_date((Long)value);
68 ashish 12311
        }
12312
        break;
12313
 
483 rajveer 12314
      case TO_DATE:
68 ashish 12315
        if (value == null) {
483 rajveer 12316
          unsetTo_date();
68 ashish 12317
        } else {
483 rajveer 12318
          setTo_date((Long)value);
68 ashish 12319
        }
12320
        break;
12321
 
483 rajveer 12322
      case STATUS:
12323
        if (value == null) {
12324
          unsetStatus();
12325
        } else {
12326
          setStatus((OrderStatus)value);
12327
        }
12328
        break;
12329
 
68 ashish 12330
      }
12331
    }
12332
 
12333
    public void setFieldValue(int fieldID, Object value) {
12334
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
12335
    }
12336
 
12337
    public Object getFieldValue(_Fields field) {
12338
      switch (field) {
483 rajveer 12339
      case CUSTOMER_ID:
12340
        return new Long(getCustomerId());
68 ashish 12341
 
483 rajveer 12342
      case FROM_DATE:
12343
        return new Long(getFrom_date());
68 ashish 12344
 
483 rajveer 12345
      case TO_DATE:
12346
        return new Long(getTo_date());
68 ashish 12347
 
483 rajveer 12348
      case STATUS:
12349
        return getStatus();
12350
 
68 ashish 12351
      }
12352
      throw new IllegalStateException();
12353
    }
12354
 
12355
    public Object getFieldValue(int fieldId) {
12356
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
12357
    }
12358
 
12359
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
12360
    public boolean isSet(_Fields field) {
12361
      switch (field) {
483 rajveer 12362
      case CUSTOMER_ID:
12363
        return isSetCustomerId();
12364
      case FROM_DATE:
12365
        return isSetFrom_date();
12366
      case TO_DATE:
12367
        return isSetTo_date();
12368
      case STATUS:
12369
        return isSetStatus();
68 ashish 12370
      }
12371
      throw new IllegalStateException();
12372
    }
12373
 
12374
    public boolean isSet(int fieldID) {
12375
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
12376
    }
12377
 
12378
    @Override
12379
    public boolean equals(Object that) {
12380
      if (that == null)
12381
        return false;
483 rajveer 12382
      if (that instanceof getOrdersForCustomer_args)
12383
        return this.equals((getOrdersForCustomer_args)that);
68 ashish 12384
      return false;
12385
    }
12386
 
483 rajveer 12387
    public boolean equals(getOrdersForCustomer_args that) {
68 ashish 12388
      if (that == null)
12389
        return false;
12390
 
483 rajveer 12391
      boolean this_present_customerId = true;
12392
      boolean that_present_customerId = true;
12393
      if (this_present_customerId || that_present_customerId) {
12394
        if (!(this_present_customerId && that_present_customerId))
68 ashish 12395
          return false;
483 rajveer 12396
        if (this.customerId != that.customerId)
68 ashish 12397
          return false;
12398
      }
12399
 
483 rajveer 12400
      boolean this_present_from_date = true;
12401
      boolean that_present_from_date = true;
12402
      if (this_present_from_date || that_present_from_date) {
12403
        if (!(this_present_from_date && that_present_from_date))
68 ashish 12404
          return false;
483 rajveer 12405
        if (this.from_date != that.from_date)
68 ashish 12406
          return false;
12407
      }
12408
 
483 rajveer 12409
      boolean this_present_to_date = true;
12410
      boolean that_present_to_date = true;
12411
      if (this_present_to_date || that_present_to_date) {
12412
        if (!(this_present_to_date && that_present_to_date))
68 ashish 12413
          return false;
483 rajveer 12414
        if (this.to_date != that.to_date)
68 ashish 12415
          return false;
12416
      }
12417
 
483 rajveer 12418
      boolean this_present_status = true && this.isSetStatus();
12419
      boolean that_present_status = true && that.isSetStatus();
12420
      if (this_present_status || that_present_status) {
12421
        if (!(this_present_status && that_present_status))
12422
          return false;
12423
        if (!this.status.equals(that.status))
12424
          return false;
12425
      }
12426
 
68 ashish 12427
      return true;
12428
    }
12429
 
12430
    @Override
12431
    public int hashCode() {
12432
      return 0;
12433
    }
12434
 
483 rajveer 12435
    public int compareTo(getOrdersForCustomer_args other) {
68 ashish 12436
      if (!getClass().equals(other.getClass())) {
12437
        return getClass().getName().compareTo(other.getClass().getName());
12438
      }
12439
 
12440
      int lastComparison = 0;
483 rajveer 12441
      getOrdersForCustomer_args typedOther = (getOrdersForCustomer_args)other;
68 ashish 12442
 
483 rajveer 12443
      lastComparison = Boolean.valueOf(isSetCustomerId()).compareTo(isSetCustomerId());
68 ashish 12444
      if (lastComparison != 0) {
12445
        return lastComparison;
12446
      }
483 rajveer 12447
      lastComparison = TBaseHelper.compareTo(customerId, typedOther.customerId);
68 ashish 12448
      if (lastComparison != 0) {
12449
        return lastComparison;
12450
      }
483 rajveer 12451
      lastComparison = Boolean.valueOf(isSetFrom_date()).compareTo(isSetFrom_date());
68 ashish 12452
      if (lastComparison != 0) {
12453
        return lastComparison;
12454
      }
483 rajveer 12455
      lastComparison = TBaseHelper.compareTo(from_date, typedOther.from_date);
68 ashish 12456
      if (lastComparison != 0) {
12457
        return lastComparison;
12458
      }
483 rajveer 12459
      lastComparison = Boolean.valueOf(isSetTo_date()).compareTo(isSetTo_date());
68 ashish 12460
      if (lastComparison != 0) {
12461
        return lastComparison;
12462
      }
483 rajveer 12463
      lastComparison = TBaseHelper.compareTo(to_date, typedOther.to_date);
68 ashish 12464
      if (lastComparison != 0) {
12465
        return lastComparison;
12466
      }
483 rajveer 12467
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
12468
      if (lastComparison != 0) {
12469
        return lastComparison;
12470
      }
12471
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
12472
      if (lastComparison != 0) {
12473
        return lastComparison;
12474
      }
68 ashish 12475
      return 0;
12476
    }
12477
 
12478
    public void read(TProtocol iprot) throws TException {
12479
      TField field;
12480
      iprot.readStructBegin();
12481
      while (true)
12482
      {
12483
        field = iprot.readFieldBegin();
12484
        if (field.type == TType.STOP) { 
12485
          break;
12486
        }
12487
        _Fields fieldId = _Fields.findByThriftId(field.id);
12488
        if (fieldId == null) {
12489
          TProtocolUtil.skip(iprot, field.type);
12490
        } else {
12491
          switch (fieldId) {
483 rajveer 12492
            case CUSTOMER_ID:
68 ashish 12493
              if (field.type == TType.I64) {
483 rajveer 12494
                this.customerId = iprot.readI64();
12495
                setCustomerIdIsSet(true);
68 ashish 12496
              } else { 
12497
                TProtocolUtil.skip(iprot, field.type);
12498
              }
12499
              break;
483 rajveer 12500
            case FROM_DATE:
68 ashish 12501
              if (field.type == TType.I64) {
483 rajveer 12502
                this.from_date = iprot.readI64();
12503
                setFrom_dateIsSet(true);
68 ashish 12504
              } else { 
12505
                TProtocolUtil.skip(iprot, field.type);
12506
              }
12507
              break;
483 rajveer 12508
            case TO_DATE:
68 ashish 12509
              if (field.type == TType.I64) {
483 rajveer 12510
                this.to_date = iprot.readI64();
12511
                setTo_dateIsSet(true);
68 ashish 12512
              } else { 
12513
                TProtocolUtil.skip(iprot, field.type);
12514
              }
12515
              break;
483 rajveer 12516
            case STATUS:
12517
              if (field.type == TType.I32) {
12518
                this.status = OrderStatus.findByValue(iprot.readI32());
12519
              } else { 
12520
                TProtocolUtil.skip(iprot, field.type);
12521
              }
12522
              break;
68 ashish 12523
          }
12524
          iprot.readFieldEnd();
12525
        }
12526
      }
12527
      iprot.readStructEnd();
12528
      validate();
12529
    }
12530
 
12531
    public void write(TProtocol oprot) throws TException {
12532
      validate();
12533
 
12534
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 12535
      oprot.writeFieldBegin(CUSTOMER_ID_FIELD_DESC);
12536
      oprot.writeI64(this.customerId);
68 ashish 12537
      oprot.writeFieldEnd();
483 rajveer 12538
      oprot.writeFieldBegin(FROM_DATE_FIELD_DESC);
12539
      oprot.writeI64(this.from_date);
68 ashish 12540
      oprot.writeFieldEnd();
483 rajveer 12541
      oprot.writeFieldBegin(TO_DATE_FIELD_DESC);
12542
      oprot.writeI64(this.to_date);
68 ashish 12543
      oprot.writeFieldEnd();
483 rajveer 12544
      if (this.status != null) {
12545
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
12546
        oprot.writeI32(this.status.getValue());
12547
        oprot.writeFieldEnd();
12548
      }
68 ashish 12549
      oprot.writeFieldStop();
12550
      oprot.writeStructEnd();
12551
    }
12552
 
12553
    @Override
12554
    public String toString() {
483 rajveer 12555
      StringBuilder sb = new StringBuilder("getOrdersForCustomer_args(");
68 ashish 12556
      boolean first = true;
12557
 
483 rajveer 12558
      sb.append("customerId:");
12559
      sb.append(this.customerId);
68 ashish 12560
      first = false;
12561
      if (!first) sb.append(", ");
483 rajveer 12562
      sb.append("from_date:");
12563
      sb.append(this.from_date);
68 ashish 12564
      first = false;
12565
      if (!first) sb.append(", ");
483 rajveer 12566
      sb.append("to_date:");
12567
      sb.append(this.to_date);
68 ashish 12568
      first = false;
483 rajveer 12569
      if (!first) sb.append(", ");
12570
      sb.append("status:");
12571
      if (this.status == null) {
12572
        sb.append("null");
12573
      } else {
12574
        String status_name = status.name();
12575
        if (status_name != null) {
12576
          sb.append(status_name);
12577
          sb.append(" (");
12578
        }
12579
        sb.append(this.status);
12580
        if (status_name != null) {
12581
          sb.append(")");
12582
        }
12583
      }
12584
      first = false;
68 ashish 12585
      sb.append(")");
12586
      return sb.toString();
12587
    }
12588
 
12589
    public void validate() throws TException {
12590
      // check for required fields
12591
    }
12592
 
12593
  }
12594
 
483 rajveer 12595
  public static class getOrdersForCustomer_result implements TBase<getOrdersForCustomer_result._Fields>, java.io.Serializable, Cloneable, Comparable<getOrdersForCustomer_result>   {
12596
    private static final TStruct STRUCT_DESC = new TStruct("getOrdersForCustomer_result");
68 ashish 12597
 
483 rajveer 12598
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
68 ashish 12599
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
12600
 
483 rajveer 12601
    private List<Order> success;
68 ashish 12602
    private TransactionServiceException ex;
12603
 
12604
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12605
    public enum _Fields implements TFieldIdEnum {
12606
      SUCCESS((short)0, "success"),
12607
      EX((short)1, "ex");
12608
 
12609
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
12610
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12611
 
12612
      static {
12613
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12614
          byId.put((int)field._thriftId, field);
12615
          byName.put(field.getFieldName(), field);
12616
        }
12617
      }
12618
 
12619
      /**
12620
       * Find the _Fields constant that matches fieldId, or null if its not found.
12621
       */
12622
      public static _Fields findByThriftId(int fieldId) {
12623
        return byId.get(fieldId);
12624
      }
12625
 
12626
      /**
12627
       * Find the _Fields constant that matches fieldId, throwing an exception
12628
       * if it is not found.
12629
       */
12630
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12631
        _Fields fields = findByThriftId(fieldId);
12632
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12633
        return fields;
12634
      }
12635
 
12636
      /**
12637
       * Find the _Fields constant that matches name, or null if its not found.
12638
       */
12639
      public static _Fields findByName(String name) {
12640
        return byName.get(name);
12641
      }
12642
 
12643
      private final short _thriftId;
12644
      private final String _fieldName;
12645
 
12646
      _Fields(short thriftId, String fieldName) {
12647
        _thriftId = thriftId;
12648
        _fieldName = fieldName;
12649
      }
12650
 
12651
      public short getThriftFieldId() {
12652
        return _thriftId;
12653
      }
12654
 
12655
      public String getFieldName() {
12656
        return _fieldName;
12657
      }
12658
    }
12659
 
12660
    // isset id assignments
12661
 
12662
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
12663
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
483 rajveer 12664
          new ListMetaData(TType.LIST, 
12665
              new StructMetaData(TType.STRUCT, Order.class))));
68 ashish 12666
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
12667
          new FieldValueMetaData(TType.STRUCT)));
12668
    }});
12669
 
12670
    static {
483 rajveer 12671
      FieldMetaData.addStructMetaDataMap(getOrdersForCustomer_result.class, metaDataMap);
68 ashish 12672
    }
12673
 
483 rajveer 12674
    public getOrdersForCustomer_result() {
68 ashish 12675
    }
12676
 
483 rajveer 12677
    public getOrdersForCustomer_result(
12678
      List<Order> success,
68 ashish 12679
      TransactionServiceException ex)
12680
    {
12681
      this();
12682
      this.success = success;
12683
      this.ex = ex;
12684
    }
12685
 
12686
    /**
12687
     * Performs a deep copy on <i>other</i>.
12688
     */
483 rajveer 12689
    public getOrdersForCustomer_result(getOrdersForCustomer_result other) {
12690
      if (other.isSetSuccess()) {
12691
        List<Order> __this__success = new ArrayList<Order>();
12692
        for (Order other_element : other.success) {
12693
          __this__success.add(new Order(other_element));
12694
        }
12695
        this.success = __this__success;
12696
      }
68 ashish 12697
      if (other.isSetEx()) {
12698
        this.ex = new TransactionServiceException(other.ex);
12699
      }
12700
    }
12701
 
483 rajveer 12702
    public getOrdersForCustomer_result deepCopy() {
12703
      return new getOrdersForCustomer_result(this);
68 ashish 12704
    }
12705
 
12706
    @Deprecated
483 rajveer 12707
    public getOrdersForCustomer_result clone() {
12708
      return new getOrdersForCustomer_result(this);
68 ashish 12709
    }
12710
 
483 rajveer 12711
    public int getSuccessSize() {
12712
      return (this.success == null) ? 0 : this.success.size();
12713
    }
12714
 
12715
    public java.util.Iterator<Order> getSuccessIterator() {
12716
      return (this.success == null) ? null : this.success.iterator();
12717
    }
12718
 
12719
    public void addToSuccess(Order elem) {
12720
      if (this.success == null) {
12721
        this.success = new ArrayList<Order>();
12722
      }
12723
      this.success.add(elem);
12724
    }
12725
 
12726
    public List<Order> getSuccess() {
68 ashish 12727
      return this.success;
12728
    }
12729
 
483 rajveer 12730
    public getOrdersForCustomer_result setSuccess(List<Order> success) {
68 ashish 12731
      this.success = success;
12732
      return this;
12733
    }
12734
 
12735
    public void unsetSuccess() {
483 rajveer 12736
      this.success = null;
68 ashish 12737
    }
12738
 
12739
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
12740
    public boolean isSetSuccess() {
483 rajveer 12741
      return this.success != null;
68 ashish 12742
    }
12743
 
12744
    public void setSuccessIsSet(boolean value) {
483 rajveer 12745
      if (!value) {
12746
        this.success = null;
12747
      }
68 ashish 12748
    }
12749
 
12750
    public TransactionServiceException getEx() {
12751
      return this.ex;
12752
    }
12753
 
483 rajveer 12754
    public getOrdersForCustomer_result setEx(TransactionServiceException ex) {
68 ashish 12755
      this.ex = ex;
12756
      return this;
12757
    }
12758
 
12759
    public void unsetEx() {
12760
      this.ex = null;
12761
    }
12762
 
12763
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
12764
    public boolean isSetEx() {
12765
      return this.ex != null;
12766
    }
12767
 
12768
    public void setExIsSet(boolean value) {
12769
      if (!value) {
12770
        this.ex = null;
12771
      }
12772
    }
12773
 
12774
    public void setFieldValue(_Fields field, Object value) {
12775
      switch (field) {
12776
      case SUCCESS:
12777
        if (value == null) {
12778
          unsetSuccess();
12779
        } else {
483 rajveer 12780
          setSuccess((List<Order>)value);
68 ashish 12781
        }
12782
        break;
12783
 
12784
      case EX:
12785
        if (value == null) {
12786
          unsetEx();
12787
        } else {
12788
          setEx((TransactionServiceException)value);
12789
        }
12790
        break;
12791
 
12792
      }
12793
    }
12794
 
12795
    public void setFieldValue(int fieldID, Object value) {
12796
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
12797
    }
12798
 
12799
    public Object getFieldValue(_Fields field) {
12800
      switch (field) {
12801
      case SUCCESS:
483 rajveer 12802
        return getSuccess();
68 ashish 12803
 
12804
      case EX:
12805
        return getEx();
12806
 
12807
      }
12808
      throw new IllegalStateException();
12809
    }
12810
 
12811
    public Object getFieldValue(int fieldId) {
12812
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
12813
    }
12814
 
12815
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
12816
    public boolean isSet(_Fields field) {
12817
      switch (field) {
12818
      case SUCCESS:
12819
        return isSetSuccess();
12820
      case EX:
12821
        return isSetEx();
12822
      }
12823
      throw new IllegalStateException();
12824
    }
12825
 
12826
    public boolean isSet(int fieldID) {
12827
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
12828
    }
12829
 
12830
    @Override
12831
    public boolean equals(Object that) {
12832
      if (that == null)
12833
        return false;
483 rajveer 12834
      if (that instanceof getOrdersForCustomer_result)
12835
        return this.equals((getOrdersForCustomer_result)that);
68 ashish 12836
      return false;
12837
    }
12838
 
483 rajveer 12839
    public boolean equals(getOrdersForCustomer_result that) {
68 ashish 12840
      if (that == null)
12841
        return false;
12842
 
483 rajveer 12843
      boolean this_present_success = true && this.isSetSuccess();
12844
      boolean that_present_success = true && that.isSetSuccess();
68 ashish 12845
      if (this_present_success || that_present_success) {
12846
        if (!(this_present_success && that_present_success))
12847
          return false;
483 rajveer 12848
        if (!this.success.equals(that.success))
68 ashish 12849
          return false;
12850
      }
12851
 
12852
      boolean this_present_ex = true && this.isSetEx();
12853
      boolean that_present_ex = true && that.isSetEx();
12854
      if (this_present_ex || that_present_ex) {
12855
        if (!(this_present_ex && that_present_ex))
12856
          return false;
12857
        if (!this.ex.equals(that.ex))
12858
          return false;
12859
      }
12860
 
12861
      return true;
12862
    }
12863
 
12864
    @Override
12865
    public int hashCode() {
12866
      return 0;
12867
    }
12868
 
483 rajveer 12869
    public int compareTo(getOrdersForCustomer_result other) {
68 ashish 12870
      if (!getClass().equals(other.getClass())) {
12871
        return getClass().getName().compareTo(other.getClass().getName());
12872
      }
12873
 
12874
      int lastComparison = 0;
483 rajveer 12875
      getOrdersForCustomer_result typedOther = (getOrdersForCustomer_result)other;
68 ashish 12876
 
12877
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
12878
      if (lastComparison != 0) {
12879
        return lastComparison;
12880
      }
12881
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
12882
      if (lastComparison != 0) {
12883
        return lastComparison;
12884
      }
12885
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
12886
      if (lastComparison != 0) {
12887
        return lastComparison;
12888
      }
12889
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
12890
      if (lastComparison != 0) {
12891
        return lastComparison;
12892
      }
12893
      return 0;
12894
    }
12895
 
12896
    public void read(TProtocol iprot) throws TException {
12897
      TField field;
12898
      iprot.readStructBegin();
12899
      while (true)
12900
      {
12901
        field = iprot.readFieldBegin();
12902
        if (field.type == TType.STOP) { 
12903
          break;
12904
        }
12905
        _Fields fieldId = _Fields.findByThriftId(field.id);
12906
        if (fieldId == null) {
12907
          TProtocolUtil.skip(iprot, field.type);
12908
        } else {
12909
          switch (fieldId) {
12910
            case SUCCESS:
483 rajveer 12911
              if (field.type == TType.LIST) {
12912
                {
1022 varun.gupt 12913
                  TList _list28 = iprot.readListBegin();
12914
                  this.success = new ArrayList<Order>(_list28.size);
12915
                  for (int _i29 = 0; _i29 < _list28.size; ++_i29)
483 rajveer 12916
                  {
1022 varun.gupt 12917
                    Order _elem30;
12918
                    _elem30 = new Order();
12919
                    _elem30.read(iprot);
12920
                    this.success.add(_elem30);
483 rajveer 12921
                  }
12922
                  iprot.readListEnd();
12923
                }
68 ashish 12924
              } else { 
12925
                TProtocolUtil.skip(iprot, field.type);
12926
              }
12927
              break;
12928
            case EX:
12929
              if (field.type == TType.STRUCT) {
12930
                this.ex = new TransactionServiceException();
12931
                this.ex.read(iprot);
12932
              } else { 
12933
                TProtocolUtil.skip(iprot, field.type);
12934
              }
12935
              break;
12936
          }
12937
          iprot.readFieldEnd();
12938
        }
12939
      }
12940
      iprot.readStructEnd();
12941
      validate();
12942
    }
12943
 
12944
    public void write(TProtocol oprot) throws TException {
12945
      oprot.writeStructBegin(STRUCT_DESC);
12946
 
12947
      if (this.isSetSuccess()) {
12948
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
483 rajveer 12949
        {
12950
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
1022 varun.gupt 12951
          for (Order _iter31 : this.success)
483 rajveer 12952
          {
1022 varun.gupt 12953
            _iter31.write(oprot);
483 rajveer 12954
          }
12955
          oprot.writeListEnd();
12956
        }
68 ashish 12957
        oprot.writeFieldEnd();
12958
      } else if (this.isSetEx()) {
12959
        oprot.writeFieldBegin(EX_FIELD_DESC);
12960
        this.ex.write(oprot);
12961
        oprot.writeFieldEnd();
12962
      }
12963
      oprot.writeFieldStop();
12964
      oprot.writeStructEnd();
12965
    }
12966
 
12967
    @Override
12968
    public String toString() {
483 rajveer 12969
      StringBuilder sb = new StringBuilder("getOrdersForCustomer_result(");
68 ashish 12970
      boolean first = true;
12971
 
12972
      sb.append("success:");
483 rajveer 12973
      if (this.success == null) {
12974
        sb.append("null");
12975
      } else {
12976
        sb.append(this.success);
12977
      }
68 ashish 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
 
483 rajveer 12997
  public static class createOrder_args implements TBase<createOrder_args._Fields>, java.io.Serializable, Cloneable, Comparable<createOrder_args>   {
12998
    private static final TStruct STRUCT_DESC = new TStruct("createOrder_args");
68 ashish 12999
 
483 rajveer 13000
    private static final TField ORDER_FIELD_DESC = new TField("order", TType.STRUCT, (short)1);
68 ashish 13001
 
483 rajveer 13002
    private Order order;
68 ashish 13003
 
13004
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13005
    public enum _Fields implements TFieldIdEnum {
483 rajveer 13006
      ORDER((short)1, "order");
68 ashish 13007
 
13008
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
13009
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13010
 
13011
      static {
13012
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13013
          byId.put((int)field._thriftId, field);
13014
          byName.put(field.getFieldName(), field);
13015
        }
13016
      }
13017
 
13018
      /**
13019
       * Find the _Fields constant that matches fieldId, or null if its not found.
13020
       */
13021
      public static _Fields findByThriftId(int fieldId) {
13022
        return byId.get(fieldId);
13023
      }
13024
 
13025
      /**
13026
       * Find the _Fields constant that matches fieldId, throwing an exception
13027
       * if it is not found.
13028
       */
13029
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13030
        _Fields fields = findByThriftId(fieldId);
13031
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13032
        return fields;
13033
      }
13034
 
13035
      /**
13036
       * Find the _Fields constant that matches name, or null if its not found.
13037
       */
13038
      public static _Fields findByName(String name) {
13039
        return byName.get(name);
13040
      }
13041
 
13042
      private final short _thriftId;
13043
      private final String _fieldName;
13044
 
13045
      _Fields(short thriftId, String fieldName) {
13046
        _thriftId = thriftId;
13047
        _fieldName = fieldName;
13048
      }
13049
 
13050
      public short getThriftFieldId() {
13051
        return _thriftId;
13052
      }
13053
 
13054
      public String getFieldName() {
13055
        return _fieldName;
13056
      }
13057
    }
13058
 
13059
    // isset id assignments
13060
 
13061
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 13062
      put(_Fields.ORDER, new FieldMetaData("order", TFieldRequirementType.DEFAULT, 
13063
          new StructMetaData(TType.STRUCT, Order.class)));
68 ashish 13064
    }});
13065
 
13066
    static {
483 rajveer 13067
      FieldMetaData.addStructMetaDataMap(createOrder_args.class, metaDataMap);
68 ashish 13068
    }
13069
 
483 rajveer 13070
    public createOrder_args() {
68 ashish 13071
    }
13072
 
483 rajveer 13073
    public createOrder_args(
13074
      Order order)
68 ashish 13075
    {
13076
      this();
483 rajveer 13077
      this.order = order;
68 ashish 13078
    }
13079
 
13080
    /**
13081
     * Performs a deep copy on <i>other</i>.
13082
     */
483 rajveer 13083
    public createOrder_args(createOrder_args other) {
13084
      if (other.isSetOrder()) {
13085
        this.order = new Order(other.order);
13086
      }
68 ashish 13087
    }
13088
 
483 rajveer 13089
    public createOrder_args deepCopy() {
13090
      return new createOrder_args(this);
68 ashish 13091
    }
13092
 
13093
    @Deprecated
483 rajveer 13094
    public createOrder_args clone() {
13095
      return new createOrder_args(this);
68 ashish 13096
    }
13097
 
483 rajveer 13098
    public Order getOrder() {
13099
      return this.order;
68 ashish 13100
    }
13101
 
483 rajveer 13102
    public createOrder_args setOrder(Order order) {
13103
      this.order = order;
68 ashish 13104
      return this;
13105
    }
13106
 
483 rajveer 13107
    public void unsetOrder() {
13108
      this.order = null;
68 ashish 13109
    }
13110
 
483 rajveer 13111
    /** Returns true if field order is set (has been asigned a value) and false otherwise */
13112
    public boolean isSetOrder() {
13113
      return this.order != null;
68 ashish 13114
    }
13115
 
483 rajveer 13116
    public void setOrderIsSet(boolean value) {
13117
      if (!value) {
13118
        this.order = null;
13119
      }
68 ashish 13120
    }
13121
 
13122
    public void setFieldValue(_Fields field, Object value) {
13123
      switch (field) {
483 rajveer 13124
      case ORDER:
68 ashish 13125
        if (value == null) {
483 rajveer 13126
          unsetOrder();
68 ashish 13127
        } else {
483 rajveer 13128
          setOrder((Order)value);
68 ashish 13129
        }
13130
        break;
13131
 
13132
      }
13133
    }
13134
 
13135
    public void setFieldValue(int fieldID, Object value) {
13136
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
13137
    }
13138
 
13139
    public Object getFieldValue(_Fields field) {
13140
      switch (field) {
483 rajveer 13141
      case ORDER:
13142
        return getOrder();
68 ashish 13143
 
13144
      }
13145
      throw new IllegalStateException();
13146
    }
13147
 
13148
    public Object getFieldValue(int fieldId) {
13149
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
13150
    }
13151
 
13152
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
13153
    public boolean isSet(_Fields field) {
13154
      switch (field) {
483 rajveer 13155
      case ORDER:
13156
        return isSetOrder();
68 ashish 13157
      }
13158
      throw new IllegalStateException();
13159
    }
13160
 
13161
    public boolean isSet(int fieldID) {
13162
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
13163
    }
13164
 
13165
    @Override
13166
    public boolean equals(Object that) {
13167
      if (that == null)
13168
        return false;
483 rajveer 13169
      if (that instanceof createOrder_args)
13170
        return this.equals((createOrder_args)that);
68 ashish 13171
      return false;
13172
    }
13173
 
483 rajveer 13174
    public boolean equals(createOrder_args that) {
68 ashish 13175
      if (that == null)
13176
        return false;
13177
 
483 rajveer 13178
      boolean this_present_order = true && this.isSetOrder();
13179
      boolean that_present_order = true && that.isSetOrder();
13180
      if (this_present_order || that_present_order) {
13181
        if (!(this_present_order && that_present_order))
68 ashish 13182
          return false;
483 rajveer 13183
        if (!this.order.equals(that.order))
68 ashish 13184
          return false;
13185
      }
13186
 
13187
      return true;
13188
    }
13189
 
13190
    @Override
13191
    public int hashCode() {
13192
      return 0;
13193
    }
13194
 
483 rajveer 13195
    public int compareTo(createOrder_args other) {
68 ashish 13196
      if (!getClass().equals(other.getClass())) {
13197
        return getClass().getName().compareTo(other.getClass().getName());
13198
      }
13199
 
13200
      int lastComparison = 0;
483 rajveer 13201
      createOrder_args typedOther = (createOrder_args)other;
68 ashish 13202
 
483 rajveer 13203
      lastComparison = Boolean.valueOf(isSetOrder()).compareTo(isSetOrder());
68 ashish 13204
      if (lastComparison != 0) {
13205
        return lastComparison;
13206
      }
483 rajveer 13207
      lastComparison = TBaseHelper.compareTo(order, typedOther.order);
68 ashish 13208
      if (lastComparison != 0) {
13209
        return lastComparison;
13210
      }
13211
      return 0;
13212
    }
13213
 
13214
    public void read(TProtocol iprot) throws TException {
13215
      TField field;
13216
      iprot.readStructBegin();
13217
      while (true)
13218
      {
13219
        field = iprot.readFieldBegin();
13220
        if (field.type == TType.STOP) { 
13221
          break;
13222
        }
13223
        _Fields fieldId = _Fields.findByThriftId(field.id);
13224
        if (fieldId == null) {
13225
          TProtocolUtil.skip(iprot, field.type);
13226
        } else {
13227
          switch (fieldId) {
483 rajveer 13228
            case ORDER:
13229
              if (field.type == TType.STRUCT) {
13230
                this.order = new Order();
13231
                this.order.read(iprot);
68 ashish 13232
              } else { 
13233
                TProtocolUtil.skip(iprot, field.type);
13234
              }
13235
              break;
13236
          }
13237
          iprot.readFieldEnd();
13238
        }
13239
      }
13240
      iprot.readStructEnd();
13241
      validate();
13242
    }
13243
 
13244
    public void write(TProtocol oprot) throws TException {
13245
      validate();
13246
 
13247
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 13248
      if (this.order != null) {
13249
        oprot.writeFieldBegin(ORDER_FIELD_DESC);
13250
        this.order.write(oprot);
13251
        oprot.writeFieldEnd();
13252
      }
68 ashish 13253
      oprot.writeFieldStop();
13254
      oprot.writeStructEnd();
13255
    }
13256
 
13257
    @Override
13258
    public String toString() {
483 rajveer 13259
      StringBuilder sb = new StringBuilder("createOrder_args(");
68 ashish 13260
      boolean first = true;
13261
 
483 rajveer 13262
      sb.append("order:");
13263
      if (this.order == null) {
13264
        sb.append("null");
13265
      } else {
13266
        sb.append(this.order);
13267
      }
68 ashish 13268
      first = false;
13269
      sb.append(")");
13270
      return sb.toString();
13271
    }
13272
 
13273
    public void validate() throws TException {
13274
      // check for required fields
13275
    }
13276
 
13277
  }
13278
 
483 rajveer 13279
  public static class createOrder_result implements TBase<createOrder_result._Fields>, java.io.Serializable, Cloneable, Comparable<createOrder_result>   {
13280
    private static final TStruct STRUCT_DESC = new TStruct("createOrder_result");
68 ashish 13281
 
483 rajveer 13282
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
68 ashish 13283
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
13284
 
483 rajveer 13285
    private long success;
68 ashish 13286
    private TransactionServiceException ex;
13287
 
13288
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13289
    public enum _Fields implements TFieldIdEnum {
13290
      SUCCESS((short)0, "success"),
13291
      EX((short)1, "ex");
13292
 
13293
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
13294
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13295
 
13296
      static {
13297
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13298
          byId.put((int)field._thriftId, field);
13299
          byName.put(field.getFieldName(), field);
13300
        }
13301
      }
13302
 
13303
      /**
13304
       * Find the _Fields constant that matches fieldId, or null if its not found.
13305
       */
13306
      public static _Fields findByThriftId(int fieldId) {
13307
        return byId.get(fieldId);
13308
      }
13309
 
13310
      /**
13311
       * Find the _Fields constant that matches fieldId, throwing an exception
13312
       * if it is not found.
13313
       */
13314
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13315
        _Fields fields = findByThriftId(fieldId);
13316
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13317
        return fields;
13318
      }
13319
 
13320
      /**
13321
       * Find the _Fields constant that matches name, or null if its not found.
13322
       */
13323
      public static _Fields findByName(String name) {
13324
        return byName.get(name);
13325
      }
13326
 
13327
      private final short _thriftId;
13328
      private final String _fieldName;
13329
 
13330
      _Fields(short thriftId, String fieldName) {
13331
        _thriftId = thriftId;
13332
        _fieldName = fieldName;
13333
      }
13334
 
13335
      public short getThriftFieldId() {
13336
        return _thriftId;
13337
      }
13338
 
13339
      public String getFieldName() {
13340
        return _fieldName;
13341
      }
13342
    }
13343
 
13344
    // isset id assignments
13345
    private static final int __SUCCESS_ISSET_ID = 0;
13346
    private BitSet __isset_bit_vector = new BitSet(1);
13347
 
13348
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
13349
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
483 rajveer 13350
          new FieldValueMetaData(TType.I64)));
68 ashish 13351
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
13352
          new FieldValueMetaData(TType.STRUCT)));
13353
    }});
13354
 
13355
    static {
483 rajveer 13356
      FieldMetaData.addStructMetaDataMap(createOrder_result.class, metaDataMap);
68 ashish 13357
    }
13358
 
483 rajveer 13359
    public createOrder_result() {
68 ashish 13360
    }
13361
 
483 rajveer 13362
    public createOrder_result(
13363
      long success,
68 ashish 13364
      TransactionServiceException ex)
13365
    {
13366
      this();
13367
      this.success = success;
13368
      setSuccessIsSet(true);
13369
      this.ex = ex;
13370
    }
13371
 
13372
    /**
13373
     * Performs a deep copy on <i>other</i>.
13374
     */
483 rajveer 13375
    public createOrder_result(createOrder_result other) {
68 ashish 13376
      __isset_bit_vector.clear();
13377
      __isset_bit_vector.or(other.__isset_bit_vector);
13378
      this.success = other.success;
13379
      if (other.isSetEx()) {
13380
        this.ex = new TransactionServiceException(other.ex);
13381
      }
13382
    }
13383
 
483 rajveer 13384
    public createOrder_result deepCopy() {
13385
      return new createOrder_result(this);
68 ashish 13386
    }
13387
 
13388
    @Deprecated
483 rajveer 13389
    public createOrder_result clone() {
13390
      return new createOrder_result(this);
68 ashish 13391
    }
13392
 
483 rajveer 13393
    public long getSuccess() {
68 ashish 13394
      return this.success;
13395
    }
13396
 
483 rajveer 13397
    public createOrder_result setSuccess(long success) {
68 ashish 13398
      this.success = success;
13399
      setSuccessIsSet(true);
13400
      return this;
13401
    }
13402
 
13403
    public void unsetSuccess() {
13404
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
13405
    }
13406
 
13407
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
13408
    public boolean isSetSuccess() {
13409
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
13410
    }
13411
 
13412
    public void setSuccessIsSet(boolean value) {
13413
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
13414
    }
13415
 
13416
    public TransactionServiceException getEx() {
13417
      return this.ex;
13418
    }
13419
 
483 rajveer 13420
    public createOrder_result setEx(TransactionServiceException ex) {
68 ashish 13421
      this.ex = ex;
13422
      return this;
13423
    }
13424
 
13425
    public void unsetEx() {
13426
      this.ex = null;
13427
    }
13428
 
13429
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
13430
    public boolean isSetEx() {
13431
      return this.ex != null;
13432
    }
13433
 
13434
    public void setExIsSet(boolean value) {
13435
      if (!value) {
13436
        this.ex = null;
13437
      }
13438
    }
13439
 
13440
    public void setFieldValue(_Fields field, Object value) {
13441
      switch (field) {
13442
      case SUCCESS:
13443
        if (value == null) {
13444
          unsetSuccess();
13445
        } else {
483 rajveer 13446
          setSuccess((Long)value);
68 ashish 13447
        }
13448
        break;
13449
 
13450
      case EX:
13451
        if (value == null) {
13452
          unsetEx();
13453
        } else {
13454
          setEx((TransactionServiceException)value);
13455
        }
13456
        break;
13457
 
13458
      }
13459
    }
13460
 
13461
    public void setFieldValue(int fieldID, Object value) {
13462
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
13463
    }
13464
 
13465
    public Object getFieldValue(_Fields field) {
13466
      switch (field) {
13467
      case SUCCESS:
483 rajveer 13468
        return new Long(getSuccess());
68 ashish 13469
 
13470
      case EX:
13471
        return getEx();
13472
 
13473
      }
13474
      throw new IllegalStateException();
13475
    }
13476
 
13477
    public Object getFieldValue(int fieldId) {
13478
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
13479
    }
13480
 
13481
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
13482
    public boolean isSet(_Fields field) {
13483
      switch (field) {
13484
      case SUCCESS:
13485
        return isSetSuccess();
13486
      case EX:
13487
        return isSetEx();
13488
      }
13489
      throw new IllegalStateException();
13490
    }
13491
 
13492
    public boolean isSet(int fieldID) {
13493
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
13494
    }
13495
 
13496
    @Override
13497
    public boolean equals(Object that) {
13498
      if (that == null)
13499
        return false;
483 rajveer 13500
      if (that instanceof createOrder_result)
13501
        return this.equals((createOrder_result)that);
68 ashish 13502
      return false;
13503
    }
13504
 
483 rajveer 13505
    public boolean equals(createOrder_result that) {
68 ashish 13506
      if (that == null)
13507
        return false;
13508
 
13509
      boolean this_present_success = true;
13510
      boolean that_present_success = true;
13511
      if (this_present_success || that_present_success) {
13512
        if (!(this_present_success && that_present_success))
13513
          return false;
13514
        if (this.success != that.success)
13515
          return false;
13516
      }
13517
 
13518
      boolean this_present_ex = true && this.isSetEx();
13519
      boolean that_present_ex = true && that.isSetEx();
13520
      if (this_present_ex || that_present_ex) {
13521
        if (!(this_present_ex && that_present_ex))
13522
          return false;
13523
        if (!this.ex.equals(that.ex))
13524
          return false;
13525
      }
13526
 
13527
      return true;
13528
    }
13529
 
13530
    @Override
13531
    public int hashCode() {
13532
      return 0;
13533
    }
13534
 
483 rajveer 13535
    public int compareTo(createOrder_result other) {
68 ashish 13536
      if (!getClass().equals(other.getClass())) {
13537
        return getClass().getName().compareTo(other.getClass().getName());
13538
      }
13539
 
13540
      int lastComparison = 0;
483 rajveer 13541
      createOrder_result typedOther = (createOrder_result)other;
68 ashish 13542
 
13543
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
13544
      if (lastComparison != 0) {
13545
        return lastComparison;
13546
      }
13547
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
13548
      if (lastComparison != 0) {
13549
        return lastComparison;
13550
      }
13551
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
13552
      if (lastComparison != 0) {
13553
        return lastComparison;
13554
      }
13555
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
13556
      if (lastComparison != 0) {
13557
        return lastComparison;
13558
      }
13559
      return 0;
13560
    }
13561
 
13562
    public void read(TProtocol iprot) throws TException {
13563
      TField field;
13564
      iprot.readStructBegin();
13565
      while (true)
13566
      {
13567
        field = iprot.readFieldBegin();
13568
        if (field.type == TType.STOP) { 
13569
          break;
13570
        }
13571
        _Fields fieldId = _Fields.findByThriftId(field.id);
13572
        if (fieldId == null) {
13573
          TProtocolUtil.skip(iprot, field.type);
13574
        } else {
13575
          switch (fieldId) {
13576
            case SUCCESS:
483 rajveer 13577
              if (field.type == TType.I64) {
13578
                this.success = iprot.readI64();
68 ashish 13579
                setSuccessIsSet(true);
13580
              } else { 
13581
                TProtocolUtil.skip(iprot, field.type);
13582
              }
13583
              break;
13584
            case EX:
13585
              if (field.type == TType.STRUCT) {
13586
                this.ex = new TransactionServiceException();
13587
                this.ex.read(iprot);
13588
              } else { 
13589
                TProtocolUtil.skip(iprot, field.type);
13590
              }
13591
              break;
13592
          }
13593
          iprot.readFieldEnd();
13594
        }
13595
      }
13596
      iprot.readStructEnd();
13597
      validate();
13598
    }
13599
 
13600
    public void write(TProtocol oprot) throws TException {
13601
      oprot.writeStructBegin(STRUCT_DESC);
13602
 
13603
      if (this.isSetSuccess()) {
13604
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
483 rajveer 13605
        oprot.writeI64(this.success);
68 ashish 13606
        oprot.writeFieldEnd();
13607
      } else if (this.isSetEx()) {
13608
        oprot.writeFieldBegin(EX_FIELD_DESC);
13609
        this.ex.write(oprot);
13610
        oprot.writeFieldEnd();
13611
      }
13612
      oprot.writeFieldStop();
13613
      oprot.writeStructEnd();
13614
    }
13615
 
13616
    @Override
13617
    public String toString() {
483 rajveer 13618
      StringBuilder sb = new StringBuilder("createOrder_result(");
68 ashish 13619
      boolean first = true;
13620
 
13621
      sb.append("success:");
13622
      sb.append(this.success);
13623
      first = false;
13624
      if (!first) sb.append(", ");
13625
      sb.append("ex:");
13626
      if (this.ex == null) {
13627
        sb.append("null");
13628
      } else {
13629
        sb.append(this.ex);
13630
      }
13631
      first = false;
13632
      sb.append(")");
13633
      return sb.toString();
13634
    }
13635
 
13636
    public void validate() throws TException {
13637
      // check for required fields
13638
    }
13639
 
13640
  }
13641
 
483 rajveer 13642
  public static class getOrder_args implements TBase<getOrder_args._Fields>, java.io.Serializable, Cloneable, Comparable<getOrder_args>   {
13643
    private static final TStruct STRUCT_DESC = new TStruct("getOrder_args");
68 ashish 13644
 
483 rajveer 13645
    private static final TField ID_FIELD_DESC = new TField("id", TType.I64, (short)1);
68 ashish 13646
 
483 rajveer 13647
    private long id;
68 ashish 13648
 
13649
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13650
    public enum _Fields implements TFieldIdEnum {
483 rajveer 13651
      ID((short)1, "id");
68 ashish 13652
 
13653
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
13654
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13655
 
13656
      static {
13657
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13658
          byId.put((int)field._thriftId, field);
13659
          byName.put(field.getFieldName(), field);
13660
        }
13661
      }
13662
 
13663
      /**
13664
       * Find the _Fields constant that matches fieldId, or null if its not found.
13665
       */
13666
      public static _Fields findByThriftId(int fieldId) {
13667
        return byId.get(fieldId);
13668
      }
13669
 
13670
      /**
13671
       * Find the _Fields constant that matches fieldId, throwing an exception
13672
       * if it is not found.
13673
       */
13674
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13675
        _Fields fields = findByThriftId(fieldId);
13676
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13677
        return fields;
13678
      }
13679
 
13680
      /**
13681
       * Find the _Fields constant that matches name, or null if its not found.
13682
       */
13683
      public static _Fields findByName(String name) {
13684
        return byName.get(name);
13685
      }
13686
 
13687
      private final short _thriftId;
13688
      private final String _fieldName;
13689
 
13690
      _Fields(short thriftId, String fieldName) {
13691
        _thriftId = thriftId;
13692
        _fieldName = fieldName;
13693
      }
13694
 
13695
      public short getThriftFieldId() {
13696
        return _thriftId;
13697
      }
13698
 
13699
      public String getFieldName() {
13700
        return _fieldName;
13701
      }
13702
    }
13703
 
13704
    // isset id assignments
483 rajveer 13705
    private static final int __ID_ISSET_ID = 0;
13706
    private BitSet __isset_bit_vector = new BitSet(1);
68 ashish 13707
 
13708
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 13709
      put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, 
68 ashish 13710
          new FieldValueMetaData(TType.I64)));
13711
    }});
13712
 
13713
    static {
483 rajveer 13714
      FieldMetaData.addStructMetaDataMap(getOrder_args.class, metaDataMap);
68 ashish 13715
    }
13716
 
483 rajveer 13717
    public getOrder_args() {
68 ashish 13718
    }
13719
 
483 rajveer 13720
    public getOrder_args(
13721
      long id)
68 ashish 13722
    {
13723
      this();
483 rajveer 13724
      this.id = id;
13725
      setIdIsSet(true);
68 ashish 13726
    }
13727
 
13728
    /**
13729
     * Performs a deep copy on <i>other</i>.
13730
     */
483 rajveer 13731
    public getOrder_args(getOrder_args other) {
68 ashish 13732
      __isset_bit_vector.clear();
13733
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 13734
      this.id = other.id;
68 ashish 13735
    }
13736
 
483 rajveer 13737
    public getOrder_args deepCopy() {
13738
      return new getOrder_args(this);
68 ashish 13739
    }
13740
 
13741
    @Deprecated
483 rajveer 13742
    public getOrder_args clone() {
13743
      return new getOrder_args(this);
68 ashish 13744
    }
13745
 
483 rajveer 13746
    public long getId() {
13747
      return this.id;
68 ashish 13748
    }
13749
 
483 rajveer 13750
    public getOrder_args setId(long id) {
13751
      this.id = id;
13752
      setIdIsSet(true);
68 ashish 13753
      return this;
13754
    }
13755
 
483 rajveer 13756
    public void unsetId() {
13757
      __isset_bit_vector.clear(__ID_ISSET_ID);
68 ashish 13758
    }
13759
 
483 rajveer 13760
    /** Returns true if field id is set (has been asigned a value) and false otherwise */
13761
    public boolean isSetId() {
13762
      return __isset_bit_vector.get(__ID_ISSET_ID);
68 ashish 13763
    }
13764
 
483 rajveer 13765
    public void setIdIsSet(boolean value) {
13766
      __isset_bit_vector.set(__ID_ISSET_ID, value);
68 ashish 13767
    }
13768
 
13769
    public void setFieldValue(_Fields field, Object value) {
13770
      switch (field) {
483 rajveer 13771
      case ID:
68 ashish 13772
        if (value == null) {
483 rajveer 13773
          unsetId();
68 ashish 13774
        } else {
483 rajveer 13775
          setId((Long)value);
68 ashish 13776
        }
13777
        break;
13778
 
13779
      }
13780
    }
13781
 
13782
    public void setFieldValue(int fieldID, Object value) {
13783
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
13784
    }
13785
 
13786
    public Object getFieldValue(_Fields field) {
13787
      switch (field) {
483 rajveer 13788
      case ID:
13789
        return new Long(getId());
68 ashish 13790
 
13791
      }
13792
      throw new IllegalStateException();
13793
    }
13794
 
13795
    public Object getFieldValue(int fieldId) {
13796
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
13797
    }
13798
 
13799
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
13800
    public boolean isSet(_Fields field) {
13801
      switch (field) {
483 rajveer 13802
      case ID:
13803
        return isSetId();
68 ashish 13804
      }
13805
      throw new IllegalStateException();
13806
    }
13807
 
13808
    public boolean isSet(int fieldID) {
13809
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
13810
    }
13811
 
13812
    @Override
13813
    public boolean equals(Object that) {
13814
      if (that == null)
13815
        return false;
483 rajveer 13816
      if (that instanceof getOrder_args)
13817
        return this.equals((getOrder_args)that);
68 ashish 13818
      return false;
13819
    }
13820
 
483 rajveer 13821
    public boolean equals(getOrder_args that) {
68 ashish 13822
      if (that == null)
13823
        return false;
13824
 
483 rajveer 13825
      boolean this_present_id = true;
13826
      boolean that_present_id = true;
13827
      if (this_present_id || that_present_id) {
13828
        if (!(this_present_id && that_present_id))
68 ashish 13829
          return false;
483 rajveer 13830
        if (this.id != that.id)
68 ashish 13831
          return false;
13832
      }
13833
 
13834
      return true;
13835
    }
13836
 
13837
    @Override
13838
    public int hashCode() {
13839
      return 0;
13840
    }
13841
 
483 rajveer 13842
    public int compareTo(getOrder_args other) {
68 ashish 13843
      if (!getClass().equals(other.getClass())) {
13844
        return getClass().getName().compareTo(other.getClass().getName());
13845
      }
13846
 
13847
      int lastComparison = 0;
483 rajveer 13848
      getOrder_args typedOther = (getOrder_args)other;
68 ashish 13849
 
483 rajveer 13850
      lastComparison = Boolean.valueOf(isSetId()).compareTo(isSetId());
68 ashish 13851
      if (lastComparison != 0) {
13852
        return lastComparison;
13853
      }
483 rajveer 13854
      lastComparison = TBaseHelper.compareTo(id, typedOther.id);
68 ashish 13855
      if (lastComparison != 0) {
13856
        return lastComparison;
13857
      }
13858
      return 0;
13859
    }
13860
 
13861
    public void read(TProtocol iprot) throws TException {
13862
      TField field;
13863
      iprot.readStructBegin();
13864
      while (true)
13865
      {
13866
        field = iprot.readFieldBegin();
13867
        if (field.type == TType.STOP) { 
13868
          break;
13869
        }
13870
        _Fields fieldId = _Fields.findByThriftId(field.id);
13871
        if (fieldId == null) {
13872
          TProtocolUtil.skip(iprot, field.type);
13873
        } else {
13874
          switch (fieldId) {
483 rajveer 13875
            case ID:
68 ashish 13876
              if (field.type == TType.I64) {
483 rajveer 13877
                this.id = iprot.readI64();
13878
                setIdIsSet(true);
68 ashish 13879
              } else { 
13880
                TProtocolUtil.skip(iprot, field.type);
13881
              }
13882
              break;
13883
          }
13884
          iprot.readFieldEnd();
13885
        }
13886
      }
13887
      iprot.readStructEnd();
13888
      validate();
13889
    }
13890
 
13891
    public void write(TProtocol oprot) throws TException {
13892
      validate();
13893
 
13894
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 13895
      oprot.writeFieldBegin(ID_FIELD_DESC);
13896
      oprot.writeI64(this.id);
68 ashish 13897
      oprot.writeFieldEnd();
13898
      oprot.writeFieldStop();
13899
      oprot.writeStructEnd();
13900
    }
13901
 
13902
    @Override
13903
    public String toString() {
483 rajveer 13904
      StringBuilder sb = new StringBuilder("getOrder_args(");
68 ashish 13905
      boolean first = true;
13906
 
483 rajveer 13907
      sb.append("id:");
13908
      sb.append(this.id);
68 ashish 13909
      first = false;
13910
      sb.append(")");
13911
      return sb.toString();
13912
    }
13913
 
13914
    public void validate() throws TException {
13915
      // check for required fields
13916
    }
13917
 
13918
  }
13919
 
483 rajveer 13920
  public static class getOrder_result implements TBase<getOrder_result._Fields>, java.io.Serializable, Cloneable, Comparable<getOrder_result>   {
13921
    private static final TStruct STRUCT_DESC = new TStruct("getOrder_result");
68 ashish 13922
 
483 rajveer 13923
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
68 ashish 13924
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
13925
 
483 rajveer 13926
    private Order success;
68 ashish 13927
    private TransactionServiceException ex;
13928
 
13929
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13930
    public enum _Fields implements TFieldIdEnum {
13931
      SUCCESS((short)0, "success"),
13932
      EX((short)1, "ex");
13933
 
13934
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
13935
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13936
 
13937
      static {
13938
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13939
          byId.put((int)field._thriftId, field);
13940
          byName.put(field.getFieldName(), field);
13941
        }
13942
      }
13943
 
13944
      /**
13945
       * Find the _Fields constant that matches fieldId, or null if its not found.
13946
       */
13947
      public static _Fields findByThriftId(int fieldId) {
13948
        return byId.get(fieldId);
13949
      }
13950
 
13951
      /**
13952
       * Find the _Fields constant that matches fieldId, throwing an exception
13953
       * if it is not found.
13954
       */
13955
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13956
        _Fields fields = findByThriftId(fieldId);
13957
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13958
        return fields;
13959
      }
13960
 
13961
      /**
13962
       * Find the _Fields constant that matches name, or null if its not found.
13963
       */
13964
      public static _Fields findByName(String name) {
13965
        return byName.get(name);
13966
      }
13967
 
13968
      private final short _thriftId;
13969
      private final String _fieldName;
13970
 
13971
      _Fields(short thriftId, String fieldName) {
13972
        _thriftId = thriftId;
13973
        _fieldName = fieldName;
13974
      }
13975
 
13976
      public short getThriftFieldId() {
13977
        return _thriftId;
13978
      }
13979
 
13980
      public String getFieldName() {
13981
        return _fieldName;
13982
      }
13983
    }
13984
 
13985
    // isset id assignments
13986
 
13987
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
13988
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
483 rajveer 13989
          new StructMetaData(TType.STRUCT, Order.class)));
68 ashish 13990
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
13991
          new FieldValueMetaData(TType.STRUCT)));
13992
    }});
13993
 
13994
    static {
483 rajveer 13995
      FieldMetaData.addStructMetaDataMap(getOrder_result.class, metaDataMap);
68 ashish 13996
    }
13997
 
483 rajveer 13998
    public getOrder_result() {
68 ashish 13999
    }
14000
 
483 rajveer 14001
    public getOrder_result(
14002
      Order success,
68 ashish 14003
      TransactionServiceException ex)
14004
    {
14005
      this();
14006
      this.success = success;
14007
      this.ex = ex;
14008
    }
14009
 
14010
    /**
14011
     * Performs a deep copy on <i>other</i>.
14012
     */
483 rajveer 14013
    public getOrder_result(getOrder_result other) {
14014
      if (other.isSetSuccess()) {
14015
        this.success = new Order(other.success);
14016
      }
68 ashish 14017
      if (other.isSetEx()) {
14018
        this.ex = new TransactionServiceException(other.ex);
14019
      }
14020
    }
14021
 
483 rajveer 14022
    public getOrder_result deepCopy() {
14023
      return new getOrder_result(this);
68 ashish 14024
    }
14025
 
14026
    @Deprecated
483 rajveer 14027
    public getOrder_result clone() {
14028
      return new getOrder_result(this);
68 ashish 14029
    }
14030
 
483 rajveer 14031
    public Order getSuccess() {
68 ashish 14032
      return this.success;
14033
    }
14034
 
483 rajveer 14035
    public getOrder_result setSuccess(Order success) {
68 ashish 14036
      this.success = success;
14037
      return this;
14038
    }
14039
 
14040
    public void unsetSuccess() {
483 rajveer 14041
      this.success = null;
68 ashish 14042
    }
14043
 
14044
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
14045
    public boolean isSetSuccess() {
483 rajveer 14046
      return this.success != null;
68 ashish 14047
    }
14048
 
14049
    public void setSuccessIsSet(boolean value) {
483 rajveer 14050
      if (!value) {
14051
        this.success = null;
14052
      }
68 ashish 14053
    }
14054
 
14055
    public TransactionServiceException getEx() {
14056
      return this.ex;
14057
    }
14058
 
483 rajveer 14059
    public getOrder_result setEx(TransactionServiceException ex) {
68 ashish 14060
      this.ex = ex;
14061
      return this;
14062
    }
14063
 
14064
    public void unsetEx() {
14065
      this.ex = null;
14066
    }
14067
 
14068
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
14069
    public boolean isSetEx() {
14070
      return this.ex != null;
14071
    }
14072
 
14073
    public void setExIsSet(boolean value) {
14074
      if (!value) {
14075
        this.ex = null;
14076
      }
14077
    }
14078
 
14079
    public void setFieldValue(_Fields field, Object value) {
14080
      switch (field) {
14081
      case SUCCESS:
14082
        if (value == null) {
14083
          unsetSuccess();
14084
        } else {
483 rajveer 14085
          setSuccess((Order)value);
68 ashish 14086
        }
14087
        break;
14088
 
14089
      case EX:
14090
        if (value == null) {
14091
          unsetEx();
14092
        } else {
14093
          setEx((TransactionServiceException)value);
14094
        }
14095
        break;
14096
 
14097
      }
14098
    }
14099
 
14100
    public void setFieldValue(int fieldID, Object value) {
14101
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
14102
    }
14103
 
14104
    public Object getFieldValue(_Fields field) {
14105
      switch (field) {
14106
      case SUCCESS:
483 rajveer 14107
        return getSuccess();
68 ashish 14108
 
14109
      case EX:
14110
        return getEx();
14111
 
14112
      }
14113
      throw new IllegalStateException();
14114
    }
14115
 
14116
    public Object getFieldValue(int fieldId) {
14117
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
14118
    }
14119
 
14120
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
14121
    public boolean isSet(_Fields field) {
14122
      switch (field) {
14123
      case SUCCESS:
14124
        return isSetSuccess();
14125
      case EX:
14126
        return isSetEx();
14127
      }
14128
      throw new IllegalStateException();
14129
    }
14130
 
14131
    public boolean isSet(int fieldID) {
14132
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
14133
    }
14134
 
14135
    @Override
14136
    public boolean equals(Object that) {
14137
      if (that == null)
14138
        return false;
483 rajveer 14139
      if (that instanceof getOrder_result)
14140
        return this.equals((getOrder_result)that);
68 ashish 14141
      return false;
14142
    }
14143
 
483 rajveer 14144
    public boolean equals(getOrder_result that) {
68 ashish 14145
      if (that == null)
14146
        return false;
14147
 
483 rajveer 14148
      boolean this_present_success = true && this.isSetSuccess();
14149
      boolean that_present_success = true && that.isSetSuccess();
68 ashish 14150
      if (this_present_success || that_present_success) {
14151
        if (!(this_present_success && that_present_success))
14152
          return false;
483 rajveer 14153
        if (!this.success.equals(that.success))
68 ashish 14154
          return false;
14155
      }
14156
 
14157
      boolean this_present_ex = true && this.isSetEx();
14158
      boolean that_present_ex = true && that.isSetEx();
14159
      if (this_present_ex || that_present_ex) {
14160
        if (!(this_present_ex && that_present_ex))
14161
          return false;
14162
        if (!this.ex.equals(that.ex))
14163
          return false;
14164
      }
14165
 
14166
      return true;
14167
    }
14168
 
14169
    @Override
14170
    public int hashCode() {
14171
      return 0;
14172
    }
14173
 
483 rajveer 14174
    public int compareTo(getOrder_result other) {
68 ashish 14175
      if (!getClass().equals(other.getClass())) {
14176
        return getClass().getName().compareTo(other.getClass().getName());
14177
      }
14178
 
14179
      int lastComparison = 0;
483 rajveer 14180
      getOrder_result typedOther = (getOrder_result)other;
68 ashish 14181
 
14182
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
14183
      if (lastComparison != 0) {
14184
        return lastComparison;
14185
      }
14186
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
14187
      if (lastComparison != 0) {
14188
        return lastComparison;
14189
      }
14190
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
14191
      if (lastComparison != 0) {
14192
        return lastComparison;
14193
      }
14194
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
14195
      if (lastComparison != 0) {
14196
        return lastComparison;
14197
      }
14198
      return 0;
14199
    }
14200
 
14201
    public void read(TProtocol iprot) throws TException {
14202
      TField field;
14203
      iprot.readStructBegin();
14204
      while (true)
14205
      {
14206
        field = iprot.readFieldBegin();
14207
        if (field.type == TType.STOP) { 
14208
          break;
14209
        }
14210
        _Fields fieldId = _Fields.findByThriftId(field.id);
14211
        if (fieldId == null) {
14212
          TProtocolUtil.skip(iprot, field.type);
14213
        } else {
14214
          switch (fieldId) {
14215
            case SUCCESS:
483 rajveer 14216
              if (field.type == TType.STRUCT) {
14217
                this.success = new Order();
14218
                this.success.read(iprot);
68 ashish 14219
              } else { 
14220
                TProtocolUtil.skip(iprot, field.type);
14221
              }
14222
              break;
14223
            case EX:
14224
              if (field.type == TType.STRUCT) {
14225
                this.ex = new TransactionServiceException();
14226
                this.ex.read(iprot);
14227
              } else { 
14228
                TProtocolUtil.skip(iprot, field.type);
14229
              }
14230
              break;
14231
          }
14232
          iprot.readFieldEnd();
14233
        }
14234
      }
14235
      iprot.readStructEnd();
14236
      validate();
14237
    }
14238
 
14239
    public void write(TProtocol oprot) throws TException {
14240
      oprot.writeStructBegin(STRUCT_DESC);
14241
 
14242
      if (this.isSetSuccess()) {
14243
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
483 rajveer 14244
        this.success.write(oprot);
68 ashish 14245
        oprot.writeFieldEnd();
14246
      } else if (this.isSetEx()) {
14247
        oprot.writeFieldBegin(EX_FIELD_DESC);
14248
        this.ex.write(oprot);
14249
        oprot.writeFieldEnd();
14250
      }
14251
      oprot.writeFieldStop();
14252
      oprot.writeStructEnd();
14253
    }
14254
 
14255
    @Override
14256
    public String toString() {
483 rajveer 14257
      StringBuilder sb = new StringBuilder("getOrder_result(");
68 ashish 14258
      boolean first = true;
14259
 
14260
      sb.append("success:");
483 rajveer 14261
      if (this.success == null) {
14262
        sb.append("null");
14263
      } else {
14264
        sb.append(this.success);
14265
      }
68 ashish 14266
      first = false;
14267
      if (!first) sb.append(", ");
14268
      sb.append("ex:");
14269
      if (this.ex == null) {
14270
        sb.append("null");
14271
      } else {
14272
        sb.append(this.ex);
14273
      }
14274
      first = false;
14275
      sb.append(")");
14276
      return sb.toString();
14277
    }
14278
 
14279
    public void validate() throws TException {
14280
      // check for required fields
14281
    }
14282
 
14283
  }
14284
 
483 rajveer 14285
  public static class getLineItemsForOrder_args implements TBase<getLineItemsForOrder_args._Fields>, java.io.Serializable, Cloneable, Comparable<getLineItemsForOrder_args>   {
14286
    private static final TStruct STRUCT_DESC = new TStruct("getLineItemsForOrder_args");
68 ashish 14287
 
483 rajveer 14288
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
68 ashish 14289
 
483 rajveer 14290
    private long orderId;
68 ashish 14291
 
14292
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14293
    public enum _Fields implements TFieldIdEnum {
483 rajveer 14294
      ORDER_ID((short)1, "orderId");
68 ashish 14295
 
14296
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
14297
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14298
 
14299
      static {
14300
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14301
          byId.put((int)field._thriftId, field);
14302
          byName.put(field.getFieldName(), field);
14303
        }
14304
      }
14305
 
14306
      /**
14307
       * Find the _Fields constant that matches fieldId, or null if its not found.
14308
       */
14309
      public static _Fields findByThriftId(int fieldId) {
14310
        return byId.get(fieldId);
14311
      }
14312
 
14313
      /**
14314
       * Find the _Fields constant that matches fieldId, throwing an exception
14315
       * if it is not found.
14316
       */
14317
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14318
        _Fields fields = findByThriftId(fieldId);
14319
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14320
        return fields;
14321
      }
14322
 
14323
      /**
14324
       * Find the _Fields constant that matches name, or null if its not found.
14325
       */
14326
      public static _Fields findByName(String name) {
14327
        return byName.get(name);
14328
      }
14329
 
14330
      private final short _thriftId;
14331
      private final String _fieldName;
14332
 
14333
      _Fields(short thriftId, String fieldName) {
14334
        _thriftId = thriftId;
14335
        _fieldName = fieldName;
14336
      }
14337
 
14338
      public short getThriftFieldId() {
14339
        return _thriftId;
14340
      }
14341
 
14342
      public String getFieldName() {
14343
        return _fieldName;
14344
      }
14345
    }
14346
 
14347
    // isset id assignments
483 rajveer 14348
    private static final int __ORDERID_ISSET_ID = 0;
68 ashish 14349
    private BitSet __isset_bit_vector = new BitSet(1);
14350
 
14351
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 14352
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
68 ashish 14353
          new FieldValueMetaData(TType.I64)));
14354
    }});
14355
 
14356
    static {
483 rajveer 14357
      FieldMetaData.addStructMetaDataMap(getLineItemsForOrder_args.class, metaDataMap);
68 ashish 14358
    }
14359
 
483 rajveer 14360
    public getLineItemsForOrder_args() {
68 ashish 14361
    }
14362
 
483 rajveer 14363
    public getLineItemsForOrder_args(
14364
      long orderId)
68 ashish 14365
    {
14366
      this();
483 rajveer 14367
      this.orderId = orderId;
14368
      setOrderIdIsSet(true);
68 ashish 14369
    }
14370
 
14371
    /**
14372
     * Performs a deep copy on <i>other</i>.
14373
     */
483 rajveer 14374
    public getLineItemsForOrder_args(getLineItemsForOrder_args other) {
68 ashish 14375
      __isset_bit_vector.clear();
14376
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 14377
      this.orderId = other.orderId;
68 ashish 14378
    }
14379
 
483 rajveer 14380
    public getLineItemsForOrder_args deepCopy() {
14381
      return new getLineItemsForOrder_args(this);
68 ashish 14382
    }
14383
 
14384
    @Deprecated
483 rajveer 14385
    public getLineItemsForOrder_args clone() {
14386
      return new getLineItemsForOrder_args(this);
68 ashish 14387
    }
14388
 
483 rajveer 14389
    public long getOrderId() {
14390
      return this.orderId;
68 ashish 14391
    }
14392
 
483 rajveer 14393
    public getLineItemsForOrder_args setOrderId(long orderId) {
14394
      this.orderId = orderId;
14395
      setOrderIdIsSet(true);
68 ashish 14396
      return this;
14397
    }
14398
 
483 rajveer 14399
    public void unsetOrderId() {
14400
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
68 ashish 14401
    }
14402
 
483 rajveer 14403
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
14404
    public boolean isSetOrderId() {
14405
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
68 ashish 14406
    }
14407
 
483 rajveer 14408
    public void setOrderIdIsSet(boolean value) {
14409
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
68 ashish 14410
    }
14411
 
14412
    public void setFieldValue(_Fields field, Object value) {
14413
      switch (field) {
483 rajveer 14414
      case ORDER_ID:
68 ashish 14415
        if (value == null) {
483 rajveer 14416
          unsetOrderId();
68 ashish 14417
        } else {
483 rajveer 14418
          setOrderId((Long)value);
68 ashish 14419
        }
14420
        break;
14421
 
14422
      }
14423
    }
14424
 
14425
    public void setFieldValue(int fieldID, Object value) {
14426
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
14427
    }
14428
 
14429
    public Object getFieldValue(_Fields field) {
14430
      switch (field) {
483 rajveer 14431
      case ORDER_ID:
14432
        return new Long(getOrderId());
68 ashish 14433
 
14434
      }
14435
      throw new IllegalStateException();
14436
    }
14437
 
14438
    public Object getFieldValue(int fieldId) {
14439
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
14440
    }
14441
 
14442
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
14443
    public boolean isSet(_Fields field) {
14444
      switch (field) {
483 rajveer 14445
      case ORDER_ID:
14446
        return isSetOrderId();
68 ashish 14447
      }
14448
      throw new IllegalStateException();
14449
    }
14450
 
14451
    public boolean isSet(int fieldID) {
14452
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
14453
    }
14454
 
14455
    @Override
14456
    public boolean equals(Object that) {
14457
      if (that == null)
14458
        return false;
483 rajveer 14459
      if (that instanceof getLineItemsForOrder_args)
14460
        return this.equals((getLineItemsForOrder_args)that);
68 ashish 14461
      return false;
14462
    }
14463
 
483 rajveer 14464
    public boolean equals(getLineItemsForOrder_args that) {
68 ashish 14465
      if (that == null)
14466
        return false;
14467
 
483 rajveer 14468
      boolean this_present_orderId = true;
14469
      boolean that_present_orderId = true;
14470
      if (this_present_orderId || that_present_orderId) {
14471
        if (!(this_present_orderId && that_present_orderId))
68 ashish 14472
          return false;
483 rajveer 14473
        if (this.orderId != that.orderId)
68 ashish 14474
          return false;
14475
      }
14476
 
14477
      return true;
14478
    }
14479
 
14480
    @Override
14481
    public int hashCode() {
14482
      return 0;
14483
    }
14484
 
483 rajveer 14485
    public int compareTo(getLineItemsForOrder_args other) {
68 ashish 14486
      if (!getClass().equals(other.getClass())) {
14487
        return getClass().getName().compareTo(other.getClass().getName());
14488
      }
14489
 
14490
      int lastComparison = 0;
483 rajveer 14491
      getLineItemsForOrder_args typedOther = (getLineItemsForOrder_args)other;
68 ashish 14492
 
483 rajveer 14493
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
68 ashish 14494
      if (lastComparison != 0) {
14495
        return lastComparison;
14496
      }
483 rajveer 14497
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
68 ashish 14498
      if (lastComparison != 0) {
14499
        return lastComparison;
14500
      }
14501
      return 0;
14502
    }
14503
 
14504
    public void read(TProtocol iprot) throws TException {
14505
      TField field;
14506
      iprot.readStructBegin();
14507
      while (true)
14508
      {
14509
        field = iprot.readFieldBegin();
14510
        if (field.type == TType.STOP) { 
14511
          break;
14512
        }
14513
        _Fields fieldId = _Fields.findByThriftId(field.id);
14514
        if (fieldId == null) {
14515
          TProtocolUtil.skip(iprot, field.type);
14516
        } else {
14517
          switch (fieldId) {
483 rajveer 14518
            case ORDER_ID:
68 ashish 14519
              if (field.type == TType.I64) {
483 rajveer 14520
                this.orderId = iprot.readI64();
14521
                setOrderIdIsSet(true);
68 ashish 14522
              } else { 
14523
                TProtocolUtil.skip(iprot, field.type);
14524
              }
14525
              break;
14526
          }
14527
          iprot.readFieldEnd();
14528
        }
14529
      }
14530
      iprot.readStructEnd();
14531
      validate();
14532
    }
14533
 
14534
    public void write(TProtocol oprot) throws TException {
14535
      validate();
14536
 
14537
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 14538
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
14539
      oprot.writeI64(this.orderId);
68 ashish 14540
      oprot.writeFieldEnd();
14541
      oprot.writeFieldStop();
14542
      oprot.writeStructEnd();
14543
    }
14544
 
14545
    @Override
14546
    public String toString() {
483 rajveer 14547
      StringBuilder sb = new StringBuilder("getLineItemsForOrder_args(");
68 ashish 14548
      boolean first = true;
14549
 
483 rajveer 14550
      sb.append("orderId:");
14551
      sb.append(this.orderId);
68 ashish 14552
      first = false;
14553
      sb.append(")");
14554
      return sb.toString();
14555
    }
14556
 
14557
    public void validate() throws TException {
14558
      // check for required fields
14559
    }
14560
 
14561
  }
14562
 
483 rajveer 14563
  public static class getLineItemsForOrder_result implements TBase<getLineItemsForOrder_result._Fields>, java.io.Serializable, Cloneable, Comparable<getLineItemsForOrder_result>   {
14564
    private static final TStruct STRUCT_DESC = new TStruct("getLineItemsForOrder_result");
68 ashish 14565
 
483 rajveer 14566
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
68 ashish 14567
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
14568
 
483 rajveer 14569
    private List<LineItem> success;
68 ashish 14570
    private TransactionServiceException ex;
14571
 
14572
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14573
    public enum _Fields implements TFieldIdEnum {
14574
      SUCCESS((short)0, "success"),
14575
      EX((short)1, "ex");
14576
 
14577
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
14578
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14579
 
14580
      static {
14581
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14582
          byId.put((int)field._thriftId, field);
14583
          byName.put(field.getFieldName(), field);
14584
        }
14585
      }
14586
 
14587
      /**
14588
       * Find the _Fields constant that matches fieldId, or null if its not found.
14589
       */
14590
      public static _Fields findByThriftId(int fieldId) {
14591
        return byId.get(fieldId);
14592
      }
14593
 
14594
      /**
14595
       * Find the _Fields constant that matches fieldId, throwing an exception
14596
       * if it is not found.
14597
       */
14598
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14599
        _Fields fields = findByThriftId(fieldId);
14600
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14601
        return fields;
14602
      }
14603
 
14604
      /**
14605
       * Find the _Fields constant that matches name, or null if its not found.
14606
       */
14607
      public static _Fields findByName(String name) {
14608
        return byName.get(name);
14609
      }
14610
 
14611
      private final short _thriftId;
14612
      private final String _fieldName;
14613
 
14614
      _Fields(short thriftId, String fieldName) {
14615
        _thriftId = thriftId;
14616
        _fieldName = fieldName;
14617
      }
14618
 
14619
      public short getThriftFieldId() {
14620
        return _thriftId;
14621
      }
14622
 
14623
      public String getFieldName() {
14624
        return _fieldName;
14625
      }
14626
    }
14627
 
14628
    // isset id assignments
14629
 
14630
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
14631
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
483 rajveer 14632
          new ListMetaData(TType.LIST, 
14633
              new StructMetaData(TType.STRUCT, LineItem.class))));
68 ashish 14634
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
14635
          new FieldValueMetaData(TType.STRUCT)));
14636
    }});
14637
 
14638
    static {
483 rajveer 14639
      FieldMetaData.addStructMetaDataMap(getLineItemsForOrder_result.class, metaDataMap);
68 ashish 14640
    }
14641
 
483 rajveer 14642
    public getLineItemsForOrder_result() {
68 ashish 14643
    }
14644
 
483 rajveer 14645
    public getLineItemsForOrder_result(
14646
      List<LineItem> success,
68 ashish 14647
      TransactionServiceException ex)
14648
    {
14649
      this();
14650
      this.success = success;
14651
      this.ex = ex;
14652
    }
14653
 
14654
    /**
14655
     * Performs a deep copy on <i>other</i>.
14656
     */
483 rajveer 14657
    public getLineItemsForOrder_result(getLineItemsForOrder_result other) {
14658
      if (other.isSetSuccess()) {
14659
        List<LineItem> __this__success = new ArrayList<LineItem>();
14660
        for (LineItem other_element : other.success) {
14661
          __this__success.add(new LineItem(other_element));
14662
        }
14663
        this.success = __this__success;
14664
      }
68 ashish 14665
      if (other.isSetEx()) {
14666
        this.ex = new TransactionServiceException(other.ex);
14667
      }
14668
    }
14669
 
483 rajveer 14670
    public getLineItemsForOrder_result deepCopy() {
14671
      return new getLineItemsForOrder_result(this);
68 ashish 14672
    }
14673
 
14674
    @Deprecated
483 rajveer 14675
    public getLineItemsForOrder_result clone() {
14676
      return new getLineItemsForOrder_result(this);
68 ashish 14677
    }
14678
 
483 rajveer 14679
    public int getSuccessSize() {
14680
      return (this.success == null) ? 0 : this.success.size();
14681
    }
14682
 
14683
    public java.util.Iterator<LineItem> getSuccessIterator() {
14684
      return (this.success == null) ? null : this.success.iterator();
14685
    }
14686
 
14687
    public void addToSuccess(LineItem elem) {
14688
      if (this.success == null) {
14689
        this.success = new ArrayList<LineItem>();
14690
      }
14691
      this.success.add(elem);
14692
    }
14693
 
14694
    public List<LineItem> getSuccess() {
68 ashish 14695
      return this.success;
14696
    }
14697
 
483 rajveer 14698
    public getLineItemsForOrder_result setSuccess(List<LineItem> success) {
68 ashish 14699
      this.success = success;
14700
      return this;
14701
    }
14702
 
14703
    public void unsetSuccess() {
483 rajveer 14704
      this.success = null;
68 ashish 14705
    }
14706
 
14707
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
14708
    public boolean isSetSuccess() {
483 rajveer 14709
      return this.success != null;
68 ashish 14710
    }
14711
 
14712
    public void setSuccessIsSet(boolean value) {
483 rajveer 14713
      if (!value) {
14714
        this.success = null;
14715
      }
68 ashish 14716
    }
14717
 
14718
    public TransactionServiceException getEx() {
14719
      return this.ex;
14720
    }
14721
 
483 rajveer 14722
    public getLineItemsForOrder_result setEx(TransactionServiceException ex) {
68 ashish 14723
      this.ex = ex;
14724
      return this;
14725
    }
14726
 
14727
    public void unsetEx() {
14728
      this.ex = null;
14729
    }
14730
 
14731
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
14732
    public boolean isSetEx() {
14733
      return this.ex != null;
14734
    }
14735
 
14736
    public void setExIsSet(boolean value) {
14737
      if (!value) {
14738
        this.ex = null;
14739
      }
14740
    }
14741
 
14742
    public void setFieldValue(_Fields field, Object value) {
14743
      switch (field) {
14744
      case SUCCESS:
14745
        if (value == null) {
14746
          unsetSuccess();
14747
        } else {
483 rajveer 14748
          setSuccess((List<LineItem>)value);
68 ashish 14749
        }
14750
        break;
14751
 
14752
      case EX:
14753
        if (value == null) {
14754
          unsetEx();
14755
        } else {
14756
          setEx((TransactionServiceException)value);
14757
        }
14758
        break;
14759
 
14760
      }
14761
    }
14762
 
14763
    public void setFieldValue(int fieldID, Object value) {
14764
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
14765
    }
14766
 
14767
    public Object getFieldValue(_Fields field) {
14768
      switch (field) {
14769
      case SUCCESS:
483 rajveer 14770
        return getSuccess();
68 ashish 14771
 
14772
      case EX:
14773
        return getEx();
14774
 
14775
      }
14776
      throw new IllegalStateException();
14777
    }
14778
 
14779
    public Object getFieldValue(int fieldId) {
14780
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
14781
    }
14782
 
14783
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
14784
    public boolean isSet(_Fields field) {
14785
      switch (field) {
14786
      case SUCCESS:
14787
        return isSetSuccess();
14788
      case EX:
14789
        return isSetEx();
14790
      }
14791
      throw new IllegalStateException();
14792
    }
14793
 
14794
    public boolean isSet(int fieldID) {
14795
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
14796
    }
14797
 
14798
    @Override
14799
    public boolean equals(Object that) {
14800
      if (that == null)
14801
        return false;
483 rajveer 14802
      if (that instanceof getLineItemsForOrder_result)
14803
        return this.equals((getLineItemsForOrder_result)that);
68 ashish 14804
      return false;
14805
    }
14806
 
483 rajveer 14807
    public boolean equals(getLineItemsForOrder_result that) {
68 ashish 14808
      if (that == null)
14809
        return false;
14810
 
483 rajveer 14811
      boolean this_present_success = true && this.isSetSuccess();
14812
      boolean that_present_success = true && that.isSetSuccess();
68 ashish 14813
      if (this_present_success || that_present_success) {
14814
        if (!(this_present_success && that_present_success))
14815
          return false;
483 rajveer 14816
        if (!this.success.equals(that.success))
68 ashish 14817
          return false;
14818
      }
14819
 
14820
      boolean this_present_ex = true && this.isSetEx();
14821
      boolean that_present_ex = true && that.isSetEx();
14822
      if (this_present_ex || that_present_ex) {
14823
        if (!(this_present_ex && that_present_ex))
14824
          return false;
14825
        if (!this.ex.equals(that.ex))
14826
          return false;
14827
      }
14828
 
14829
      return true;
14830
    }
14831
 
14832
    @Override
14833
    public int hashCode() {
14834
      return 0;
14835
    }
14836
 
483 rajveer 14837
    public int compareTo(getLineItemsForOrder_result other) {
68 ashish 14838
      if (!getClass().equals(other.getClass())) {
14839
        return getClass().getName().compareTo(other.getClass().getName());
14840
      }
14841
 
14842
      int lastComparison = 0;
483 rajveer 14843
      getLineItemsForOrder_result typedOther = (getLineItemsForOrder_result)other;
68 ashish 14844
 
14845
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
14846
      if (lastComparison != 0) {
14847
        return lastComparison;
14848
      }
14849
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
14850
      if (lastComparison != 0) {
14851
        return lastComparison;
14852
      }
14853
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
14854
      if (lastComparison != 0) {
14855
        return lastComparison;
14856
      }
14857
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
14858
      if (lastComparison != 0) {
14859
        return lastComparison;
14860
      }
14861
      return 0;
14862
    }
14863
 
14864
    public void read(TProtocol iprot) throws TException {
14865
      TField field;
14866
      iprot.readStructBegin();
14867
      while (true)
14868
      {
14869
        field = iprot.readFieldBegin();
14870
        if (field.type == TType.STOP) { 
14871
          break;
14872
        }
14873
        _Fields fieldId = _Fields.findByThriftId(field.id);
14874
        if (fieldId == null) {
14875
          TProtocolUtil.skip(iprot, field.type);
14876
        } else {
14877
          switch (fieldId) {
14878
            case SUCCESS:
483 rajveer 14879
              if (field.type == TType.LIST) {
14880
                {
1022 varun.gupt 14881
                  TList _list32 = iprot.readListBegin();
14882
                  this.success = new ArrayList<LineItem>(_list32.size);
14883
                  for (int _i33 = 0; _i33 < _list32.size; ++_i33)
483 rajveer 14884
                  {
1022 varun.gupt 14885
                    LineItem _elem34;
14886
                    _elem34 = new LineItem();
14887
                    _elem34.read(iprot);
14888
                    this.success.add(_elem34);
483 rajveer 14889
                  }
14890
                  iprot.readListEnd();
14891
                }
68 ashish 14892
              } else { 
14893
                TProtocolUtil.skip(iprot, field.type);
14894
              }
14895
              break;
14896
            case EX:
14897
              if (field.type == TType.STRUCT) {
14898
                this.ex = new TransactionServiceException();
14899
                this.ex.read(iprot);
14900
              } else { 
14901
                TProtocolUtil.skip(iprot, field.type);
14902
              }
14903
              break;
14904
          }
14905
          iprot.readFieldEnd();
14906
        }
14907
      }
14908
      iprot.readStructEnd();
14909
      validate();
14910
    }
14911
 
14912
    public void write(TProtocol oprot) throws TException {
14913
      oprot.writeStructBegin(STRUCT_DESC);
14914
 
14915
      if (this.isSetSuccess()) {
14916
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
483 rajveer 14917
        {
14918
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
1022 varun.gupt 14919
          for (LineItem _iter35 : this.success)
483 rajveer 14920
          {
1022 varun.gupt 14921
            _iter35.write(oprot);
483 rajveer 14922
          }
14923
          oprot.writeListEnd();
14924
        }
68 ashish 14925
        oprot.writeFieldEnd();
14926
      } else if (this.isSetEx()) {
14927
        oprot.writeFieldBegin(EX_FIELD_DESC);
14928
        this.ex.write(oprot);
14929
        oprot.writeFieldEnd();
14930
      }
14931
      oprot.writeFieldStop();
14932
      oprot.writeStructEnd();
14933
    }
14934
 
14935
    @Override
14936
    public String toString() {
483 rajveer 14937
      StringBuilder sb = new StringBuilder("getLineItemsForOrder_result(");
68 ashish 14938
      boolean first = true;
14939
 
14940
      sb.append("success:");
483 rajveer 14941
      if (this.success == null) {
14942
        sb.append("null");
14943
      } else {
14944
        sb.append(this.success);
14945
      }
68 ashish 14946
      first = false;
14947
      if (!first) sb.append(", ");
14948
      sb.append("ex:");
14949
      if (this.ex == null) {
14950
        sb.append("null");
14951
      } else {
14952
        sb.append(this.ex);
14953
      }
14954
      first = false;
14955
      sb.append(")");
14956
      return sb.toString();
14957
    }
14958
 
14959
    public void validate() throws TException {
14960
      // check for required fields
14961
    }
14962
 
14963
  }
14964
 
758 chandransh 14965
  public static class markOrdersAsManifested_args implements TBase<markOrdersAsManifested_args._Fields>, java.io.Serializable, Cloneable, Comparable<markOrdersAsManifested_args>   {
14966
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsManifested_args");
14967
 
14968
    private static final TField WAREHOUSE_ID_FIELD_DESC = new TField("warehouseId", TType.I64, (short)1);
14969
    private static final TField PROVIDER_ID_FIELD_DESC = new TField("providerId", TType.I64, (short)2);
14970
 
14971
    private long warehouseId;
14972
    private long providerId;
14973
 
14974
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14975
    public enum _Fields implements TFieldIdEnum {
14976
      WAREHOUSE_ID((short)1, "warehouseId"),
14977
      PROVIDER_ID((short)2, "providerId");
14978
 
14979
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
14980
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14981
 
14982
      static {
14983
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14984
          byId.put((int)field._thriftId, field);
14985
          byName.put(field.getFieldName(), field);
14986
        }
14987
      }
14988
 
14989
      /**
14990
       * Find the _Fields constant that matches fieldId, or null if its not found.
14991
       */
14992
      public static _Fields findByThriftId(int fieldId) {
14993
        return byId.get(fieldId);
14994
      }
14995
 
14996
      /**
14997
       * Find the _Fields constant that matches fieldId, throwing an exception
14998
       * if it is not found.
14999
       */
15000
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15001
        _Fields fields = findByThriftId(fieldId);
15002
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15003
        return fields;
15004
      }
15005
 
15006
      /**
15007
       * Find the _Fields constant that matches name, or null if its not found.
15008
       */
15009
      public static _Fields findByName(String name) {
15010
        return byName.get(name);
15011
      }
15012
 
15013
      private final short _thriftId;
15014
      private final String _fieldName;
15015
 
15016
      _Fields(short thriftId, String fieldName) {
15017
        _thriftId = thriftId;
15018
        _fieldName = fieldName;
15019
      }
15020
 
15021
      public short getThriftFieldId() {
15022
        return _thriftId;
15023
      }
15024
 
15025
      public String getFieldName() {
15026
        return _fieldName;
15027
      }
15028
    }
15029
 
15030
    // isset id assignments
15031
    private static final int __WAREHOUSEID_ISSET_ID = 0;
15032
    private static final int __PROVIDERID_ISSET_ID = 1;
15033
    private BitSet __isset_bit_vector = new BitSet(2);
15034
 
15035
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
15036
      put(_Fields.WAREHOUSE_ID, new FieldMetaData("warehouseId", TFieldRequirementType.DEFAULT, 
15037
          new FieldValueMetaData(TType.I64)));
15038
      put(_Fields.PROVIDER_ID, new FieldMetaData("providerId", TFieldRequirementType.DEFAULT, 
15039
          new FieldValueMetaData(TType.I64)));
15040
    }});
15041
 
15042
    static {
15043
      FieldMetaData.addStructMetaDataMap(markOrdersAsManifested_args.class, metaDataMap);
15044
    }
15045
 
15046
    public markOrdersAsManifested_args() {
15047
    }
15048
 
15049
    public markOrdersAsManifested_args(
15050
      long warehouseId,
15051
      long providerId)
15052
    {
15053
      this();
15054
      this.warehouseId = warehouseId;
15055
      setWarehouseIdIsSet(true);
15056
      this.providerId = providerId;
15057
      setProviderIdIsSet(true);
15058
    }
15059
 
15060
    /**
15061
     * Performs a deep copy on <i>other</i>.
15062
     */
15063
    public markOrdersAsManifested_args(markOrdersAsManifested_args other) {
15064
      __isset_bit_vector.clear();
15065
      __isset_bit_vector.or(other.__isset_bit_vector);
15066
      this.warehouseId = other.warehouseId;
15067
      this.providerId = other.providerId;
15068
    }
15069
 
15070
    public markOrdersAsManifested_args deepCopy() {
15071
      return new markOrdersAsManifested_args(this);
15072
    }
15073
 
15074
    @Deprecated
15075
    public markOrdersAsManifested_args clone() {
15076
      return new markOrdersAsManifested_args(this);
15077
    }
15078
 
15079
    public long getWarehouseId() {
15080
      return this.warehouseId;
15081
    }
15082
 
15083
    public markOrdersAsManifested_args setWarehouseId(long warehouseId) {
15084
      this.warehouseId = warehouseId;
15085
      setWarehouseIdIsSet(true);
15086
      return this;
15087
    }
15088
 
15089
    public void unsetWarehouseId() {
15090
      __isset_bit_vector.clear(__WAREHOUSEID_ISSET_ID);
15091
    }
15092
 
15093
    /** Returns true if field warehouseId is set (has been asigned a value) and false otherwise */
15094
    public boolean isSetWarehouseId() {
15095
      return __isset_bit_vector.get(__WAREHOUSEID_ISSET_ID);
15096
    }
15097
 
15098
    public void setWarehouseIdIsSet(boolean value) {
15099
      __isset_bit_vector.set(__WAREHOUSEID_ISSET_ID, value);
15100
    }
15101
 
15102
    public long getProviderId() {
15103
      return this.providerId;
15104
    }
15105
 
15106
    public markOrdersAsManifested_args setProviderId(long providerId) {
15107
      this.providerId = providerId;
15108
      setProviderIdIsSet(true);
15109
      return this;
15110
    }
15111
 
15112
    public void unsetProviderId() {
15113
      __isset_bit_vector.clear(__PROVIDERID_ISSET_ID);
15114
    }
15115
 
15116
    /** Returns true if field providerId is set (has been asigned a value) and false otherwise */
15117
    public boolean isSetProviderId() {
15118
      return __isset_bit_vector.get(__PROVIDERID_ISSET_ID);
15119
    }
15120
 
15121
    public void setProviderIdIsSet(boolean value) {
15122
      __isset_bit_vector.set(__PROVIDERID_ISSET_ID, value);
15123
    }
15124
 
15125
    public void setFieldValue(_Fields field, Object value) {
15126
      switch (field) {
15127
      case WAREHOUSE_ID:
15128
        if (value == null) {
15129
          unsetWarehouseId();
15130
        } else {
15131
          setWarehouseId((Long)value);
15132
        }
15133
        break;
15134
 
15135
      case PROVIDER_ID:
15136
        if (value == null) {
15137
          unsetProviderId();
15138
        } else {
15139
          setProviderId((Long)value);
15140
        }
15141
        break;
15142
 
15143
      }
15144
    }
15145
 
15146
    public void setFieldValue(int fieldID, Object value) {
15147
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
15148
    }
15149
 
15150
    public Object getFieldValue(_Fields field) {
15151
      switch (field) {
15152
      case WAREHOUSE_ID:
15153
        return new Long(getWarehouseId());
15154
 
15155
      case PROVIDER_ID:
15156
        return new Long(getProviderId());
15157
 
15158
      }
15159
      throw new IllegalStateException();
15160
    }
15161
 
15162
    public Object getFieldValue(int fieldId) {
15163
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
15164
    }
15165
 
15166
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
15167
    public boolean isSet(_Fields field) {
15168
      switch (field) {
15169
      case WAREHOUSE_ID:
15170
        return isSetWarehouseId();
15171
      case PROVIDER_ID:
15172
        return isSetProviderId();
15173
      }
15174
      throw new IllegalStateException();
15175
    }
15176
 
15177
    public boolean isSet(int fieldID) {
15178
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
15179
    }
15180
 
15181
    @Override
15182
    public boolean equals(Object that) {
15183
      if (that == null)
15184
        return false;
15185
      if (that instanceof markOrdersAsManifested_args)
15186
        return this.equals((markOrdersAsManifested_args)that);
15187
      return false;
15188
    }
15189
 
15190
    public boolean equals(markOrdersAsManifested_args that) {
15191
      if (that == null)
15192
        return false;
15193
 
15194
      boolean this_present_warehouseId = true;
15195
      boolean that_present_warehouseId = true;
15196
      if (this_present_warehouseId || that_present_warehouseId) {
15197
        if (!(this_present_warehouseId && that_present_warehouseId))
15198
          return false;
15199
        if (this.warehouseId != that.warehouseId)
15200
          return false;
15201
      }
15202
 
15203
      boolean this_present_providerId = true;
15204
      boolean that_present_providerId = true;
15205
      if (this_present_providerId || that_present_providerId) {
15206
        if (!(this_present_providerId && that_present_providerId))
15207
          return false;
15208
        if (this.providerId != that.providerId)
15209
          return false;
15210
      }
15211
 
15212
      return true;
15213
    }
15214
 
15215
    @Override
15216
    public int hashCode() {
15217
      return 0;
15218
    }
15219
 
15220
    public int compareTo(markOrdersAsManifested_args other) {
15221
      if (!getClass().equals(other.getClass())) {
15222
        return getClass().getName().compareTo(other.getClass().getName());
15223
      }
15224
 
15225
      int lastComparison = 0;
15226
      markOrdersAsManifested_args typedOther = (markOrdersAsManifested_args)other;
15227
 
15228
      lastComparison = Boolean.valueOf(isSetWarehouseId()).compareTo(isSetWarehouseId());
15229
      if (lastComparison != 0) {
15230
        return lastComparison;
15231
      }
15232
      lastComparison = TBaseHelper.compareTo(warehouseId, typedOther.warehouseId);
15233
      if (lastComparison != 0) {
15234
        return lastComparison;
15235
      }
15236
      lastComparison = Boolean.valueOf(isSetProviderId()).compareTo(isSetProviderId());
15237
      if (lastComparison != 0) {
15238
        return lastComparison;
15239
      }
15240
      lastComparison = TBaseHelper.compareTo(providerId, typedOther.providerId);
15241
      if (lastComparison != 0) {
15242
        return lastComparison;
15243
      }
15244
      return 0;
15245
    }
15246
 
15247
    public void read(TProtocol iprot) throws TException {
15248
      TField field;
15249
      iprot.readStructBegin();
15250
      while (true)
15251
      {
15252
        field = iprot.readFieldBegin();
15253
        if (field.type == TType.STOP) { 
15254
          break;
15255
        }
15256
        _Fields fieldId = _Fields.findByThriftId(field.id);
15257
        if (fieldId == null) {
15258
          TProtocolUtil.skip(iprot, field.type);
15259
        } else {
15260
          switch (fieldId) {
15261
            case WAREHOUSE_ID:
15262
              if (field.type == TType.I64) {
15263
                this.warehouseId = iprot.readI64();
15264
                setWarehouseIdIsSet(true);
15265
              } else { 
15266
                TProtocolUtil.skip(iprot, field.type);
15267
              }
15268
              break;
15269
            case PROVIDER_ID:
15270
              if (field.type == TType.I64) {
15271
                this.providerId = iprot.readI64();
15272
                setProviderIdIsSet(true);
15273
              } else { 
15274
                TProtocolUtil.skip(iprot, field.type);
15275
              }
15276
              break;
15277
          }
15278
          iprot.readFieldEnd();
15279
        }
15280
      }
15281
      iprot.readStructEnd();
15282
      validate();
15283
    }
15284
 
15285
    public void write(TProtocol oprot) throws TException {
15286
      validate();
15287
 
15288
      oprot.writeStructBegin(STRUCT_DESC);
15289
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
15290
      oprot.writeI64(this.warehouseId);
15291
      oprot.writeFieldEnd();
15292
      oprot.writeFieldBegin(PROVIDER_ID_FIELD_DESC);
15293
      oprot.writeI64(this.providerId);
15294
      oprot.writeFieldEnd();
15295
      oprot.writeFieldStop();
15296
      oprot.writeStructEnd();
15297
    }
15298
 
15299
    @Override
15300
    public String toString() {
15301
      StringBuilder sb = new StringBuilder("markOrdersAsManifested_args(");
15302
      boolean first = true;
15303
 
15304
      sb.append("warehouseId:");
15305
      sb.append(this.warehouseId);
15306
      first = false;
15307
      if (!first) sb.append(", ");
15308
      sb.append("providerId:");
15309
      sb.append(this.providerId);
15310
      first = false;
15311
      sb.append(")");
15312
      return sb.toString();
15313
    }
15314
 
15315
    public void validate() throws TException {
15316
      // check for required fields
15317
    }
15318
 
15319
  }
15320
 
15321
  public static class markOrdersAsManifested_result implements TBase<markOrdersAsManifested_result._Fields>, java.io.Serializable, Cloneable, Comparable<markOrdersAsManifested_result>   {
15322
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsManifested_result");
15323
 
15324
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
15325
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
15326
 
15327
    private boolean success;
15328
    private TransactionServiceException ex;
15329
 
15330
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15331
    public enum _Fields implements TFieldIdEnum {
15332
      SUCCESS((short)0, "success"),
15333
      EX((short)1, "ex");
15334
 
15335
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
15336
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15337
 
15338
      static {
15339
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15340
          byId.put((int)field._thriftId, field);
15341
          byName.put(field.getFieldName(), field);
15342
        }
15343
      }
15344
 
15345
      /**
15346
       * Find the _Fields constant that matches fieldId, or null if its not found.
15347
       */
15348
      public static _Fields findByThriftId(int fieldId) {
15349
        return byId.get(fieldId);
15350
      }
15351
 
15352
      /**
15353
       * Find the _Fields constant that matches fieldId, throwing an exception
15354
       * if it is not found.
15355
       */
15356
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15357
        _Fields fields = findByThriftId(fieldId);
15358
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15359
        return fields;
15360
      }
15361
 
15362
      /**
15363
       * Find the _Fields constant that matches name, or null if its not found.
15364
       */
15365
      public static _Fields findByName(String name) {
15366
        return byName.get(name);
15367
      }
15368
 
15369
      private final short _thriftId;
15370
      private final String _fieldName;
15371
 
15372
      _Fields(short thriftId, String fieldName) {
15373
        _thriftId = thriftId;
15374
        _fieldName = fieldName;
15375
      }
15376
 
15377
      public short getThriftFieldId() {
15378
        return _thriftId;
15379
      }
15380
 
15381
      public String getFieldName() {
15382
        return _fieldName;
15383
      }
15384
    }
15385
 
15386
    // isset id assignments
15387
    private static final int __SUCCESS_ISSET_ID = 0;
15388
    private BitSet __isset_bit_vector = new BitSet(1);
15389
 
15390
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
15391
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
15392
          new FieldValueMetaData(TType.BOOL)));
15393
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
15394
          new FieldValueMetaData(TType.STRUCT)));
15395
    }});
15396
 
15397
    static {
15398
      FieldMetaData.addStructMetaDataMap(markOrdersAsManifested_result.class, metaDataMap);
15399
    }
15400
 
15401
    public markOrdersAsManifested_result() {
15402
    }
15403
 
15404
    public markOrdersAsManifested_result(
15405
      boolean success,
15406
      TransactionServiceException ex)
15407
    {
15408
      this();
15409
      this.success = success;
15410
      setSuccessIsSet(true);
15411
      this.ex = ex;
15412
    }
15413
 
15414
    /**
15415
     * Performs a deep copy on <i>other</i>.
15416
     */
15417
    public markOrdersAsManifested_result(markOrdersAsManifested_result other) {
15418
      __isset_bit_vector.clear();
15419
      __isset_bit_vector.or(other.__isset_bit_vector);
15420
      this.success = other.success;
15421
      if (other.isSetEx()) {
15422
        this.ex = new TransactionServiceException(other.ex);
15423
      }
15424
    }
15425
 
15426
    public markOrdersAsManifested_result deepCopy() {
15427
      return new markOrdersAsManifested_result(this);
15428
    }
15429
 
15430
    @Deprecated
15431
    public markOrdersAsManifested_result clone() {
15432
      return new markOrdersAsManifested_result(this);
15433
    }
15434
 
15435
    public boolean isSuccess() {
15436
      return this.success;
15437
    }
15438
 
15439
    public markOrdersAsManifested_result setSuccess(boolean success) {
15440
      this.success = success;
15441
      setSuccessIsSet(true);
15442
      return this;
15443
    }
15444
 
15445
    public void unsetSuccess() {
15446
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
15447
    }
15448
 
15449
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
15450
    public boolean isSetSuccess() {
15451
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
15452
    }
15453
 
15454
    public void setSuccessIsSet(boolean value) {
15455
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
15456
    }
15457
 
15458
    public TransactionServiceException getEx() {
15459
      return this.ex;
15460
    }
15461
 
15462
    public markOrdersAsManifested_result setEx(TransactionServiceException ex) {
15463
      this.ex = ex;
15464
      return this;
15465
    }
15466
 
15467
    public void unsetEx() {
15468
      this.ex = null;
15469
    }
15470
 
15471
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
15472
    public boolean isSetEx() {
15473
      return this.ex != null;
15474
    }
15475
 
15476
    public void setExIsSet(boolean value) {
15477
      if (!value) {
15478
        this.ex = null;
15479
      }
15480
    }
15481
 
15482
    public void setFieldValue(_Fields field, Object value) {
15483
      switch (field) {
15484
      case SUCCESS:
15485
        if (value == null) {
15486
          unsetSuccess();
15487
        } else {
15488
          setSuccess((Boolean)value);
15489
        }
15490
        break;
15491
 
15492
      case EX:
15493
        if (value == null) {
15494
          unsetEx();
15495
        } else {
15496
          setEx((TransactionServiceException)value);
15497
        }
15498
        break;
15499
 
15500
      }
15501
    }
15502
 
15503
    public void setFieldValue(int fieldID, Object value) {
15504
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
15505
    }
15506
 
15507
    public Object getFieldValue(_Fields field) {
15508
      switch (field) {
15509
      case SUCCESS:
15510
        return new Boolean(isSuccess());
15511
 
15512
      case EX:
15513
        return getEx();
15514
 
15515
      }
15516
      throw new IllegalStateException();
15517
    }
15518
 
15519
    public Object getFieldValue(int fieldId) {
15520
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
15521
    }
15522
 
15523
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
15524
    public boolean isSet(_Fields field) {
15525
      switch (field) {
15526
      case SUCCESS:
15527
        return isSetSuccess();
15528
      case EX:
15529
        return isSetEx();
15530
      }
15531
      throw new IllegalStateException();
15532
    }
15533
 
15534
    public boolean isSet(int fieldID) {
15535
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
15536
    }
15537
 
15538
    @Override
15539
    public boolean equals(Object that) {
15540
      if (that == null)
15541
        return false;
15542
      if (that instanceof markOrdersAsManifested_result)
15543
        return this.equals((markOrdersAsManifested_result)that);
15544
      return false;
15545
    }
15546
 
15547
    public boolean equals(markOrdersAsManifested_result that) {
15548
      if (that == null)
15549
        return false;
15550
 
15551
      boolean this_present_success = true;
15552
      boolean that_present_success = true;
15553
      if (this_present_success || that_present_success) {
15554
        if (!(this_present_success && that_present_success))
15555
          return false;
15556
        if (this.success != that.success)
15557
          return false;
15558
      }
15559
 
15560
      boolean this_present_ex = true && this.isSetEx();
15561
      boolean that_present_ex = true && that.isSetEx();
15562
      if (this_present_ex || that_present_ex) {
15563
        if (!(this_present_ex && that_present_ex))
15564
          return false;
15565
        if (!this.ex.equals(that.ex))
15566
          return false;
15567
      }
15568
 
15569
      return true;
15570
    }
15571
 
15572
    @Override
15573
    public int hashCode() {
15574
      return 0;
15575
    }
15576
 
15577
    public int compareTo(markOrdersAsManifested_result other) {
15578
      if (!getClass().equals(other.getClass())) {
15579
        return getClass().getName().compareTo(other.getClass().getName());
15580
      }
15581
 
15582
      int lastComparison = 0;
15583
      markOrdersAsManifested_result typedOther = (markOrdersAsManifested_result)other;
15584
 
15585
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
15586
      if (lastComparison != 0) {
15587
        return lastComparison;
15588
      }
15589
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
15590
      if (lastComparison != 0) {
15591
        return lastComparison;
15592
      }
15593
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
15594
      if (lastComparison != 0) {
15595
        return lastComparison;
15596
      }
15597
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
15598
      if (lastComparison != 0) {
15599
        return lastComparison;
15600
      }
15601
      return 0;
15602
    }
15603
 
15604
    public void read(TProtocol iprot) throws TException {
15605
      TField field;
15606
      iprot.readStructBegin();
15607
      while (true)
15608
      {
15609
        field = iprot.readFieldBegin();
15610
        if (field.type == TType.STOP) { 
15611
          break;
15612
        }
15613
        _Fields fieldId = _Fields.findByThriftId(field.id);
15614
        if (fieldId == null) {
15615
          TProtocolUtil.skip(iprot, field.type);
15616
        } else {
15617
          switch (fieldId) {
15618
            case SUCCESS:
15619
              if (field.type == TType.BOOL) {
15620
                this.success = iprot.readBool();
15621
                setSuccessIsSet(true);
15622
              } else { 
15623
                TProtocolUtil.skip(iprot, field.type);
15624
              }
15625
              break;
15626
            case EX:
15627
              if (field.type == TType.STRUCT) {
15628
                this.ex = new TransactionServiceException();
15629
                this.ex.read(iprot);
15630
              } else { 
15631
                TProtocolUtil.skip(iprot, field.type);
15632
              }
15633
              break;
15634
          }
15635
          iprot.readFieldEnd();
15636
        }
15637
      }
15638
      iprot.readStructEnd();
15639
      validate();
15640
    }
15641
 
15642
    public void write(TProtocol oprot) throws TException {
15643
      oprot.writeStructBegin(STRUCT_DESC);
15644
 
15645
      if (this.isSetSuccess()) {
15646
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
15647
        oprot.writeBool(this.success);
15648
        oprot.writeFieldEnd();
15649
      } else if (this.isSetEx()) {
15650
        oprot.writeFieldBegin(EX_FIELD_DESC);
15651
        this.ex.write(oprot);
15652
        oprot.writeFieldEnd();
15653
      }
15654
      oprot.writeFieldStop();
15655
      oprot.writeStructEnd();
15656
    }
15657
 
15658
    @Override
15659
    public String toString() {
15660
      StringBuilder sb = new StringBuilder("markOrdersAsManifested_result(");
15661
      boolean first = true;
15662
 
15663
      sb.append("success:");
15664
      sb.append(this.success);
15665
      first = false;
15666
      if (!first) sb.append(", ");
15667
      sb.append("ex:");
15668
      if (this.ex == null) {
15669
        sb.append("null");
15670
      } else {
15671
        sb.append(this.ex);
15672
      }
15673
      first = false;
15674
      sb.append(")");
15675
      return sb.toString();
15676
    }
15677
 
15678
    public void validate() throws TException {
15679
      // check for required fields
15680
    }
15681
 
15682
  }
15683
 
1114 chandransh 15684
  public static class markOrdersAsPickedUp_args implements TBase<markOrdersAsPickedUp_args._Fields>, java.io.Serializable, Cloneable   {
15685
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsPickedUp_args");
15686
 
15687
    private static final TField PROVIDER_ID_FIELD_DESC = new TField("providerId", TType.I64, (short)1);
15688
    private static final TField PICKUP_DETAILS_FIELD_DESC = new TField("pickupDetails", TType.MAP, (short)2);
15689
 
15690
    private long providerId;
15691
    private Map<String,Long> pickupDetails;
15692
 
15693
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15694
    public enum _Fields implements TFieldIdEnum {
15695
      PROVIDER_ID((short)1, "providerId"),
15696
      PICKUP_DETAILS((short)2, "pickupDetails");
15697
 
15698
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
15699
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15700
 
15701
      static {
15702
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15703
          byId.put((int)field._thriftId, field);
15704
          byName.put(field.getFieldName(), field);
15705
        }
15706
      }
15707
 
15708
      /**
15709
       * Find the _Fields constant that matches fieldId, or null if its not found.
15710
       */
15711
      public static _Fields findByThriftId(int fieldId) {
15712
        return byId.get(fieldId);
15713
      }
15714
 
15715
      /**
15716
       * Find the _Fields constant that matches fieldId, throwing an exception
15717
       * if it is not found.
15718
       */
15719
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15720
        _Fields fields = findByThriftId(fieldId);
15721
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15722
        return fields;
15723
      }
15724
 
15725
      /**
15726
       * Find the _Fields constant that matches name, or null if its not found.
15727
       */
15728
      public static _Fields findByName(String name) {
15729
        return byName.get(name);
15730
      }
15731
 
15732
      private final short _thriftId;
15733
      private final String _fieldName;
15734
 
15735
      _Fields(short thriftId, String fieldName) {
15736
        _thriftId = thriftId;
15737
        _fieldName = fieldName;
15738
      }
15739
 
15740
      public short getThriftFieldId() {
15741
        return _thriftId;
15742
      }
15743
 
15744
      public String getFieldName() {
15745
        return _fieldName;
15746
      }
15747
    }
15748
 
15749
    // isset id assignments
15750
    private static final int __PROVIDERID_ISSET_ID = 0;
15751
    private BitSet __isset_bit_vector = new BitSet(1);
15752
 
15753
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
15754
      put(_Fields.PROVIDER_ID, new FieldMetaData("providerId", TFieldRequirementType.DEFAULT, 
15755
          new FieldValueMetaData(TType.I64)));
15756
      put(_Fields.PICKUP_DETAILS, new FieldMetaData("pickupDetails", TFieldRequirementType.DEFAULT, 
15757
          new MapMetaData(TType.MAP, 
15758
              new FieldValueMetaData(TType.STRING), 
15759
              new FieldValueMetaData(TType.I64))));
15760
    }});
15761
 
15762
    static {
15763
      FieldMetaData.addStructMetaDataMap(markOrdersAsPickedUp_args.class, metaDataMap);
15764
    }
15765
 
15766
    public markOrdersAsPickedUp_args() {
15767
    }
15768
 
15769
    public markOrdersAsPickedUp_args(
15770
      long providerId,
15771
      Map<String,Long> pickupDetails)
15772
    {
15773
      this();
15774
      this.providerId = providerId;
15775
      setProviderIdIsSet(true);
15776
      this.pickupDetails = pickupDetails;
15777
    }
15778
 
15779
    /**
15780
     * Performs a deep copy on <i>other</i>.
15781
     */
15782
    public markOrdersAsPickedUp_args(markOrdersAsPickedUp_args other) {
15783
      __isset_bit_vector.clear();
15784
      __isset_bit_vector.or(other.__isset_bit_vector);
15785
      this.providerId = other.providerId;
15786
      if (other.isSetPickupDetails()) {
15787
        Map<String,Long> __this__pickupDetails = new HashMap<String,Long>();
15788
        for (Map.Entry<String, Long> other_element : other.pickupDetails.entrySet()) {
15789
 
15790
          String other_element_key = other_element.getKey();
15791
          Long other_element_value = other_element.getValue();
15792
 
15793
          String __this__pickupDetails_copy_key = other_element_key;
15794
 
15795
          Long __this__pickupDetails_copy_value = other_element_value;
15796
 
15797
          __this__pickupDetails.put(__this__pickupDetails_copy_key, __this__pickupDetails_copy_value);
15798
        }
15799
        this.pickupDetails = __this__pickupDetails;
15800
      }
15801
    }
15802
 
15803
    public markOrdersAsPickedUp_args deepCopy() {
15804
      return new markOrdersAsPickedUp_args(this);
15805
    }
15806
 
15807
    @Deprecated
15808
    public markOrdersAsPickedUp_args clone() {
15809
      return new markOrdersAsPickedUp_args(this);
15810
    }
15811
 
15812
    public long getProviderId() {
15813
      return this.providerId;
15814
    }
15815
 
15816
    public markOrdersAsPickedUp_args setProviderId(long providerId) {
15817
      this.providerId = providerId;
15818
      setProviderIdIsSet(true);
15819
      return this;
15820
    }
15821
 
15822
    public void unsetProviderId() {
15823
      __isset_bit_vector.clear(__PROVIDERID_ISSET_ID);
15824
    }
15825
 
15826
    /** Returns true if field providerId is set (has been asigned a value) and false otherwise */
15827
    public boolean isSetProviderId() {
15828
      return __isset_bit_vector.get(__PROVIDERID_ISSET_ID);
15829
    }
15830
 
15831
    public void setProviderIdIsSet(boolean value) {
15832
      __isset_bit_vector.set(__PROVIDERID_ISSET_ID, value);
15833
    }
15834
 
15835
    public int getPickupDetailsSize() {
15836
      return (this.pickupDetails == null) ? 0 : this.pickupDetails.size();
15837
    }
15838
 
15839
    public void putToPickupDetails(String key, long val) {
15840
      if (this.pickupDetails == null) {
15841
        this.pickupDetails = new HashMap<String,Long>();
15842
      }
15843
      this.pickupDetails.put(key, val);
15844
    }
15845
 
15846
    public Map<String,Long> getPickupDetails() {
15847
      return this.pickupDetails;
15848
    }
15849
 
15850
    public markOrdersAsPickedUp_args setPickupDetails(Map<String,Long> pickupDetails) {
15851
      this.pickupDetails = pickupDetails;
15852
      return this;
15853
    }
15854
 
15855
    public void unsetPickupDetails() {
15856
      this.pickupDetails = null;
15857
    }
15858
 
15859
    /** Returns true if field pickupDetails is set (has been asigned a value) and false otherwise */
15860
    public boolean isSetPickupDetails() {
15861
      return this.pickupDetails != null;
15862
    }
15863
 
15864
    public void setPickupDetailsIsSet(boolean value) {
15865
      if (!value) {
15866
        this.pickupDetails = null;
15867
      }
15868
    }
15869
 
15870
    public void setFieldValue(_Fields field, Object value) {
15871
      switch (field) {
15872
      case PROVIDER_ID:
15873
        if (value == null) {
15874
          unsetProviderId();
15875
        } else {
15876
          setProviderId((Long)value);
15877
        }
15878
        break;
15879
 
15880
      case PICKUP_DETAILS:
15881
        if (value == null) {
15882
          unsetPickupDetails();
15883
        } else {
15884
          setPickupDetails((Map<String,Long>)value);
15885
        }
15886
        break;
15887
 
15888
      }
15889
    }
15890
 
15891
    public void setFieldValue(int fieldID, Object value) {
15892
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
15893
    }
15894
 
15895
    public Object getFieldValue(_Fields field) {
15896
      switch (field) {
15897
      case PROVIDER_ID:
15898
        return new Long(getProviderId());
15899
 
15900
      case PICKUP_DETAILS:
15901
        return getPickupDetails();
15902
 
15903
      }
15904
      throw new IllegalStateException();
15905
    }
15906
 
15907
    public Object getFieldValue(int fieldId) {
15908
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
15909
    }
15910
 
15911
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
15912
    public boolean isSet(_Fields field) {
15913
      switch (field) {
15914
      case PROVIDER_ID:
15915
        return isSetProviderId();
15916
      case PICKUP_DETAILS:
15917
        return isSetPickupDetails();
15918
      }
15919
      throw new IllegalStateException();
15920
    }
15921
 
15922
    public boolean isSet(int fieldID) {
15923
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
15924
    }
15925
 
15926
    @Override
15927
    public boolean equals(Object that) {
15928
      if (that == null)
15929
        return false;
15930
      if (that instanceof markOrdersAsPickedUp_args)
15931
        return this.equals((markOrdersAsPickedUp_args)that);
15932
      return false;
15933
    }
15934
 
15935
    public boolean equals(markOrdersAsPickedUp_args that) {
15936
      if (that == null)
15937
        return false;
15938
 
15939
      boolean this_present_providerId = true;
15940
      boolean that_present_providerId = true;
15941
      if (this_present_providerId || that_present_providerId) {
15942
        if (!(this_present_providerId && that_present_providerId))
15943
          return false;
15944
        if (this.providerId != that.providerId)
15945
          return false;
15946
      }
15947
 
15948
      boolean this_present_pickupDetails = true && this.isSetPickupDetails();
15949
      boolean that_present_pickupDetails = true && that.isSetPickupDetails();
15950
      if (this_present_pickupDetails || that_present_pickupDetails) {
15951
        if (!(this_present_pickupDetails && that_present_pickupDetails))
15952
          return false;
15953
        if (!this.pickupDetails.equals(that.pickupDetails))
15954
          return false;
15955
      }
15956
 
15957
      return true;
15958
    }
15959
 
15960
    @Override
15961
    public int hashCode() {
15962
      return 0;
15963
    }
15964
 
15965
    public void read(TProtocol iprot) throws TException {
15966
      TField field;
15967
      iprot.readStructBegin();
15968
      while (true)
15969
      {
15970
        field = iprot.readFieldBegin();
15971
        if (field.type == TType.STOP) { 
15972
          break;
15973
        }
15974
        _Fields fieldId = _Fields.findByThriftId(field.id);
15975
        if (fieldId == null) {
15976
          TProtocolUtil.skip(iprot, field.type);
15977
        } else {
15978
          switch (fieldId) {
15979
            case PROVIDER_ID:
15980
              if (field.type == TType.I64) {
15981
                this.providerId = iprot.readI64();
15982
                setProviderIdIsSet(true);
15983
              } else { 
15984
                TProtocolUtil.skip(iprot, field.type);
15985
              }
15986
              break;
15987
            case PICKUP_DETAILS:
15988
              if (field.type == TType.MAP) {
15989
                {
15990
                  TMap _map36 = iprot.readMapBegin();
15991
                  this.pickupDetails = new HashMap<String,Long>(2*_map36.size);
15992
                  for (int _i37 = 0; _i37 < _map36.size; ++_i37)
15993
                  {
15994
                    String _key38;
15995
                    long _val39;
15996
                    _key38 = iprot.readString();
15997
                    _val39 = iprot.readI64();
15998
                    this.pickupDetails.put(_key38, _val39);
15999
                  }
16000
                  iprot.readMapEnd();
16001
                }
16002
              } else { 
16003
                TProtocolUtil.skip(iprot, field.type);
16004
              }
16005
              break;
16006
          }
16007
          iprot.readFieldEnd();
16008
        }
16009
      }
16010
      iprot.readStructEnd();
16011
      validate();
16012
    }
16013
 
16014
    public void write(TProtocol oprot) throws TException {
16015
      validate();
16016
 
16017
      oprot.writeStructBegin(STRUCT_DESC);
16018
      oprot.writeFieldBegin(PROVIDER_ID_FIELD_DESC);
16019
      oprot.writeI64(this.providerId);
16020
      oprot.writeFieldEnd();
16021
      if (this.pickupDetails != null) {
16022
        oprot.writeFieldBegin(PICKUP_DETAILS_FIELD_DESC);
16023
        {
16024
          oprot.writeMapBegin(new TMap(TType.STRING, TType.I64, this.pickupDetails.size()));
16025
          for (Map.Entry<String, Long> _iter40 : this.pickupDetails.entrySet())
16026
          {
16027
            oprot.writeString(_iter40.getKey());
16028
            oprot.writeI64(_iter40.getValue());
16029
          }
16030
          oprot.writeMapEnd();
16031
        }
16032
        oprot.writeFieldEnd();
16033
      }
16034
      oprot.writeFieldStop();
16035
      oprot.writeStructEnd();
16036
    }
16037
 
16038
    @Override
16039
    public String toString() {
16040
      StringBuilder sb = new StringBuilder("markOrdersAsPickedUp_args(");
16041
      boolean first = true;
16042
 
16043
      sb.append("providerId:");
16044
      sb.append(this.providerId);
16045
      first = false;
16046
      if (!first) sb.append(", ");
16047
      sb.append("pickupDetails:");
16048
      if (this.pickupDetails == null) {
16049
        sb.append("null");
16050
      } else {
16051
        sb.append(this.pickupDetails);
16052
      }
16053
      first = false;
16054
      sb.append(")");
16055
      return sb.toString();
16056
    }
16057
 
16058
    public void validate() throws TException {
16059
      // check for required fields
16060
    }
16061
 
16062
  }
16063
 
16064
  public static class markOrdersAsPickedUp_result implements TBase<markOrdersAsPickedUp_result._Fields>, java.io.Serializable, Cloneable, Comparable<markOrdersAsPickedUp_result>   {
16065
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsPickedUp_result");
16066
 
16067
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
16068
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
16069
 
16070
    private List<Order> success;
16071
    private TransactionServiceException ex;
16072
 
16073
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16074
    public enum _Fields implements TFieldIdEnum {
16075
      SUCCESS((short)0, "success"),
16076
      EX((short)1, "ex");
16077
 
16078
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
16079
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16080
 
16081
      static {
16082
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16083
          byId.put((int)field._thriftId, field);
16084
          byName.put(field.getFieldName(), field);
16085
        }
16086
      }
16087
 
16088
      /**
16089
       * Find the _Fields constant that matches fieldId, or null if its not found.
16090
       */
16091
      public static _Fields findByThriftId(int fieldId) {
16092
        return byId.get(fieldId);
16093
      }
16094
 
16095
      /**
16096
       * Find the _Fields constant that matches fieldId, throwing an exception
16097
       * if it is not found.
16098
       */
16099
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16100
        _Fields fields = findByThriftId(fieldId);
16101
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16102
        return fields;
16103
      }
16104
 
16105
      /**
16106
       * Find the _Fields constant that matches name, or null if its not found.
16107
       */
16108
      public static _Fields findByName(String name) {
16109
        return byName.get(name);
16110
      }
16111
 
16112
      private final short _thriftId;
16113
      private final String _fieldName;
16114
 
16115
      _Fields(short thriftId, String fieldName) {
16116
        _thriftId = thriftId;
16117
        _fieldName = fieldName;
16118
      }
16119
 
16120
      public short getThriftFieldId() {
16121
        return _thriftId;
16122
      }
16123
 
16124
      public String getFieldName() {
16125
        return _fieldName;
16126
      }
16127
    }
16128
 
16129
    // isset id assignments
16130
 
16131
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
16132
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
16133
          new ListMetaData(TType.LIST, 
16134
              new StructMetaData(TType.STRUCT, Order.class))));
16135
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
16136
          new FieldValueMetaData(TType.STRUCT)));
16137
    }});
16138
 
16139
    static {
16140
      FieldMetaData.addStructMetaDataMap(markOrdersAsPickedUp_result.class, metaDataMap);
16141
    }
16142
 
16143
    public markOrdersAsPickedUp_result() {
16144
    }
16145
 
16146
    public markOrdersAsPickedUp_result(
16147
      List<Order> success,
16148
      TransactionServiceException ex)
16149
    {
16150
      this();
16151
      this.success = success;
16152
      this.ex = ex;
16153
    }
16154
 
16155
    /**
16156
     * Performs a deep copy on <i>other</i>.
16157
     */
16158
    public markOrdersAsPickedUp_result(markOrdersAsPickedUp_result other) {
16159
      if (other.isSetSuccess()) {
16160
        List<Order> __this__success = new ArrayList<Order>();
16161
        for (Order other_element : other.success) {
16162
          __this__success.add(new Order(other_element));
16163
        }
16164
        this.success = __this__success;
16165
      }
16166
      if (other.isSetEx()) {
16167
        this.ex = new TransactionServiceException(other.ex);
16168
      }
16169
    }
16170
 
16171
    public markOrdersAsPickedUp_result deepCopy() {
16172
      return new markOrdersAsPickedUp_result(this);
16173
    }
16174
 
16175
    @Deprecated
16176
    public markOrdersAsPickedUp_result clone() {
16177
      return new markOrdersAsPickedUp_result(this);
16178
    }
16179
 
16180
    public int getSuccessSize() {
16181
      return (this.success == null) ? 0 : this.success.size();
16182
    }
16183
 
16184
    public java.util.Iterator<Order> getSuccessIterator() {
16185
      return (this.success == null) ? null : this.success.iterator();
16186
    }
16187
 
16188
    public void addToSuccess(Order elem) {
16189
      if (this.success == null) {
16190
        this.success = new ArrayList<Order>();
16191
      }
16192
      this.success.add(elem);
16193
    }
16194
 
16195
    public List<Order> getSuccess() {
16196
      return this.success;
16197
    }
16198
 
16199
    public markOrdersAsPickedUp_result setSuccess(List<Order> success) {
16200
      this.success = success;
16201
      return this;
16202
    }
16203
 
16204
    public void unsetSuccess() {
16205
      this.success = null;
16206
    }
16207
 
16208
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
16209
    public boolean isSetSuccess() {
16210
      return this.success != null;
16211
    }
16212
 
16213
    public void setSuccessIsSet(boolean value) {
16214
      if (!value) {
16215
        this.success = null;
16216
      }
16217
    }
16218
 
16219
    public TransactionServiceException getEx() {
16220
      return this.ex;
16221
    }
16222
 
16223
    public markOrdersAsPickedUp_result setEx(TransactionServiceException ex) {
16224
      this.ex = ex;
16225
      return this;
16226
    }
16227
 
16228
    public void unsetEx() {
16229
      this.ex = null;
16230
    }
16231
 
16232
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
16233
    public boolean isSetEx() {
16234
      return this.ex != null;
16235
    }
16236
 
16237
    public void setExIsSet(boolean value) {
16238
      if (!value) {
16239
        this.ex = null;
16240
      }
16241
    }
16242
 
16243
    public void setFieldValue(_Fields field, Object value) {
16244
      switch (field) {
16245
      case SUCCESS:
16246
        if (value == null) {
16247
          unsetSuccess();
16248
        } else {
16249
          setSuccess((List<Order>)value);
16250
        }
16251
        break;
16252
 
16253
      case EX:
16254
        if (value == null) {
16255
          unsetEx();
16256
        } else {
16257
          setEx((TransactionServiceException)value);
16258
        }
16259
        break;
16260
 
16261
      }
16262
    }
16263
 
16264
    public void setFieldValue(int fieldID, Object value) {
16265
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
16266
    }
16267
 
16268
    public Object getFieldValue(_Fields field) {
16269
      switch (field) {
16270
      case SUCCESS:
16271
        return getSuccess();
16272
 
16273
      case EX:
16274
        return getEx();
16275
 
16276
      }
16277
      throw new IllegalStateException();
16278
    }
16279
 
16280
    public Object getFieldValue(int fieldId) {
16281
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
16282
    }
16283
 
16284
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
16285
    public boolean isSet(_Fields field) {
16286
      switch (field) {
16287
      case SUCCESS:
16288
        return isSetSuccess();
16289
      case EX:
16290
        return isSetEx();
16291
      }
16292
      throw new IllegalStateException();
16293
    }
16294
 
16295
    public boolean isSet(int fieldID) {
16296
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
16297
    }
16298
 
16299
    @Override
16300
    public boolean equals(Object that) {
16301
      if (that == null)
16302
        return false;
16303
      if (that instanceof markOrdersAsPickedUp_result)
16304
        return this.equals((markOrdersAsPickedUp_result)that);
16305
      return false;
16306
    }
16307
 
16308
    public boolean equals(markOrdersAsPickedUp_result that) {
16309
      if (that == null)
16310
        return false;
16311
 
16312
      boolean this_present_success = true && this.isSetSuccess();
16313
      boolean that_present_success = true && that.isSetSuccess();
16314
      if (this_present_success || that_present_success) {
16315
        if (!(this_present_success && that_present_success))
16316
          return false;
16317
        if (!this.success.equals(that.success))
16318
          return false;
16319
      }
16320
 
16321
      boolean this_present_ex = true && this.isSetEx();
16322
      boolean that_present_ex = true && that.isSetEx();
16323
      if (this_present_ex || that_present_ex) {
16324
        if (!(this_present_ex && that_present_ex))
16325
          return false;
16326
        if (!this.ex.equals(that.ex))
16327
          return false;
16328
      }
16329
 
16330
      return true;
16331
    }
16332
 
16333
    @Override
16334
    public int hashCode() {
16335
      return 0;
16336
    }
16337
 
16338
    public int compareTo(markOrdersAsPickedUp_result other) {
16339
      if (!getClass().equals(other.getClass())) {
16340
        return getClass().getName().compareTo(other.getClass().getName());
16341
      }
16342
 
16343
      int lastComparison = 0;
16344
      markOrdersAsPickedUp_result typedOther = (markOrdersAsPickedUp_result)other;
16345
 
16346
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
16347
      if (lastComparison != 0) {
16348
        return lastComparison;
16349
      }
16350
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
16351
      if (lastComparison != 0) {
16352
        return lastComparison;
16353
      }
16354
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
16355
      if (lastComparison != 0) {
16356
        return lastComparison;
16357
      }
16358
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
16359
      if (lastComparison != 0) {
16360
        return lastComparison;
16361
      }
16362
      return 0;
16363
    }
16364
 
16365
    public void read(TProtocol iprot) throws TException {
16366
      TField field;
16367
      iprot.readStructBegin();
16368
      while (true)
16369
      {
16370
        field = iprot.readFieldBegin();
16371
        if (field.type == TType.STOP) { 
16372
          break;
16373
        }
16374
        _Fields fieldId = _Fields.findByThriftId(field.id);
16375
        if (fieldId == null) {
16376
          TProtocolUtil.skip(iprot, field.type);
16377
        } else {
16378
          switch (fieldId) {
16379
            case SUCCESS:
16380
              if (field.type == TType.LIST) {
16381
                {
16382
                  TList _list41 = iprot.readListBegin();
16383
                  this.success = new ArrayList<Order>(_list41.size);
16384
                  for (int _i42 = 0; _i42 < _list41.size; ++_i42)
16385
                  {
16386
                    Order _elem43;
16387
                    _elem43 = new Order();
16388
                    _elem43.read(iprot);
16389
                    this.success.add(_elem43);
16390
                  }
16391
                  iprot.readListEnd();
16392
                }
16393
              } else { 
16394
                TProtocolUtil.skip(iprot, field.type);
16395
              }
16396
              break;
16397
            case EX:
16398
              if (field.type == TType.STRUCT) {
16399
                this.ex = new TransactionServiceException();
16400
                this.ex.read(iprot);
16401
              } else { 
16402
                TProtocolUtil.skip(iprot, field.type);
16403
              }
16404
              break;
16405
          }
16406
          iprot.readFieldEnd();
16407
        }
16408
      }
16409
      iprot.readStructEnd();
16410
      validate();
16411
    }
16412
 
16413
    public void write(TProtocol oprot) throws TException {
16414
      oprot.writeStructBegin(STRUCT_DESC);
16415
 
16416
      if (this.isSetSuccess()) {
16417
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
16418
        {
16419
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
16420
          for (Order _iter44 : this.success)
16421
          {
16422
            _iter44.write(oprot);
16423
          }
16424
          oprot.writeListEnd();
16425
        }
16426
        oprot.writeFieldEnd();
16427
      } else if (this.isSetEx()) {
16428
        oprot.writeFieldBegin(EX_FIELD_DESC);
16429
        this.ex.write(oprot);
16430
        oprot.writeFieldEnd();
16431
      }
16432
      oprot.writeFieldStop();
16433
      oprot.writeStructEnd();
16434
    }
16435
 
16436
    @Override
16437
    public String toString() {
16438
      StringBuilder sb = new StringBuilder("markOrdersAsPickedUp_result(");
16439
      boolean first = true;
16440
 
16441
      sb.append("success:");
16442
      if (this.success == null) {
16443
        sb.append("null");
16444
      } else {
16445
        sb.append(this.success);
16446
      }
16447
      first = false;
16448
      if (!first) sb.append(", ");
16449
      sb.append("ex:");
16450
      if (this.ex == null) {
16451
        sb.append("null");
16452
      } else {
16453
        sb.append(this.ex);
16454
      }
16455
      first = false;
16456
      sb.append(")");
16457
      return sb.toString();
16458
    }
16459
 
16460
    public void validate() throws TException {
16461
      // check for required fields
16462
    }
16463
 
16464
  }
16465
 
1133 chandransh 16466
  public static class markOrdersAsDelivered_args implements TBase<markOrdersAsDelivered_args._Fields>, java.io.Serializable, Cloneable   {
16467
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsDelivered_args");
16468
 
16469
    private static final TField PROVIDER_ID_FIELD_DESC = new TField("providerId", TType.I64, (short)1);
16470
    private static final TField DELIVERED_ORDERS_FIELD_DESC = new TField("deliveredOrders", TType.MAP, (short)2);
16471
 
16472
    private long providerId;
16473
    private Map<String,String> deliveredOrders;
16474
 
16475
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16476
    public enum _Fields implements TFieldIdEnum {
16477
      PROVIDER_ID((short)1, "providerId"),
16478
      DELIVERED_ORDERS((short)2, "deliveredOrders");
16479
 
16480
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
16481
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16482
 
16483
      static {
16484
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16485
          byId.put((int)field._thriftId, field);
16486
          byName.put(field.getFieldName(), field);
16487
        }
16488
      }
16489
 
16490
      /**
16491
       * Find the _Fields constant that matches fieldId, or null if its not found.
16492
       */
16493
      public static _Fields findByThriftId(int fieldId) {
16494
        return byId.get(fieldId);
16495
      }
16496
 
16497
      /**
16498
       * Find the _Fields constant that matches fieldId, throwing an exception
16499
       * if it is not found.
16500
       */
16501
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16502
        _Fields fields = findByThriftId(fieldId);
16503
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16504
        return fields;
16505
      }
16506
 
16507
      /**
16508
       * Find the _Fields constant that matches name, or null if its not found.
16509
       */
16510
      public static _Fields findByName(String name) {
16511
        return byName.get(name);
16512
      }
16513
 
16514
      private final short _thriftId;
16515
      private final String _fieldName;
16516
 
16517
      _Fields(short thriftId, String fieldName) {
16518
        _thriftId = thriftId;
16519
        _fieldName = fieldName;
16520
      }
16521
 
16522
      public short getThriftFieldId() {
16523
        return _thriftId;
16524
      }
16525
 
16526
      public String getFieldName() {
16527
        return _fieldName;
16528
      }
16529
    }
16530
 
16531
    // isset id assignments
16532
    private static final int __PROVIDERID_ISSET_ID = 0;
16533
    private BitSet __isset_bit_vector = new BitSet(1);
16534
 
16535
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
16536
      put(_Fields.PROVIDER_ID, new FieldMetaData("providerId", TFieldRequirementType.DEFAULT, 
16537
          new FieldValueMetaData(TType.I64)));
16538
      put(_Fields.DELIVERED_ORDERS, new FieldMetaData("deliveredOrders", TFieldRequirementType.DEFAULT, 
16539
          new MapMetaData(TType.MAP, 
16540
              new FieldValueMetaData(TType.STRING), 
16541
              new FieldValueMetaData(TType.STRING))));
16542
    }});
16543
 
16544
    static {
16545
      FieldMetaData.addStructMetaDataMap(markOrdersAsDelivered_args.class, metaDataMap);
16546
    }
16547
 
16548
    public markOrdersAsDelivered_args() {
16549
    }
16550
 
16551
    public markOrdersAsDelivered_args(
16552
      long providerId,
16553
      Map<String,String> deliveredOrders)
16554
    {
16555
      this();
16556
      this.providerId = providerId;
16557
      setProviderIdIsSet(true);
16558
      this.deliveredOrders = deliveredOrders;
16559
    }
16560
 
16561
    /**
16562
     * Performs a deep copy on <i>other</i>.
16563
     */
16564
    public markOrdersAsDelivered_args(markOrdersAsDelivered_args other) {
16565
      __isset_bit_vector.clear();
16566
      __isset_bit_vector.or(other.__isset_bit_vector);
16567
      this.providerId = other.providerId;
16568
      if (other.isSetDeliveredOrders()) {
16569
        Map<String,String> __this__deliveredOrders = new HashMap<String,String>();
16570
        for (Map.Entry<String, String> other_element : other.deliveredOrders.entrySet()) {
16571
 
16572
          String other_element_key = other_element.getKey();
16573
          String other_element_value = other_element.getValue();
16574
 
16575
          String __this__deliveredOrders_copy_key = other_element_key;
16576
 
16577
          String __this__deliveredOrders_copy_value = other_element_value;
16578
 
16579
          __this__deliveredOrders.put(__this__deliveredOrders_copy_key, __this__deliveredOrders_copy_value);
16580
        }
16581
        this.deliveredOrders = __this__deliveredOrders;
16582
      }
16583
    }
16584
 
16585
    public markOrdersAsDelivered_args deepCopy() {
16586
      return new markOrdersAsDelivered_args(this);
16587
    }
16588
 
16589
    @Deprecated
16590
    public markOrdersAsDelivered_args clone() {
16591
      return new markOrdersAsDelivered_args(this);
16592
    }
16593
 
16594
    public long getProviderId() {
16595
      return this.providerId;
16596
    }
16597
 
16598
    public markOrdersAsDelivered_args setProviderId(long providerId) {
16599
      this.providerId = providerId;
16600
      setProviderIdIsSet(true);
16601
      return this;
16602
    }
16603
 
16604
    public void unsetProviderId() {
16605
      __isset_bit_vector.clear(__PROVIDERID_ISSET_ID);
16606
    }
16607
 
16608
    /** Returns true if field providerId is set (has been asigned a value) and false otherwise */
16609
    public boolean isSetProviderId() {
16610
      return __isset_bit_vector.get(__PROVIDERID_ISSET_ID);
16611
    }
16612
 
16613
    public void setProviderIdIsSet(boolean value) {
16614
      __isset_bit_vector.set(__PROVIDERID_ISSET_ID, value);
16615
    }
16616
 
16617
    public int getDeliveredOrdersSize() {
16618
      return (this.deliveredOrders == null) ? 0 : this.deliveredOrders.size();
16619
    }
16620
 
16621
    public void putToDeliveredOrders(String key, String val) {
16622
      if (this.deliveredOrders == null) {
16623
        this.deliveredOrders = new HashMap<String,String>();
16624
      }
16625
      this.deliveredOrders.put(key, val);
16626
    }
16627
 
16628
    public Map<String,String> getDeliveredOrders() {
16629
      return this.deliveredOrders;
16630
    }
16631
 
16632
    public markOrdersAsDelivered_args setDeliveredOrders(Map<String,String> deliveredOrders) {
16633
      this.deliveredOrders = deliveredOrders;
16634
      return this;
16635
    }
16636
 
16637
    public void unsetDeliveredOrders() {
16638
      this.deliveredOrders = null;
16639
    }
16640
 
16641
    /** Returns true if field deliveredOrders is set (has been asigned a value) and false otherwise */
16642
    public boolean isSetDeliveredOrders() {
16643
      return this.deliveredOrders != null;
16644
    }
16645
 
16646
    public void setDeliveredOrdersIsSet(boolean value) {
16647
      if (!value) {
16648
        this.deliveredOrders = null;
16649
      }
16650
    }
16651
 
16652
    public void setFieldValue(_Fields field, Object value) {
16653
      switch (field) {
16654
      case PROVIDER_ID:
16655
        if (value == null) {
16656
          unsetProviderId();
16657
        } else {
16658
          setProviderId((Long)value);
16659
        }
16660
        break;
16661
 
16662
      case DELIVERED_ORDERS:
16663
        if (value == null) {
16664
          unsetDeliveredOrders();
16665
        } else {
16666
          setDeliveredOrders((Map<String,String>)value);
16667
        }
16668
        break;
16669
 
16670
      }
16671
    }
16672
 
16673
    public void setFieldValue(int fieldID, Object value) {
16674
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
16675
    }
16676
 
16677
    public Object getFieldValue(_Fields field) {
16678
      switch (field) {
16679
      case PROVIDER_ID:
16680
        return new Long(getProviderId());
16681
 
16682
      case DELIVERED_ORDERS:
16683
        return getDeliveredOrders();
16684
 
16685
      }
16686
      throw new IllegalStateException();
16687
    }
16688
 
16689
    public Object getFieldValue(int fieldId) {
16690
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
16691
    }
16692
 
16693
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
16694
    public boolean isSet(_Fields field) {
16695
      switch (field) {
16696
      case PROVIDER_ID:
16697
        return isSetProviderId();
16698
      case DELIVERED_ORDERS:
16699
        return isSetDeliveredOrders();
16700
      }
16701
      throw new IllegalStateException();
16702
    }
16703
 
16704
    public boolean isSet(int fieldID) {
16705
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
16706
    }
16707
 
16708
    @Override
16709
    public boolean equals(Object that) {
16710
      if (that == null)
16711
        return false;
16712
      if (that instanceof markOrdersAsDelivered_args)
16713
        return this.equals((markOrdersAsDelivered_args)that);
16714
      return false;
16715
    }
16716
 
16717
    public boolean equals(markOrdersAsDelivered_args that) {
16718
      if (that == null)
16719
        return false;
16720
 
16721
      boolean this_present_providerId = true;
16722
      boolean that_present_providerId = true;
16723
      if (this_present_providerId || that_present_providerId) {
16724
        if (!(this_present_providerId && that_present_providerId))
16725
          return false;
16726
        if (this.providerId != that.providerId)
16727
          return false;
16728
      }
16729
 
16730
      boolean this_present_deliveredOrders = true && this.isSetDeliveredOrders();
16731
      boolean that_present_deliveredOrders = true && that.isSetDeliveredOrders();
16732
      if (this_present_deliveredOrders || that_present_deliveredOrders) {
16733
        if (!(this_present_deliveredOrders && that_present_deliveredOrders))
16734
          return false;
16735
        if (!this.deliveredOrders.equals(that.deliveredOrders))
16736
          return false;
16737
      }
16738
 
16739
      return true;
16740
    }
16741
 
16742
    @Override
16743
    public int hashCode() {
16744
      return 0;
16745
    }
16746
 
16747
    public void read(TProtocol iprot) throws TException {
16748
      TField field;
16749
      iprot.readStructBegin();
16750
      while (true)
16751
      {
16752
        field = iprot.readFieldBegin();
16753
        if (field.type == TType.STOP) { 
16754
          break;
16755
        }
16756
        _Fields fieldId = _Fields.findByThriftId(field.id);
16757
        if (fieldId == null) {
16758
          TProtocolUtil.skip(iprot, field.type);
16759
        } else {
16760
          switch (fieldId) {
16761
            case PROVIDER_ID:
16762
              if (field.type == TType.I64) {
16763
                this.providerId = iprot.readI64();
16764
                setProviderIdIsSet(true);
16765
              } else { 
16766
                TProtocolUtil.skip(iprot, field.type);
16767
              }
16768
              break;
16769
            case DELIVERED_ORDERS:
16770
              if (field.type == TType.MAP) {
16771
                {
16772
                  TMap _map45 = iprot.readMapBegin();
16773
                  this.deliveredOrders = new HashMap<String,String>(2*_map45.size);
16774
                  for (int _i46 = 0; _i46 < _map45.size; ++_i46)
16775
                  {
16776
                    String _key47;
16777
                    String _val48;
16778
                    _key47 = iprot.readString();
16779
                    _val48 = iprot.readString();
16780
                    this.deliveredOrders.put(_key47, _val48);
16781
                  }
16782
                  iprot.readMapEnd();
16783
                }
16784
              } else { 
16785
                TProtocolUtil.skip(iprot, field.type);
16786
              }
16787
              break;
16788
          }
16789
          iprot.readFieldEnd();
16790
        }
16791
      }
16792
      iprot.readStructEnd();
16793
      validate();
16794
    }
16795
 
16796
    public void write(TProtocol oprot) throws TException {
16797
      validate();
16798
 
16799
      oprot.writeStructBegin(STRUCT_DESC);
16800
      oprot.writeFieldBegin(PROVIDER_ID_FIELD_DESC);
16801
      oprot.writeI64(this.providerId);
16802
      oprot.writeFieldEnd();
16803
      if (this.deliveredOrders != null) {
16804
        oprot.writeFieldBegin(DELIVERED_ORDERS_FIELD_DESC);
16805
        {
16806
          oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.deliveredOrders.size()));
16807
          for (Map.Entry<String, String> _iter49 : this.deliveredOrders.entrySet())
16808
          {
16809
            oprot.writeString(_iter49.getKey());
16810
            oprot.writeString(_iter49.getValue());
16811
          }
16812
          oprot.writeMapEnd();
16813
        }
16814
        oprot.writeFieldEnd();
16815
      }
16816
      oprot.writeFieldStop();
16817
      oprot.writeStructEnd();
16818
    }
16819
 
16820
    @Override
16821
    public String toString() {
16822
      StringBuilder sb = new StringBuilder("markOrdersAsDelivered_args(");
16823
      boolean first = true;
16824
 
16825
      sb.append("providerId:");
16826
      sb.append(this.providerId);
16827
      first = false;
16828
      if (!first) sb.append(", ");
16829
      sb.append("deliveredOrders:");
16830
      if (this.deliveredOrders == null) {
16831
        sb.append("null");
16832
      } else {
16833
        sb.append(this.deliveredOrders);
16834
      }
16835
      first = false;
16836
      sb.append(")");
16837
      return sb.toString();
16838
    }
16839
 
16840
    public void validate() throws TException {
16841
      // check for required fields
16842
    }
16843
 
16844
  }
16845
 
16846
  public static class markOrdersAsDelivered_result implements TBase<markOrdersAsDelivered_result._Fields>, java.io.Serializable, Cloneable, Comparable<markOrdersAsDelivered_result>   {
16847
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsDelivered_result");
16848
 
16849
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
16850
 
16851
    private TransactionServiceException ex;
16852
 
16853
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16854
    public enum _Fields implements TFieldIdEnum {
16855
      EX((short)1, "ex");
16856
 
16857
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
16858
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16859
 
16860
      static {
16861
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16862
          byId.put((int)field._thriftId, field);
16863
          byName.put(field.getFieldName(), field);
16864
        }
16865
      }
16866
 
16867
      /**
16868
       * Find the _Fields constant that matches fieldId, or null if its not found.
16869
       */
16870
      public static _Fields findByThriftId(int fieldId) {
16871
        return byId.get(fieldId);
16872
      }
16873
 
16874
      /**
16875
       * Find the _Fields constant that matches fieldId, throwing an exception
16876
       * if it is not found.
16877
       */
16878
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16879
        _Fields fields = findByThriftId(fieldId);
16880
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16881
        return fields;
16882
      }
16883
 
16884
      /**
16885
       * Find the _Fields constant that matches name, or null if its not found.
16886
       */
16887
      public static _Fields findByName(String name) {
16888
        return byName.get(name);
16889
      }
16890
 
16891
      private final short _thriftId;
16892
      private final String _fieldName;
16893
 
16894
      _Fields(short thriftId, String fieldName) {
16895
        _thriftId = thriftId;
16896
        _fieldName = fieldName;
16897
      }
16898
 
16899
      public short getThriftFieldId() {
16900
        return _thriftId;
16901
      }
16902
 
16903
      public String getFieldName() {
16904
        return _fieldName;
16905
      }
16906
    }
16907
 
16908
    // isset id assignments
16909
 
16910
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
16911
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
16912
          new FieldValueMetaData(TType.STRUCT)));
16913
    }});
16914
 
16915
    static {
16916
      FieldMetaData.addStructMetaDataMap(markOrdersAsDelivered_result.class, metaDataMap);
16917
    }
16918
 
16919
    public markOrdersAsDelivered_result() {
16920
    }
16921
 
16922
    public markOrdersAsDelivered_result(
16923
      TransactionServiceException ex)
16924
    {
16925
      this();
16926
      this.ex = ex;
16927
    }
16928
 
16929
    /**
16930
     * Performs a deep copy on <i>other</i>.
16931
     */
16932
    public markOrdersAsDelivered_result(markOrdersAsDelivered_result other) {
16933
      if (other.isSetEx()) {
16934
        this.ex = new TransactionServiceException(other.ex);
16935
      }
16936
    }
16937
 
16938
    public markOrdersAsDelivered_result deepCopy() {
16939
      return new markOrdersAsDelivered_result(this);
16940
    }
16941
 
16942
    @Deprecated
16943
    public markOrdersAsDelivered_result clone() {
16944
      return new markOrdersAsDelivered_result(this);
16945
    }
16946
 
16947
    public TransactionServiceException getEx() {
16948
      return this.ex;
16949
    }
16950
 
16951
    public markOrdersAsDelivered_result setEx(TransactionServiceException ex) {
16952
      this.ex = ex;
16953
      return this;
16954
    }
16955
 
16956
    public void unsetEx() {
16957
      this.ex = null;
16958
    }
16959
 
16960
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
16961
    public boolean isSetEx() {
16962
      return this.ex != null;
16963
    }
16964
 
16965
    public void setExIsSet(boolean value) {
16966
      if (!value) {
16967
        this.ex = null;
16968
      }
16969
    }
16970
 
16971
    public void setFieldValue(_Fields field, Object value) {
16972
      switch (field) {
16973
      case EX:
16974
        if (value == null) {
16975
          unsetEx();
16976
        } else {
16977
          setEx((TransactionServiceException)value);
16978
        }
16979
        break;
16980
 
16981
      }
16982
    }
16983
 
16984
    public void setFieldValue(int fieldID, Object value) {
16985
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
16986
    }
16987
 
16988
    public Object getFieldValue(_Fields field) {
16989
      switch (field) {
16990
      case EX:
16991
        return getEx();
16992
 
16993
      }
16994
      throw new IllegalStateException();
16995
    }
16996
 
16997
    public Object getFieldValue(int fieldId) {
16998
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
16999
    }
17000
 
17001
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
17002
    public boolean isSet(_Fields field) {
17003
      switch (field) {
17004
      case EX:
17005
        return isSetEx();
17006
      }
17007
      throw new IllegalStateException();
17008
    }
17009
 
17010
    public boolean isSet(int fieldID) {
17011
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
17012
    }
17013
 
17014
    @Override
17015
    public boolean equals(Object that) {
17016
      if (that == null)
17017
        return false;
17018
      if (that instanceof markOrdersAsDelivered_result)
17019
        return this.equals((markOrdersAsDelivered_result)that);
17020
      return false;
17021
    }
17022
 
17023
    public boolean equals(markOrdersAsDelivered_result that) {
17024
      if (that == null)
17025
        return false;
17026
 
17027
      boolean this_present_ex = true && this.isSetEx();
17028
      boolean that_present_ex = true && that.isSetEx();
17029
      if (this_present_ex || that_present_ex) {
17030
        if (!(this_present_ex && that_present_ex))
17031
          return false;
17032
        if (!this.ex.equals(that.ex))
17033
          return false;
17034
      }
17035
 
17036
      return true;
17037
    }
17038
 
17039
    @Override
17040
    public int hashCode() {
17041
      return 0;
17042
    }
17043
 
17044
    public int compareTo(markOrdersAsDelivered_result other) {
17045
      if (!getClass().equals(other.getClass())) {
17046
        return getClass().getName().compareTo(other.getClass().getName());
17047
      }
17048
 
17049
      int lastComparison = 0;
17050
      markOrdersAsDelivered_result typedOther = (markOrdersAsDelivered_result)other;
17051
 
17052
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
17053
      if (lastComparison != 0) {
17054
        return lastComparison;
17055
      }
17056
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
17057
      if (lastComparison != 0) {
17058
        return lastComparison;
17059
      }
17060
      return 0;
17061
    }
17062
 
17063
    public void read(TProtocol iprot) throws TException {
17064
      TField field;
17065
      iprot.readStructBegin();
17066
      while (true)
17067
      {
17068
        field = iprot.readFieldBegin();
17069
        if (field.type == TType.STOP) { 
17070
          break;
17071
        }
17072
        _Fields fieldId = _Fields.findByThriftId(field.id);
17073
        if (fieldId == null) {
17074
          TProtocolUtil.skip(iprot, field.type);
17075
        } else {
17076
          switch (fieldId) {
17077
            case EX:
17078
              if (field.type == TType.STRUCT) {
17079
                this.ex = new TransactionServiceException();
17080
                this.ex.read(iprot);
17081
              } else { 
17082
                TProtocolUtil.skip(iprot, field.type);
17083
              }
17084
              break;
17085
          }
17086
          iprot.readFieldEnd();
17087
        }
17088
      }
17089
      iprot.readStructEnd();
17090
      validate();
17091
    }
17092
 
17093
    public void write(TProtocol oprot) throws TException {
17094
      oprot.writeStructBegin(STRUCT_DESC);
17095
 
17096
      if (this.isSetEx()) {
17097
        oprot.writeFieldBegin(EX_FIELD_DESC);
17098
        this.ex.write(oprot);
17099
        oprot.writeFieldEnd();
17100
      }
17101
      oprot.writeFieldStop();
17102
      oprot.writeStructEnd();
17103
    }
17104
 
17105
    @Override
17106
    public String toString() {
17107
      StringBuilder sb = new StringBuilder("markOrdersAsDelivered_result(");
17108
      boolean first = true;
17109
 
17110
      sb.append("ex:");
17111
      if (this.ex == null) {
17112
        sb.append("null");
17113
      } else {
17114
        sb.append(this.ex);
17115
      }
17116
      first = false;
17117
      sb.append(")");
17118
      return sb.toString();
17119
    }
17120
 
17121
    public void validate() throws TException {
17122
      // check for required fields
17123
    }
17124
 
17125
  }
17126
 
17127
  public static class markOrdersAsFailed_args implements TBase<markOrdersAsFailed_args._Fields>, java.io.Serializable, Cloneable   {
17128
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsFailed_args");
17129
 
17130
    private static final TField PROVIDER_ID_FIELD_DESC = new TField("providerId", TType.I64, (short)1);
17131
    private static final TField RETURNED_ORDERS_FIELD_DESC = new TField("returnedOrders", TType.MAP, (short)2);
17132
 
17133
    private long providerId;
17134
    private Map<String,String> returnedOrders;
17135
 
17136
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17137
    public enum _Fields implements TFieldIdEnum {
17138
      PROVIDER_ID((short)1, "providerId"),
17139
      RETURNED_ORDERS((short)2, "returnedOrders");
17140
 
17141
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
17142
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17143
 
17144
      static {
17145
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17146
          byId.put((int)field._thriftId, field);
17147
          byName.put(field.getFieldName(), field);
17148
        }
17149
      }
17150
 
17151
      /**
17152
       * Find the _Fields constant that matches fieldId, or null if its not found.
17153
       */
17154
      public static _Fields findByThriftId(int fieldId) {
17155
        return byId.get(fieldId);
17156
      }
17157
 
17158
      /**
17159
       * Find the _Fields constant that matches fieldId, throwing an exception
17160
       * if it is not found.
17161
       */
17162
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17163
        _Fields fields = findByThriftId(fieldId);
17164
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17165
        return fields;
17166
      }
17167
 
17168
      /**
17169
       * Find the _Fields constant that matches name, or null if its not found.
17170
       */
17171
      public static _Fields findByName(String name) {
17172
        return byName.get(name);
17173
      }
17174
 
17175
      private final short _thriftId;
17176
      private final String _fieldName;
17177
 
17178
      _Fields(short thriftId, String fieldName) {
17179
        _thriftId = thriftId;
17180
        _fieldName = fieldName;
17181
      }
17182
 
17183
      public short getThriftFieldId() {
17184
        return _thriftId;
17185
      }
17186
 
17187
      public String getFieldName() {
17188
        return _fieldName;
17189
      }
17190
    }
17191
 
17192
    // isset id assignments
17193
    private static final int __PROVIDERID_ISSET_ID = 0;
17194
    private BitSet __isset_bit_vector = new BitSet(1);
17195
 
17196
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
17197
      put(_Fields.PROVIDER_ID, new FieldMetaData("providerId", TFieldRequirementType.DEFAULT, 
17198
          new FieldValueMetaData(TType.I64)));
17199
      put(_Fields.RETURNED_ORDERS, new FieldMetaData("returnedOrders", TFieldRequirementType.DEFAULT, 
17200
          new MapMetaData(TType.MAP, 
17201
              new FieldValueMetaData(TType.STRING), 
17202
              new FieldValueMetaData(TType.STRING))));
17203
    }});
17204
 
17205
    static {
17206
      FieldMetaData.addStructMetaDataMap(markOrdersAsFailed_args.class, metaDataMap);
17207
    }
17208
 
17209
    public markOrdersAsFailed_args() {
17210
    }
17211
 
17212
    public markOrdersAsFailed_args(
17213
      long providerId,
17214
      Map<String,String> returnedOrders)
17215
    {
17216
      this();
17217
      this.providerId = providerId;
17218
      setProviderIdIsSet(true);
17219
      this.returnedOrders = returnedOrders;
17220
    }
17221
 
17222
    /**
17223
     * Performs a deep copy on <i>other</i>.
17224
     */
17225
    public markOrdersAsFailed_args(markOrdersAsFailed_args other) {
17226
      __isset_bit_vector.clear();
17227
      __isset_bit_vector.or(other.__isset_bit_vector);
17228
      this.providerId = other.providerId;
17229
      if (other.isSetReturnedOrders()) {
17230
        Map<String,String> __this__returnedOrders = new HashMap<String,String>();
17231
        for (Map.Entry<String, String> other_element : other.returnedOrders.entrySet()) {
17232
 
17233
          String other_element_key = other_element.getKey();
17234
          String other_element_value = other_element.getValue();
17235
 
17236
          String __this__returnedOrders_copy_key = other_element_key;
17237
 
17238
          String __this__returnedOrders_copy_value = other_element_value;
17239
 
17240
          __this__returnedOrders.put(__this__returnedOrders_copy_key, __this__returnedOrders_copy_value);
17241
        }
17242
        this.returnedOrders = __this__returnedOrders;
17243
      }
17244
    }
17245
 
17246
    public markOrdersAsFailed_args deepCopy() {
17247
      return new markOrdersAsFailed_args(this);
17248
    }
17249
 
17250
    @Deprecated
17251
    public markOrdersAsFailed_args clone() {
17252
      return new markOrdersAsFailed_args(this);
17253
    }
17254
 
17255
    public long getProviderId() {
17256
      return this.providerId;
17257
    }
17258
 
17259
    public markOrdersAsFailed_args setProviderId(long providerId) {
17260
      this.providerId = providerId;
17261
      setProviderIdIsSet(true);
17262
      return this;
17263
    }
17264
 
17265
    public void unsetProviderId() {
17266
      __isset_bit_vector.clear(__PROVIDERID_ISSET_ID);
17267
    }
17268
 
17269
    /** Returns true if field providerId is set (has been asigned a value) and false otherwise */
17270
    public boolean isSetProviderId() {
17271
      return __isset_bit_vector.get(__PROVIDERID_ISSET_ID);
17272
    }
17273
 
17274
    public void setProviderIdIsSet(boolean value) {
17275
      __isset_bit_vector.set(__PROVIDERID_ISSET_ID, value);
17276
    }
17277
 
17278
    public int getReturnedOrdersSize() {
17279
      return (this.returnedOrders == null) ? 0 : this.returnedOrders.size();
17280
    }
17281
 
17282
    public void putToReturnedOrders(String key, String val) {
17283
      if (this.returnedOrders == null) {
17284
        this.returnedOrders = new HashMap<String,String>();
17285
      }
17286
      this.returnedOrders.put(key, val);
17287
    }
17288
 
17289
    public Map<String,String> getReturnedOrders() {
17290
      return this.returnedOrders;
17291
    }
17292
 
17293
    public markOrdersAsFailed_args setReturnedOrders(Map<String,String> returnedOrders) {
17294
      this.returnedOrders = returnedOrders;
17295
      return this;
17296
    }
17297
 
17298
    public void unsetReturnedOrders() {
17299
      this.returnedOrders = null;
17300
    }
17301
 
17302
    /** Returns true if field returnedOrders is set (has been asigned a value) and false otherwise */
17303
    public boolean isSetReturnedOrders() {
17304
      return this.returnedOrders != null;
17305
    }
17306
 
17307
    public void setReturnedOrdersIsSet(boolean value) {
17308
      if (!value) {
17309
        this.returnedOrders = null;
17310
      }
17311
    }
17312
 
17313
    public void setFieldValue(_Fields field, Object value) {
17314
      switch (field) {
17315
      case PROVIDER_ID:
17316
        if (value == null) {
17317
          unsetProviderId();
17318
        } else {
17319
          setProviderId((Long)value);
17320
        }
17321
        break;
17322
 
17323
      case RETURNED_ORDERS:
17324
        if (value == null) {
17325
          unsetReturnedOrders();
17326
        } else {
17327
          setReturnedOrders((Map<String,String>)value);
17328
        }
17329
        break;
17330
 
17331
      }
17332
    }
17333
 
17334
    public void setFieldValue(int fieldID, Object value) {
17335
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
17336
    }
17337
 
17338
    public Object getFieldValue(_Fields field) {
17339
      switch (field) {
17340
      case PROVIDER_ID:
17341
        return new Long(getProviderId());
17342
 
17343
      case RETURNED_ORDERS:
17344
        return getReturnedOrders();
17345
 
17346
      }
17347
      throw new IllegalStateException();
17348
    }
17349
 
17350
    public Object getFieldValue(int fieldId) {
17351
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
17352
    }
17353
 
17354
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
17355
    public boolean isSet(_Fields field) {
17356
      switch (field) {
17357
      case PROVIDER_ID:
17358
        return isSetProviderId();
17359
      case RETURNED_ORDERS:
17360
        return isSetReturnedOrders();
17361
      }
17362
      throw new IllegalStateException();
17363
    }
17364
 
17365
    public boolean isSet(int fieldID) {
17366
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
17367
    }
17368
 
17369
    @Override
17370
    public boolean equals(Object that) {
17371
      if (that == null)
17372
        return false;
17373
      if (that instanceof markOrdersAsFailed_args)
17374
        return this.equals((markOrdersAsFailed_args)that);
17375
      return false;
17376
    }
17377
 
17378
    public boolean equals(markOrdersAsFailed_args that) {
17379
      if (that == null)
17380
        return false;
17381
 
17382
      boolean this_present_providerId = true;
17383
      boolean that_present_providerId = true;
17384
      if (this_present_providerId || that_present_providerId) {
17385
        if (!(this_present_providerId && that_present_providerId))
17386
          return false;
17387
        if (this.providerId != that.providerId)
17388
          return false;
17389
      }
17390
 
17391
      boolean this_present_returnedOrders = true && this.isSetReturnedOrders();
17392
      boolean that_present_returnedOrders = true && that.isSetReturnedOrders();
17393
      if (this_present_returnedOrders || that_present_returnedOrders) {
17394
        if (!(this_present_returnedOrders && that_present_returnedOrders))
17395
          return false;
17396
        if (!this.returnedOrders.equals(that.returnedOrders))
17397
          return false;
17398
      }
17399
 
17400
      return true;
17401
    }
17402
 
17403
    @Override
17404
    public int hashCode() {
17405
      return 0;
17406
    }
17407
 
17408
    public void read(TProtocol iprot) throws TException {
17409
      TField field;
17410
      iprot.readStructBegin();
17411
      while (true)
17412
      {
17413
        field = iprot.readFieldBegin();
17414
        if (field.type == TType.STOP) { 
17415
          break;
17416
        }
17417
        _Fields fieldId = _Fields.findByThriftId(field.id);
17418
        if (fieldId == null) {
17419
          TProtocolUtil.skip(iprot, field.type);
17420
        } else {
17421
          switch (fieldId) {
17422
            case PROVIDER_ID:
17423
              if (field.type == TType.I64) {
17424
                this.providerId = iprot.readI64();
17425
                setProviderIdIsSet(true);
17426
              } else { 
17427
                TProtocolUtil.skip(iprot, field.type);
17428
              }
17429
              break;
17430
            case RETURNED_ORDERS:
17431
              if (field.type == TType.MAP) {
17432
                {
17433
                  TMap _map50 = iprot.readMapBegin();
17434
                  this.returnedOrders = new HashMap<String,String>(2*_map50.size);
17435
                  for (int _i51 = 0; _i51 < _map50.size; ++_i51)
17436
                  {
17437
                    String _key52;
17438
                    String _val53;
17439
                    _key52 = iprot.readString();
17440
                    _val53 = iprot.readString();
17441
                    this.returnedOrders.put(_key52, _val53);
17442
                  }
17443
                  iprot.readMapEnd();
17444
                }
17445
              } else { 
17446
                TProtocolUtil.skip(iprot, field.type);
17447
              }
17448
              break;
17449
          }
17450
          iprot.readFieldEnd();
17451
        }
17452
      }
17453
      iprot.readStructEnd();
17454
      validate();
17455
    }
17456
 
17457
    public void write(TProtocol oprot) throws TException {
17458
      validate();
17459
 
17460
      oprot.writeStructBegin(STRUCT_DESC);
17461
      oprot.writeFieldBegin(PROVIDER_ID_FIELD_DESC);
17462
      oprot.writeI64(this.providerId);
17463
      oprot.writeFieldEnd();
17464
      if (this.returnedOrders != null) {
17465
        oprot.writeFieldBegin(RETURNED_ORDERS_FIELD_DESC);
17466
        {
17467
          oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.returnedOrders.size()));
17468
          for (Map.Entry<String, String> _iter54 : this.returnedOrders.entrySet())
17469
          {
17470
            oprot.writeString(_iter54.getKey());
17471
            oprot.writeString(_iter54.getValue());
17472
          }
17473
          oprot.writeMapEnd();
17474
        }
17475
        oprot.writeFieldEnd();
17476
      }
17477
      oprot.writeFieldStop();
17478
      oprot.writeStructEnd();
17479
    }
17480
 
17481
    @Override
17482
    public String toString() {
17483
      StringBuilder sb = new StringBuilder("markOrdersAsFailed_args(");
17484
      boolean first = true;
17485
 
17486
      sb.append("providerId:");
17487
      sb.append(this.providerId);
17488
      first = false;
17489
      if (!first) sb.append(", ");
17490
      sb.append("returnedOrders:");
17491
      if (this.returnedOrders == null) {
17492
        sb.append("null");
17493
      } else {
17494
        sb.append(this.returnedOrders);
17495
      }
17496
      first = false;
17497
      sb.append(")");
17498
      return sb.toString();
17499
    }
17500
 
17501
    public void validate() throws TException {
17502
      // check for required fields
17503
    }
17504
 
17505
  }
17506
 
17507
  public static class markOrdersAsFailed_result implements TBase<markOrdersAsFailed_result._Fields>, java.io.Serializable, Cloneable, Comparable<markOrdersAsFailed_result>   {
17508
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsFailed_result");
17509
 
17510
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
17511
 
17512
    private TransactionServiceException ex;
17513
 
17514
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17515
    public enum _Fields implements TFieldIdEnum {
17516
      EX((short)1, "ex");
17517
 
17518
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
17519
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17520
 
17521
      static {
17522
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17523
          byId.put((int)field._thriftId, field);
17524
          byName.put(field.getFieldName(), field);
17525
        }
17526
      }
17527
 
17528
      /**
17529
       * Find the _Fields constant that matches fieldId, or null if its not found.
17530
       */
17531
      public static _Fields findByThriftId(int fieldId) {
17532
        return byId.get(fieldId);
17533
      }
17534
 
17535
      /**
17536
       * Find the _Fields constant that matches fieldId, throwing an exception
17537
       * if it is not found.
17538
       */
17539
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17540
        _Fields fields = findByThriftId(fieldId);
17541
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17542
        return fields;
17543
      }
17544
 
17545
      /**
17546
       * Find the _Fields constant that matches name, or null if its not found.
17547
       */
17548
      public static _Fields findByName(String name) {
17549
        return byName.get(name);
17550
      }
17551
 
17552
      private final short _thriftId;
17553
      private final String _fieldName;
17554
 
17555
      _Fields(short thriftId, String fieldName) {
17556
        _thriftId = thriftId;
17557
        _fieldName = fieldName;
17558
      }
17559
 
17560
      public short getThriftFieldId() {
17561
        return _thriftId;
17562
      }
17563
 
17564
      public String getFieldName() {
17565
        return _fieldName;
17566
      }
17567
    }
17568
 
17569
    // isset id assignments
17570
 
17571
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
17572
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
17573
          new FieldValueMetaData(TType.STRUCT)));
17574
    }});
17575
 
17576
    static {
17577
      FieldMetaData.addStructMetaDataMap(markOrdersAsFailed_result.class, metaDataMap);
17578
    }
17579
 
17580
    public markOrdersAsFailed_result() {
17581
    }
17582
 
17583
    public markOrdersAsFailed_result(
17584
      TransactionServiceException ex)
17585
    {
17586
      this();
17587
      this.ex = ex;
17588
    }
17589
 
17590
    /**
17591
     * Performs a deep copy on <i>other</i>.
17592
     */
17593
    public markOrdersAsFailed_result(markOrdersAsFailed_result other) {
17594
      if (other.isSetEx()) {
17595
        this.ex = new TransactionServiceException(other.ex);
17596
      }
17597
    }
17598
 
17599
    public markOrdersAsFailed_result deepCopy() {
17600
      return new markOrdersAsFailed_result(this);
17601
    }
17602
 
17603
    @Deprecated
17604
    public markOrdersAsFailed_result clone() {
17605
      return new markOrdersAsFailed_result(this);
17606
    }
17607
 
17608
    public TransactionServiceException getEx() {
17609
      return this.ex;
17610
    }
17611
 
17612
    public markOrdersAsFailed_result setEx(TransactionServiceException ex) {
17613
      this.ex = ex;
17614
      return this;
17615
    }
17616
 
17617
    public void unsetEx() {
17618
      this.ex = null;
17619
    }
17620
 
17621
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
17622
    public boolean isSetEx() {
17623
      return this.ex != null;
17624
    }
17625
 
17626
    public void setExIsSet(boolean value) {
17627
      if (!value) {
17628
        this.ex = null;
17629
      }
17630
    }
17631
 
17632
    public void setFieldValue(_Fields field, Object value) {
17633
      switch (field) {
17634
      case EX:
17635
        if (value == null) {
17636
          unsetEx();
17637
        } else {
17638
          setEx((TransactionServiceException)value);
17639
        }
17640
        break;
17641
 
17642
      }
17643
    }
17644
 
17645
    public void setFieldValue(int fieldID, Object value) {
17646
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
17647
    }
17648
 
17649
    public Object getFieldValue(_Fields field) {
17650
      switch (field) {
17651
      case EX:
17652
        return getEx();
17653
 
17654
      }
17655
      throw new IllegalStateException();
17656
    }
17657
 
17658
    public Object getFieldValue(int fieldId) {
17659
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
17660
    }
17661
 
17662
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
17663
    public boolean isSet(_Fields field) {
17664
      switch (field) {
17665
      case EX:
17666
        return isSetEx();
17667
      }
17668
      throw new IllegalStateException();
17669
    }
17670
 
17671
    public boolean isSet(int fieldID) {
17672
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
17673
    }
17674
 
17675
    @Override
17676
    public boolean equals(Object that) {
17677
      if (that == null)
17678
        return false;
17679
      if (that instanceof markOrdersAsFailed_result)
17680
        return this.equals((markOrdersAsFailed_result)that);
17681
      return false;
17682
    }
17683
 
17684
    public boolean equals(markOrdersAsFailed_result that) {
17685
      if (that == null)
17686
        return false;
17687
 
17688
      boolean this_present_ex = true && this.isSetEx();
17689
      boolean that_present_ex = true && that.isSetEx();
17690
      if (this_present_ex || that_present_ex) {
17691
        if (!(this_present_ex && that_present_ex))
17692
          return false;
17693
        if (!this.ex.equals(that.ex))
17694
          return false;
17695
      }
17696
 
17697
      return true;
17698
    }
17699
 
17700
    @Override
17701
    public int hashCode() {
17702
      return 0;
17703
    }
17704
 
17705
    public int compareTo(markOrdersAsFailed_result other) {
17706
      if (!getClass().equals(other.getClass())) {
17707
        return getClass().getName().compareTo(other.getClass().getName());
17708
      }
17709
 
17710
      int lastComparison = 0;
17711
      markOrdersAsFailed_result typedOther = (markOrdersAsFailed_result)other;
17712
 
17713
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
17714
      if (lastComparison != 0) {
17715
        return lastComparison;
17716
      }
17717
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
17718
      if (lastComparison != 0) {
17719
        return lastComparison;
17720
      }
17721
      return 0;
17722
    }
17723
 
17724
    public void read(TProtocol iprot) throws TException {
17725
      TField field;
17726
      iprot.readStructBegin();
17727
      while (true)
17728
      {
17729
        field = iprot.readFieldBegin();
17730
        if (field.type == TType.STOP) { 
17731
          break;
17732
        }
17733
        _Fields fieldId = _Fields.findByThriftId(field.id);
17734
        if (fieldId == null) {
17735
          TProtocolUtil.skip(iprot, field.type);
17736
        } else {
17737
          switch (fieldId) {
17738
            case EX:
17739
              if (field.type == TType.STRUCT) {
17740
                this.ex = new TransactionServiceException();
17741
                this.ex.read(iprot);
17742
              } else { 
17743
                TProtocolUtil.skip(iprot, field.type);
17744
              }
17745
              break;
17746
          }
17747
          iprot.readFieldEnd();
17748
        }
17749
      }
17750
      iprot.readStructEnd();
17751
      validate();
17752
    }
17753
 
17754
    public void write(TProtocol oprot) throws TException {
17755
      oprot.writeStructBegin(STRUCT_DESC);
17756
 
17757
      if (this.isSetEx()) {
17758
        oprot.writeFieldBegin(EX_FIELD_DESC);
17759
        this.ex.write(oprot);
17760
        oprot.writeFieldEnd();
17761
      }
17762
      oprot.writeFieldStop();
17763
      oprot.writeStructEnd();
17764
    }
17765
 
17766
    @Override
17767
    public String toString() {
17768
      StringBuilder sb = new StringBuilder("markOrdersAsFailed_result(");
17769
      boolean first = true;
17770
 
17771
      sb.append("ex:");
17772
      if (this.ex == null) {
17773
        sb.append("null");
17774
      } else {
17775
        sb.append(this.ex);
17776
      }
17777
      first = false;
17778
      sb.append(")");
17779
      return sb.toString();
17780
    }
17781
 
17782
    public void validate() throws TException {
17783
      // check for required fields
17784
    }
17785
 
17786
  }
17787
 
305 ashish 17788
  public static class getAlerts_args implements TBase<getAlerts_args._Fields>, java.io.Serializable, Cloneable, Comparable<getAlerts_args>   {
17789
    private static final TStruct STRUCT_DESC = new TStruct("getAlerts_args");
17790
 
483 rajveer 17791
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
305 ashish 17792
    private static final TField VALID_FIELD_DESC = new TField("valid", TType.BOOL, (short)2);
17793
 
483 rajveer 17794
    private long orderId;
305 ashish 17795
    private boolean valid;
17796
 
17797
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17798
    public enum _Fields implements TFieldIdEnum {
483 rajveer 17799
      ORDER_ID((short)1, "orderId"),
305 ashish 17800
      VALID((short)2, "valid");
17801
 
17802
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
17803
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17804
 
17805
      static {
17806
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17807
          byId.put((int)field._thriftId, field);
17808
          byName.put(field.getFieldName(), field);
17809
        }
17810
      }
17811
 
17812
      /**
17813
       * Find the _Fields constant that matches fieldId, or null if its not found.
17814
       */
17815
      public static _Fields findByThriftId(int fieldId) {
17816
        return byId.get(fieldId);
17817
      }
17818
 
17819
      /**
17820
       * Find the _Fields constant that matches fieldId, throwing an exception
17821
       * if it is not found.
17822
       */
17823
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17824
        _Fields fields = findByThriftId(fieldId);
17825
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17826
        return fields;
17827
      }
17828
 
17829
      /**
17830
       * Find the _Fields constant that matches name, or null if its not found.
17831
       */
17832
      public static _Fields findByName(String name) {
17833
        return byName.get(name);
17834
      }
17835
 
17836
      private final short _thriftId;
17837
      private final String _fieldName;
17838
 
17839
      _Fields(short thriftId, String fieldName) {
17840
        _thriftId = thriftId;
17841
        _fieldName = fieldName;
17842
      }
17843
 
17844
      public short getThriftFieldId() {
17845
        return _thriftId;
17846
      }
17847
 
17848
      public String getFieldName() {
17849
        return _fieldName;
17850
      }
17851
    }
17852
 
17853
    // isset id assignments
483 rajveer 17854
    private static final int __ORDERID_ISSET_ID = 0;
305 ashish 17855
    private static final int __VALID_ISSET_ID = 1;
17856
    private BitSet __isset_bit_vector = new BitSet(2);
17857
 
17858
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 17859
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
305 ashish 17860
          new FieldValueMetaData(TType.I64)));
17861
      put(_Fields.VALID, new FieldMetaData("valid", TFieldRequirementType.DEFAULT, 
17862
          new FieldValueMetaData(TType.BOOL)));
17863
    }});
17864
 
17865
    static {
17866
      FieldMetaData.addStructMetaDataMap(getAlerts_args.class, metaDataMap);
17867
    }
17868
 
17869
    public getAlerts_args() {
17870
    }
17871
 
17872
    public getAlerts_args(
483 rajveer 17873
      long orderId,
305 ashish 17874
      boolean valid)
17875
    {
17876
      this();
483 rajveer 17877
      this.orderId = orderId;
17878
      setOrderIdIsSet(true);
305 ashish 17879
      this.valid = valid;
17880
      setValidIsSet(true);
17881
    }
17882
 
17883
    /**
17884
     * Performs a deep copy on <i>other</i>.
17885
     */
17886
    public getAlerts_args(getAlerts_args other) {
17887
      __isset_bit_vector.clear();
17888
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 17889
      this.orderId = other.orderId;
305 ashish 17890
      this.valid = other.valid;
17891
    }
17892
 
17893
    public getAlerts_args deepCopy() {
17894
      return new getAlerts_args(this);
17895
    }
17896
 
17897
    @Deprecated
17898
    public getAlerts_args clone() {
17899
      return new getAlerts_args(this);
17900
    }
17901
 
483 rajveer 17902
    public long getOrderId() {
17903
      return this.orderId;
305 ashish 17904
    }
17905
 
483 rajveer 17906
    public getAlerts_args setOrderId(long orderId) {
17907
      this.orderId = orderId;
17908
      setOrderIdIsSet(true);
305 ashish 17909
      return this;
17910
    }
17911
 
483 rajveer 17912
    public void unsetOrderId() {
17913
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
305 ashish 17914
    }
17915
 
483 rajveer 17916
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
17917
    public boolean isSetOrderId() {
17918
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
305 ashish 17919
    }
17920
 
483 rajveer 17921
    public void setOrderIdIsSet(boolean value) {
17922
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
305 ashish 17923
    }
17924
 
17925
    public boolean isValid() {
17926
      return this.valid;
17927
    }
17928
 
17929
    public getAlerts_args setValid(boolean valid) {
17930
      this.valid = valid;
17931
      setValidIsSet(true);
17932
      return this;
17933
    }
17934
 
17935
    public void unsetValid() {
17936
      __isset_bit_vector.clear(__VALID_ISSET_ID);
17937
    }
17938
 
17939
    /** Returns true if field valid is set (has been asigned a value) and false otherwise */
17940
    public boolean isSetValid() {
17941
      return __isset_bit_vector.get(__VALID_ISSET_ID);
17942
    }
17943
 
17944
    public void setValidIsSet(boolean value) {
17945
      __isset_bit_vector.set(__VALID_ISSET_ID, value);
17946
    }
17947
 
17948
    public void setFieldValue(_Fields field, Object value) {
17949
      switch (field) {
483 rajveer 17950
      case ORDER_ID:
305 ashish 17951
        if (value == null) {
483 rajveer 17952
          unsetOrderId();
305 ashish 17953
        } else {
483 rajveer 17954
          setOrderId((Long)value);
305 ashish 17955
        }
17956
        break;
17957
 
17958
      case VALID:
17959
        if (value == null) {
17960
          unsetValid();
17961
        } else {
17962
          setValid((Boolean)value);
17963
        }
17964
        break;
17965
 
17966
      }
17967
    }
17968
 
17969
    public void setFieldValue(int fieldID, Object value) {
17970
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
17971
    }
17972
 
17973
    public Object getFieldValue(_Fields field) {
17974
      switch (field) {
483 rajveer 17975
      case ORDER_ID:
17976
        return new Long(getOrderId());
305 ashish 17977
 
17978
      case VALID:
17979
        return new Boolean(isValid());
17980
 
17981
      }
17982
      throw new IllegalStateException();
17983
    }
17984
 
17985
    public Object getFieldValue(int fieldId) {
17986
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
17987
    }
17988
 
17989
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
17990
    public boolean isSet(_Fields field) {
17991
      switch (field) {
483 rajveer 17992
      case ORDER_ID:
17993
        return isSetOrderId();
305 ashish 17994
      case VALID:
17995
        return isSetValid();
17996
      }
17997
      throw new IllegalStateException();
17998
    }
17999
 
18000
    public boolean isSet(int fieldID) {
18001
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
18002
    }
18003
 
18004
    @Override
18005
    public boolean equals(Object that) {
18006
      if (that == null)
18007
        return false;
18008
      if (that instanceof getAlerts_args)
18009
        return this.equals((getAlerts_args)that);
18010
      return false;
18011
    }
18012
 
18013
    public boolean equals(getAlerts_args that) {
18014
      if (that == null)
18015
        return false;
18016
 
483 rajveer 18017
      boolean this_present_orderId = true;
18018
      boolean that_present_orderId = true;
18019
      if (this_present_orderId || that_present_orderId) {
18020
        if (!(this_present_orderId && that_present_orderId))
305 ashish 18021
          return false;
483 rajveer 18022
        if (this.orderId != that.orderId)
305 ashish 18023
          return false;
18024
      }
18025
 
18026
      boolean this_present_valid = true;
18027
      boolean that_present_valid = true;
18028
      if (this_present_valid || that_present_valid) {
18029
        if (!(this_present_valid && that_present_valid))
18030
          return false;
18031
        if (this.valid != that.valid)
18032
          return false;
18033
      }
18034
 
18035
      return true;
18036
    }
18037
 
18038
    @Override
18039
    public int hashCode() {
18040
      return 0;
18041
    }
18042
 
18043
    public int compareTo(getAlerts_args other) {
18044
      if (!getClass().equals(other.getClass())) {
18045
        return getClass().getName().compareTo(other.getClass().getName());
18046
      }
18047
 
18048
      int lastComparison = 0;
18049
      getAlerts_args typedOther = (getAlerts_args)other;
18050
 
483 rajveer 18051
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
305 ashish 18052
      if (lastComparison != 0) {
18053
        return lastComparison;
18054
      }
483 rajveer 18055
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
305 ashish 18056
      if (lastComparison != 0) {
18057
        return lastComparison;
18058
      }
18059
      lastComparison = Boolean.valueOf(isSetValid()).compareTo(isSetValid());
18060
      if (lastComparison != 0) {
18061
        return lastComparison;
18062
      }
18063
      lastComparison = TBaseHelper.compareTo(valid, typedOther.valid);
18064
      if (lastComparison != 0) {
18065
        return lastComparison;
18066
      }
18067
      return 0;
18068
    }
18069
 
18070
    public void read(TProtocol iprot) throws TException {
18071
      TField field;
18072
      iprot.readStructBegin();
18073
      while (true)
18074
      {
18075
        field = iprot.readFieldBegin();
18076
        if (field.type == TType.STOP) { 
18077
          break;
18078
        }
18079
        _Fields fieldId = _Fields.findByThriftId(field.id);
18080
        if (fieldId == null) {
18081
          TProtocolUtil.skip(iprot, field.type);
18082
        } else {
18083
          switch (fieldId) {
483 rajveer 18084
            case ORDER_ID:
305 ashish 18085
              if (field.type == TType.I64) {
483 rajveer 18086
                this.orderId = iprot.readI64();
18087
                setOrderIdIsSet(true);
305 ashish 18088
              } else { 
18089
                TProtocolUtil.skip(iprot, field.type);
18090
              }
18091
              break;
18092
            case VALID:
18093
              if (field.type == TType.BOOL) {
18094
                this.valid = iprot.readBool();
18095
                setValidIsSet(true);
18096
              } else { 
18097
                TProtocolUtil.skip(iprot, field.type);
18098
              }
18099
              break;
18100
          }
18101
          iprot.readFieldEnd();
18102
        }
18103
      }
18104
      iprot.readStructEnd();
18105
      validate();
18106
    }
18107
 
18108
    public void write(TProtocol oprot) throws TException {
18109
      validate();
18110
 
18111
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 18112
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
18113
      oprot.writeI64(this.orderId);
305 ashish 18114
      oprot.writeFieldEnd();
18115
      oprot.writeFieldBegin(VALID_FIELD_DESC);
18116
      oprot.writeBool(this.valid);
18117
      oprot.writeFieldEnd();
18118
      oprot.writeFieldStop();
18119
      oprot.writeStructEnd();
18120
    }
18121
 
18122
    @Override
18123
    public String toString() {
18124
      StringBuilder sb = new StringBuilder("getAlerts_args(");
18125
      boolean first = true;
18126
 
483 rajveer 18127
      sb.append("orderId:");
18128
      sb.append(this.orderId);
305 ashish 18129
      first = false;
18130
      if (!first) sb.append(", ");
18131
      sb.append("valid:");
18132
      sb.append(this.valid);
18133
      first = false;
18134
      sb.append(")");
18135
      return sb.toString();
18136
    }
18137
 
18138
    public void validate() throws TException {
18139
      // check for required fields
18140
    }
18141
 
18142
  }
18143
 
18144
  public static class getAlerts_result implements TBase<getAlerts_result._Fields>, java.io.Serializable, Cloneable, Comparable<getAlerts_result>   {
18145
    private static final TStruct STRUCT_DESC = new TStruct("getAlerts_result");
18146
 
18147
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
18148
 
18149
    private List<Alert> success;
18150
 
18151
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18152
    public enum _Fields implements TFieldIdEnum {
18153
      SUCCESS((short)0, "success");
18154
 
18155
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
18156
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18157
 
18158
      static {
18159
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18160
          byId.put((int)field._thriftId, field);
18161
          byName.put(field.getFieldName(), field);
18162
        }
18163
      }
18164
 
18165
      /**
18166
       * Find the _Fields constant that matches fieldId, or null if its not found.
18167
       */
18168
      public static _Fields findByThriftId(int fieldId) {
18169
        return byId.get(fieldId);
18170
      }
18171
 
18172
      /**
18173
       * Find the _Fields constant that matches fieldId, throwing an exception
18174
       * if it is not found.
18175
       */
18176
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18177
        _Fields fields = findByThriftId(fieldId);
18178
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18179
        return fields;
18180
      }
18181
 
18182
      /**
18183
       * Find the _Fields constant that matches name, or null if its not found.
18184
       */
18185
      public static _Fields findByName(String name) {
18186
        return byName.get(name);
18187
      }
18188
 
18189
      private final short _thriftId;
18190
      private final String _fieldName;
18191
 
18192
      _Fields(short thriftId, String fieldName) {
18193
        _thriftId = thriftId;
18194
        _fieldName = fieldName;
18195
      }
18196
 
18197
      public short getThriftFieldId() {
18198
        return _thriftId;
18199
      }
18200
 
18201
      public String getFieldName() {
18202
        return _fieldName;
18203
      }
18204
    }
18205
 
18206
    // isset id assignments
18207
 
18208
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
18209
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
18210
          new ListMetaData(TType.LIST, 
18211
              new StructMetaData(TType.STRUCT, Alert.class))));
18212
    }});
18213
 
18214
    static {
18215
      FieldMetaData.addStructMetaDataMap(getAlerts_result.class, metaDataMap);
18216
    }
18217
 
18218
    public getAlerts_result() {
18219
    }
18220
 
18221
    public getAlerts_result(
18222
      List<Alert> success)
18223
    {
18224
      this();
18225
      this.success = success;
18226
    }
18227
 
18228
    /**
18229
     * Performs a deep copy on <i>other</i>.
18230
     */
18231
    public getAlerts_result(getAlerts_result other) {
18232
      if (other.isSetSuccess()) {
18233
        List<Alert> __this__success = new ArrayList<Alert>();
18234
        for (Alert other_element : other.success) {
18235
          __this__success.add(new Alert(other_element));
18236
        }
18237
        this.success = __this__success;
18238
      }
18239
    }
18240
 
18241
    public getAlerts_result deepCopy() {
18242
      return new getAlerts_result(this);
18243
    }
18244
 
18245
    @Deprecated
18246
    public getAlerts_result clone() {
18247
      return new getAlerts_result(this);
18248
    }
18249
 
18250
    public int getSuccessSize() {
18251
      return (this.success == null) ? 0 : this.success.size();
18252
    }
18253
 
18254
    public java.util.Iterator<Alert> getSuccessIterator() {
18255
      return (this.success == null) ? null : this.success.iterator();
18256
    }
18257
 
18258
    public void addToSuccess(Alert elem) {
18259
      if (this.success == null) {
18260
        this.success = new ArrayList<Alert>();
18261
      }
18262
      this.success.add(elem);
18263
    }
18264
 
18265
    public List<Alert> getSuccess() {
18266
      return this.success;
18267
    }
18268
 
18269
    public getAlerts_result setSuccess(List<Alert> success) {
18270
      this.success = success;
18271
      return this;
18272
    }
18273
 
18274
    public void unsetSuccess() {
18275
      this.success = null;
18276
    }
18277
 
18278
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
18279
    public boolean isSetSuccess() {
18280
      return this.success != null;
18281
    }
18282
 
18283
    public void setSuccessIsSet(boolean value) {
18284
      if (!value) {
18285
        this.success = null;
18286
      }
18287
    }
18288
 
18289
    public void setFieldValue(_Fields field, Object value) {
18290
      switch (field) {
18291
      case SUCCESS:
18292
        if (value == null) {
18293
          unsetSuccess();
18294
        } else {
18295
          setSuccess((List<Alert>)value);
18296
        }
18297
        break;
18298
 
18299
      }
18300
    }
18301
 
18302
    public void setFieldValue(int fieldID, Object value) {
18303
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
18304
    }
18305
 
18306
    public Object getFieldValue(_Fields field) {
18307
      switch (field) {
18308
      case SUCCESS:
18309
        return getSuccess();
18310
 
18311
      }
18312
      throw new IllegalStateException();
18313
    }
18314
 
18315
    public Object getFieldValue(int fieldId) {
18316
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
18317
    }
18318
 
18319
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
18320
    public boolean isSet(_Fields field) {
18321
      switch (field) {
18322
      case SUCCESS:
18323
        return isSetSuccess();
18324
      }
18325
      throw new IllegalStateException();
18326
    }
18327
 
18328
    public boolean isSet(int fieldID) {
18329
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
18330
    }
18331
 
18332
    @Override
18333
    public boolean equals(Object that) {
18334
      if (that == null)
18335
        return false;
18336
      if (that instanceof getAlerts_result)
18337
        return this.equals((getAlerts_result)that);
18338
      return false;
18339
    }
18340
 
18341
    public boolean equals(getAlerts_result that) {
18342
      if (that == null)
18343
        return false;
18344
 
18345
      boolean this_present_success = true && this.isSetSuccess();
18346
      boolean that_present_success = true && that.isSetSuccess();
18347
      if (this_present_success || that_present_success) {
18348
        if (!(this_present_success && that_present_success))
18349
          return false;
18350
        if (!this.success.equals(that.success))
18351
          return false;
18352
      }
18353
 
18354
      return true;
18355
    }
18356
 
18357
    @Override
18358
    public int hashCode() {
18359
      return 0;
18360
    }
18361
 
18362
    public int compareTo(getAlerts_result other) {
18363
      if (!getClass().equals(other.getClass())) {
18364
        return getClass().getName().compareTo(other.getClass().getName());
18365
      }
18366
 
18367
      int lastComparison = 0;
18368
      getAlerts_result typedOther = (getAlerts_result)other;
18369
 
18370
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
18371
      if (lastComparison != 0) {
18372
        return lastComparison;
18373
      }
18374
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
18375
      if (lastComparison != 0) {
18376
        return lastComparison;
18377
      }
18378
      return 0;
18379
    }
18380
 
18381
    public void read(TProtocol iprot) throws TException {
18382
      TField field;
18383
      iprot.readStructBegin();
18384
      while (true)
18385
      {
18386
        field = iprot.readFieldBegin();
18387
        if (field.type == TType.STOP) { 
18388
          break;
18389
        }
18390
        _Fields fieldId = _Fields.findByThriftId(field.id);
18391
        if (fieldId == null) {
18392
          TProtocolUtil.skip(iprot, field.type);
18393
        } else {
18394
          switch (fieldId) {
18395
            case SUCCESS:
18396
              if (field.type == TType.LIST) {
18397
                {
1133 chandransh 18398
                  TList _list55 = iprot.readListBegin();
18399
                  this.success = new ArrayList<Alert>(_list55.size);
18400
                  for (int _i56 = 0; _i56 < _list55.size; ++_i56)
305 ashish 18401
                  {
1133 chandransh 18402
                    Alert _elem57;
18403
                    _elem57 = new Alert();
18404
                    _elem57.read(iprot);
18405
                    this.success.add(_elem57);
305 ashish 18406
                  }
18407
                  iprot.readListEnd();
18408
                }
18409
              } else { 
18410
                TProtocolUtil.skip(iprot, field.type);
18411
              }
18412
              break;
18413
          }
18414
          iprot.readFieldEnd();
18415
        }
18416
      }
18417
      iprot.readStructEnd();
18418
      validate();
18419
    }
18420
 
18421
    public void write(TProtocol oprot) throws TException {
18422
      oprot.writeStructBegin(STRUCT_DESC);
18423
 
18424
      if (this.isSetSuccess()) {
18425
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
18426
        {
18427
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
1133 chandransh 18428
          for (Alert _iter58 : this.success)
305 ashish 18429
          {
1133 chandransh 18430
            _iter58.write(oprot);
305 ashish 18431
          }
18432
          oprot.writeListEnd();
18433
        }
18434
        oprot.writeFieldEnd();
18435
      }
18436
      oprot.writeFieldStop();
18437
      oprot.writeStructEnd();
18438
    }
18439
 
18440
    @Override
18441
    public String toString() {
18442
      StringBuilder sb = new StringBuilder("getAlerts_result(");
18443
      boolean first = true;
18444
 
18445
      sb.append("success:");
18446
      if (this.success == null) {
18447
        sb.append("null");
18448
      } else {
18449
        sb.append(this.success);
18450
      }
18451
      first = false;
18452
      sb.append(")");
18453
      return sb.toString();
18454
    }
18455
 
18456
    public void validate() throws TException {
18457
      // check for required fields
18458
    }
18459
 
18460
  }
18461
 
18462
  public static class setAlert_args implements TBase<setAlert_args._Fields>, java.io.Serializable, Cloneable, Comparable<setAlert_args>   {
18463
    private static final TStruct STRUCT_DESC = new TStruct("setAlert_args");
18464
 
483 rajveer 18465
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
305 ashish 18466
    private static final TField UNSET_FIELD_DESC = new TField("unset", TType.BOOL, (short)2);
18467
    private static final TField TYPE_FIELD_DESC = new TField("type", TType.I64, (short)3);
18468
    private static final TField COMMENT_FIELD_DESC = new TField("comment", TType.STRING, (short)4);
18469
 
483 rajveer 18470
    private long orderId;
305 ashish 18471
    private boolean unset;
18472
    private long type;
18473
    private String comment;
18474
 
18475
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18476
    public enum _Fields implements TFieldIdEnum {
483 rajveer 18477
      ORDER_ID((short)1, "orderId"),
305 ashish 18478
      UNSET((short)2, "unset"),
18479
      TYPE((short)3, "type"),
18480
      COMMENT((short)4, "comment");
18481
 
18482
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
18483
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18484
 
18485
      static {
18486
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18487
          byId.put((int)field._thriftId, field);
18488
          byName.put(field.getFieldName(), field);
18489
        }
18490
      }
18491
 
18492
      /**
18493
       * Find the _Fields constant that matches fieldId, or null if its not found.
18494
       */
18495
      public static _Fields findByThriftId(int fieldId) {
18496
        return byId.get(fieldId);
18497
      }
18498
 
18499
      /**
18500
       * Find the _Fields constant that matches fieldId, throwing an exception
18501
       * if it is not found.
18502
       */
18503
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18504
        _Fields fields = findByThriftId(fieldId);
18505
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18506
        return fields;
18507
      }
18508
 
18509
      /**
18510
       * Find the _Fields constant that matches name, or null if its not found.
18511
       */
18512
      public static _Fields findByName(String name) {
18513
        return byName.get(name);
18514
      }
18515
 
18516
      private final short _thriftId;
18517
      private final String _fieldName;
18518
 
18519
      _Fields(short thriftId, String fieldName) {
18520
        _thriftId = thriftId;
18521
        _fieldName = fieldName;
18522
      }
18523
 
18524
      public short getThriftFieldId() {
18525
        return _thriftId;
18526
      }
18527
 
18528
      public String getFieldName() {
18529
        return _fieldName;
18530
      }
18531
    }
18532
 
18533
    // isset id assignments
483 rajveer 18534
    private static final int __ORDERID_ISSET_ID = 0;
305 ashish 18535
    private static final int __UNSET_ISSET_ID = 1;
18536
    private static final int __TYPE_ISSET_ID = 2;
18537
    private BitSet __isset_bit_vector = new BitSet(3);
18538
 
18539
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 18540
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
305 ashish 18541
          new FieldValueMetaData(TType.I64)));
18542
      put(_Fields.UNSET, new FieldMetaData("unset", TFieldRequirementType.DEFAULT, 
18543
          new FieldValueMetaData(TType.BOOL)));
18544
      put(_Fields.TYPE, new FieldMetaData("type", TFieldRequirementType.DEFAULT, 
18545
          new FieldValueMetaData(TType.I64)));
18546
      put(_Fields.COMMENT, new FieldMetaData("comment", TFieldRequirementType.DEFAULT, 
18547
          new FieldValueMetaData(TType.STRING)));
18548
    }});
18549
 
18550
    static {
18551
      FieldMetaData.addStructMetaDataMap(setAlert_args.class, metaDataMap);
18552
    }
18553
 
18554
    public setAlert_args() {
18555
    }
18556
 
18557
    public setAlert_args(
483 rajveer 18558
      long orderId,
305 ashish 18559
      boolean unset,
18560
      long type,
18561
      String comment)
18562
    {
18563
      this();
483 rajveer 18564
      this.orderId = orderId;
18565
      setOrderIdIsSet(true);
305 ashish 18566
      this.unset = unset;
18567
      setUnsetIsSet(true);
18568
      this.type = type;
18569
      setTypeIsSet(true);
18570
      this.comment = comment;
18571
    }
18572
 
18573
    /**
18574
     * Performs a deep copy on <i>other</i>.
18575
     */
18576
    public setAlert_args(setAlert_args other) {
18577
      __isset_bit_vector.clear();
18578
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 18579
      this.orderId = other.orderId;
305 ashish 18580
      this.unset = other.unset;
18581
      this.type = other.type;
18582
      if (other.isSetComment()) {
18583
        this.comment = other.comment;
18584
      }
18585
    }
18586
 
18587
    public setAlert_args deepCopy() {
18588
      return new setAlert_args(this);
18589
    }
18590
 
18591
    @Deprecated
18592
    public setAlert_args clone() {
18593
      return new setAlert_args(this);
18594
    }
18595
 
483 rajveer 18596
    public long getOrderId() {
18597
      return this.orderId;
305 ashish 18598
    }
18599
 
483 rajveer 18600
    public setAlert_args setOrderId(long orderId) {
18601
      this.orderId = orderId;
18602
      setOrderIdIsSet(true);
305 ashish 18603
      return this;
18604
    }
18605
 
483 rajveer 18606
    public void unsetOrderId() {
18607
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
305 ashish 18608
    }
18609
 
483 rajveer 18610
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
18611
    public boolean isSetOrderId() {
18612
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
305 ashish 18613
    }
18614
 
483 rajveer 18615
    public void setOrderIdIsSet(boolean value) {
18616
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
305 ashish 18617
    }
18618
 
18619
    public boolean isUnset() {
18620
      return this.unset;
18621
    }
18622
 
18623
    public setAlert_args setUnset(boolean unset) {
18624
      this.unset = unset;
18625
      setUnsetIsSet(true);
18626
      return this;
18627
    }
18628
 
18629
    public void unsetUnset() {
18630
      __isset_bit_vector.clear(__UNSET_ISSET_ID);
18631
    }
18632
 
18633
    /** Returns true if field unset is set (has been asigned a value) and false otherwise */
18634
    public boolean isSetUnset() {
18635
      return __isset_bit_vector.get(__UNSET_ISSET_ID);
18636
    }
18637
 
18638
    public void setUnsetIsSet(boolean value) {
18639
      __isset_bit_vector.set(__UNSET_ISSET_ID, value);
18640
    }
18641
 
18642
    public long getType() {
18643
      return this.type;
18644
    }
18645
 
18646
    public setAlert_args setType(long type) {
18647
      this.type = type;
18648
      setTypeIsSet(true);
18649
      return this;
18650
    }
18651
 
18652
    public void unsetType() {
18653
      __isset_bit_vector.clear(__TYPE_ISSET_ID);
18654
    }
18655
 
18656
    /** Returns true if field type is set (has been asigned a value) and false otherwise */
18657
    public boolean isSetType() {
18658
      return __isset_bit_vector.get(__TYPE_ISSET_ID);
18659
    }
18660
 
18661
    public void setTypeIsSet(boolean value) {
18662
      __isset_bit_vector.set(__TYPE_ISSET_ID, value);
18663
    }
18664
 
18665
    public String getComment() {
18666
      return this.comment;
18667
    }
18668
 
18669
    public setAlert_args setComment(String comment) {
18670
      this.comment = comment;
18671
      return this;
18672
    }
18673
 
18674
    public void unsetComment() {
18675
      this.comment = null;
18676
    }
18677
 
18678
    /** Returns true if field comment is set (has been asigned a value) and false otherwise */
18679
    public boolean isSetComment() {
18680
      return this.comment != null;
18681
    }
18682
 
18683
    public void setCommentIsSet(boolean value) {
18684
      if (!value) {
18685
        this.comment = null;
18686
      }
18687
    }
18688
 
18689
    public void setFieldValue(_Fields field, Object value) {
18690
      switch (field) {
483 rajveer 18691
      case ORDER_ID:
305 ashish 18692
        if (value == null) {
483 rajveer 18693
          unsetOrderId();
305 ashish 18694
        } else {
483 rajveer 18695
          setOrderId((Long)value);
305 ashish 18696
        }
18697
        break;
18698
 
18699
      case UNSET:
18700
        if (value == null) {
18701
          unsetUnset();
18702
        } else {
18703
          setUnset((Boolean)value);
18704
        }
18705
        break;
18706
 
18707
      case TYPE:
18708
        if (value == null) {
18709
          unsetType();
18710
        } else {
18711
          setType((Long)value);
18712
        }
18713
        break;
18714
 
18715
      case COMMENT:
18716
        if (value == null) {
18717
          unsetComment();
18718
        } else {
18719
          setComment((String)value);
18720
        }
18721
        break;
18722
 
18723
      }
18724
    }
18725
 
18726
    public void setFieldValue(int fieldID, Object value) {
18727
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
18728
    }
18729
 
18730
    public Object getFieldValue(_Fields field) {
18731
      switch (field) {
483 rajveer 18732
      case ORDER_ID:
18733
        return new Long(getOrderId());
305 ashish 18734
 
18735
      case UNSET:
18736
        return new Boolean(isUnset());
18737
 
18738
      case TYPE:
18739
        return new Long(getType());
18740
 
18741
      case COMMENT:
18742
        return getComment();
18743
 
18744
      }
18745
      throw new IllegalStateException();
18746
    }
18747
 
18748
    public Object getFieldValue(int fieldId) {
18749
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
18750
    }
18751
 
18752
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
18753
    public boolean isSet(_Fields field) {
18754
      switch (field) {
483 rajveer 18755
      case ORDER_ID:
18756
        return isSetOrderId();
305 ashish 18757
      case UNSET:
18758
        return isSetUnset();
18759
      case TYPE:
18760
        return isSetType();
18761
      case COMMENT:
18762
        return isSetComment();
18763
      }
18764
      throw new IllegalStateException();
18765
    }
18766
 
18767
    public boolean isSet(int fieldID) {
18768
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
18769
    }
18770
 
18771
    @Override
18772
    public boolean equals(Object that) {
18773
      if (that == null)
18774
        return false;
18775
      if (that instanceof setAlert_args)
18776
        return this.equals((setAlert_args)that);
18777
      return false;
18778
    }
18779
 
18780
    public boolean equals(setAlert_args that) {
18781
      if (that == null)
18782
        return false;
18783
 
483 rajveer 18784
      boolean this_present_orderId = true;
18785
      boolean that_present_orderId = true;
18786
      if (this_present_orderId || that_present_orderId) {
18787
        if (!(this_present_orderId && that_present_orderId))
305 ashish 18788
          return false;
483 rajveer 18789
        if (this.orderId != that.orderId)
305 ashish 18790
          return false;
18791
      }
18792
 
18793
      boolean this_present_unset = true;
18794
      boolean that_present_unset = true;
18795
      if (this_present_unset || that_present_unset) {
18796
        if (!(this_present_unset && that_present_unset))
18797
          return false;
18798
        if (this.unset != that.unset)
18799
          return false;
18800
      }
18801
 
18802
      boolean this_present_type = true;
18803
      boolean that_present_type = true;
18804
      if (this_present_type || that_present_type) {
18805
        if (!(this_present_type && that_present_type))
18806
          return false;
18807
        if (this.type != that.type)
18808
          return false;
18809
      }
18810
 
18811
      boolean this_present_comment = true && this.isSetComment();
18812
      boolean that_present_comment = true && that.isSetComment();
18813
      if (this_present_comment || that_present_comment) {
18814
        if (!(this_present_comment && that_present_comment))
18815
          return false;
18816
        if (!this.comment.equals(that.comment))
18817
          return false;
18818
      }
18819
 
18820
      return true;
18821
    }
18822
 
18823
    @Override
18824
    public int hashCode() {
18825
      return 0;
18826
    }
18827
 
18828
    public int compareTo(setAlert_args other) {
18829
      if (!getClass().equals(other.getClass())) {
18830
        return getClass().getName().compareTo(other.getClass().getName());
18831
      }
18832
 
18833
      int lastComparison = 0;
18834
      setAlert_args typedOther = (setAlert_args)other;
18835
 
483 rajveer 18836
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
305 ashish 18837
      if (lastComparison != 0) {
18838
        return lastComparison;
18839
      }
483 rajveer 18840
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
305 ashish 18841
      if (lastComparison != 0) {
18842
        return lastComparison;
18843
      }
18844
      lastComparison = Boolean.valueOf(isSetUnset()).compareTo(isSetUnset());
18845
      if (lastComparison != 0) {
18846
        return lastComparison;
18847
      }
18848
      lastComparison = TBaseHelper.compareTo(unset, typedOther.unset);
18849
      if (lastComparison != 0) {
18850
        return lastComparison;
18851
      }
18852
      lastComparison = Boolean.valueOf(isSetType()).compareTo(isSetType());
18853
      if (lastComparison != 0) {
18854
        return lastComparison;
18855
      }
18856
      lastComparison = TBaseHelper.compareTo(type, typedOther.type);
18857
      if (lastComparison != 0) {
18858
        return lastComparison;
18859
      }
18860
      lastComparison = Boolean.valueOf(isSetComment()).compareTo(isSetComment());
18861
      if (lastComparison != 0) {
18862
        return lastComparison;
18863
      }
18864
      lastComparison = TBaseHelper.compareTo(comment, typedOther.comment);
18865
      if (lastComparison != 0) {
18866
        return lastComparison;
18867
      }
18868
      return 0;
18869
    }
18870
 
18871
    public void read(TProtocol iprot) throws TException {
18872
      TField field;
18873
      iprot.readStructBegin();
18874
      while (true)
18875
      {
18876
        field = iprot.readFieldBegin();
18877
        if (field.type == TType.STOP) { 
18878
          break;
18879
        }
18880
        _Fields fieldId = _Fields.findByThriftId(field.id);
18881
        if (fieldId == null) {
18882
          TProtocolUtil.skip(iprot, field.type);
18883
        } else {
18884
          switch (fieldId) {
483 rajveer 18885
            case ORDER_ID:
305 ashish 18886
              if (field.type == TType.I64) {
483 rajveer 18887
                this.orderId = iprot.readI64();
18888
                setOrderIdIsSet(true);
305 ashish 18889
              } else { 
18890
                TProtocolUtil.skip(iprot, field.type);
18891
              }
18892
              break;
18893
            case UNSET:
18894
              if (field.type == TType.BOOL) {
18895
                this.unset = iprot.readBool();
18896
                setUnsetIsSet(true);
18897
              } else { 
18898
                TProtocolUtil.skip(iprot, field.type);
18899
              }
18900
              break;
18901
            case TYPE:
18902
              if (field.type == TType.I64) {
18903
                this.type = iprot.readI64();
18904
                setTypeIsSet(true);
18905
              } else { 
18906
                TProtocolUtil.skip(iprot, field.type);
18907
              }
18908
              break;
18909
            case COMMENT:
18910
              if (field.type == TType.STRING) {
18911
                this.comment = iprot.readString();
18912
              } else { 
18913
                TProtocolUtil.skip(iprot, field.type);
18914
              }
18915
              break;
18916
          }
18917
          iprot.readFieldEnd();
18918
        }
18919
      }
18920
      iprot.readStructEnd();
18921
      validate();
18922
    }
18923
 
18924
    public void write(TProtocol oprot) throws TException {
18925
      validate();
18926
 
18927
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 18928
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
18929
      oprot.writeI64(this.orderId);
305 ashish 18930
      oprot.writeFieldEnd();
18931
      oprot.writeFieldBegin(UNSET_FIELD_DESC);
18932
      oprot.writeBool(this.unset);
18933
      oprot.writeFieldEnd();
18934
      oprot.writeFieldBegin(TYPE_FIELD_DESC);
18935
      oprot.writeI64(this.type);
18936
      oprot.writeFieldEnd();
18937
      if (this.comment != null) {
18938
        oprot.writeFieldBegin(COMMENT_FIELD_DESC);
18939
        oprot.writeString(this.comment);
18940
        oprot.writeFieldEnd();
18941
      }
18942
      oprot.writeFieldStop();
18943
      oprot.writeStructEnd();
18944
    }
18945
 
18946
    @Override
18947
    public String toString() {
18948
      StringBuilder sb = new StringBuilder("setAlert_args(");
18949
      boolean first = true;
18950
 
483 rajveer 18951
      sb.append("orderId:");
18952
      sb.append(this.orderId);
305 ashish 18953
      first = false;
18954
      if (!first) sb.append(", ");
18955
      sb.append("unset:");
18956
      sb.append(this.unset);
18957
      first = false;
18958
      if (!first) sb.append(", ");
18959
      sb.append("type:");
18960
      sb.append(this.type);
18961
      first = false;
18962
      if (!first) sb.append(", ");
18963
      sb.append("comment:");
18964
      if (this.comment == null) {
18965
        sb.append("null");
18966
      } else {
18967
        sb.append(this.comment);
18968
      }
18969
      first = false;
18970
      sb.append(")");
18971
      return sb.toString();
18972
    }
18973
 
18974
    public void validate() throws TException {
18975
      // check for required fields
18976
    }
18977
 
18978
  }
18979
 
18980
  public static class setAlert_result implements TBase<setAlert_result._Fields>, java.io.Serializable, Cloneable, Comparable<setAlert_result>   {
18981
    private static final TStruct STRUCT_DESC = new TStruct("setAlert_result");
18982
 
18983
 
18984
 
18985
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18986
    public enum _Fields implements TFieldIdEnum {
18987
;
18988
 
18989
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
18990
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18991
 
18992
      static {
18993
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18994
          byId.put((int)field._thriftId, field);
18995
          byName.put(field.getFieldName(), field);
18996
        }
18997
      }
18998
 
18999
      /**
19000
       * Find the _Fields constant that matches fieldId, or null if its not found.
19001
       */
19002
      public static _Fields findByThriftId(int fieldId) {
19003
        return byId.get(fieldId);
19004
      }
19005
 
19006
      /**
19007
       * Find the _Fields constant that matches fieldId, throwing an exception
19008
       * if it is not found.
19009
       */
19010
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19011
        _Fields fields = findByThriftId(fieldId);
19012
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19013
        return fields;
19014
      }
19015
 
19016
      /**
19017
       * Find the _Fields constant that matches name, or null if its not found.
19018
       */
19019
      public static _Fields findByName(String name) {
19020
        return byName.get(name);
19021
      }
19022
 
19023
      private final short _thriftId;
19024
      private final String _fieldName;
19025
 
19026
      _Fields(short thriftId, String fieldName) {
19027
        _thriftId = thriftId;
19028
        _fieldName = fieldName;
19029
      }
19030
 
19031
      public short getThriftFieldId() {
19032
        return _thriftId;
19033
      }
19034
 
19035
      public String getFieldName() {
19036
        return _fieldName;
19037
      }
19038
    }
19039
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
19040
    }});
19041
 
19042
    static {
19043
      FieldMetaData.addStructMetaDataMap(setAlert_result.class, metaDataMap);
19044
    }
19045
 
19046
    public setAlert_result() {
19047
    }
19048
 
19049
    /**
19050
     * Performs a deep copy on <i>other</i>.
19051
     */
19052
    public setAlert_result(setAlert_result other) {
19053
    }
19054
 
19055
    public setAlert_result deepCopy() {
19056
      return new setAlert_result(this);
19057
    }
19058
 
19059
    @Deprecated
19060
    public setAlert_result clone() {
19061
      return new setAlert_result(this);
19062
    }
19063
 
19064
    public void setFieldValue(_Fields field, Object value) {
19065
      switch (field) {
19066
      }
19067
    }
19068
 
19069
    public void setFieldValue(int fieldID, Object value) {
19070
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
19071
    }
19072
 
19073
    public Object getFieldValue(_Fields field) {
19074
      switch (field) {
19075
      }
19076
      throw new IllegalStateException();
19077
    }
19078
 
19079
    public Object getFieldValue(int fieldId) {
19080
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
19081
    }
19082
 
19083
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
19084
    public boolean isSet(_Fields field) {
19085
      switch (field) {
19086
      }
19087
      throw new IllegalStateException();
19088
    }
19089
 
19090
    public boolean isSet(int fieldID) {
19091
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
19092
    }
19093
 
19094
    @Override
19095
    public boolean equals(Object that) {
19096
      if (that == null)
19097
        return false;
19098
      if (that instanceof setAlert_result)
19099
        return this.equals((setAlert_result)that);
19100
      return false;
19101
    }
19102
 
19103
    public boolean equals(setAlert_result that) {
19104
      if (that == null)
19105
        return false;
19106
 
19107
      return true;
19108
    }
19109
 
19110
    @Override
19111
    public int hashCode() {
19112
      return 0;
19113
    }
19114
 
19115
    public int compareTo(setAlert_result other) {
19116
      if (!getClass().equals(other.getClass())) {
19117
        return getClass().getName().compareTo(other.getClass().getName());
19118
      }
19119
 
19120
      int lastComparison = 0;
19121
      setAlert_result typedOther = (setAlert_result)other;
19122
 
19123
      return 0;
19124
    }
19125
 
19126
    public void read(TProtocol iprot) throws TException {
19127
      TField field;
19128
      iprot.readStructBegin();
19129
      while (true)
19130
      {
19131
        field = iprot.readFieldBegin();
19132
        if (field.type == TType.STOP) { 
19133
          break;
19134
        }
19135
        _Fields fieldId = _Fields.findByThriftId(field.id);
19136
        if (fieldId == null) {
19137
          TProtocolUtil.skip(iprot, field.type);
19138
        } else {
19139
          switch (fieldId) {
19140
          }
19141
          iprot.readFieldEnd();
19142
        }
19143
      }
19144
      iprot.readStructEnd();
19145
      validate();
19146
    }
19147
 
19148
    public void write(TProtocol oprot) throws TException {
19149
      oprot.writeStructBegin(STRUCT_DESC);
19150
 
19151
      oprot.writeFieldStop();
19152
      oprot.writeStructEnd();
19153
    }
19154
 
19155
    @Override
19156
    public String toString() {
19157
      StringBuilder sb = new StringBuilder("setAlert_result(");
19158
      boolean first = true;
19159
 
19160
      sb.append(")");
19161
      return sb.toString();
19162
    }
19163
 
19164
    public void validate() throws TException {
19165
      // check for required fields
19166
    }
19167
 
19168
  }
19169
 
68 ashish 19170
}