Subversion Repositories SmartDukaan

Rev

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

Rev Author Line No. Line
68 ashish 1
/**
2
 * Autogenerated by Thrift
3
 *
4
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
 */
6
package in.shop2020.model.v1.order;
7
 
8
import java.util.List;
9
import java.util.ArrayList;
10
import java.util.Map;
11
import java.util.HashMap;
12
import java.util.EnumMap;
13
import java.util.Set;
14
import java.util.HashSet;
15
import java.util.EnumSet;
16
import java.util.Collections;
17
import java.util.BitSet;
18
import java.util.Arrays;
19
import org.slf4j.Logger;
20
import org.slf4j.LoggerFactory;
21
 
22
import org.apache.thrift.*;
23
import org.apache.thrift.meta_data.*;
24
import org.apache.thrift.protocol.*;
25
 
26
public class TransactionService {
27
 
28
  public interface Iface {
29
 
764 rajveer 30
    /**
31
     * For closing the open session in sqlalchemy
32
     */
33
    public void closeSession() throws TException;
34
 
132 ashish 35
    public long createTransaction(Transaction transaction) throws TransactionServiceException, TException;
68 ashish 36
 
37
    public Transaction getTransaction(long id) throws TransactionServiceException, TException;
38
 
132 ashish 39
    public List<Transaction> getTransactionsForCustomer(long customerId, long from_date, long to_date, TransactionStatus status) throws TransactionServiceException, TException;
68 ashish 40
 
132 ashish 41
    public List<Transaction> getTransactionsForShoppingCartId(long shoppingCartId) throws TransactionServiceException, TException;
42
 
68 ashish 43
    public TransactionStatus getTransactionStatus(long transactionId) throws TransactionServiceException, TException;
44
 
45
    public boolean changeTransactionStatus(long transactionId, TransactionStatus status, String description) throws TransactionServiceException, TException;
46
 
1398 varun.gupt 47
    public boolean enqueueTransactionInfoEmail(long transactionId) throws TransactionServiceException, TException;
1382 varun.gupt 48
 
483 rajveer 49
    public List<Order> getAllOrders(OrderStatus status, long from_date, long to_date, long warehouse_id) throws TransactionServiceException, TException;
68 ashish 50
 
1133 chandransh 51
    /**
52
     * Returns orders within a range of their billing dates
53
     * 
54
     * @param status
55
     * @param start_billing_date
56
     * @param end_billing_date
57
     * @param warehouse_id
58
     */
1022 varun.gupt 59
    public List<Order> getOrdersByBillingDate(OrderStatus status, long start_billing_date, long end_billing_date, long warehouse_id) throws TransactionServiceException, TException;
60
 
1382 varun.gupt 61
    /**
62
     * Returns order ids for orders which can be returned
63
     * 
64
     * @param customer_id
65
     * @param limit
66
     */
67
    public List<Long> getReturnableOrdersForCustomer(long customer_id, long limit) throws TransactionServiceException, TException;
68
 
69
    /**
70
     * Returns order ids for orders which can be cancelled
71
     * 
72
     * @param customer_id
73
     * @param limit
74
     */
75
    public List<Long> getCancellableOrdersForCustomer(long customer_id, long limit) throws TransactionServiceException, TException;
76
 
483 rajveer 77
    public boolean changeOrderStatus(long orderId, OrderStatus status, String description) throws TransactionServiceException, TException;
68 ashish 78
 
1148 chandransh 79
    /**
80
     * Add billing details such as the bill number and the biller to the Order.
81
     * 
82
     * @param orderId
83
     * @param invoice_number
84
     * @param billed_by
85
     */
86
    public boolean addBillingDetails(long orderId, String invoice_number, String billed_by) throws TransactionServiceException, TException;
495 rajveer 87
 
1148 chandransh 88
    /**
89
     * Adds jacket number to the order. Return false if it doesn't find the order with the given ID.
90
     * 
91
     * @param orderId
92
     * @param jacketNumber
93
     */
94
    public boolean addJacketNumber(long orderId, long jacketNumber) throws TransactionServiceException, TException;
95
 
923 rajveer 96
    public boolean acceptOrder(long orderId) throws TransactionServiceException, TException;
97
 
98
    public boolean billOrder(long orderId) throws TransactionServiceException, TException;
99
 
483 rajveer 100
    public List<Order> getOrdersForTransaction(long transactionId) throws TransactionServiceException, TException;
68 ashish 101
 
483 rajveer 102
    public List<Order> getOrdersForCustomer(long customerId, long from_date, long to_date, OrderStatus status) throws TransactionServiceException, TException;
68 ashish 103
 
483 rajveer 104
    public long createOrder(Order order) throws TransactionServiceException, TException;
68 ashish 105
 
483 rajveer 106
    public Order getOrder(long id) throws TransactionServiceException, TException;
68 ashish 107
 
483 rajveer 108
    public List<LineItem> getLineItemsForOrder(long orderId) throws TransactionServiceException, TException;
68 ashish 109
 
758 chandransh 110
    /**
1221 chandransh 111
     * Create a batch of all the pending orders for the given warehouse.
112
     * The returned list is orderd by created_timestamp.
113
     * If there are no pending orders, an empty list is returned.
114
     * 
115
     * @param warehouseId
116
     */
117
    public List<Order> batchOrders(long warehouseId) throws TransactionServiceException, TException;
118
 
119
    /**
1209 chandransh 120
     * Mark the given order as out of stock. Throws an exception if the order with the given Id couldn't be found.
121
     * 
122
     * @param orderId
123
     */
124
    public boolean markOrderAsOutOfStock(long orderId) throws TransactionServiceException, TException;
125
 
126
    /**
758 chandransh 127
     * Marks all BILLED orders for a warehouse and a provider as SHIPPED_FROM_WH
128
     * 
129
     * @param warehouseId
130
     * @param providerId
131
     */
132
    public boolean markOrdersAsManifested(long warehouseId, long providerId) throws TransactionServiceException, TException;
133
 
1114 chandransh 134
    /**
135
     * Marks all SHIPPED_FROM_WH orders of the previous day for a provider as SHIPPED_TO_LOGISTICS.
136
     * Returns a list of orders that were shipped from warehouse but did not appear in the pick-up report.
137
     * Raises an exception if we encounter report for an AWB number that we did not ship.
138
     * 
139
     * @param providerId
140
     * @param pickupDetails
141
     */
1245 chandransh 142
    public List<Order> markOrdersAsPickedUp(long providerId, Map<String,String> pickupDetails) throws TransactionServiceException, TException;
1114 chandransh 143
 
1133 chandransh 144
    /**
145
     * Marks all orders with AWBs in the given map as delivered. Also sets the delivery timestamp and
146
     * the name of the receiver.
147
     * Raises an exception if we encounter report for an AWB number that we did not ship.
148
     * 
149
     * @param providerId
150
     * @param deliveredOrders
151
     */
152
    public void markOrdersAsDelivered(long providerId, Map<String,String> deliveredOrders) throws TransactionServiceException, TException;
153
 
154
    /**
155
     * Mark all orders with AWBs in the given map as failed. Also sets the delivery timestamp.
156
     * Raises an exception if we encounter report for an AWB number that we did not ship.
157
     * 
158
     * @param providerId
159
     * @param returnedOrders
160
     */
161
    public void markOrdersAsFailed(long providerId, Map<String,String> returnedOrders) throws TransactionServiceException, TException;
162
 
1245 chandransh 163
    /**
164
     * Update the status description of orders whose AWB numbers are keys of the Map.
165
     * 
166
     * @param providerId
167
     * @param undeliveredOrders
168
     */
169
    public void updateNonDeliveryReason(long providerId, Map<String,String> undeliveredOrders) throws TransactionServiceException, TException;
170
 
483 rajveer 171
    public List<Alert> getAlerts(long orderId, boolean valid) throws TException;
68 ashish 172
 
483 rajveer 173
    public void setAlert(long orderId, boolean unset, long type, String comment) throws TException;
68 ashish 174
 
175
  }
176
 
177
  public static class Client implements Iface {
178
    public Client(TProtocol prot)
179
    {
180
      this(prot, prot);
181
    }
182
 
183
    public Client(TProtocol iprot, TProtocol oprot)
184
    {
185
      iprot_ = iprot;
186
      oprot_ = oprot;
187
    }
188
 
189
    protected TProtocol iprot_;
190
    protected TProtocol oprot_;
191
 
192
    protected int seqid_;
193
 
194
    public TProtocol getInputProtocol()
195
    {
196
      return this.iprot_;
197
    }
198
 
199
    public TProtocol getOutputProtocol()
200
    {
201
      return this.oprot_;
202
    }
203
 
764 rajveer 204
    public void closeSession() throws TException
205
    {
206
      send_closeSession();
207
      recv_closeSession();
208
    }
209
 
210
    public void send_closeSession() throws TException
211
    {
212
      oprot_.writeMessageBegin(new TMessage("closeSession", TMessageType.CALL, seqid_));
213
      closeSession_args args = new closeSession_args();
214
      args.write(oprot_);
215
      oprot_.writeMessageEnd();
216
      oprot_.getTransport().flush();
217
    }
218
 
219
    public void recv_closeSession() throws TException
220
    {
221
      TMessage msg = iprot_.readMessageBegin();
222
      if (msg.type == TMessageType.EXCEPTION) {
223
        TApplicationException x = TApplicationException.read(iprot_);
224
        iprot_.readMessageEnd();
225
        throw x;
226
      }
227
      closeSession_result result = new closeSession_result();
228
      result.read(iprot_);
229
      iprot_.readMessageEnd();
230
      return;
231
    }
232
 
132 ashish 233
    public long createTransaction(Transaction transaction) throws TransactionServiceException, TException
68 ashish 234
    {
235
      send_createTransaction(transaction);
132 ashish 236
      return recv_createTransaction();
68 ashish 237
    }
238
 
239
    public void send_createTransaction(Transaction transaction) throws TException
240
    {
241
      oprot_.writeMessageBegin(new TMessage("createTransaction", TMessageType.CALL, seqid_));
242
      createTransaction_args args = new createTransaction_args();
243
      args.transaction = transaction;
244
      args.write(oprot_);
245
      oprot_.writeMessageEnd();
246
      oprot_.getTransport().flush();
247
    }
248
 
132 ashish 249
    public long recv_createTransaction() throws TransactionServiceException, TException
68 ashish 250
    {
251
      TMessage msg = iprot_.readMessageBegin();
252
      if (msg.type == TMessageType.EXCEPTION) {
253
        TApplicationException x = TApplicationException.read(iprot_);
254
        iprot_.readMessageEnd();
255
        throw x;
256
      }
257
      createTransaction_result result = new createTransaction_result();
258
      result.read(iprot_);
259
      iprot_.readMessageEnd();
132 ashish 260
      if (result.isSetSuccess()) {
261
        return result.success;
262
      }
68 ashish 263
      if (result.ex != null) {
264
        throw result.ex;
265
      }
132 ashish 266
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "createTransaction failed: unknown result");
68 ashish 267
    }
268
 
269
    public Transaction getTransaction(long id) throws TransactionServiceException, TException
270
    {
271
      send_getTransaction(id);
272
      return recv_getTransaction();
273
    }
274
 
275
    public void send_getTransaction(long id) throws TException
276
    {
277
      oprot_.writeMessageBegin(new TMessage("getTransaction", TMessageType.CALL, seqid_));
278
      getTransaction_args args = new getTransaction_args();
279
      args.id = id;
280
      args.write(oprot_);
281
      oprot_.writeMessageEnd();
282
      oprot_.getTransport().flush();
283
    }
284
 
285
    public Transaction recv_getTransaction() throws TransactionServiceException, TException
286
    {
287
      TMessage msg = iprot_.readMessageBegin();
288
      if (msg.type == TMessageType.EXCEPTION) {
289
        TApplicationException x = TApplicationException.read(iprot_);
290
        iprot_.readMessageEnd();
291
        throw x;
292
      }
293
      getTransaction_result result = new getTransaction_result();
294
      result.read(iprot_);
295
      iprot_.readMessageEnd();
296
      if (result.isSetSuccess()) {
297
        return result.success;
298
      }
299
      if (result.ex != null) {
300
        throw result.ex;
301
      }
302
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getTransaction failed: unknown result");
303
    }
304
 
132 ashish 305
    public List<Transaction> getTransactionsForCustomer(long customerId, long from_date, long to_date, TransactionStatus status) throws TransactionServiceException, TException
68 ashish 306
    {
132 ashish 307
      send_getTransactionsForCustomer(customerId, from_date, to_date, status);
68 ashish 308
      return recv_getTransactionsForCustomer();
309
    }
310
 
132 ashish 311
    public void send_getTransactionsForCustomer(long customerId, long from_date, long to_date, TransactionStatus status) throws TException
68 ashish 312
    {
313
      oprot_.writeMessageBegin(new TMessage("getTransactionsForCustomer", TMessageType.CALL, seqid_));
314
      getTransactionsForCustomer_args args = new getTransactionsForCustomer_args();
315
      args.customerId = customerId;
132 ashish 316
      args.from_date = from_date;
317
      args.to_date = to_date;
68 ashish 318
      args.status = status;
319
      args.write(oprot_);
320
      oprot_.writeMessageEnd();
321
      oprot_.getTransport().flush();
322
    }
323
 
324
    public List<Transaction> recv_getTransactionsForCustomer() throws TransactionServiceException, TException
325
    {
326
      TMessage msg = iprot_.readMessageBegin();
327
      if (msg.type == TMessageType.EXCEPTION) {
328
        TApplicationException x = TApplicationException.read(iprot_);
329
        iprot_.readMessageEnd();
330
        throw x;
331
      }
332
      getTransactionsForCustomer_result result = new getTransactionsForCustomer_result();
333
      result.read(iprot_);
334
      iprot_.readMessageEnd();
335
      if (result.isSetSuccess()) {
336
        return result.success;
337
      }
338
      if (result.ex != null) {
339
        throw result.ex;
340
      }
341
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getTransactionsForCustomer failed: unknown result");
342
    }
343
 
132 ashish 344
    public List<Transaction> getTransactionsForShoppingCartId(long shoppingCartId) throws TransactionServiceException, TException
345
    {
346
      send_getTransactionsForShoppingCartId(shoppingCartId);
347
      return recv_getTransactionsForShoppingCartId();
348
    }
349
 
350
    public void send_getTransactionsForShoppingCartId(long shoppingCartId) throws TException
351
    {
352
      oprot_.writeMessageBegin(new TMessage("getTransactionsForShoppingCartId", TMessageType.CALL, seqid_));
353
      getTransactionsForShoppingCartId_args args = new getTransactionsForShoppingCartId_args();
354
      args.shoppingCartId = shoppingCartId;
355
      args.write(oprot_);
356
      oprot_.writeMessageEnd();
357
      oprot_.getTransport().flush();
358
    }
359
 
360
    public List<Transaction> recv_getTransactionsForShoppingCartId() throws TransactionServiceException, TException
361
    {
362
      TMessage msg = iprot_.readMessageBegin();
363
      if (msg.type == TMessageType.EXCEPTION) {
364
        TApplicationException x = TApplicationException.read(iprot_);
365
        iprot_.readMessageEnd();
366
        throw x;
367
      }
368
      getTransactionsForShoppingCartId_result result = new getTransactionsForShoppingCartId_result();
369
      result.read(iprot_);
370
      iprot_.readMessageEnd();
371
      if (result.isSetSuccess()) {
372
        return result.success;
373
      }
374
      if (result.ex != null) {
375
        throw result.ex;
376
      }
377
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getTransactionsForShoppingCartId failed: unknown result");
378
    }
379
 
68 ashish 380
    public TransactionStatus getTransactionStatus(long transactionId) throws TransactionServiceException, TException
381
    {
382
      send_getTransactionStatus(transactionId);
383
      return recv_getTransactionStatus();
384
    }
385
 
386
    public void send_getTransactionStatus(long transactionId) throws TException
387
    {
388
      oprot_.writeMessageBegin(new TMessage("getTransactionStatus", TMessageType.CALL, seqid_));
389
      getTransactionStatus_args args = new getTransactionStatus_args();
390
      args.transactionId = transactionId;
391
      args.write(oprot_);
392
      oprot_.writeMessageEnd();
393
      oprot_.getTransport().flush();
394
    }
395
 
396
    public TransactionStatus recv_getTransactionStatus() throws TransactionServiceException, TException
397
    {
398
      TMessage msg = iprot_.readMessageBegin();
399
      if (msg.type == TMessageType.EXCEPTION) {
400
        TApplicationException x = TApplicationException.read(iprot_);
401
        iprot_.readMessageEnd();
402
        throw x;
403
      }
404
      getTransactionStatus_result result = new getTransactionStatus_result();
405
      result.read(iprot_);
406
      iprot_.readMessageEnd();
407
      if (result.isSetSuccess()) {
408
        return result.success;
409
      }
410
      if (result.ex != null) {
411
        throw result.ex;
412
      }
413
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getTransactionStatus failed: unknown result");
414
    }
415
 
416
    public boolean changeTransactionStatus(long transactionId, TransactionStatus status, String description) throws TransactionServiceException, TException
417
    {
418
      send_changeTransactionStatus(transactionId, status, description);
419
      return recv_changeTransactionStatus();
420
    }
421
 
422
    public void send_changeTransactionStatus(long transactionId, TransactionStatus status, String description) throws TException
423
    {
424
      oprot_.writeMessageBegin(new TMessage("changeTransactionStatus", TMessageType.CALL, seqid_));
425
      changeTransactionStatus_args args = new changeTransactionStatus_args();
426
      args.transactionId = transactionId;
427
      args.status = status;
428
      args.description = description;
429
      args.write(oprot_);
430
      oprot_.writeMessageEnd();
431
      oprot_.getTransport().flush();
432
    }
433
 
434
    public boolean recv_changeTransactionStatus() throws TransactionServiceException, TException
435
    {
436
      TMessage msg = iprot_.readMessageBegin();
437
      if (msg.type == TMessageType.EXCEPTION) {
438
        TApplicationException x = TApplicationException.read(iprot_);
439
        iprot_.readMessageEnd();
440
        throw x;
441
      }
442
      changeTransactionStatus_result result = new changeTransactionStatus_result();
443
      result.read(iprot_);
444
      iprot_.readMessageEnd();
445
      if (result.isSetSuccess()) {
446
        return result.success;
447
      }
448
      if (result.ex != null) {
449
        throw result.ex;
450
      }
451
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "changeTransactionStatus failed: unknown result");
452
    }
453
 
1398 varun.gupt 454
    public boolean enqueueTransactionInfoEmail(long transactionId) throws TransactionServiceException, TException
1382 varun.gupt 455
    {
1398 varun.gupt 456
      send_enqueueTransactionInfoEmail(transactionId);
457
      return recv_enqueueTransactionInfoEmail();
1382 varun.gupt 458
    }
459
 
1398 varun.gupt 460
    public void send_enqueueTransactionInfoEmail(long transactionId) throws TException
1382 varun.gupt 461
    {
1398 varun.gupt 462
      oprot_.writeMessageBegin(new TMessage("enqueueTransactionInfoEmail", TMessageType.CALL, seqid_));
463
      enqueueTransactionInfoEmail_args args = new enqueueTransactionInfoEmail_args();
1382 varun.gupt 464
      args.transactionId = transactionId;
465
      args.write(oprot_);
466
      oprot_.writeMessageEnd();
467
      oprot_.getTransport().flush();
468
    }
469
 
1398 varun.gupt 470
    public boolean recv_enqueueTransactionInfoEmail() throws TransactionServiceException, TException
1382 varun.gupt 471
    {
472
      TMessage msg = iprot_.readMessageBegin();
473
      if (msg.type == TMessageType.EXCEPTION) {
474
        TApplicationException x = TApplicationException.read(iprot_);
475
        iprot_.readMessageEnd();
476
        throw x;
477
      }
1398 varun.gupt 478
      enqueueTransactionInfoEmail_result result = new enqueueTransactionInfoEmail_result();
1382 varun.gupt 479
      result.read(iprot_);
480
      iprot_.readMessageEnd();
481
      if (result.isSetSuccess()) {
482
        return result.success;
483
      }
484
      if (result.ex != null) {
485
        throw result.ex;
486
      }
1398 varun.gupt 487
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "enqueueTransactionInfoEmail failed: unknown result");
1382 varun.gupt 488
    }
489
 
483 rajveer 490
    public List<Order> getAllOrders(OrderStatus status, long from_date, long to_date, long warehouse_id) throws TransactionServiceException, TException
68 ashish 491
    {
483 rajveer 492
      send_getAllOrders(status, from_date, to_date, warehouse_id);
493
      return recv_getAllOrders();
68 ashish 494
    }
495
 
483 rajveer 496
    public void send_getAllOrders(OrderStatus status, long from_date, long to_date, long warehouse_id) throws TException
68 ashish 497
    {
483 rajveer 498
      oprot_.writeMessageBegin(new TMessage("getAllOrders", TMessageType.CALL, seqid_));
499
      getAllOrders_args args = new getAllOrders_args();
500
      args.status = status;
501
      args.from_date = from_date;
502
      args.to_date = to_date;
503
      args.warehouse_id = warehouse_id;
68 ashish 504
      args.write(oprot_);
505
      oprot_.writeMessageEnd();
506
      oprot_.getTransport().flush();
507
    }
508
 
483 rajveer 509
    public List<Order> recv_getAllOrders() throws TransactionServiceException, TException
68 ashish 510
    {
511
      TMessage msg = iprot_.readMessageBegin();
512
      if (msg.type == TMessageType.EXCEPTION) {
513
        TApplicationException x = TApplicationException.read(iprot_);
514
        iprot_.readMessageEnd();
515
        throw x;
516
      }
483 rajveer 517
      getAllOrders_result result = new getAllOrders_result();
68 ashish 518
      result.read(iprot_);
519
      iprot_.readMessageEnd();
520
      if (result.isSetSuccess()) {
521
        return result.success;
522
      }
523
      if (result.ex != null) {
524
        throw result.ex;
525
      }
483 rajveer 526
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getAllOrders failed: unknown result");
68 ashish 527
    }
528
 
1022 varun.gupt 529
    public List<Order> getOrdersByBillingDate(OrderStatus status, long start_billing_date, long end_billing_date, long warehouse_id) throws TransactionServiceException, TException
530
    {
531
      send_getOrdersByBillingDate(status, start_billing_date, end_billing_date, warehouse_id);
532
      return recv_getOrdersByBillingDate();
533
    }
534
 
535
    public void send_getOrdersByBillingDate(OrderStatus status, long start_billing_date, long end_billing_date, long warehouse_id) throws TException
536
    {
537
      oprot_.writeMessageBegin(new TMessage("getOrdersByBillingDate", TMessageType.CALL, seqid_));
538
      getOrdersByBillingDate_args args = new getOrdersByBillingDate_args();
539
      args.status = status;
540
      args.start_billing_date = start_billing_date;
541
      args.end_billing_date = end_billing_date;
542
      args.warehouse_id = warehouse_id;
543
      args.write(oprot_);
544
      oprot_.writeMessageEnd();
545
      oprot_.getTransport().flush();
546
    }
547
 
548
    public List<Order> recv_getOrdersByBillingDate() throws TransactionServiceException, TException
549
    {
550
      TMessage msg = iprot_.readMessageBegin();
551
      if (msg.type == TMessageType.EXCEPTION) {
552
        TApplicationException x = TApplicationException.read(iprot_);
553
        iprot_.readMessageEnd();
554
        throw x;
555
      }
556
      getOrdersByBillingDate_result result = new getOrdersByBillingDate_result();
557
      result.read(iprot_);
558
      iprot_.readMessageEnd();
559
      if (result.isSetSuccess()) {
560
        return result.success;
561
      }
562
      if (result.ex != null) {
563
        throw result.ex;
564
      }
565
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getOrdersByBillingDate failed: unknown result");
566
    }
567
 
1382 varun.gupt 568
    public List<Long> getReturnableOrdersForCustomer(long customer_id, long limit) throws TransactionServiceException, TException
569
    {
570
      send_getReturnableOrdersForCustomer(customer_id, limit);
571
      return recv_getReturnableOrdersForCustomer();
572
    }
573
 
574
    public void send_getReturnableOrdersForCustomer(long customer_id, long limit) throws TException
575
    {
576
      oprot_.writeMessageBegin(new TMessage("getReturnableOrdersForCustomer", TMessageType.CALL, seqid_));
577
      getReturnableOrdersForCustomer_args args = new getReturnableOrdersForCustomer_args();
578
      args.customer_id = customer_id;
579
      args.limit = limit;
580
      args.write(oprot_);
581
      oprot_.writeMessageEnd();
582
      oprot_.getTransport().flush();
583
    }
584
 
585
    public List<Long> recv_getReturnableOrdersForCustomer() throws TransactionServiceException, TException
586
    {
587
      TMessage msg = iprot_.readMessageBegin();
588
      if (msg.type == TMessageType.EXCEPTION) {
589
        TApplicationException x = TApplicationException.read(iprot_);
590
        iprot_.readMessageEnd();
591
        throw x;
592
      }
593
      getReturnableOrdersForCustomer_result result = new getReturnableOrdersForCustomer_result();
594
      result.read(iprot_);
595
      iprot_.readMessageEnd();
596
      if (result.isSetSuccess()) {
597
        return result.success;
598
      }
599
      if (result.ex != null) {
600
        throw result.ex;
601
      }
602
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getReturnableOrdersForCustomer failed: unknown result");
603
    }
604
 
605
    public List<Long> getCancellableOrdersForCustomer(long customer_id, long limit) throws TransactionServiceException, TException
606
    {
607
      send_getCancellableOrdersForCustomer(customer_id, limit);
608
      return recv_getCancellableOrdersForCustomer();
609
    }
610
 
611
    public void send_getCancellableOrdersForCustomer(long customer_id, long limit) throws TException
612
    {
613
      oprot_.writeMessageBegin(new TMessage("getCancellableOrdersForCustomer", TMessageType.CALL, seqid_));
614
      getCancellableOrdersForCustomer_args args = new getCancellableOrdersForCustomer_args();
615
      args.customer_id = customer_id;
616
      args.limit = limit;
617
      args.write(oprot_);
618
      oprot_.writeMessageEnd();
619
      oprot_.getTransport().flush();
620
    }
621
 
622
    public List<Long> recv_getCancellableOrdersForCustomer() throws TransactionServiceException, TException
623
    {
624
      TMessage msg = iprot_.readMessageBegin();
625
      if (msg.type == TMessageType.EXCEPTION) {
626
        TApplicationException x = TApplicationException.read(iprot_);
627
        iprot_.readMessageEnd();
628
        throw x;
629
      }
630
      getCancellableOrdersForCustomer_result result = new getCancellableOrdersForCustomer_result();
631
      result.read(iprot_);
632
      iprot_.readMessageEnd();
633
      if (result.isSetSuccess()) {
634
        return result.success;
635
      }
636
      if (result.ex != null) {
637
        throw result.ex;
638
      }
639
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getCancellableOrdersForCustomer failed: unknown result");
640
    }
641
 
483 rajveer 642
    public boolean changeOrderStatus(long orderId, OrderStatus status, String description) throws TransactionServiceException, TException
68 ashish 643
    {
483 rajveer 644
      send_changeOrderStatus(orderId, status, description);
645
      return recv_changeOrderStatus();
68 ashish 646
    }
647
 
483 rajveer 648
    public void send_changeOrderStatus(long orderId, OrderStatus status, String description) throws TException
68 ashish 649
    {
483 rajveer 650
      oprot_.writeMessageBegin(new TMessage("changeOrderStatus", TMessageType.CALL, seqid_));
651
      changeOrderStatus_args args = new changeOrderStatus_args();
652
      args.orderId = orderId;
653
      args.status = status;
654
      args.description = description;
68 ashish 655
      args.write(oprot_);
656
      oprot_.writeMessageEnd();
657
      oprot_.getTransport().flush();
658
    }
659
 
483 rajveer 660
    public boolean recv_changeOrderStatus() throws TransactionServiceException, TException
68 ashish 661
    {
662
      TMessage msg = iprot_.readMessageBegin();
663
      if (msg.type == TMessageType.EXCEPTION) {
664
        TApplicationException x = TApplicationException.read(iprot_);
665
        iprot_.readMessageEnd();
666
        throw x;
667
      }
483 rajveer 668
      changeOrderStatus_result result = new changeOrderStatus_result();
68 ashish 669
      result.read(iprot_);
670
      iprot_.readMessageEnd();
671
      if (result.isSetSuccess()) {
672
        return result.success;
673
      }
674
      if (result.ex != null) {
675
        throw result.ex;
676
      }
483 rajveer 677
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "changeOrderStatus failed: unknown result");
68 ashish 678
    }
679
 
1148 chandransh 680
    public boolean addBillingDetails(long orderId, String invoice_number, String billed_by) throws TransactionServiceException, TException
495 rajveer 681
    {
1148 chandransh 682
      send_addBillingDetails(orderId, invoice_number, billed_by);
495 rajveer 683
      return recv_addBillingDetails();
684
    }
685
 
1148 chandransh 686
    public void send_addBillingDetails(long orderId, String invoice_number, String billed_by) throws TException
495 rajveer 687
    {
688
      oprot_.writeMessageBegin(new TMessage("addBillingDetails", TMessageType.CALL, seqid_));
689
      addBillingDetails_args args = new addBillingDetails_args();
690
      args.orderId = orderId;
691
      args.invoice_number = invoice_number;
692
      args.billed_by = billed_by;
693
      args.write(oprot_);
694
      oprot_.writeMessageEnd();
695
      oprot_.getTransport().flush();
696
    }
697
 
698
    public boolean recv_addBillingDetails() throws TransactionServiceException, TException
699
    {
700
      TMessage msg = iprot_.readMessageBegin();
701
      if (msg.type == TMessageType.EXCEPTION) {
702
        TApplicationException x = TApplicationException.read(iprot_);
703
        iprot_.readMessageEnd();
704
        throw x;
705
      }
706
      addBillingDetails_result result = new addBillingDetails_result();
707
      result.read(iprot_);
708
      iprot_.readMessageEnd();
709
      if (result.isSetSuccess()) {
710
        return result.success;
711
      }
712
      if (result.ex != null) {
713
        throw result.ex;
714
      }
715
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "addBillingDetails failed: unknown result");
716
    }
717
 
1148 chandransh 718
    public boolean addJacketNumber(long orderId, long jacketNumber) throws TransactionServiceException, TException
719
    {
720
      send_addJacketNumber(orderId, jacketNumber);
721
      return recv_addJacketNumber();
722
    }
723
 
724
    public void send_addJacketNumber(long orderId, long jacketNumber) throws TException
725
    {
726
      oprot_.writeMessageBegin(new TMessage("addJacketNumber", TMessageType.CALL, seqid_));
727
      addJacketNumber_args args = new addJacketNumber_args();
728
      args.orderId = orderId;
729
      args.jacketNumber = jacketNumber;
730
      args.write(oprot_);
731
      oprot_.writeMessageEnd();
732
      oprot_.getTransport().flush();
733
    }
734
 
735
    public boolean recv_addJacketNumber() throws TransactionServiceException, TException
736
    {
737
      TMessage msg = iprot_.readMessageBegin();
738
      if (msg.type == TMessageType.EXCEPTION) {
739
        TApplicationException x = TApplicationException.read(iprot_);
740
        iprot_.readMessageEnd();
741
        throw x;
742
      }
743
      addJacketNumber_result result = new addJacketNumber_result();
744
      result.read(iprot_);
745
      iprot_.readMessageEnd();
746
      if (result.isSetSuccess()) {
747
        return result.success;
748
      }
749
      if (result.ex != null) {
750
        throw result.ex;
751
      }
752
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "addJacketNumber failed: unknown result");
753
    }
754
 
923 rajveer 755
    public boolean acceptOrder(long orderId) throws TransactionServiceException, TException
756
    {
757
      send_acceptOrder(orderId);
758
      return recv_acceptOrder();
759
    }
760
 
761
    public void send_acceptOrder(long orderId) throws TException
762
    {
763
      oprot_.writeMessageBegin(new TMessage("acceptOrder", TMessageType.CALL, seqid_));
764
      acceptOrder_args args = new acceptOrder_args();
765
      args.orderId = orderId;
766
      args.write(oprot_);
767
      oprot_.writeMessageEnd();
768
      oprot_.getTransport().flush();
769
    }
770
 
771
    public boolean recv_acceptOrder() throws TransactionServiceException, TException
772
    {
773
      TMessage msg = iprot_.readMessageBegin();
774
      if (msg.type == TMessageType.EXCEPTION) {
775
        TApplicationException x = TApplicationException.read(iprot_);
776
        iprot_.readMessageEnd();
777
        throw x;
778
      }
779
      acceptOrder_result result = new acceptOrder_result();
780
      result.read(iprot_);
781
      iprot_.readMessageEnd();
782
      if (result.isSetSuccess()) {
783
        return result.success;
784
      }
785
      if (result.ex != null) {
786
        throw result.ex;
787
      }
788
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "acceptOrder failed: unknown result");
789
    }
790
 
791
    public boolean billOrder(long orderId) throws TransactionServiceException, TException
792
    {
793
      send_billOrder(orderId);
794
      return recv_billOrder();
795
    }
796
 
797
    public void send_billOrder(long orderId) throws TException
798
    {
799
      oprot_.writeMessageBegin(new TMessage("billOrder", TMessageType.CALL, seqid_));
800
      billOrder_args args = new billOrder_args();
801
      args.orderId = orderId;
802
      args.write(oprot_);
803
      oprot_.writeMessageEnd();
804
      oprot_.getTransport().flush();
805
    }
806
 
807
    public boolean recv_billOrder() throws TransactionServiceException, TException
808
    {
809
      TMessage msg = iprot_.readMessageBegin();
810
      if (msg.type == TMessageType.EXCEPTION) {
811
        TApplicationException x = TApplicationException.read(iprot_);
812
        iprot_.readMessageEnd();
813
        throw x;
814
      }
815
      billOrder_result result = new billOrder_result();
816
      result.read(iprot_);
817
      iprot_.readMessageEnd();
818
      if (result.isSetSuccess()) {
819
        return result.success;
820
      }
821
      if (result.ex != null) {
822
        throw result.ex;
823
      }
824
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "billOrder failed: unknown result");
825
    }
826
 
483 rajveer 827
    public List<Order> getOrdersForTransaction(long transactionId) throws TransactionServiceException, TException
68 ashish 828
    {
483 rajveer 829
      send_getOrdersForTransaction(transactionId);
830
      return recv_getOrdersForTransaction();
68 ashish 831
    }
832
 
483 rajveer 833
    public void send_getOrdersForTransaction(long transactionId) throws TException
68 ashish 834
    {
483 rajveer 835
      oprot_.writeMessageBegin(new TMessage("getOrdersForTransaction", TMessageType.CALL, seqid_));
836
      getOrdersForTransaction_args args = new getOrdersForTransaction_args();
68 ashish 837
      args.transactionId = transactionId;
838
      args.write(oprot_);
839
      oprot_.writeMessageEnd();
840
      oprot_.getTransport().flush();
841
    }
842
 
483 rajveer 843
    public List<Order> recv_getOrdersForTransaction() throws TransactionServiceException, TException
68 ashish 844
    {
845
      TMessage msg = iprot_.readMessageBegin();
846
      if (msg.type == TMessageType.EXCEPTION) {
847
        TApplicationException x = TApplicationException.read(iprot_);
848
        iprot_.readMessageEnd();
849
        throw x;
850
      }
483 rajveer 851
      getOrdersForTransaction_result result = new getOrdersForTransaction_result();
68 ashish 852
      result.read(iprot_);
853
      iprot_.readMessageEnd();
854
      if (result.isSetSuccess()) {
855
        return result.success;
856
      }
857
      if (result.ex != null) {
858
        throw result.ex;
859
      }
483 rajveer 860
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getOrdersForTransaction failed: unknown result");
68 ashish 861
    }
862
 
483 rajveer 863
    public List<Order> getOrdersForCustomer(long customerId, long from_date, long to_date, OrderStatus status) throws TransactionServiceException, TException
68 ashish 864
    {
483 rajveer 865
      send_getOrdersForCustomer(customerId, from_date, to_date, status);
866
      return recv_getOrdersForCustomer();
68 ashish 867
    }
868
 
483 rajveer 869
    public void send_getOrdersForCustomer(long customerId, long from_date, long to_date, OrderStatus status) throws TException
68 ashish 870
    {
483 rajveer 871
      oprot_.writeMessageBegin(new TMessage("getOrdersForCustomer", TMessageType.CALL, seqid_));
872
      getOrdersForCustomer_args args = new getOrdersForCustomer_args();
873
      args.customerId = customerId;
874
      args.from_date = from_date;
875
      args.to_date = to_date;
876
      args.status = status;
68 ashish 877
      args.write(oprot_);
878
      oprot_.writeMessageEnd();
879
      oprot_.getTransport().flush();
880
    }
881
 
483 rajveer 882
    public List<Order> recv_getOrdersForCustomer() throws TransactionServiceException, TException
68 ashish 883
    {
884
      TMessage msg = iprot_.readMessageBegin();
885
      if (msg.type == TMessageType.EXCEPTION) {
886
        TApplicationException x = TApplicationException.read(iprot_);
887
        iprot_.readMessageEnd();
888
        throw x;
889
      }
483 rajveer 890
      getOrdersForCustomer_result result = new getOrdersForCustomer_result();
68 ashish 891
      result.read(iprot_);
892
      iprot_.readMessageEnd();
893
      if (result.isSetSuccess()) {
894
        return result.success;
895
      }
896
      if (result.ex != null) {
897
        throw result.ex;
898
      }
483 rajveer 899
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getOrdersForCustomer failed: unknown result");
68 ashish 900
    }
901
 
483 rajveer 902
    public long createOrder(Order order) throws TransactionServiceException, TException
68 ashish 903
    {
483 rajveer 904
      send_createOrder(order);
905
      return recv_createOrder();
68 ashish 906
    }
907
 
483 rajveer 908
    public void send_createOrder(Order order) throws TException
68 ashish 909
    {
483 rajveer 910
      oprot_.writeMessageBegin(new TMessage("createOrder", TMessageType.CALL, seqid_));
911
      createOrder_args args = new createOrder_args();
912
      args.order = order;
68 ashish 913
      args.write(oprot_);
914
      oprot_.writeMessageEnd();
915
      oprot_.getTransport().flush();
916
    }
917
 
483 rajveer 918
    public long recv_createOrder() throws TransactionServiceException, TException
68 ashish 919
    {
920
      TMessage msg = iprot_.readMessageBegin();
921
      if (msg.type == TMessageType.EXCEPTION) {
922
        TApplicationException x = TApplicationException.read(iprot_);
923
        iprot_.readMessageEnd();
924
        throw x;
925
      }
483 rajveer 926
      createOrder_result result = new createOrder_result();
68 ashish 927
      result.read(iprot_);
928
      iprot_.readMessageEnd();
929
      if (result.isSetSuccess()) {
930
        return result.success;
931
      }
932
      if (result.ex != null) {
933
        throw result.ex;
934
      }
483 rajveer 935
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "createOrder failed: unknown result");
68 ashish 936
    }
937
 
483 rajveer 938
    public Order getOrder(long id) throws TransactionServiceException, TException
68 ashish 939
    {
483 rajveer 940
      send_getOrder(id);
941
      return recv_getOrder();
68 ashish 942
    }
943
 
483 rajveer 944
    public void send_getOrder(long id) throws TException
68 ashish 945
    {
483 rajveer 946
      oprot_.writeMessageBegin(new TMessage("getOrder", TMessageType.CALL, seqid_));
947
      getOrder_args args = new getOrder_args();
948
      args.id = id;
68 ashish 949
      args.write(oprot_);
950
      oprot_.writeMessageEnd();
951
      oprot_.getTransport().flush();
952
    }
953
 
483 rajveer 954
    public Order recv_getOrder() throws TransactionServiceException, TException
68 ashish 955
    {
956
      TMessage msg = iprot_.readMessageBegin();
957
      if (msg.type == TMessageType.EXCEPTION) {
958
        TApplicationException x = TApplicationException.read(iprot_);
959
        iprot_.readMessageEnd();
960
        throw x;
961
      }
483 rajveer 962
      getOrder_result result = new getOrder_result();
68 ashish 963
      result.read(iprot_);
964
      iprot_.readMessageEnd();
965
      if (result.isSetSuccess()) {
966
        return result.success;
967
      }
968
      if (result.ex != null) {
969
        throw result.ex;
970
      }
483 rajveer 971
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getOrder failed: unknown result");
68 ashish 972
    }
973
 
483 rajveer 974
    public List<LineItem> getLineItemsForOrder(long orderId) throws TransactionServiceException, TException
68 ashish 975
    {
483 rajveer 976
      send_getLineItemsForOrder(orderId);
977
      return recv_getLineItemsForOrder();
68 ashish 978
    }
979
 
483 rajveer 980
    public void send_getLineItemsForOrder(long orderId) throws TException
68 ashish 981
    {
483 rajveer 982
      oprot_.writeMessageBegin(new TMessage("getLineItemsForOrder", TMessageType.CALL, seqid_));
983
      getLineItemsForOrder_args args = new getLineItemsForOrder_args();
984
      args.orderId = orderId;
68 ashish 985
      args.write(oprot_);
986
      oprot_.writeMessageEnd();
987
      oprot_.getTransport().flush();
988
    }
989
 
483 rajveer 990
    public List<LineItem> recv_getLineItemsForOrder() throws TransactionServiceException, TException
68 ashish 991
    {
992
      TMessage msg = iprot_.readMessageBegin();
993
      if (msg.type == TMessageType.EXCEPTION) {
994
        TApplicationException x = TApplicationException.read(iprot_);
995
        iprot_.readMessageEnd();
996
        throw x;
997
      }
483 rajveer 998
      getLineItemsForOrder_result result = new getLineItemsForOrder_result();
68 ashish 999
      result.read(iprot_);
1000
      iprot_.readMessageEnd();
1001
      if (result.isSetSuccess()) {
1002
        return result.success;
1003
      }
1004
      if (result.ex != null) {
1005
        throw result.ex;
1006
      }
483 rajveer 1007
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getLineItemsForOrder failed: unknown result");
68 ashish 1008
    }
1009
 
1221 chandransh 1010
    public List<Order> batchOrders(long warehouseId) throws TransactionServiceException, TException
1011
    {
1012
      send_batchOrders(warehouseId);
1013
      return recv_batchOrders();
1014
    }
1015
 
1016
    public void send_batchOrders(long warehouseId) throws TException
1017
    {
1018
      oprot_.writeMessageBegin(new TMessage("batchOrders", TMessageType.CALL, seqid_));
1019
      batchOrders_args args = new batchOrders_args();
1020
      args.warehouseId = warehouseId;
1021
      args.write(oprot_);
1022
      oprot_.writeMessageEnd();
1023
      oprot_.getTransport().flush();
1024
    }
1025
 
1026
    public List<Order> recv_batchOrders() throws TransactionServiceException, TException
1027
    {
1028
      TMessage msg = iprot_.readMessageBegin();
1029
      if (msg.type == TMessageType.EXCEPTION) {
1030
        TApplicationException x = TApplicationException.read(iprot_);
1031
        iprot_.readMessageEnd();
1032
        throw x;
1033
      }
1034
      batchOrders_result result = new batchOrders_result();
1035
      result.read(iprot_);
1036
      iprot_.readMessageEnd();
1037
      if (result.isSetSuccess()) {
1038
        return result.success;
1039
      }
1040
      if (result.ex != null) {
1041
        throw result.ex;
1042
      }
1043
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "batchOrders failed: unknown result");
1044
    }
1045
 
1209 chandransh 1046
    public boolean markOrderAsOutOfStock(long orderId) throws TransactionServiceException, TException
1047
    {
1048
      send_markOrderAsOutOfStock(orderId);
1049
      return recv_markOrderAsOutOfStock();
1050
    }
1051
 
1052
    public void send_markOrderAsOutOfStock(long orderId) throws TException
1053
    {
1054
      oprot_.writeMessageBegin(new TMessage("markOrderAsOutOfStock", TMessageType.CALL, seqid_));
1055
      markOrderAsOutOfStock_args args = new markOrderAsOutOfStock_args();
1056
      args.orderId = orderId;
1057
      args.write(oprot_);
1058
      oprot_.writeMessageEnd();
1059
      oprot_.getTransport().flush();
1060
    }
1061
 
1062
    public boolean recv_markOrderAsOutOfStock() throws TransactionServiceException, TException
1063
    {
1064
      TMessage msg = iprot_.readMessageBegin();
1065
      if (msg.type == TMessageType.EXCEPTION) {
1066
        TApplicationException x = TApplicationException.read(iprot_);
1067
        iprot_.readMessageEnd();
1068
        throw x;
1069
      }
1070
      markOrderAsOutOfStock_result result = new markOrderAsOutOfStock_result();
1071
      result.read(iprot_);
1072
      iprot_.readMessageEnd();
1073
      if (result.isSetSuccess()) {
1074
        return result.success;
1075
      }
1076
      if (result.ex != null) {
1077
        throw result.ex;
1078
      }
1079
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "markOrderAsOutOfStock failed: unknown result");
1080
    }
1081
 
758 chandransh 1082
    public boolean markOrdersAsManifested(long warehouseId, long providerId) throws TransactionServiceException, TException
1083
    {
1084
      send_markOrdersAsManifested(warehouseId, providerId);
1085
      return recv_markOrdersAsManifested();
1086
    }
1087
 
1088
    public void send_markOrdersAsManifested(long warehouseId, long providerId) throws TException
1089
    {
1090
      oprot_.writeMessageBegin(new TMessage("markOrdersAsManifested", TMessageType.CALL, seqid_));
1091
      markOrdersAsManifested_args args = new markOrdersAsManifested_args();
1092
      args.warehouseId = warehouseId;
1093
      args.providerId = providerId;
1094
      args.write(oprot_);
1095
      oprot_.writeMessageEnd();
1096
      oprot_.getTransport().flush();
1097
    }
1098
 
1099
    public boolean recv_markOrdersAsManifested() throws TransactionServiceException, TException
1100
    {
1101
      TMessage msg = iprot_.readMessageBegin();
1102
      if (msg.type == TMessageType.EXCEPTION) {
1103
        TApplicationException x = TApplicationException.read(iprot_);
1104
        iprot_.readMessageEnd();
1105
        throw x;
1106
      }
1107
      markOrdersAsManifested_result result = new markOrdersAsManifested_result();
1108
      result.read(iprot_);
1109
      iprot_.readMessageEnd();
1110
      if (result.isSetSuccess()) {
1111
        return result.success;
1112
      }
1113
      if (result.ex != null) {
1114
        throw result.ex;
1115
      }
1116
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "markOrdersAsManifested failed: unknown result");
1117
    }
1118
 
1245 chandransh 1119
    public List<Order> markOrdersAsPickedUp(long providerId, Map<String,String> pickupDetails) throws TransactionServiceException, TException
1114 chandransh 1120
    {
1121
      send_markOrdersAsPickedUp(providerId, pickupDetails);
1122
      return recv_markOrdersAsPickedUp();
1123
    }
1124
 
1245 chandransh 1125
    public void send_markOrdersAsPickedUp(long providerId, Map<String,String> pickupDetails) throws TException
1114 chandransh 1126
    {
1127
      oprot_.writeMessageBegin(new TMessage("markOrdersAsPickedUp", TMessageType.CALL, seqid_));
1128
      markOrdersAsPickedUp_args args = new markOrdersAsPickedUp_args();
1129
      args.providerId = providerId;
1130
      args.pickupDetails = pickupDetails;
1131
      args.write(oprot_);
1132
      oprot_.writeMessageEnd();
1133
      oprot_.getTransport().flush();
1134
    }
1135
 
1136
    public List<Order> recv_markOrdersAsPickedUp() throws TransactionServiceException, TException
1137
    {
1138
      TMessage msg = iprot_.readMessageBegin();
1139
      if (msg.type == TMessageType.EXCEPTION) {
1140
        TApplicationException x = TApplicationException.read(iprot_);
1141
        iprot_.readMessageEnd();
1142
        throw x;
1143
      }
1144
      markOrdersAsPickedUp_result result = new markOrdersAsPickedUp_result();
1145
      result.read(iprot_);
1146
      iprot_.readMessageEnd();
1147
      if (result.isSetSuccess()) {
1148
        return result.success;
1149
      }
1150
      if (result.ex != null) {
1151
        throw result.ex;
1152
      }
1153
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "markOrdersAsPickedUp failed: unknown result");
1154
    }
1155
 
1133 chandransh 1156
    public void markOrdersAsDelivered(long providerId, Map<String,String> deliveredOrders) throws TransactionServiceException, TException
1157
    {
1158
      send_markOrdersAsDelivered(providerId, deliveredOrders);
1159
      recv_markOrdersAsDelivered();
1160
    }
1161
 
1162
    public void send_markOrdersAsDelivered(long providerId, Map<String,String> deliveredOrders) throws TException
1163
    {
1164
      oprot_.writeMessageBegin(new TMessage("markOrdersAsDelivered", TMessageType.CALL, seqid_));
1165
      markOrdersAsDelivered_args args = new markOrdersAsDelivered_args();
1166
      args.providerId = providerId;
1167
      args.deliveredOrders = deliveredOrders;
1168
      args.write(oprot_);
1169
      oprot_.writeMessageEnd();
1170
      oprot_.getTransport().flush();
1171
    }
1172
 
1173
    public void recv_markOrdersAsDelivered() throws TransactionServiceException, TException
1174
    {
1175
      TMessage msg = iprot_.readMessageBegin();
1176
      if (msg.type == TMessageType.EXCEPTION) {
1177
        TApplicationException x = TApplicationException.read(iprot_);
1178
        iprot_.readMessageEnd();
1179
        throw x;
1180
      }
1181
      markOrdersAsDelivered_result result = new markOrdersAsDelivered_result();
1182
      result.read(iprot_);
1183
      iprot_.readMessageEnd();
1184
      if (result.ex != null) {
1185
        throw result.ex;
1186
      }
1187
      return;
1188
    }
1189
 
1190
    public void markOrdersAsFailed(long providerId, Map<String,String> returnedOrders) throws TransactionServiceException, TException
1191
    {
1192
      send_markOrdersAsFailed(providerId, returnedOrders);
1193
      recv_markOrdersAsFailed();
1194
    }
1195
 
1196
    public void send_markOrdersAsFailed(long providerId, Map<String,String> returnedOrders) throws TException
1197
    {
1198
      oprot_.writeMessageBegin(new TMessage("markOrdersAsFailed", TMessageType.CALL, seqid_));
1199
      markOrdersAsFailed_args args = new markOrdersAsFailed_args();
1200
      args.providerId = providerId;
1201
      args.returnedOrders = returnedOrders;
1202
      args.write(oprot_);
1203
      oprot_.writeMessageEnd();
1204
      oprot_.getTransport().flush();
1205
    }
1206
 
1207
    public void recv_markOrdersAsFailed() throws TransactionServiceException, TException
1208
    {
1209
      TMessage msg = iprot_.readMessageBegin();
1210
      if (msg.type == TMessageType.EXCEPTION) {
1211
        TApplicationException x = TApplicationException.read(iprot_);
1212
        iprot_.readMessageEnd();
1213
        throw x;
1214
      }
1215
      markOrdersAsFailed_result result = new markOrdersAsFailed_result();
1216
      result.read(iprot_);
1217
      iprot_.readMessageEnd();
1218
      if (result.ex != null) {
1219
        throw result.ex;
1220
      }
1221
      return;
1222
    }
1223
 
1245 chandransh 1224
    public void updateNonDeliveryReason(long providerId, Map<String,String> undeliveredOrders) throws TransactionServiceException, TException
1225
    {
1226
      send_updateNonDeliveryReason(providerId, undeliveredOrders);
1227
      recv_updateNonDeliveryReason();
1228
    }
1229
 
1230
    public void send_updateNonDeliveryReason(long providerId, Map<String,String> undeliveredOrders) throws TException
1231
    {
1232
      oprot_.writeMessageBegin(new TMessage("updateNonDeliveryReason", TMessageType.CALL, seqid_));
1233
      updateNonDeliveryReason_args args = new updateNonDeliveryReason_args();
1234
      args.providerId = providerId;
1235
      args.undeliveredOrders = undeliveredOrders;
1236
      args.write(oprot_);
1237
      oprot_.writeMessageEnd();
1238
      oprot_.getTransport().flush();
1239
    }
1240
 
1241
    public void recv_updateNonDeliveryReason() throws TransactionServiceException, TException
1242
    {
1243
      TMessage msg = iprot_.readMessageBegin();
1244
      if (msg.type == TMessageType.EXCEPTION) {
1245
        TApplicationException x = TApplicationException.read(iprot_);
1246
        iprot_.readMessageEnd();
1247
        throw x;
1248
      }
1249
      updateNonDeliveryReason_result result = new updateNonDeliveryReason_result();
1250
      result.read(iprot_);
1251
      iprot_.readMessageEnd();
1252
      if (result.ex != null) {
1253
        throw result.ex;
1254
      }
1255
      return;
1256
    }
1257
 
483 rajveer 1258
    public List<Alert> getAlerts(long orderId, boolean valid) throws TException
68 ashish 1259
    {
483 rajveer 1260
      send_getAlerts(orderId, valid);
305 ashish 1261
      return recv_getAlerts();
1262
    }
1263
 
483 rajveer 1264
    public void send_getAlerts(long orderId, boolean valid) throws TException
305 ashish 1265
    {
1266
      oprot_.writeMessageBegin(new TMessage("getAlerts", TMessageType.CALL, seqid_));
1267
      getAlerts_args args = new getAlerts_args();
483 rajveer 1268
      args.orderId = orderId;
305 ashish 1269
      args.valid = valid;
1270
      args.write(oprot_);
1271
      oprot_.writeMessageEnd();
1272
      oprot_.getTransport().flush();
1273
    }
1274
 
1275
    public List<Alert> recv_getAlerts() throws TException
1276
    {
1277
      TMessage msg = iprot_.readMessageBegin();
1278
      if (msg.type == TMessageType.EXCEPTION) {
1279
        TApplicationException x = TApplicationException.read(iprot_);
1280
        iprot_.readMessageEnd();
1281
        throw x;
1282
      }
1283
      getAlerts_result result = new getAlerts_result();
1284
      result.read(iprot_);
1285
      iprot_.readMessageEnd();
1286
      if (result.isSetSuccess()) {
1287
        return result.success;
1288
      }
1289
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getAlerts failed: unknown result");
1290
    }
1291
 
483 rajveer 1292
    public void setAlert(long orderId, boolean unset, long type, String comment) throws TException
305 ashish 1293
    {
483 rajveer 1294
      send_setAlert(orderId, unset, type, comment);
305 ashish 1295
      recv_setAlert();
1296
    }
1297
 
483 rajveer 1298
    public void send_setAlert(long orderId, boolean unset, long type, String comment) throws TException
305 ashish 1299
    {
1300
      oprot_.writeMessageBegin(new TMessage("setAlert", TMessageType.CALL, seqid_));
1301
      setAlert_args args = new setAlert_args();
483 rajveer 1302
      args.orderId = orderId;
305 ashish 1303
      args.unset = unset;
1304
      args.type = type;
1305
      args.comment = comment;
1306
      args.write(oprot_);
1307
      oprot_.writeMessageEnd();
1308
      oprot_.getTransport().flush();
1309
    }
1310
 
1311
    public void recv_setAlert() throws TException
1312
    {
1313
      TMessage msg = iprot_.readMessageBegin();
1314
      if (msg.type == TMessageType.EXCEPTION) {
1315
        TApplicationException x = TApplicationException.read(iprot_);
1316
        iprot_.readMessageEnd();
1317
        throw x;
1318
      }
1319
      setAlert_result result = new setAlert_result();
1320
      result.read(iprot_);
1321
      iprot_.readMessageEnd();
1322
      return;
1323
    }
1324
 
68 ashish 1325
  }
1326
  public static class Processor implements TProcessor {
1327
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
1328
    public Processor(Iface iface)
1329
    {
1330
      iface_ = iface;
764 rajveer 1331
      processMap_.put("closeSession", new closeSession());
68 ashish 1332
      processMap_.put("createTransaction", new createTransaction());
1333
      processMap_.put("getTransaction", new getTransaction());
1334
      processMap_.put("getTransactionsForCustomer", new getTransactionsForCustomer());
132 ashish 1335
      processMap_.put("getTransactionsForShoppingCartId", new getTransactionsForShoppingCartId());
68 ashish 1336
      processMap_.put("getTransactionStatus", new getTransactionStatus());
1337
      processMap_.put("changeTransactionStatus", new changeTransactionStatus());
1398 varun.gupt 1338
      processMap_.put("enqueueTransactionInfoEmail", new enqueueTransactionInfoEmail());
483 rajveer 1339
      processMap_.put("getAllOrders", new getAllOrders());
1022 varun.gupt 1340
      processMap_.put("getOrdersByBillingDate", new getOrdersByBillingDate());
1382 varun.gupt 1341
      processMap_.put("getReturnableOrdersForCustomer", new getReturnableOrdersForCustomer());
1342
      processMap_.put("getCancellableOrdersForCustomer", new getCancellableOrdersForCustomer());
483 rajveer 1343
      processMap_.put("changeOrderStatus", new changeOrderStatus());
495 rajveer 1344
      processMap_.put("addBillingDetails", new addBillingDetails());
1148 chandransh 1345
      processMap_.put("addJacketNumber", new addJacketNumber());
923 rajveer 1346
      processMap_.put("acceptOrder", new acceptOrder());
1347
      processMap_.put("billOrder", new billOrder());
483 rajveer 1348
      processMap_.put("getOrdersForTransaction", new getOrdersForTransaction());
1349
      processMap_.put("getOrdersForCustomer", new getOrdersForCustomer());
1350
      processMap_.put("createOrder", new createOrder());
1351
      processMap_.put("getOrder", new getOrder());
1352
      processMap_.put("getLineItemsForOrder", new getLineItemsForOrder());
1221 chandransh 1353
      processMap_.put("batchOrders", new batchOrders());
1209 chandransh 1354
      processMap_.put("markOrderAsOutOfStock", new markOrderAsOutOfStock());
758 chandransh 1355
      processMap_.put("markOrdersAsManifested", new markOrdersAsManifested());
1114 chandransh 1356
      processMap_.put("markOrdersAsPickedUp", new markOrdersAsPickedUp());
1133 chandransh 1357
      processMap_.put("markOrdersAsDelivered", new markOrdersAsDelivered());
1358
      processMap_.put("markOrdersAsFailed", new markOrdersAsFailed());
1245 chandransh 1359
      processMap_.put("updateNonDeliveryReason", new updateNonDeliveryReason());
305 ashish 1360
      processMap_.put("getAlerts", new getAlerts());
1361
      processMap_.put("setAlert", new setAlert());
68 ashish 1362
    }
1363
 
1364
    protected static interface ProcessFunction {
1365
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException;
1366
    }
1367
 
1368
    private Iface iface_;
1369
    protected final HashMap<String,ProcessFunction> processMap_ = new HashMap<String,ProcessFunction>();
1370
 
1371
    public boolean process(TProtocol iprot, TProtocol oprot) throws TException
1372
    {
1373
      TMessage msg = iprot.readMessageBegin();
1374
      ProcessFunction fn = processMap_.get(msg.name);
1375
      if (fn == null) {
1376
        TProtocolUtil.skip(iprot, TType.STRUCT);
1377
        iprot.readMessageEnd();
1378
        TApplicationException x = new TApplicationException(TApplicationException.UNKNOWN_METHOD, "Invalid method name: '"+msg.name+"'");
1379
        oprot.writeMessageBegin(new TMessage(msg.name, TMessageType.EXCEPTION, msg.seqid));
1380
        x.write(oprot);
1381
        oprot.writeMessageEnd();
1382
        oprot.getTransport().flush();
1383
        return true;
1384
      }
1385
      fn.process(msg.seqid, iprot, oprot);
1386
      return true;
1387
    }
1388
 
764 rajveer 1389
    private class closeSession implements ProcessFunction {
1390
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1391
      {
1392
        closeSession_args args = new closeSession_args();
1393
        args.read(iprot);
1394
        iprot.readMessageEnd();
1395
        closeSession_result result = new closeSession_result();
1396
        iface_.closeSession();
1397
        oprot.writeMessageBegin(new TMessage("closeSession", TMessageType.REPLY, seqid));
1398
        result.write(oprot);
1399
        oprot.writeMessageEnd();
1400
        oprot.getTransport().flush();
1401
      }
1402
 
1403
    }
1404
 
68 ashish 1405
    private class createTransaction implements ProcessFunction {
1406
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1407
      {
1408
        createTransaction_args args = new createTransaction_args();
1409
        args.read(iprot);
1410
        iprot.readMessageEnd();
1411
        createTransaction_result result = new createTransaction_result();
1412
        try {
132 ashish 1413
          result.success = iface_.createTransaction(args.transaction);
1414
          result.setSuccessIsSet(true);
68 ashish 1415
        } catch (TransactionServiceException ex) {
1416
          result.ex = ex;
1417
        } catch (Throwable th) {
1418
          LOGGER.error("Internal error processing createTransaction", th);
1419
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing createTransaction");
1420
          oprot.writeMessageBegin(new TMessage("createTransaction", TMessageType.EXCEPTION, seqid));
1421
          x.write(oprot);
1422
          oprot.writeMessageEnd();
1423
          oprot.getTransport().flush();
1424
          return;
1425
        }
1426
        oprot.writeMessageBegin(new TMessage("createTransaction", TMessageType.REPLY, seqid));
1427
        result.write(oprot);
1428
        oprot.writeMessageEnd();
1429
        oprot.getTransport().flush();
1430
      }
1431
 
1432
    }
1433
 
1434
    private class getTransaction implements ProcessFunction {
1435
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1436
      {
1437
        getTransaction_args args = new getTransaction_args();
1438
        args.read(iprot);
1439
        iprot.readMessageEnd();
1440
        getTransaction_result result = new getTransaction_result();
1441
        try {
1442
          result.success = iface_.getTransaction(args.id);
1443
        } catch (TransactionServiceException ex) {
1444
          result.ex = ex;
1445
        } catch (Throwable th) {
1446
          LOGGER.error("Internal error processing getTransaction", th);
1447
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getTransaction");
1448
          oprot.writeMessageBegin(new TMessage("getTransaction", TMessageType.EXCEPTION, seqid));
1449
          x.write(oprot);
1450
          oprot.writeMessageEnd();
1451
          oprot.getTransport().flush();
1452
          return;
1453
        }
1454
        oprot.writeMessageBegin(new TMessage("getTransaction", TMessageType.REPLY, seqid));
1455
        result.write(oprot);
1456
        oprot.writeMessageEnd();
1457
        oprot.getTransport().flush();
1458
      }
1459
 
1460
    }
1461
 
1462
    private class getTransactionsForCustomer implements ProcessFunction {
1463
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1464
      {
1465
        getTransactionsForCustomer_args args = new getTransactionsForCustomer_args();
1466
        args.read(iprot);
1467
        iprot.readMessageEnd();
1468
        getTransactionsForCustomer_result result = new getTransactionsForCustomer_result();
1469
        try {
132 ashish 1470
          result.success = iface_.getTransactionsForCustomer(args.customerId, args.from_date, args.to_date, args.status);
68 ashish 1471
        } catch (TransactionServiceException ex) {
1472
          result.ex = ex;
1473
        } catch (Throwable th) {
1474
          LOGGER.error("Internal error processing getTransactionsForCustomer", th);
1475
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getTransactionsForCustomer");
1476
          oprot.writeMessageBegin(new TMessage("getTransactionsForCustomer", TMessageType.EXCEPTION, seqid));
1477
          x.write(oprot);
1478
          oprot.writeMessageEnd();
1479
          oprot.getTransport().flush();
1480
          return;
1481
        }
1482
        oprot.writeMessageBegin(new TMessage("getTransactionsForCustomer", TMessageType.REPLY, seqid));
1483
        result.write(oprot);
1484
        oprot.writeMessageEnd();
1485
        oprot.getTransport().flush();
1486
      }
1487
 
1488
    }
1489
 
132 ashish 1490
    private class getTransactionsForShoppingCartId implements ProcessFunction {
1491
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1492
      {
1493
        getTransactionsForShoppingCartId_args args = new getTransactionsForShoppingCartId_args();
1494
        args.read(iprot);
1495
        iprot.readMessageEnd();
1496
        getTransactionsForShoppingCartId_result result = new getTransactionsForShoppingCartId_result();
1497
        try {
1498
          result.success = iface_.getTransactionsForShoppingCartId(args.shoppingCartId);
1499
        } catch (TransactionServiceException ex) {
1500
          result.ex = ex;
1501
        } catch (Throwable th) {
1502
          LOGGER.error("Internal error processing getTransactionsForShoppingCartId", th);
1503
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getTransactionsForShoppingCartId");
1504
          oprot.writeMessageBegin(new TMessage("getTransactionsForShoppingCartId", TMessageType.EXCEPTION, seqid));
1505
          x.write(oprot);
1506
          oprot.writeMessageEnd();
1507
          oprot.getTransport().flush();
1508
          return;
1509
        }
1510
        oprot.writeMessageBegin(new TMessage("getTransactionsForShoppingCartId", TMessageType.REPLY, seqid));
1511
        result.write(oprot);
1512
        oprot.writeMessageEnd();
1513
        oprot.getTransport().flush();
1514
      }
1515
 
1516
    }
1517
 
68 ashish 1518
    private class getTransactionStatus implements ProcessFunction {
1519
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1520
      {
1521
        getTransactionStatus_args args = new getTransactionStatus_args();
1522
        args.read(iprot);
1523
        iprot.readMessageEnd();
1524
        getTransactionStatus_result result = new getTransactionStatus_result();
1525
        try {
1526
          result.success = iface_.getTransactionStatus(args.transactionId);
1527
        } catch (TransactionServiceException ex) {
1528
          result.ex = ex;
1529
        } catch (Throwable th) {
1530
          LOGGER.error("Internal error processing getTransactionStatus", th);
1531
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getTransactionStatus");
1532
          oprot.writeMessageBegin(new TMessage("getTransactionStatus", TMessageType.EXCEPTION, seqid));
1533
          x.write(oprot);
1534
          oprot.writeMessageEnd();
1535
          oprot.getTransport().flush();
1536
          return;
1537
        }
1538
        oprot.writeMessageBegin(new TMessage("getTransactionStatus", TMessageType.REPLY, seqid));
1539
        result.write(oprot);
1540
        oprot.writeMessageEnd();
1541
        oprot.getTransport().flush();
1542
      }
1543
 
1544
    }
1545
 
1546
    private class changeTransactionStatus implements ProcessFunction {
1547
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1548
      {
1549
        changeTransactionStatus_args args = new changeTransactionStatus_args();
1550
        args.read(iprot);
1551
        iprot.readMessageEnd();
1552
        changeTransactionStatus_result result = new changeTransactionStatus_result();
1553
        try {
1554
          result.success = iface_.changeTransactionStatus(args.transactionId, args.status, args.description);
1555
          result.setSuccessIsSet(true);
1556
        } catch (TransactionServiceException ex) {
1557
          result.ex = ex;
1558
        } catch (Throwable th) {
1559
          LOGGER.error("Internal error processing changeTransactionStatus", th);
1560
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing changeTransactionStatus");
1561
          oprot.writeMessageBegin(new TMessage("changeTransactionStatus", TMessageType.EXCEPTION, seqid));
1562
          x.write(oprot);
1563
          oprot.writeMessageEnd();
1564
          oprot.getTransport().flush();
1565
          return;
1566
        }
1567
        oprot.writeMessageBegin(new TMessage("changeTransactionStatus", TMessageType.REPLY, seqid));
1568
        result.write(oprot);
1569
        oprot.writeMessageEnd();
1570
        oprot.getTransport().flush();
1571
      }
1572
 
1573
    }
1574
 
1398 varun.gupt 1575
    private class enqueueTransactionInfoEmail implements ProcessFunction {
1382 varun.gupt 1576
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1577
      {
1398 varun.gupt 1578
        enqueueTransactionInfoEmail_args args = new enqueueTransactionInfoEmail_args();
1382 varun.gupt 1579
        args.read(iprot);
1580
        iprot.readMessageEnd();
1398 varun.gupt 1581
        enqueueTransactionInfoEmail_result result = new enqueueTransactionInfoEmail_result();
1382 varun.gupt 1582
        try {
1398 varun.gupt 1583
          result.success = iface_.enqueueTransactionInfoEmail(args.transactionId);
1382 varun.gupt 1584
          result.setSuccessIsSet(true);
1585
        } catch (TransactionServiceException ex) {
1586
          result.ex = ex;
1587
        } catch (Throwable th) {
1398 varun.gupt 1588
          LOGGER.error("Internal error processing enqueueTransactionInfoEmail", th);
1589
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing enqueueTransactionInfoEmail");
1590
          oprot.writeMessageBegin(new TMessage("enqueueTransactionInfoEmail", TMessageType.EXCEPTION, seqid));
1382 varun.gupt 1591
          x.write(oprot);
1592
          oprot.writeMessageEnd();
1593
          oprot.getTransport().flush();
1594
          return;
1595
        }
1398 varun.gupt 1596
        oprot.writeMessageBegin(new TMessage("enqueueTransactionInfoEmail", TMessageType.REPLY, seqid));
1382 varun.gupt 1597
        result.write(oprot);
1598
        oprot.writeMessageEnd();
1599
        oprot.getTransport().flush();
1600
      }
1601
 
1602
    }
1603
 
483 rajveer 1604
    private class getAllOrders implements ProcessFunction {
68 ashish 1605
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1606
      {
483 rajveer 1607
        getAllOrders_args args = new getAllOrders_args();
68 ashish 1608
        args.read(iprot);
1609
        iprot.readMessageEnd();
483 rajveer 1610
        getAllOrders_result result = new getAllOrders_result();
68 ashish 1611
        try {
483 rajveer 1612
          result.success = iface_.getAllOrders(args.status, args.from_date, args.to_date, args.warehouse_id);
68 ashish 1613
        } catch (TransactionServiceException ex) {
1614
          result.ex = ex;
1615
        } catch (Throwable th) {
483 rajveer 1616
          LOGGER.error("Internal error processing getAllOrders", th);
1617
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getAllOrders");
1618
          oprot.writeMessageBegin(new TMessage("getAllOrders", TMessageType.EXCEPTION, seqid));
68 ashish 1619
          x.write(oprot);
1620
          oprot.writeMessageEnd();
1621
          oprot.getTransport().flush();
1622
          return;
1623
        }
483 rajveer 1624
        oprot.writeMessageBegin(new TMessage("getAllOrders", TMessageType.REPLY, seqid));
68 ashish 1625
        result.write(oprot);
1626
        oprot.writeMessageEnd();
1627
        oprot.getTransport().flush();
1628
      }
1629
 
1630
    }
1631
 
1022 varun.gupt 1632
    private class getOrdersByBillingDate implements ProcessFunction {
1633
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1634
      {
1635
        getOrdersByBillingDate_args args = new getOrdersByBillingDate_args();
1636
        args.read(iprot);
1637
        iprot.readMessageEnd();
1638
        getOrdersByBillingDate_result result = new getOrdersByBillingDate_result();
1639
        try {
1640
          result.success = iface_.getOrdersByBillingDate(args.status, args.start_billing_date, args.end_billing_date, args.warehouse_id);
1641
        } catch (TransactionServiceException ex) {
1642
          result.ex = ex;
1643
        } catch (Throwable th) {
1644
          LOGGER.error("Internal error processing getOrdersByBillingDate", th);
1645
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getOrdersByBillingDate");
1646
          oprot.writeMessageBegin(new TMessage("getOrdersByBillingDate", TMessageType.EXCEPTION, seqid));
1647
          x.write(oprot);
1648
          oprot.writeMessageEnd();
1649
          oprot.getTransport().flush();
1650
          return;
1651
        }
1652
        oprot.writeMessageBegin(new TMessage("getOrdersByBillingDate", TMessageType.REPLY, seqid));
1653
        result.write(oprot);
1654
        oprot.writeMessageEnd();
1655
        oprot.getTransport().flush();
1656
      }
1657
 
1658
    }
1659
 
1382 varun.gupt 1660
    private class getReturnableOrdersForCustomer implements ProcessFunction {
1661
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1662
      {
1663
        getReturnableOrdersForCustomer_args args = new getReturnableOrdersForCustomer_args();
1664
        args.read(iprot);
1665
        iprot.readMessageEnd();
1666
        getReturnableOrdersForCustomer_result result = new getReturnableOrdersForCustomer_result();
1667
        try {
1668
          result.success = iface_.getReturnableOrdersForCustomer(args.customer_id, args.limit);
1669
        } catch (TransactionServiceException ex) {
1670
          result.ex = ex;
1671
        } catch (Throwable th) {
1672
          LOGGER.error("Internal error processing getReturnableOrdersForCustomer", th);
1673
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getReturnableOrdersForCustomer");
1674
          oprot.writeMessageBegin(new TMessage("getReturnableOrdersForCustomer", TMessageType.EXCEPTION, seqid));
1675
          x.write(oprot);
1676
          oprot.writeMessageEnd();
1677
          oprot.getTransport().flush();
1678
          return;
1679
        }
1680
        oprot.writeMessageBegin(new TMessage("getReturnableOrdersForCustomer", TMessageType.REPLY, seqid));
1681
        result.write(oprot);
1682
        oprot.writeMessageEnd();
1683
        oprot.getTransport().flush();
1684
      }
1685
 
1686
    }
1687
 
1688
    private class getCancellableOrdersForCustomer implements ProcessFunction {
1689
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1690
      {
1691
        getCancellableOrdersForCustomer_args args = new getCancellableOrdersForCustomer_args();
1692
        args.read(iprot);
1693
        iprot.readMessageEnd();
1694
        getCancellableOrdersForCustomer_result result = new getCancellableOrdersForCustomer_result();
1695
        try {
1696
          result.success = iface_.getCancellableOrdersForCustomer(args.customer_id, args.limit);
1697
        } catch (TransactionServiceException ex) {
1698
          result.ex = ex;
1699
        } catch (Throwable th) {
1700
          LOGGER.error("Internal error processing getCancellableOrdersForCustomer", th);
1701
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getCancellableOrdersForCustomer");
1702
          oprot.writeMessageBegin(new TMessage("getCancellableOrdersForCustomer", TMessageType.EXCEPTION, seqid));
1703
          x.write(oprot);
1704
          oprot.writeMessageEnd();
1705
          oprot.getTransport().flush();
1706
          return;
1707
        }
1708
        oprot.writeMessageBegin(new TMessage("getCancellableOrdersForCustomer", TMessageType.REPLY, seqid));
1709
        result.write(oprot);
1710
        oprot.writeMessageEnd();
1711
        oprot.getTransport().flush();
1712
      }
1713
 
1714
    }
1715
 
483 rajveer 1716
    private class changeOrderStatus implements ProcessFunction {
68 ashish 1717
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1718
      {
483 rajveer 1719
        changeOrderStatus_args args = new changeOrderStatus_args();
68 ashish 1720
        args.read(iprot);
1721
        iprot.readMessageEnd();
483 rajveer 1722
        changeOrderStatus_result result = new changeOrderStatus_result();
68 ashish 1723
        try {
483 rajveer 1724
          result.success = iface_.changeOrderStatus(args.orderId, args.status, args.description);
68 ashish 1725
          result.setSuccessIsSet(true);
1726
        } catch (TransactionServiceException ex) {
1727
          result.ex = ex;
1728
        } catch (Throwable th) {
483 rajveer 1729
          LOGGER.error("Internal error processing changeOrderStatus", th);
1730
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing changeOrderStatus");
1731
          oprot.writeMessageBegin(new TMessage("changeOrderStatus", TMessageType.EXCEPTION, seqid));
68 ashish 1732
          x.write(oprot);
1733
          oprot.writeMessageEnd();
1734
          oprot.getTransport().flush();
1735
          return;
1736
        }
483 rajveer 1737
        oprot.writeMessageBegin(new TMessage("changeOrderStatus", TMessageType.REPLY, seqid));
68 ashish 1738
        result.write(oprot);
1739
        oprot.writeMessageEnd();
1740
        oprot.getTransport().flush();
1741
      }
1742
 
1743
    }
1744
 
495 rajveer 1745
    private class addBillingDetails implements ProcessFunction {
1746
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1747
      {
1748
        addBillingDetails_args args = new addBillingDetails_args();
1749
        args.read(iprot);
1750
        iprot.readMessageEnd();
1751
        addBillingDetails_result result = new addBillingDetails_result();
1752
        try {
1148 chandransh 1753
          result.success = iface_.addBillingDetails(args.orderId, args.invoice_number, args.billed_by);
495 rajveer 1754
          result.setSuccessIsSet(true);
1755
        } catch (TransactionServiceException ex) {
1756
          result.ex = ex;
1757
        } catch (Throwable th) {
1758
          LOGGER.error("Internal error processing addBillingDetails", th);
1759
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing addBillingDetails");
1760
          oprot.writeMessageBegin(new TMessage("addBillingDetails", TMessageType.EXCEPTION, seqid));
1761
          x.write(oprot);
1762
          oprot.writeMessageEnd();
1763
          oprot.getTransport().flush();
1764
          return;
1765
        }
1766
        oprot.writeMessageBegin(new TMessage("addBillingDetails", TMessageType.REPLY, seqid));
1767
        result.write(oprot);
1768
        oprot.writeMessageEnd();
1769
        oprot.getTransport().flush();
1770
      }
1771
 
1772
    }
1773
 
1148 chandransh 1774
    private class addJacketNumber implements ProcessFunction {
1775
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1776
      {
1777
        addJacketNumber_args args = new addJacketNumber_args();
1778
        args.read(iprot);
1779
        iprot.readMessageEnd();
1780
        addJacketNumber_result result = new addJacketNumber_result();
1781
        try {
1782
          result.success = iface_.addJacketNumber(args.orderId, args.jacketNumber);
1783
          result.setSuccessIsSet(true);
1784
        } catch (TransactionServiceException ex) {
1785
          result.ex = ex;
1786
        } catch (Throwable th) {
1787
          LOGGER.error("Internal error processing addJacketNumber", th);
1788
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing addJacketNumber");
1789
          oprot.writeMessageBegin(new TMessage("addJacketNumber", TMessageType.EXCEPTION, seqid));
1790
          x.write(oprot);
1791
          oprot.writeMessageEnd();
1792
          oprot.getTransport().flush();
1793
          return;
1794
        }
1795
        oprot.writeMessageBegin(new TMessage("addJacketNumber", TMessageType.REPLY, seqid));
1796
        result.write(oprot);
1797
        oprot.writeMessageEnd();
1798
        oprot.getTransport().flush();
1799
      }
1800
 
1801
    }
1802
 
923 rajveer 1803
    private class acceptOrder implements ProcessFunction {
1804
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1805
      {
1806
        acceptOrder_args args = new acceptOrder_args();
1807
        args.read(iprot);
1808
        iprot.readMessageEnd();
1809
        acceptOrder_result result = new acceptOrder_result();
1810
        try {
1811
          result.success = iface_.acceptOrder(args.orderId);
1812
          result.setSuccessIsSet(true);
1813
        } catch (TransactionServiceException ex) {
1814
          result.ex = ex;
1815
        } catch (Throwable th) {
1816
          LOGGER.error("Internal error processing acceptOrder", th);
1817
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing acceptOrder");
1818
          oprot.writeMessageBegin(new TMessage("acceptOrder", TMessageType.EXCEPTION, seqid));
1819
          x.write(oprot);
1820
          oprot.writeMessageEnd();
1821
          oprot.getTransport().flush();
1822
          return;
1823
        }
1824
        oprot.writeMessageBegin(new TMessage("acceptOrder", TMessageType.REPLY, seqid));
1825
        result.write(oprot);
1826
        oprot.writeMessageEnd();
1827
        oprot.getTransport().flush();
1828
      }
1829
 
1830
    }
1831
 
1832
    private class billOrder implements ProcessFunction {
1833
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1834
      {
1835
        billOrder_args args = new billOrder_args();
1836
        args.read(iprot);
1837
        iprot.readMessageEnd();
1838
        billOrder_result result = new billOrder_result();
1839
        try {
1840
          result.success = iface_.billOrder(args.orderId);
1841
          result.setSuccessIsSet(true);
1842
        } catch (TransactionServiceException ex) {
1843
          result.ex = ex;
1844
        } catch (Throwable th) {
1845
          LOGGER.error("Internal error processing billOrder", th);
1846
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing billOrder");
1847
          oprot.writeMessageBegin(new TMessage("billOrder", TMessageType.EXCEPTION, seqid));
1848
          x.write(oprot);
1849
          oprot.writeMessageEnd();
1850
          oprot.getTransport().flush();
1851
          return;
1852
        }
1853
        oprot.writeMessageBegin(new TMessage("billOrder", TMessageType.REPLY, seqid));
1854
        result.write(oprot);
1855
        oprot.writeMessageEnd();
1856
        oprot.getTransport().flush();
1857
      }
1858
 
1859
    }
1860
 
483 rajveer 1861
    private class getOrdersForTransaction implements ProcessFunction {
68 ashish 1862
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1863
      {
483 rajveer 1864
        getOrdersForTransaction_args args = new getOrdersForTransaction_args();
68 ashish 1865
        args.read(iprot);
1866
        iprot.readMessageEnd();
483 rajveer 1867
        getOrdersForTransaction_result result = new getOrdersForTransaction_result();
68 ashish 1868
        try {
483 rajveer 1869
          result.success = iface_.getOrdersForTransaction(args.transactionId);
68 ashish 1870
        } catch (TransactionServiceException ex) {
1871
          result.ex = ex;
1872
        } catch (Throwable th) {
483 rajveer 1873
          LOGGER.error("Internal error processing getOrdersForTransaction", th);
1874
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getOrdersForTransaction");
1875
          oprot.writeMessageBegin(new TMessage("getOrdersForTransaction", TMessageType.EXCEPTION, seqid));
68 ashish 1876
          x.write(oprot);
1877
          oprot.writeMessageEnd();
1878
          oprot.getTransport().flush();
1879
          return;
1880
        }
483 rajveer 1881
        oprot.writeMessageBegin(new TMessage("getOrdersForTransaction", TMessageType.REPLY, seqid));
68 ashish 1882
        result.write(oprot);
1883
        oprot.writeMessageEnd();
1884
        oprot.getTransport().flush();
1885
      }
1886
 
1887
    }
1888
 
483 rajveer 1889
    private class getOrdersForCustomer implements ProcessFunction {
68 ashish 1890
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1891
      {
483 rajveer 1892
        getOrdersForCustomer_args args = new getOrdersForCustomer_args();
68 ashish 1893
        args.read(iprot);
1894
        iprot.readMessageEnd();
483 rajveer 1895
        getOrdersForCustomer_result result = new getOrdersForCustomer_result();
68 ashish 1896
        try {
483 rajveer 1897
          result.success = iface_.getOrdersForCustomer(args.customerId, args.from_date, args.to_date, args.status);
68 ashish 1898
        } catch (TransactionServiceException ex) {
1899
          result.ex = ex;
1900
        } catch (Throwable th) {
483 rajveer 1901
          LOGGER.error("Internal error processing getOrdersForCustomer", th);
1902
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getOrdersForCustomer");
1903
          oprot.writeMessageBegin(new TMessage("getOrdersForCustomer", TMessageType.EXCEPTION, seqid));
68 ashish 1904
          x.write(oprot);
1905
          oprot.writeMessageEnd();
1906
          oprot.getTransport().flush();
1907
          return;
1908
        }
483 rajveer 1909
        oprot.writeMessageBegin(new TMessage("getOrdersForCustomer", TMessageType.REPLY, seqid));
68 ashish 1910
        result.write(oprot);
1911
        oprot.writeMessageEnd();
1912
        oprot.getTransport().flush();
1913
      }
1914
 
1915
    }
1916
 
483 rajveer 1917
    private class createOrder implements ProcessFunction {
68 ashish 1918
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1919
      {
483 rajveer 1920
        createOrder_args args = new createOrder_args();
68 ashish 1921
        args.read(iprot);
1922
        iprot.readMessageEnd();
483 rajveer 1923
        createOrder_result result = new createOrder_result();
68 ashish 1924
        try {
483 rajveer 1925
          result.success = iface_.createOrder(args.order);
68 ashish 1926
          result.setSuccessIsSet(true);
1927
        } catch (TransactionServiceException ex) {
1928
          result.ex = ex;
1929
        } catch (Throwable th) {
483 rajveer 1930
          LOGGER.error("Internal error processing createOrder", th);
1931
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing createOrder");
1932
          oprot.writeMessageBegin(new TMessage("createOrder", TMessageType.EXCEPTION, seqid));
68 ashish 1933
          x.write(oprot);
1934
          oprot.writeMessageEnd();
1935
          oprot.getTransport().flush();
1936
          return;
1937
        }
483 rajveer 1938
        oprot.writeMessageBegin(new TMessage("createOrder", TMessageType.REPLY, seqid));
68 ashish 1939
        result.write(oprot);
1940
        oprot.writeMessageEnd();
1941
        oprot.getTransport().flush();
1942
      }
1943
 
1944
    }
1945
 
483 rajveer 1946
    private class getOrder implements ProcessFunction {
68 ashish 1947
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1948
      {
483 rajveer 1949
        getOrder_args args = new getOrder_args();
68 ashish 1950
        args.read(iprot);
1951
        iprot.readMessageEnd();
483 rajveer 1952
        getOrder_result result = new getOrder_result();
68 ashish 1953
        try {
483 rajveer 1954
          result.success = iface_.getOrder(args.id);
68 ashish 1955
        } catch (TransactionServiceException ex) {
1956
          result.ex = ex;
1957
        } catch (Throwable th) {
483 rajveer 1958
          LOGGER.error("Internal error processing getOrder", th);
1959
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getOrder");
1960
          oprot.writeMessageBegin(new TMessage("getOrder", TMessageType.EXCEPTION, seqid));
68 ashish 1961
          x.write(oprot);
1962
          oprot.writeMessageEnd();
1963
          oprot.getTransport().flush();
1964
          return;
1965
        }
483 rajveer 1966
        oprot.writeMessageBegin(new TMessage("getOrder", TMessageType.REPLY, seqid));
68 ashish 1967
        result.write(oprot);
1968
        oprot.writeMessageEnd();
1969
        oprot.getTransport().flush();
1970
      }
1971
 
1972
    }
1973
 
483 rajveer 1974
    private class getLineItemsForOrder implements ProcessFunction {
68 ashish 1975
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1976
      {
483 rajveer 1977
        getLineItemsForOrder_args args = new getLineItemsForOrder_args();
68 ashish 1978
        args.read(iprot);
1979
        iprot.readMessageEnd();
483 rajveer 1980
        getLineItemsForOrder_result result = new getLineItemsForOrder_result();
68 ashish 1981
        try {
483 rajveer 1982
          result.success = iface_.getLineItemsForOrder(args.orderId);
68 ashish 1983
        } catch (TransactionServiceException ex) {
1984
          result.ex = ex;
1985
        } catch (Throwable th) {
483 rajveer 1986
          LOGGER.error("Internal error processing getLineItemsForOrder", th);
1987
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getLineItemsForOrder");
1988
          oprot.writeMessageBegin(new TMessage("getLineItemsForOrder", TMessageType.EXCEPTION, seqid));
68 ashish 1989
          x.write(oprot);
1990
          oprot.writeMessageEnd();
1991
          oprot.getTransport().flush();
1992
          return;
1993
        }
483 rajveer 1994
        oprot.writeMessageBegin(new TMessage("getLineItemsForOrder", TMessageType.REPLY, seqid));
68 ashish 1995
        result.write(oprot);
1996
        oprot.writeMessageEnd();
1997
        oprot.getTransport().flush();
1998
      }
1999
 
2000
    }
2001
 
1221 chandransh 2002
    private class batchOrders implements ProcessFunction {
2003
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2004
      {
2005
        batchOrders_args args = new batchOrders_args();
2006
        args.read(iprot);
2007
        iprot.readMessageEnd();
2008
        batchOrders_result result = new batchOrders_result();
2009
        try {
2010
          result.success = iface_.batchOrders(args.warehouseId);
2011
        } catch (TransactionServiceException ex) {
2012
          result.ex = ex;
2013
        } catch (Throwable th) {
2014
          LOGGER.error("Internal error processing batchOrders", th);
2015
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing batchOrders");
2016
          oprot.writeMessageBegin(new TMessage("batchOrders", TMessageType.EXCEPTION, seqid));
2017
          x.write(oprot);
2018
          oprot.writeMessageEnd();
2019
          oprot.getTransport().flush();
2020
          return;
2021
        }
2022
        oprot.writeMessageBegin(new TMessage("batchOrders", TMessageType.REPLY, seqid));
2023
        result.write(oprot);
2024
        oprot.writeMessageEnd();
2025
        oprot.getTransport().flush();
2026
      }
2027
 
2028
    }
2029
 
1209 chandransh 2030
    private class markOrderAsOutOfStock implements ProcessFunction {
2031
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2032
      {
2033
        markOrderAsOutOfStock_args args = new markOrderAsOutOfStock_args();
2034
        args.read(iprot);
2035
        iprot.readMessageEnd();
2036
        markOrderAsOutOfStock_result result = new markOrderAsOutOfStock_result();
2037
        try {
2038
          result.success = iface_.markOrderAsOutOfStock(args.orderId);
2039
          result.setSuccessIsSet(true);
2040
        } catch (TransactionServiceException ex) {
2041
          result.ex = ex;
2042
        } catch (Throwable th) {
2043
          LOGGER.error("Internal error processing markOrderAsOutOfStock", th);
2044
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing markOrderAsOutOfStock");
2045
          oprot.writeMessageBegin(new TMessage("markOrderAsOutOfStock", TMessageType.EXCEPTION, seqid));
2046
          x.write(oprot);
2047
          oprot.writeMessageEnd();
2048
          oprot.getTransport().flush();
2049
          return;
2050
        }
2051
        oprot.writeMessageBegin(new TMessage("markOrderAsOutOfStock", TMessageType.REPLY, seqid));
2052
        result.write(oprot);
2053
        oprot.writeMessageEnd();
2054
        oprot.getTransport().flush();
2055
      }
2056
 
2057
    }
2058
 
758 chandransh 2059
    private class markOrdersAsManifested implements ProcessFunction {
2060
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2061
      {
2062
        markOrdersAsManifested_args args = new markOrdersAsManifested_args();
2063
        args.read(iprot);
2064
        iprot.readMessageEnd();
2065
        markOrdersAsManifested_result result = new markOrdersAsManifested_result();
2066
        try {
2067
          result.success = iface_.markOrdersAsManifested(args.warehouseId, args.providerId);
2068
          result.setSuccessIsSet(true);
2069
        } catch (TransactionServiceException ex) {
2070
          result.ex = ex;
2071
        } catch (Throwable th) {
2072
          LOGGER.error("Internal error processing markOrdersAsManifested", th);
2073
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing markOrdersAsManifested");
2074
          oprot.writeMessageBegin(new TMessage("markOrdersAsManifested", TMessageType.EXCEPTION, seqid));
2075
          x.write(oprot);
2076
          oprot.writeMessageEnd();
2077
          oprot.getTransport().flush();
2078
          return;
2079
        }
2080
        oprot.writeMessageBegin(new TMessage("markOrdersAsManifested", TMessageType.REPLY, seqid));
2081
        result.write(oprot);
2082
        oprot.writeMessageEnd();
2083
        oprot.getTransport().flush();
2084
      }
2085
 
2086
    }
2087
 
1114 chandransh 2088
    private class markOrdersAsPickedUp implements ProcessFunction {
2089
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2090
      {
2091
        markOrdersAsPickedUp_args args = new markOrdersAsPickedUp_args();
2092
        args.read(iprot);
2093
        iprot.readMessageEnd();
2094
        markOrdersAsPickedUp_result result = new markOrdersAsPickedUp_result();
2095
        try {
2096
          result.success = iface_.markOrdersAsPickedUp(args.providerId, args.pickupDetails);
2097
        } catch (TransactionServiceException ex) {
2098
          result.ex = ex;
2099
        } catch (Throwable th) {
2100
          LOGGER.error("Internal error processing markOrdersAsPickedUp", th);
2101
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing markOrdersAsPickedUp");
2102
          oprot.writeMessageBegin(new TMessage("markOrdersAsPickedUp", TMessageType.EXCEPTION, seqid));
2103
          x.write(oprot);
2104
          oprot.writeMessageEnd();
2105
          oprot.getTransport().flush();
2106
          return;
2107
        }
2108
        oprot.writeMessageBegin(new TMessage("markOrdersAsPickedUp", TMessageType.REPLY, seqid));
2109
        result.write(oprot);
2110
        oprot.writeMessageEnd();
2111
        oprot.getTransport().flush();
2112
      }
2113
 
2114
    }
2115
 
1133 chandransh 2116
    private class markOrdersAsDelivered implements ProcessFunction {
2117
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2118
      {
2119
        markOrdersAsDelivered_args args = new markOrdersAsDelivered_args();
2120
        args.read(iprot);
2121
        iprot.readMessageEnd();
2122
        markOrdersAsDelivered_result result = new markOrdersAsDelivered_result();
2123
        try {
2124
          iface_.markOrdersAsDelivered(args.providerId, args.deliveredOrders);
2125
        } catch (TransactionServiceException ex) {
2126
          result.ex = ex;
2127
        } catch (Throwable th) {
2128
          LOGGER.error("Internal error processing markOrdersAsDelivered", th);
2129
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing markOrdersAsDelivered");
2130
          oprot.writeMessageBegin(new TMessage("markOrdersAsDelivered", TMessageType.EXCEPTION, seqid));
2131
          x.write(oprot);
2132
          oprot.writeMessageEnd();
2133
          oprot.getTransport().flush();
2134
          return;
2135
        }
2136
        oprot.writeMessageBegin(new TMessage("markOrdersAsDelivered", TMessageType.REPLY, seqid));
2137
        result.write(oprot);
2138
        oprot.writeMessageEnd();
2139
        oprot.getTransport().flush();
2140
      }
2141
 
2142
    }
2143
 
2144
    private class markOrdersAsFailed implements ProcessFunction {
2145
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2146
      {
2147
        markOrdersAsFailed_args args = new markOrdersAsFailed_args();
2148
        args.read(iprot);
2149
        iprot.readMessageEnd();
2150
        markOrdersAsFailed_result result = new markOrdersAsFailed_result();
2151
        try {
2152
          iface_.markOrdersAsFailed(args.providerId, args.returnedOrders);
2153
        } catch (TransactionServiceException ex) {
2154
          result.ex = ex;
2155
        } catch (Throwable th) {
2156
          LOGGER.error("Internal error processing markOrdersAsFailed", th);
2157
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing markOrdersAsFailed");
2158
          oprot.writeMessageBegin(new TMessage("markOrdersAsFailed", TMessageType.EXCEPTION, seqid));
2159
          x.write(oprot);
2160
          oprot.writeMessageEnd();
2161
          oprot.getTransport().flush();
2162
          return;
2163
        }
2164
        oprot.writeMessageBegin(new TMessage("markOrdersAsFailed", TMessageType.REPLY, seqid));
2165
        result.write(oprot);
2166
        oprot.writeMessageEnd();
2167
        oprot.getTransport().flush();
2168
      }
2169
 
2170
    }
2171
 
1245 chandransh 2172
    private class updateNonDeliveryReason implements ProcessFunction {
2173
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2174
      {
2175
        updateNonDeliveryReason_args args = new updateNonDeliveryReason_args();
2176
        args.read(iprot);
2177
        iprot.readMessageEnd();
2178
        updateNonDeliveryReason_result result = new updateNonDeliveryReason_result();
2179
        try {
2180
          iface_.updateNonDeliveryReason(args.providerId, args.undeliveredOrders);
2181
        } catch (TransactionServiceException ex) {
2182
          result.ex = ex;
2183
        } catch (Throwable th) {
2184
          LOGGER.error("Internal error processing updateNonDeliveryReason", th);
2185
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing updateNonDeliveryReason");
2186
          oprot.writeMessageBegin(new TMessage("updateNonDeliveryReason", TMessageType.EXCEPTION, seqid));
2187
          x.write(oprot);
2188
          oprot.writeMessageEnd();
2189
          oprot.getTransport().flush();
2190
          return;
2191
        }
2192
        oprot.writeMessageBegin(new TMessage("updateNonDeliveryReason", TMessageType.REPLY, seqid));
2193
        result.write(oprot);
2194
        oprot.writeMessageEnd();
2195
        oprot.getTransport().flush();
2196
      }
2197
 
2198
    }
2199
 
305 ashish 2200
    private class getAlerts implements ProcessFunction {
2201
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2202
      {
2203
        getAlerts_args args = new getAlerts_args();
2204
        args.read(iprot);
2205
        iprot.readMessageEnd();
2206
        getAlerts_result result = new getAlerts_result();
483 rajveer 2207
        result.success = iface_.getAlerts(args.orderId, args.valid);
305 ashish 2208
        oprot.writeMessageBegin(new TMessage("getAlerts", TMessageType.REPLY, seqid));
2209
        result.write(oprot);
2210
        oprot.writeMessageEnd();
2211
        oprot.getTransport().flush();
2212
      }
2213
 
2214
    }
2215
 
2216
    private class setAlert implements ProcessFunction {
2217
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2218
      {
2219
        setAlert_args args = new setAlert_args();
2220
        args.read(iprot);
2221
        iprot.readMessageEnd();
2222
        setAlert_result result = new setAlert_result();
483 rajveer 2223
        iface_.setAlert(args.orderId, args.unset, args.type, args.comment);
305 ashish 2224
        oprot.writeMessageBegin(new TMessage("setAlert", TMessageType.REPLY, seqid));
2225
        result.write(oprot);
2226
        oprot.writeMessageEnd();
2227
        oprot.getTransport().flush();
2228
      }
2229
 
2230
    }
2231
 
68 ashish 2232
  }
2233
 
764 rajveer 2234
  public static class closeSession_args implements TBase<closeSession_args._Fields>, java.io.Serializable, Cloneable, Comparable<closeSession_args>   {
2235
    private static final TStruct STRUCT_DESC = new TStruct("closeSession_args");
2236
 
2237
 
2238
 
2239
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2240
    public enum _Fields implements TFieldIdEnum {
2241
;
2242
 
2243
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
2244
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2245
 
2246
      static {
2247
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2248
          byId.put((int)field._thriftId, field);
2249
          byName.put(field.getFieldName(), field);
2250
        }
2251
      }
2252
 
2253
      /**
2254
       * Find the _Fields constant that matches fieldId, or null if its not found.
2255
       */
2256
      public static _Fields findByThriftId(int fieldId) {
2257
        return byId.get(fieldId);
2258
      }
2259
 
2260
      /**
2261
       * Find the _Fields constant that matches fieldId, throwing an exception
2262
       * if it is not found.
2263
       */
2264
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2265
        _Fields fields = findByThriftId(fieldId);
2266
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2267
        return fields;
2268
      }
2269
 
2270
      /**
2271
       * Find the _Fields constant that matches name, or null if its not found.
2272
       */
2273
      public static _Fields findByName(String name) {
2274
        return byName.get(name);
2275
      }
2276
 
2277
      private final short _thriftId;
2278
      private final String _fieldName;
2279
 
2280
      _Fields(short thriftId, String fieldName) {
2281
        _thriftId = thriftId;
2282
        _fieldName = fieldName;
2283
      }
2284
 
2285
      public short getThriftFieldId() {
2286
        return _thriftId;
2287
      }
2288
 
2289
      public String getFieldName() {
2290
        return _fieldName;
2291
      }
2292
    }
2293
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
2294
    }});
2295
 
2296
    static {
2297
      FieldMetaData.addStructMetaDataMap(closeSession_args.class, metaDataMap);
2298
    }
2299
 
2300
    public closeSession_args() {
2301
    }
2302
 
2303
    /**
2304
     * Performs a deep copy on <i>other</i>.
2305
     */
2306
    public closeSession_args(closeSession_args other) {
2307
    }
2308
 
2309
    public closeSession_args deepCopy() {
2310
      return new closeSession_args(this);
2311
    }
2312
 
2313
    @Deprecated
2314
    public closeSession_args clone() {
2315
      return new closeSession_args(this);
2316
    }
2317
 
2318
    public void setFieldValue(_Fields field, Object value) {
2319
      switch (field) {
2320
      }
2321
    }
2322
 
2323
    public void setFieldValue(int fieldID, Object value) {
2324
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
2325
    }
2326
 
2327
    public Object getFieldValue(_Fields field) {
2328
      switch (field) {
2329
      }
2330
      throw new IllegalStateException();
2331
    }
2332
 
2333
    public Object getFieldValue(int fieldId) {
2334
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
2335
    }
2336
 
2337
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
2338
    public boolean isSet(_Fields field) {
2339
      switch (field) {
2340
      }
2341
      throw new IllegalStateException();
2342
    }
2343
 
2344
    public boolean isSet(int fieldID) {
2345
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
2346
    }
2347
 
2348
    @Override
2349
    public boolean equals(Object that) {
2350
      if (that == null)
2351
        return false;
2352
      if (that instanceof closeSession_args)
2353
        return this.equals((closeSession_args)that);
2354
      return false;
2355
    }
2356
 
2357
    public boolean equals(closeSession_args that) {
2358
      if (that == null)
2359
        return false;
2360
 
2361
      return true;
2362
    }
2363
 
2364
    @Override
2365
    public int hashCode() {
2366
      return 0;
2367
    }
2368
 
2369
    public int compareTo(closeSession_args other) {
2370
      if (!getClass().equals(other.getClass())) {
2371
        return getClass().getName().compareTo(other.getClass().getName());
2372
      }
2373
 
2374
      int lastComparison = 0;
2375
      closeSession_args typedOther = (closeSession_args)other;
2376
 
2377
      return 0;
2378
    }
2379
 
2380
    public void read(TProtocol iprot) throws TException {
2381
      TField field;
2382
      iprot.readStructBegin();
2383
      while (true)
2384
      {
2385
        field = iprot.readFieldBegin();
2386
        if (field.type == TType.STOP) { 
2387
          break;
2388
        }
2389
        _Fields fieldId = _Fields.findByThriftId(field.id);
2390
        if (fieldId == null) {
2391
          TProtocolUtil.skip(iprot, field.type);
2392
        } else {
2393
          switch (fieldId) {
2394
          }
2395
          iprot.readFieldEnd();
2396
        }
2397
      }
2398
      iprot.readStructEnd();
2399
      validate();
2400
    }
2401
 
2402
    public void write(TProtocol oprot) throws TException {
2403
      validate();
2404
 
2405
      oprot.writeStructBegin(STRUCT_DESC);
2406
      oprot.writeFieldStop();
2407
      oprot.writeStructEnd();
2408
    }
2409
 
2410
    @Override
2411
    public String toString() {
2412
      StringBuilder sb = new StringBuilder("closeSession_args(");
2413
      boolean first = true;
2414
 
2415
      sb.append(")");
2416
      return sb.toString();
2417
    }
2418
 
2419
    public void validate() throws TException {
2420
      // check for required fields
2421
    }
2422
 
2423
  }
2424
 
2425
  public static class closeSession_result implements TBase<closeSession_result._Fields>, java.io.Serializable, Cloneable, Comparable<closeSession_result>   {
2426
    private static final TStruct STRUCT_DESC = new TStruct("closeSession_result");
2427
 
2428
 
2429
 
2430
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2431
    public enum _Fields implements TFieldIdEnum {
2432
;
2433
 
2434
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
2435
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2436
 
2437
      static {
2438
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2439
          byId.put((int)field._thriftId, field);
2440
          byName.put(field.getFieldName(), field);
2441
        }
2442
      }
2443
 
2444
      /**
2445
       * Find the _Fields constant that matches fieldId, or null if its not found.
2446
       */
2447
      public static _Fields findByThriftId(int fieldId) {
2448
        return byId.get(fieldId);
2449
      }
2450
 
2451
      /**
2452
       * Find the _Fields constant that matches fieldId, throwing an exception
2453
       * if it is not found.
2454
       */
2455
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2456
        _Fields fields = findByThriftId(fieldId);
2457
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2458
        return fields;
2459
      }
2460
 
2461
      /**
2462
       * Find the _Fields constant that matches name, or null if its not found.
2463
       */
2464
      public static _Fields findByName(String name) {
2465
        return byName.get(name);
2466
      }
2467
 
2468
      private final short _thriftId;
2469
      private final String _fieldName;
2470
 
2471
      _Fields(short thriftId, String fieldName) {
2472
        _thriftId = thriftId;
2473
        _fieldName = fieldName;
2474
      }
2475
 
2476
      public short getThriftFieldId() {
2477
        return _thriftId;
2478
      }
2479
 
2480
      public String getFieldName() {
2481
        return _fieldName;
2482
      }
2483
    }
2484
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
2485
    }});
2486
 
2487
    static {
2488
      FieldMetaData.addStructMetaDataMap(closeSession_result.class, metaDataMap);
2489
    }
2490
 
2491
    public closeSession_result() {
2492
    }
2493
 
2494
    /**
2495
     * Performs a deep copy on <i>other</i>.
2496
     */
2497
    public closeSession_result(closeSession_result other) {
2498
    }
2499
 
2500
    public closeSession_result deepCopy() {
2501
      return new closeSession_result(this);
2502
    }
2503
 
2504
    @Deprecated
2505
    public closeSession_result clone() {
2506
      return new closeSession_result(this);
2507
    }
2508
 
2509
    public void setFieldValue(_Fields field, Object value) {
2510
      switch (field) {
2511
      }
2512
    }
2513
 
2514
    public void setFieldValue(int fieldID, Object value) {
2515
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
2516
    }
2517
 
2518
    public Object getFieldValue(_Fields field) {
2519
      switch (field) {
2520
      }
2521
      throw new IllegalStateException();
2522
    }
2523
 
2524
    public Object getFieldValue(int fieldId) {
2525
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
2526
    }
2527
 
2528
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
2529
    public boolean isSet(_Fields field) {
2530
      switch (field) {
2531
      }
2532
      throw new IllegalStateException();
2533
    }
2534
 
2535
    public boolean isSet(int fieldID) {
2536
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
2537
    }
2538
 
2539
    @Override
2540
    public boolean equals(Object that) {
2541
      if (that == null)
2542
        return false;
2543
      if (that instanceof closeSession_result)
2544
        return this.equals((closeSession_result)that);
2545
      return false;
2546
    }
2547
 
2548
    public boolean equals(closeSession_result that) {
2549
      if (that == null)
2550
        return false;
2551
 
2552
      return true;
2553
    }
2554
 
2555
    @Override
2556
    public int hashCode() {
2557
      return 0;
2558
    }
2559
 
2560
    public int compareTo(closeSession_result other) {
2561
      if (!getClass().equals(other.getClass())) {
2562
        return getClass().getName().compareTo(other.getClass().getName());
2563
      }
2564
 
2565
      int lastComparison = 0;
2566
      closeSession_result typedOther = (closeSession_result)other;
2567
 
2568
      return 0;
2569
    }
2570
 
2571
    public void read(TProtocol iprot) throws TException {
2572
      TField field;
2573
      iprot.readStructBegin();
2574
      while (true)
2575
      {
2576
        field = iprot.readFieldBegin();
2577
        if (field.type == TType.STOP) { 
2578
          break;
2579
        }
2580
        _Fields fieldId = _Fields.findByThriftId(field.id);
2581
        if (fieldId == null) {
2582
          TProtocolUtil.skip(iprot, field.type);
2583
        } else {
2584
          switch (fieldId) {
2585
          }
2586
          iprot.readFieldEnd();
2587
        }
2588
      }
2589
      iprot.readStructEnd();
2590
      validate();
2591
    }
2592
 
2593
    public void write(TProtocol oprot) throws TException {
2594
      oprot.writeStructBegin(STRUCT_DESC);
2595
 
2596
      oprot.writeFieldStop();
2597
      oprot.writeStructEnd();
2598
    }
2599
 
2600
    @Override
2601
    public String toString() {
2602
      StringBuilder sb = new StringBuilder("closeSession_result(");
2603
      boolean first = true;
2604
 
2605
      sb.append(")");
2606
      return sb.toString();
2607
    }
2608
 
2609
    public void validate() throws TException {
2610
      // check for required fields
2611
    }
2612
 
2613
  }
2614
 
684 chandransh 2615
  public static class createTransaction_args implements TBase<createTransaction_args._Fields>, java.io.Serializable, Cloneable, Comparable<createTransaction_args>   {
68 ashish 2616
    private static final TStruct STRUCT_DESC = new TStruct("createTransaction_args");
2617
 
2618
    private static final TField TRANSACTION_FIELD_DESC = new TField("transaction", TType.STRUCT, (short)1);
2619
 
2620
    private Transaction transaction;
2621
 
2622
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2623
    public enum _Fields implements TFieldIdEnum {
2624
      TRANSACTION((short)1, "transaction");
2625
 
2626
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
2627
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2628
 
2629
      static {
2630
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2631
          byId.put((int)field._thriftId, field);
2632
          byName.put(field.getFieldName(), field);
2633
        }
2634
      }
2635
 
2636
      /**
2637
       * Find the _Fields constant that matches fieldId, or null if its not found.
2638
       */
2639
      public static _Fields findByThriftId(int fieldId) {
2640
        return byId.get(fieldId);
2641
      }
2642
 
2643
      /**
2644
       * Find the _Fields constant that matches fieldId, throwing an exception
2645
       * if it is not found.
2646
       */
2647
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2648
        _Fields fields = findByThriftId(fieldId);
2649
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2650
        return fields;
2651
      }
2652
 
2653
      /**
2654
       * Find the _Fields constant that matches name, or null if its not found.
2655
       */
2656
      public static _Fields findByName(String name) {
2657
        return byName.get(name);
2658
      }
2659
 
2660
      private final short _thriftId;
2661
      private final String _fieldName;
2662
 
2663
      _Fields(short thriftId, String fieldName) {
2664
        _thriftId = thriftId;
2665
        _fieldName = fieldName;
2666
      }
2667
 
2668
      public short getThriftFieldId() {
2669
        return _thriftId;
2670
      }
2671
 
2672
      public String getFieldName() {
2673
        return _fieldName;
2674
      }
2675
    }
2676
 
2677
    // isset id assignments
2678
 
2679
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
2680
      put(_Fields.TRANSACTION, new FieldMetaData("transaction", TFieldRequirementType.DEFAULT, 
2681
          new StructMetaData(TType.STRUCT, Transaction.class)));
2682
    }});
2683
 
2684
    static {
2685
      FieldMetaData.addStructMetaDataMap(createTransaction_args.class, metaDataMap);
2686
    }
2687
 
2688
    public createTransaction_args() {
2689
    }
2690
 
2691
    public createTransaction_args(
2692
      Transaction transaction)
2693
    {
2694
      this();
2695
      this.transaction = transaction;
2696
    }
2697
 
2698
    /**
2699
     * Performs a deep copy on <i>other</i>.
2700
     */
2701
    public createTransaction_args(createTransaction_args other) {
2702
      if (other.isSetTransaction()) {
2703
        this.transaction = new Transaction(other.transaction);
2704
      }
2705
    }
2706
 
2707
    public createTransaction_args deepCopy() {
2708
      return new createTransaction_args(this);
2709
    }
2710
 
2711
    @Deprecated
2712
    public createTransaction_args clone() {
2713
      return new createTransaction_args(this);
2714
    }
2715
 
2716
    public Transaction getTransaction() {
2717
      return this.transaction;
2718
    }
2719
 
2720
    public createTransaction_args setTransaction(Transaction transaction) {
2721
      this.transaction = transaction;
2722
      return this;
2723
    }
2724
 
2725
    public void unsetTransaction() {
2726
      this.transaction = null;
2727
    }
2728
 
2729
    /** Returns true if field transaction is set (has been asigned a value) and false otherwise */
2730
    public boolean isSetTransaction() {
2731
      return this.transaction != null;
2732
    }
2733
 
2734
    public void setTransactionIsSet(boolean value) {
2735
      if (!value) {
2736
        this.transaction = null;
2737
      }
2738
    }
2739
 
2740
    public void setFieldValue(_Fields field, Object value) {
2741
      switch (field) {
2742
      case TRANSACTION:
2743
        if (value == null) {
2744
          unsetTransaction();
2745
        } else {
2746
          setTransaction((Transaction)value);
2747
        }
2748
        break;
2749
 
2750
      }
2751
    }
2752
 
2753
    public void setFieldValue(int fieldID, Object value) {
2754
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
2755
    }
2756
 
2757
    public Object getFieldValue(_Fields field) {
2758
      switch (field) {
2759
      case TRANSACTION:
2760
        return getTransaction();
2761
 
2762
      }
2763
      throw new IllegalStateException();
2764
    }
2765
 
2766
    public Object getFieldValue(int fieldId) {
2767
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
2768
    }
2769
 
2770
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
2771
    public boolean isSet(_Fields field) {
2772
      switch (field) {
2773
      case TRANSACTION:
2774
        return isSetTransaction();
2775
      }
2776
      throw new IllegalStateException();
2777
    }
2778
 
2779
    public boolean isSet(int fieldID) {
2780
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
2781
    }
2782
 
2783
    @Override
2784
    public boolean equals(Object that) {
2785
      if (that == null)
2786
        return false;
2787
      if (that instanceof createTransaction_args)
2788
        return this.equals((createTransaction_args)that);
2789
      return false;
2790
    }
2791
 
2792
    public boolean equals(createTransaction_args that) {
2793
      if (that == null)
2794
        return false;
2795
 
2796
      boolean this_present_transaction = true && this.isSetTransaction();
2797
      boolean that_present_transaction = true && that.isSetTransaction();
2798
      if (this_present_transaction || that_present_transaction) {
2799
        if (!(this_present_transaction && that_present_transaction))
2800
          return false;
2801
        if (!this.transaction.equals(that.transaction))
2802
          return false;
2803
      }
2804
 
2805
      return true;
2806
    }
2807
 
2808
    @Override
2809
    public int hashCode() {
2810
      return 0;
2811
    }
2812
 
684 chandransh 2813
    public int compareTo(createTransaction_args other) {
2814
      if (!getClass().equals(other.getClass())) {
2815
        return getClass().getName().compareTo(other.getClass().getName());
2816
      }
2817
 
2818
      int lastComparison = 0;
2819
      createTransaction_args typedOther = (createTransaction_args)other;
2820
 
2821
      lastComparison = Boolean.valueOf(isSetTransaction()).compareTo(isSetTransaction());
2822
      if (lastComparison != 0) {
2823
        return lastComparison;
2824
      }
2825
      lastComparison = TBaseHelper.compareTo(transaction, typedOther.transaction);
2826
      if (lastComparison != 0) {
2827
        return lastComparison;
2828
      }
2829
      return 0;
2830
    }
2831
 
68 ashish 2832
    public void read(TProtocol iprot) throws TException {
2833
      TField field;
2834
      iprot.readStructBegin();
2835
      while (true)
2836
      {
2837
        field = iprot.readFieldBegin();
2838
        if (field.type == TType.STOP) { 
2839
          break;
2840
        }
2841
        _Fields fieldId = _Fields.findByThriftId(field.id);
2842
        if (fieldId == null) {
2843
          TProtocolUtil.skip(iprot, field.type);
2844
        } else {
2845
          switch (fieldId) {
2846
            case TRANSACTION:
2847
              if (field.type == TType.STRUCT) {
2848
                this.transaction = new Transaction();
2849
                this.transaction.read(iprot);
2850
              } else { 
2851
                TProtocolUtil.skip(iprot, field.type);
2852
              }
2853
              break;
2854
          }
2855
          iprot.readFieldEnd();
2856
        }
2857
      }
2858
      iprot.readStructEnd();
2859
      validate();
2860
    }
2861
 
2862
    public void write(TProtocol oprot) throws TException {
2863
      validate();
2864
 
2865
      oprot.writeStructBegin(STRUCT_DESC);
2866
      if (this.transaction != null) {
2867
        oprot.writeFieldBegin(TRANSACTION_FIELD_DESC);
2868
        this.transaction.write(oprot);
2869
        oprot.writeFieldEnd();
2870
      }
2871
      oprot.writeFieldStop();
2872
      oprot.writeStructEnd();
2873
    }
2874
 
2875
    @Override
2876
    public String toString() {
2877
      StringBuilder sb = new StringBuilder("createTransaction_args(");
2878
      boolean first = true;
2879
 
2880
      sb.append("transaction:");
2881
      if (this.transaction == null) {
2882
        sb.append("null");
2883
      } else {
2884
        sb.append(this.transaction);
2885
      }
2886
      first = false;
2887
      sb.append(")");
2888
      return sb.toString();
2889
    }
2890
 
2891
    public void validate() throws TException {
2892
      // check for required fields
2893
    }
2894
 
2895
  }
2896
 
2897
  public static class createTransaction_result implements TBase<createTransaction_result._Fields>, java.io.Serializable, Cloneable, Comparable<createTransaction_result>   {
2898
    private static final TStruct STRUCT_DESC = new TStruct("createTransaction_result");
2899
 
132 ashish 2900
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
68 ashish 2901
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
2902
 
132 ashish 2903
    private long success;
68 ashish 2904
    private TransactionServiceException ex;
2905
 
2906
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2907
    public enum _Fields implements TFieldIdEnum {
132 ashish 2908
      SUCCESS((short)0, "success"),
68 ashish 2909
      EX((short)1, "ex");
2910
 
2911
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
2912
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2913
 
2914
      static {
2915
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2916
          byId.put((int)field._thriftId, field);
2917
          byName.put(field.getFieldName(), field);
2918
        }
2919
      }
2920
 
2921
      /**
2922
       * Find the _Fields constant that matches fieldId, or null if its not found.
2923
       */
2924
      public static _Fields findByThriftId(int fieldId) {
2925
        return byId.get(fieldId);
2926
      }
2927
 
2928
      /**
2929
       * Find the _Fields constant that matches fieldId, throwing an exception
2930
       * if it is not found.
2931
       */
2932
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2933
        _Fields fields = findByThriftId(fieldId);
2934
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2935
        return fields;
2936
      }
2937
 
2938
      /**
2939
       * Find the _Fields constant that matches name, or null if its not found.
2940
       */
2941
      public static _Fields findByName(String name) {
2942
        return byName.get(name);
2943
      }
2944
 
2945
      private final short _thriftId;
2946
      private final String _fieldName;
2947
 
2948
      _Fields(short thriftId, String fieldName) {
2949
        _thriftId = thriftId;
2950
        _fieldName = fieldName;
2951
      }
2952
 
2953
      public short getThriftFieldId() {
2954
        return _thriftId;
2955
      }
2956
 
2957
      public String getFieldName() {
2958
        return _fieldName;
2959
      }
2960
    }
2961
 
2962
    // isset id assignments
132 ashish 2963
    private static final int __SUCCESS_ISSET_ID = 0;
2964
    private BitSet __isset_bit_vector = new BitSet(1);
68 ashish 2965
 
2966
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
132 ashish 2967
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
2968
          new FieldValueMetaData(TType.I64)));
68 ashish 2969
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
2970
          new FieldValueMetaData(TType.STRUCT)));
2971
    }});
2972
 
2973
    static {
2974
      FieldMetaData.addStructMetaDataMap(createTransaction_result.class, metaDataMap);
2975
    }
2976
 
2977
    public createTransaction_result() {
2978
    }
2979
 
2980
    public createTransaction_result(
132 ashish 2981
      long success,
68 ashish 2982
      TransactionServiceException ex)
2983
    {
2984
      this();
132 ashish 2985
      this.success = success;
2986
      setSuccessIsSet(true);
68 ashish 2987
      this.ex = ex;
2988
    }
2989
 
2990
    /**
2991
     * Performs a deep copy on <i>other</i>.
2992
     */
2993
    public createTransaction_result(createTransaction_result other) {
132 ashish 2994
      __isset_bit_vector.clear();
2995
      __isset_bit_vector.or(other.__isset_bit_vector);
2996
      this.success = other.success;
68 ashish 2997
      if (other.isSetEx()) {
2998
        this.ex = new TransactionServiceException(other.ex);
2999
      }
3000
    }
3001
 
3002
    public createTransaction_result deepCopy() {
3003
      return new createTransaction_result(this);
3004
    }
3005
 
3006
    @Deprecated
3007
    public createTransaction_result clone() {
3008
      return new createTransaction_result(this);
3009
    }
3010
 
132 ashish 3011
    public long getSuccess() {
3012
      return this.success;
3013
    }
3014
 
3015
    public createTransaction_result setSuccess(long success) {
3016
      this.success = success;
3017
      setSuccessIsSet(true);
3018
      return this;
3019
    }
3020
 
3021
    public void unsetSuccess() {
3022
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
3023
    }
3024
 
3025
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
3026
    public boolean isSetSuccess() {
3027
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
3028
    }
3029
 
3030
    public void setSuccessIsSet(boolean value) {
3031
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
3032
    }
3033
 
68 ashish 3034
    public TransactionServiceException getEx() {
3035
      return this.ex;
3036
    }
3037
 
3038
    public createTransaction_result setEx(TransactionServiceException ex) {
3039
      this.ex = ex;
3040
      return this;
3041
    }
3042
 
3043
    public void unsetEx() {
3044
      this.ex = null;
3045
    }
3046
 
3047
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
3048
    public boolean isSetEx() {
3049
      return this.ex != null;
3050
    }
3051
 
3052
    public void setExIsSet(boolean value) {
3053
      if (!value) {
3054
        this.ex = null;
3055
      }
3056
    }
3057
 
3058
    public void setFieldValue(_Fields field, Object value) {
3059
      switch (field) {
132 ashish 3060
      case SUCCESS:
3061
        if (value == null) {
3062
          unsetSuccess();
3063
        } else {
3064
          setSuccess((Long)value);
3065
        }
3066
        break;
3067
 
68 ashish 3068
      case EX:
3069
        if (value == null) {
3070
          unsetEx();
3071
        } else {
3072
          setEx((TransactionServiceException)value);
3073
        }
3074
        break;
3075
 
3076
      }
3077
    }
3078
 
3079
    public void setFieldValue(int fieldID, Object value) {
3080
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3081
    }
3082
 
3083
    public Object getFieldValue(_Fields field) {
3084
      switch (field) {
132 ashish 3085
      case SUCCESS:
3086
        return new Long(getSuccess());
3087
 
68 ashish 3088
      case EX:
3089
        return getEx();
3090
 
3091
      }
3092
      throw new IllegalStateException();
3093
    }
3094
 
3095
    public Object getFieldValue(int fieldId) {
3096
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3097
    }
3098
 
3099
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3100
    public boolean isSet(_Fields field) {
3101
      switch (field) {
132 ashish 3102
      case SUCCESS:
3103
        return isSetSuccess();
68 ashish 3104
      case EX:
3105
        return isSetEx();
3106
      }
3107
      throw new IllegalStateException();
3108
    }
3109
 
3110
    public boolean isSet(int fieldID) {
3111
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3112
    }
3113
 
3114
    @Override
3115
    public boolean equals(Object that) {
3116
      if (that == null)
3117
        return false;
3118
      if (that instanceof createTransaction_result)
3119
        return this.equals((createTransaction_result)that);
3120
      return false;
3121
    }
3122
 
3123
    public boolean equals(createTransaction_result that) {
3124
      if (that == null)
3125
        return false;
3126
 
132 ashish 3127
      boolean this_present_success = true;
3128
      boolean that_present_success = true;
3129
      if (this_present_success || that_present_success) {
3130
        if (!(this_present_success && that_present_success))
3131
          return false;
3132
        if (this.success != that.success)
3133
          return false;
3134
      }
3135
 
68 ashish 3136
      boolean this_present_ex = true && this.isSetEx();
3137
      boolean that_present_ex = true && that.isSetEx();
3138
      if (this_present_ex || that_present_ex) {
3139
        if (!(this_present_ex && that_present_ex))
3140
          return false;
3141
        if (!this.ex.equals(that.ex))
3142
          return false;
3143
      }
3144
 
3145
      return true;
3146
    }
3147
 
3148
    @Override
3149
    public int hashCode() {
3150
      return 0;
3151
    }
3152
 
3153
    public int compareTo(createTransaction_result other) {
3154
      if (!getClass().equals(other.getClass())) {
3155
        return getClass().getName().compareTo(other.getClass().getName());
3156
      }
3157
 
3158
      int lastComparison = 0;
3159
      createTransaction_result typedOther = (createTransaction_result)other;
3160
 
132 ashish 3161
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
3162
      if (lastComparison != 0) {
3163
        return lastComparison;
3164
      }
3165
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
3166
      if (lastComparison != 0) {
3167
        return lastComparison;
3168
      }
68 ashish 3169
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
3170
      if (lastComparison != 0) {
3171
        return lastComparison;
3172
      }
3173
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
3174
      if (lastComparison != 0) {
3175
        return lastComparison;
3176
      }
3177
      return 0;
3178
    }
3179
 
3180
    public void read(TProtocol iprot) throws TException {
3181
      TField field;
3182
      iprot.readStructBegin();
3183
      while (true)
3184
      {
3185
        field = iprot.readFieldBegin();
3186
        if (field.type == TType.STOP) { 
3187
          break;
3188
        }
3189
        _Fields fieldId = _Fields.findByThriftId(field.id);
3190
        if (fieldId == null) {
3191
          TProtocolUtil.skip(iprot, field.type);
3192
        } else {
3193
          switch (fieldId) {
132 ashish 3194
            case SUCCESS:
3195
              if (field.type == TType.I64) {
3196
                this.success = iprot.readI64();
3197
                setSuccessIsSet(true);
3198
              } else { 
3199
                TProtocolUtil.skip(iprot, field.type);
3200
              }
3201
              break;
68 ashish 3202
            case EX:
3203
              if (field.type == TType.STRUCT) {
3204
                this.ex = new TransactionServiceException();
3205
                this.ex.read(iprot);
3206
              } else { 
3207
                TProtocolUtil.skip(iprot, field.type);
3208
              }
3209
              break;
3210
          }
3211
          iprot.readFieldEnd();
3212
        }
3213
      }
3214
      iprot.readStructEnd();
3215
      validate();
3216
    }
3217
 
3218
    public void write(TProtocol oprot) throws TException {
3219
      oprot.writeStructBegin(STRUCT_DESC);
3220
 
132 ashish 3221
      if (this.isSetSuccess()) {
3222
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
3223
        oprot.writeI64(this.success);
3224
        oprot.writeFieldEnd();
3225
      } else if (this.isSetEx()) {
68 ashish 3226
        oprot.writeFieldBegin(EX_FIELD_DESC);
3227
        this.ex.write(oprot);
3228
        oprot.writeFieldEnd();
3229
      }
3230
      oprot.writeFieldStop();
3231
      oprot.writeStructEnd();
3232
    }
3233
 
3234
    @Override
3235
    public String toString() {
3236
      StringBuilder sb = new StringBuilder("createTransaction_result(");
3237
      boolean first = true;
3238
 
132 ashish 3239
      sb.append("success:");
3240
      sb.append(this.success);
3241
      first = false;
3242
      if (!first) sb.append(", ");
68 ashish 3243
      sb.append("ex:");
3244
      if (this.ex == null) {
3245
        sb.append("null");
3246
      } else {
3247
        sb.append(this.ex);
3248
      }
3249
      first = false;
3250
      sb.append(")");
3251
      return sb.toString();
3252
    }
3253
 
3254
    public void validate() throws TException {
3255
      // check for required fields
3256
    }
3257
 
3258
  }
3259
 
3260
  public static class getTransaction_args implements TBase<getTransaction_args._Fields>, java.io.Serializable, Cloneable, Comparable<getTransaction_args>   {
3261
    private static final TStruct STRUCT_DESC = new TStruct("getTransaction_args");
3262
 
3263
    private static final TField ID_FIELD_DESC = new TField("id", TType.I64, (short)1);
3264
 
3265
    private long id;
3266
 
3267
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3268
    public enum _Fields implements TFieldIdEnum {
3269
      ID((short)1, "id");
3270
 
3271
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3272
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3273
 
3274
      static {
3275
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3276
          byId.put((int)field._thriftId, field);
3277
          byName.put(field.getFieldName(), field);
3278
        }
3279
      }
3280
 
3281
      /**
3282
       * Find the _Fields constant that matches fieldId, or null if its not found.
3283
       */
3284
      public static _Fields findByThriftId(int fieldId) {
3285
        return byId.get(fieldId);
3286
      }
3287
 
3288
      /**
3289
       * Find the _Fields constant that matches fieldId, throwing an exception
3290
       * if it is not found.
3291
       */
3292
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3293
        _Fields fields = findByThriftId(fieldId);
3294
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3295
        return fields;
3296
      }
3297
 
3298
      /**
3299
       * Find the _Fields constant that matches name, or null if its not found.
3300
       */
3301
      public static _Fields findByName(String name) {
3302
        return byName.get(name);
3303
      }
3304
 
3305
      private final short _thriftId;
3306
      private final String _fieldName;
3307
 
3308
      _Fields(short thriftId, String fieldName) {
3309
        _thriftId = thriftId;
3310
        _fieldName = fieldName;
3311
      }
3312
 
3313
      public short getThriftFieldId() {
3314
        return _thriftId;
3315
      }
3316
 
3317
      public String getFieldName() {
3318
        return _fieldName;
3319
      }
3320
    }
3321
 
3322
    // isset id assignments
3323
    private static final int __ID_ISSET_ID = 0;
3324
    private BitSet __isset_bit_vector = new BitSet(1);
3325
 
3326
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3327
      put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, 
3328
          new FieldValueMetaData(TType.I64)));
3329
    }});
3330
 
3331
    static {
3332
      FieldMetaData.addStructMetaDataMap(getTransaction_args.class, metaDataMap);
3333
    }
3334
 
3335
    public getTransaction_args() {
3336
    }
3337
 
3338
    public getTransaction_args(
3339
      long id)
3340
    {
3341
      this();
3342
      this.id = id;
3343
      setIdIsSet(true);
3344
    }
3345
 
3346
    /**
3347
     * Performs a deep copy on <i>other</i>.
3348
     */
3349
    public getTransaction_args(getTransaction_args other) {
3350
      __isset_bit_vector.clear();
3351
      __isset_bit_vector.or(other.__isset_bit_vector);
3352
      this.id = other.id;
3353
    }
3354
 
3355
    public getTransaction_args deepCopy() {
3356
      return new getTransaction_args(this);
3357
    }
3358
 
3359
    @Deprecated
3360
    public getTransaction_args clone() {
3361
      return new getTransaction_args(this);
3362
    }
3363
 
3364
    public long getId() {
3365
      return this.id;
3366
    }
3367
 
3368
    public getTransaction_args setId(long id) {
3369
      this.id = id;
3370
      setIdIsSet(true);
3371
      return this;
3372
    }
3373
 
3374
    public void unsetId() {
3375
      __isset_bit_vector.clear(__ID_ISSET_ID);
3376
    }
3377
 
3378
    /** Returns true if field id is set (has been asigned a value) and false otherwise */
3379
    public boolean isSetId() {
3380
      return __isset_bit_vector.get(__ID_ISSET_ID);
3381
    }
3382
 
3383
    public void setIdIsSet(boolean value) {
3384
      __isset_bit_vector.set(__ID_ISSET_ID, value);
3385
    }
3386
 
3387
    public void setFieldValue(_Fields field, Object value) {
3388
      switch (field) {
3389
      case ID:
3390
        if (value == null) {
3391
          unsetId();
3392
        } else {
3393
          setId((Long)value);
3394
        }
3395
        break;
3396
 
3397
      }
3398
    }
3399
 
3400
    public void setFieldValue(int fieldID, Object value) {
3401
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3402
    }
3403
 
3404
    public Object getFieldValue(_Fields field) {
3405
      switch (field) {
3406
      case ID:
3407
        return new Long(getId());
3408
 
3409
      }
3410
      throw new IllegalStateException();
3411
    }
3412
 
3413
    public Object getFieldValue(int fieldId) {
3414
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3415
    }
3416
 
3417
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3418
    public boolean isSet(_Fields field) {
3419
      switch (field) {
3420
      case ID:
3421
        return isSetId();
3422
      }
3423
      throw new IllegalStateException();
3424
    }
3425
 
3426
    public boolean isSet(int fieldID) {
3427
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3428
    }
3429
 
3430
    @Override
3431
    public boolean equals(Object that) {
3432
      if (that == null)
3433
        return false;
3434
      if (that instanceof getTransaction_args)
3435
        return this.equals((getTransaction_args)that);
3436
      return false;
3437
    }
3438
 
3439
    public boolean equals(getTransaction_args that) {
3440
      if (that == null)
3441
        return false;
3442
 
3443
      boolean this_present_id = true;
3444
      boolean that_present_id = true;
3445
      if (this_present_id || that_present_id) {
3446
        if (!(this_present_id && that_present_id))
3447
          return false;
3448
        if (this.id != that.id)
3449
          return false;
3450
      }
3451
 
3452
      return true;
3453
    }
3454
 
3455
    @Override
3456
    public int hashCode() {
3457
      return 0;
3458
    }
3459
 
3460
    public int compareTo(getTransaction_args other) {
3461
      if (!getClass().equals(other.getClass())) {
3462
        return getClass().getName().compareTo(other.getClass().getName());
3463
      }
3464
 
3465
      int lastComparison = 0;
3466
      getTransaction_args typedOther = (getTransaction_args)other;
3467
 
3468
      lastComparison = Boolean.valueOf(isSetId()).compareTo(isSetId());
3469
      if (lastComparison != 0) {
3470
        return lastComparison;
3471
      }
3472
      lastComparison = TBaseHelper.compareTo(id, typedOther.id);
3473
      if (lastComparison != 0) {
3474
        return lastComparison;
3475
      }
3476
      return 0;
3477
    }
3478
 
3479
    public void read(TProtocol iprot) throws TException {
3480
      TField field;
3481
      iprot.readStructBegin();
3482
      while (true)
3483
      {
3484
        field = iprot.readFieldBegin();
3485
        if (field.type == TType.STOP) { 
3486
          break;
3487
        }
3488
        _Fields fieldId = _Fields.findByThriftId(field.id);
3489
        if (fieldId == null) {
3490
          TProtocolUtil.skip(iprot, field.type);
3491
        } else {
3492
          switch (fieldId) {
3493
            case ID:
3494
              if (field.type == TType.I64) {
3495
                this.id = iprot.readI64();
3496
                setIdIsSet(true);
3497
              } else { 
3498
                TProtocolUtil.skip(iprot, field.type);
3499
              }
3500
              break;
3501
          }
3502
          iprot.readFieldEnd();
3503
        }
3504
      }
3505
      iprot.readStructEnd();
3506
      validate();
3507
    }
3508
 
3509
    public void write(TProtocol oprot) throws TException {
3510
      validate();
3511
 
3512
      oprot.writeStructBegin(STRUCT_DESC);
3513
      oprot.writeFieldBegin(ID_FIELD_DESC);
3514
      oprot.writeI64(this.id);
3515
      oprot.writeFieldEnd();
3516
      oprot.writeFieldStop();
3517
      oprot.writeStructEnd();
3518
    }
3519
 
3520
    @Override
3521
    public String toString() {
3522
      StringBuilder sb = new StringBuilder("getTransaction_args(");
3523
      boolean first = true;
3524
 
3525
      sb.append("id:");
3526
      sb.append(this.id);
3527
      first = false;
3528
      sb.append(")");
3529
      return sb.toString();
3530
    }
3531
 
3532
    public void validate() throws TException {
3533
      // check for required fields
3534
    }
3535
 
3536
  }
3537
 
684 chandransh 3538
  public static class getTransaction_result implements TBase<getTransaction_result._Fields>, java.io.Serializable, Cloneable, Comparable<getTransaction_result>   {
68 ashish 3539
    private static final TStruct STRUCT_DESC = new TStruct("getTransaction_result");
3540
 
3541
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
3542
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
3543
 
3544
    private Transaction success;
3545
    private TransactionServiceException ex;
3546
 
3547
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3548
    public enum _Fields implements TFieldIdEnum {
3549
      SUCCESS((short)0, "success"),
3550
      EX((short)1, "ex");
3551
 
3552
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3553
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3554
 
3555
      static {
3556
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3557
          byId.put((int)field._thriftId, field);
3558
          byName.put(field.getFieldName(), field);
3559
        }
3560
      }
3561
 
3562
      /**
3563
       * Find the _Fields constant that matches fieldId, or null if its not found.
3564
       */
3565
      public static _Fields findByThriftId(int fieldId) {
3566
        return byId.get(fieldId);
3567
      }
3568
 
3569
      /**
3570
       * Find the _Fields constant that matches fieldId, throwing an exception
3571
       * if it is not found.
3572
       */
3573
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3574
        _Fields fields = findByThriftId(fieldId);
3575
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3576
        return fields;
3577
      }
3578
 
3579
      /**
3580
       * Find the _Fields constant that matches name, or null if its not found.
3581
       */
3582
      public static _Fields findByName(String name) {
3583
        return byName.get(name);
3584
      }
3585
 
3586
      private final short _thriftId;
3587
      private final String _fieldName;
3588
 
3589
      _Fields(short thriftId, String fieldName) {
3590
        _thriftId = thriftId;
3591
        _fieldName = fieldName;
3592
      }
3593
 
3594
      public short getThriftFieldId() {
3595
        return _thriftId;
3596
      }
3597
 
3598
      public String getFieldName() {
3599
        return _fieldName;
3600
      }
3601
    }
3602
 
3603
    // isset id assignments
3604
 
3605
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3606
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
3607
          new StructMetaData(TType.STRUCT, Transaction.class)));
3608
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
3609
          new FieldValueMetaData(TType.STRUCT)));
3610
    }});
3611
 
3612
    static {
3613
      FieldMetaData.addStructMetaDataMap(getTransaction_result.class, metaDataMap);
3614
    }
3615
 
3616
    public getTransaction_result() {
3617
    }
3618
 
3619
    public getTransaction_result(
3620
      Transaction success,
3621
      TransactionServiceException ex)
3622
    {
3623
      this();
3624
      this.success = success;
3625
      this.ex = ex;
3626
    }
3627
 
3628
    /**
3629
     * Performs a deep copy on <i>other</i>.
3630
     */
3631
    public getTransaction_result(getTransaction_result other) {
3632
      if (other.isSetSuccess()) {
3633
        this.success = new Transaction(other.success);
3634
      }
3635
      if (other.isSetEx()) {
3636
        this.ex = new TransactionServiceException(other.ex);
3637
      }
3638
    }
3639
 
3640
    public getTransaction_result deepCopy() {
3641
      return new getTransaction_result(this);
3642
    }
3643
 
3644
    @Deprecated
3645
    public getTransaction_result clone() {
3646
      return new getTransaction_result(this);
3647
    }
3648
 
3649
    public Transaction getSuccess() {
3650
      return this.success;
3651
    }
3652
 
3653
    public getTransaction_result setSuccess(Transaction success) {
3654
      this.success = success;
3655
      return this;
3656
    }
3657
 
3658
    public void unsetSuccess() {
3659
      this.success = null;
3660
    }
3661
 
3662
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
3663
    public boolean isSetSuccess() {
3664
      return this.success != null;
3665
    }
3666
 
3667
    public void setSuccessIsSet(boolean value) {
3668
      if (!value) {
3669
        this.success = null;
3670
      }
3671
    }
3672
 
3673
    public TransactionServiceException getEx() {
3674
      return this.ex;
3675
    }
3676
 
3677
    public getTransaction_result setEx(TransactionServiceException ex) {
3678
      this.ex = ex;
3679
      return this;
3680
    }
3681
 
3682
    public void unsetEx() {
3683
      this.ex = null;
3684
    }
3685
 
3686
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
3687
    public boolean isSetEx() {
3688
      return this.ex != null;
3689
    }
3690
 
3691
    public void setExIsSet(boolean value) {
3692
      if (!value) {
3693
        this.ex = null;
3694
      }
3695
    }
3696
 
3697
    public void setFieldValue(_Fields field, Object value) {
3698
      switch (field) {
3699
      case SUCCESS:
3700
        if (value == null) {
3701
          unsetSuccess();
3702
        } else {
3703
          setSuccess((Transaction)value);
3704
        }
3705
        break;
3706
 
3707
      case EX:
3708
        if (value == null) {
3709
          unsetEx();
3710
        } else {
3711
          setEx((TransactionServiceException)value);
3712
        }
3713
        break;
3714
 
3715
      }
3716
    }
3717
 
3718
    public void setFieldValue(int fieldID, Object value) {
3719
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3720
    }
3721
 
3722
    public Object getFieldValue(_Fields field) {
3723
      switch (field) {
3724
      case SUCCESS:
3725
        return getSuccess();
3726
 
3727
      case EX:
3728
        return getEx();
3729
 
3730
      }
3731
      throw new IllegalStateException();
3732
    }
3733
 
3734
    public Object getFieldValue(int fieldId) {
3735
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3736
    }
3737
 
3738
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3739
    public boolean isSet(_Fields field) {
3740
      switch (field) {
3741
      case SUCCESS:
3742
        return isSetSuccess();
3743
      case EX:
3744
        return isSetEx();
3745
      }
3746
      throw new IllegalStateException();
3747
    }
3748
 
3749
    public boolean isSet(int fieldID) {
3750
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3751
    }
3752
 
3753
    @Override
3754
    public boolean equals(Object that) {
3755
      if (that == null)
3756
        return false;
3757
      if (that instanceof getTransaction_result)
3758
        return this.equals((getTransaction_result)that);
3759
      return false;
3760
    }
3761
 
3762
    public boolean equals(getTransaction_result that) {
3763
      if (that == null)
3764
        return false;
3765
 
3766
      boolean this_present_success = true && this.isSetSuccess();
3767
      boolean that_present_success = true && that.isSetSuccess();
3768
      if (this_present_success || that_present_success) {
3769
        if (!(this_present_success && that_present_success))
3770
          return false;
3771
        if (!this.success.equals(that.success))
3772
          return false;
3773
      }
3774
 
3775
      boolean this_present_ex = true && this.isSetEx();
3776
      boolean that_present_ex = true && that.isSetEx();
3777
      if (this_present_ex || that_present_ex) {
3778
        if (!(this_present_ex && that_present_ex))
3779
          return false;
3780
        if (!this.ex.equals(that.ex))
3781
          return false;
3782
      }
3783
 
3784
      return true;
3785
    }
3786
 
3787
    @Override
3788
    public int hashCode() {
3789
      return 0;
3790
    }
3791
 
684 chandransh 3792
    public int compareTo(getTransaction_result other) {
3793
      if (!getClass().equals(other.getClass())) {
3794
        return getClass().getName().compareTo(other.getClass().getName());
3795
      }
3796
 
3797
      int lastComparison = 0;
3798
      getTransaction_result typedOther = (getTransaction_result)other;
3799
 
3800
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
3801
      if (lastComparison != 0) {
3802
        return lastComparison;
3803
      }
3804
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
3805
      if (lastComparison != 0) {
3806
        return lastComparison;
3807
      }
3808
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
3809
      if (lastComparison != 0) {
3810
        return lastComparison;
3811
      }
3812
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
3813
      if (lastComparison != 0) {
3814
        return lastComparison;
3815
      }
3816
      return 0;
3817
    }
3818
 
68 ashish 3819
    public void read(TProtocol iprot) throws TException {
3820
      TField field;
3821
      iprot.readStructBegin();
3822
      while (true)
3823
      {
3824
        field = iprot.readFieldBegin();
3825
        if (field.type == TType.STOP) { 
3826
          break;
3827
        }
3828
        _Fields fieldId = _Fields.findByThriftId(field.id);
3829
        if (fieldId == null) {
3830
          TProtocolUtil.skip(iprot, field.type);
3831
        } else {
3832
          switch (fieldId) {
3833
            case SUCCESS:
3834
              if (field.type == TType.STRUCT) {
3835
                this.success = new Transaction();
3836
                this.success.read(iprot);
3837
              } else { 
3838
                TProtocolUtil.skip(iprot, field.type);
3839
              }
3840
              break;
3841
            case EX:
3842
              if (field.type == TType.STRUCT) {
3843
                this.ex = new TransactionServiceException();
3844
                this.ex.read(iprot);
3845
              } else { 
3846
                TProtocolUtil.skip(iprot, field.type);
3847
              }
3848
              break;
3849
          }
3850
          iprot.readFieldEnd();
3851
        }
3852
      }
3853
      iprot.readStructEnd();
3854
      validate();
3855
    }
3856
 
3857
    public void write(TProtocol oprot) throws TException {
3858
      oprot.writeStructBegin(STRUCT_DESC);
3859
 
3860
      if (this.isSetSuccess()) {
3861
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
3862
        this.success.write(oprot);
3863
        oprot.writeFieldEnd();
3864
      } else if (this.isSetEx()) {
3865
        oprot.writeFieldBegin(EX_FIELD_DESC);
3866
        this.ex.write(oprot);
3867
        oprot.writeFieldEnd();
3868
      }
3869
      oprot.writeFieldStop();
3870
      oprot.writeStructEnd();
3871
    }
3872
 
3873
    @Override
3874
    public String toString() {
3875
      StringBuilder sb = new StringBuilder("getTransaction_result(");
3876
      boolean first = true;
3877
 
3878
      sb.append("success:");
3879
      if (this.success == null) {
3880
        sb.append("null");
3881
      } else {
3882
        sb.append(this.success);
3883
      }
3884
      first = false;
3885
      if (!first) sb.append(", ");
3886
      sb.append("ex:");
3887
      if (this.ex == null) {
3888
        sb.append("null");
3889
      } else {
3890
        sb.append(this.ex);
3891
      }
3892
      first = false;
3893
      sb.append(")");
3894
      return sb.toString();
3895
    }
3896
 
3897
    public void validate() throws TException {
3898
      // check for required fields
3899
    }
3900
 
3901
  }
3902
 
3903
  public static class getTransactionsForCustomer_args implements TBase<getTransactionsForCustomer_args._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionsForCustomer_args>   {
3904
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionsForCustomer_args");
3905
 
3906
    private static final TField CUSTOMER_ID_FIELD_DESC = new TField("customerId", TType.I64, (short)1);
132 ashish 3907
    private static final TField FROM_DATE_FIELD_DESC = new TField("from_date", TType.I64, (short)2);
3908
    private static final TField TO_DATE_FIELD_DESC = new TField("to_date", TType.I64, (short)3);
68 ashish 3909
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)4);
3910
 
3911
    private long customerId;
132 ashish 3912
    private long from_date;
3913
    private long to_date;
68 ashish 3914
    private TransactionStatus status;
3915
 
3916
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3917
    public enum _Fields implements TFieldIdEnum {
3918
      CUSTOMER_ID((short)1, "customerId"),
132 ashish 3919
      FROM_DATE((short)2, "from_date"),
3920
      TO_DATE((short)3, "to_date"),
68 ashish 3921
      /**
3922
       * 
3923
       * @see TransactionStatus
3924
       */
3925
      STATUS((short)4, "status");
3926
 
3927
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3928
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3929
 
3930
      static {
3931
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3932
          byId.put((int)field._thriftId, field);
3933
          byName.put(field.getFieldName(), field);
3934
        }
3935
      }
3936
 
3937
      /**
3938
       * Find the _Fields constant that matches fieldId, or null if its not found.
3939
       */
3940
      public static _Fields findByThriftId(int fieldId) {
3941
        return byId.get(fieldId);
3942
      }
3943
 
3944
      /**
3945
       * Find the _Fields constant that matches fieldId, throwing an exception
3946
       * if it is not found.
3947
       */
3948
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3949
        _Fields fields = findByThriftId(fieldId);
3950
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3951
        return fields;
3952
      }
3953
 
3954
      /**
3955
       * Find the _Fields constant that matches name, or null if its not found.
3956
       */
3957
      public static _Fields findByName(String name) {
3958
        return byName.get(name);
3959
      }
3960
 
3961
      private final short _thriftId;
3962
      private final String _fieldName;
3963
 
3964
      _Fields(short thriftId, String fieldName) {
3965
        _thriftId = thriftId;
3966
        _fieldName = fieldName;
3967
      }
3968
 
3969
      public short getThriftFieldId() {
3970
        return _thriftId;
3971
      }
3972
 
3973
      public String getFieldName() {
3974
        return _fieldName;
3975
      }
3976
    }
3977
 
3978
    // isset id assignments
3979
    private static final int __CUSTOMERID_ISSET_ID = 0;
132 ashish 3980
    private static final int __FROM_DATE_ISSET_ID = 1;
3981
    private static final int __TO_DATE_ISSET_ID = 2;
68 ashish 3982
    private BitSet __isset_bit_vector = new BitSet(3);
3983
 
3984
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3985
      put(_Fields.CUSTOMER_ID, new FieldMetaData("customerId", TFieldRequirementType.DEFAULT, 
3986
          new FieldValueMetaData(TType.I64)));
132 ashish 3987
      put(_Fields.FROM_DATE, new FieldMetaData("from_date", TFieldRequirementType.DEFAULT, 
68 ashish 3988
          new FieldValueMetaData(TType.I64)));
132 ashish 3989
      put(_Fields.TO_DATE, new FieldMetaData("to_date", TFieldRequirementType.DEFAULT, 
68 ashish 3990
          new FieldValueMetaData(TType.I64)));
3991
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
3992
          new EnumMetaData(TType.ENUM, TransactionStatus.class)));
3993
    }});
3994
 
3995
    static {
3996
      FieldMetaData.addStructMetaDataMap(getTransactionsForCustomer_args.class, metaDataMap);
3997
    }
3998
 
3999
    public getTransactionsForCustomer_args() {
4000
    }
4001
 
4002
    public getTransactionsForCustomer_args(
4003
      long customerId,
132 ashish 4004
      long from_date,
4005
      long to_date,
68 ashish 4006
      TransactionStatus status)
4007
    {
4008
      this();
4009
      this.customerId = customerId;
4010
      setCustomerIdIsSet(true);
132 ashish 4011
      this.from_date = from_date;
4012
      setFrom_dateIsSet(true);
4013
      this.to_date = to_date;
4014
      setTo_dateIsSet(true);
68 ashish 4015
      this.status = status;
4016
    }
4017
 
4018
    /**
4019
     * Performs a deep copy on <i>other</i>.
4020
     */
4021
    public getTransactionsForCustomer_args(getTransactionsForCustomer_args other) {
4022
      __isset_bit_vector.clear();
4023
      __isset_bit_vector.or(other.__isset_bit_vector);
4024
      this.customerId = other.customerId;
132 ashish 4025
      this.from_date = other.from_date;
4026
      this.to_date = other.to_date;
68 ashish 4027
      if (other.isSetStatus()) {
4028
        this.status = other.status;
4029
      }
4030
    }
4031
 
4032
    public getTransactionsForCustomer_args deepCopy() {
4033
      return new getTransactionsForCustomer_args(this);
4034
    }
4035
 
4036
    @Deprecated
4037
    public getTransactionsForCustomer_args clone() {
4038
      return new getTransactionsForCustomer_args(this);
4039
    }
4040
 
4041
    public long getCustomerId() {
4042
      return this.customerId;
4043
    }
4044
 
4045
    public getTransactionsForCustomer_args setCustomerId(long customerId) {
4046
      this.customerId = customerId;
4047
      setCustomerIdIsSet(true);
4048
      return this;
4049
    }
4050
 
4051
    public void unsetCustomerId() {
4052
      __isset_bit_vector.clear(__CUSTOMERID_ISSET_ID);
4053
    }
4054
 
4055
    /** Returns true if field customerId is set (has been asigned a value) and false otherwise */
4056
    public boolean isSetCustomerId() {
4057
      return __isset_bit_vector.get(__CUSTOMERID_ISSET_ID);
4058
    }
4059
 
4060
    public void setCustomerIdIsSet(boolean value) {
4061
      __isset_bit_vector.set(__CUSTOMERID_ISSET_ID, value);
4062
    }
4063
 
132 ashish 4064
    public long getFrom_date() {
4065
      return this.from_date;
68 ashish 4066
    }
4067
 
132 ashish 4068
    public getTransactionsForCustomer_args setFrom_date(long from_date) {
4069
      this.from_date = from_date;
4070
      setFrom_dateIsSet(true);
68 ashish 4071
      return this;
4072
    }
4073
 
132 ashish 4074
    public void unsetFrom_date() {
4075
      __isset_bit_vector.clear(__FROM_DATE_ISSET_ID);
68 ashish 4076
    }
4077
 
132 ashish 4078
    /** Returns true if field from_date is set (has been asigned a value) and false otherwise */
4079
    public boolean isSetFrom_date() {
4080
      return __isset_bit_vector.get(__FROM_DATE_ISSET_ID);
68 ashish 4081
    }
4082
 
132 ashish 4083
    public void setFrom_dateIsSet(boolean value) {
4084
      __isset_bit_vector.set(__FROM_DATE_ISSET_ID, value);
68 ashish 4085
    }
4086
 
132 ashish 4087
    public long getTo_date() {
4088
      return this.to_date;
68 ashish 4089
    }
4090
 
132 ashish 4091
    public getTransactionsForCustomer_args setTo_date(long to_date) {
4092
      this.to_date = to_date;
4093
      setTo_dateIsSet(true);
68 ashish 4094
      return this;
4095
    }
4096
 
132 ashish 4097
    public void unsetTo_date() {
4098
      __isset_bit_vector.clear(__TO_DATE_ISSET_ID);
68 ashish 4099
    }
4100
 
132 ashish 4101
    /** Returns true if field to_date is set (has been asigned a value) and false otherwise */
4102
    public boolean isSetTo_date() {
4103
      return __isset_bit_vector.get(__TO_DATE_ISSET_ID);
68 ashish 4104
    }
4105
 
132 ashish 4106
    public void setTo_dateIsSet(boolean value) {
4107
      __isset_bit_vector.set(__TO_DATE_ISSET_ID, value);
68 ashish 4108
    }
4109
 
4110
    /**
4111
     * 
4112
     * @see TransactionStatus
4113
     */
4114
    public TransactionStatus getStatus() {
4115
      return this.status;
4116
    }
4117
 
4118
    /**
4119
     * 
4120
     * @see TransactionStatus
4121
     */
4122
    public getTransactionsForCustomer_args setStatus(TransactionStatus status) {
4123
      this.status = status;
4124
      return this;
4125
    }
4126
 
4127
    public void unsetStatus() {
4128
      this.status = null;
4129
    }
4130
 
4131
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
4132
    public boolean isSetStatus() {
4133
      return this.status != null;
4134
    }
4135
 
4136
    public void setStatusIsSet(boolean value) {
4137
      if (!value) {
4138
        this.status = null;
4139
      }
4140
    }
4141
 
4142
    public void setFieldValue(_Fields field, Object value) {
4143
      switch (field) {
4144
      case CUSTOMER_ID:
4145
        if (value == null) {
4146
          unsetCustomerId();
4147
        } else {
4148
          setCustomerId((Long)value);
4149
        }
4150
        break;
4151
 
132 ashish 4152
      case FROM_DATE:
68 ashish 4153
        if (value == null) {
132 ashish 4154
          unsetFrom_date();
68 ashish 4155
        } else {
132 ashish 4156
          setFrom_date((Long)value);
68 ashish 4157
        }
4158
        break;
4159
 
132 ashish 4160
      case TO_DATE:
68 ashish 4161
        if (value == null) {
132 ashish 4162
          unsetTo_date();
68 ashish 4163
        } else {
132 ashish 4164
          setTo_date((Long)value);
68 ashish 4165
        }
4166
        break;
4167
 
4168
      case STATUS:
4169
        if (value == null) {
4170
          unsetStatus();
4171
        } else {
4172
          setStatus((TransactionStatus)value);
4173
        }
4174
        break;
4175
 
4176
      }
4177
    }
4178
 
4179
    public void setFieldValue(int fieldID, Object value) {
4180
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4181
    }
4182
 
4183
    public Object getFieldValue(_Fields field) {
4184
      switch (field) {
4185
      case CUSTOMER_ID:
4186
        return new Long(getCustomerId());
4187
 
132 ashish 4188
      case FROM_DATE:
4189
        return new Long(getFrom_date());
68 ashish 4190
 
132 ashish 4191
      case TO_DATE:
4192
        return new Long(getTo_date());
68 ashish 4193
 
4194
      case STATUS:
4195
        return getStatus();
4196
 
4197
      }
4198
      throw new IllegalStateException();
4199
    }
4200
 
4201
    public Object getFieldValue(int fieldId) {
4202
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4203
    }
4204
 
4205
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4206
    public boolean isSet(_Fields field) {
4207
      switch (field) {
4208
      case CUSTOMER_ID:
4209
        return isSetCustomerId();
132 ashish 4210
      case FROM_DATE:
4211
        return isSetFrom_date();
4212
      case TO_DATE:
4213
        return isSetTo_date();
68 ashish 4214
      case STATUS:
4215
        return isSetStatus();
4216
      }
4217
      throw new IllegalStateException();
4218
    }
4219
 
4220
    public boolean isSet(int fieldID) {
4221
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4222
    }
4223
 
4224
    @Override
4225
    public boolean equals(Object that) {
4226
      if (that == null)
4227
        return false;
4228
      if (that instanceof getTransactionsForCustomer_args)
4229
        return this.equals((getTransactionsForCustomer_args)that);
4230
      return false;
4231
    }
4232
 
4233
    public boolean equals(getTransactionsForCustomer_args that) {
4234
      if (that == null)
4235
        return false;
4236
 
4237
      boolean this_present_customerId = true;
4238
      boolean that_present_customerId = true;
4239
      if (this_present_customerId || that_present_customerId) {
4240
        if (!(this_present_customerId && that_present_customerId))
4241
          return false;
4242
        if (this.customerId != that.customerId)
4243
          return false;
4244
      }
4245
 
132 ashish 4246
      boolean this_present_from_date = true;
4247
      boolean that_present_from_date = true;
4248
      if (this_present_from_date || that_present_from_date) {
4249
        if (!(this_present_from_date && that_present_from_date))
68 ashish 4250
          return false;
132 ashish 4251
        if (this.from_date != that.from_date)
68 ashish 4252
          return false;
4253
      }
4254
 
132 ashish 4255
      boolean this_present_to_date = true;
4256
      boolean that_present_to_date = true;
4257
      if (this_present_to_date || that_present_to_date) {
4258
        if (!(this_present_to_date && that_present_to_date))
68 ashish 4259
          return false;
132 ashish 4260
        if (this.to_date != that.to_date)
68 ashish 4261
          return false;
4262
      }
4263
 
4264
      boolean this_present_status = true && this.isSetStatus();
4265
      boolean that_present_status = true && that.isSetStatus();
4266
      if (this_present_status || that_present_status) {
4267
        if (!(this_present_status && that_present_status))
4268
          return false;
4269
        if (!this.status.equals(that.status))
4270
          return false;
4271
      }
4272
 
4273
      return true;
4274
    }
4275
 
4276
    @Override
4277
    public int hashCode() {
4278
      return 0;
4279
    }
4280
 
4281
    public int compareTo(getTransactionsForCustomer_args other) {
4282
      if (!getClass().equals(other.getClass())) {
4283
        return getClass().getName().compareTo(other.getClass().getName());
4284
      }
4285
 
4286
      int lastComparison = 0;
4287
      getTransactionsForCustomer_args typedOther = (getTransactionsForCustomer_args)other;
4288
 
4289
      lastComparison = Boolean.valueOf(isSetCustomerId()).compareTo(isSetCustomerId());
4290
      if (lastComparison != 0) {
4291
        return lastComparison;
4292
      }
4293
      lastComparison = TBaseHelper.compareTo(customerId, typedOther.customerId);
4294
      if (lastComparison != 0) {
4295
        return lastComparison;
4296
      }
132 ashish 4297
      lastComparison = Boolean.valueOf(isSetFrom_date()).compareTo(isSetFrom_date());
68 ashish 4298
      if (lastComparison != 0) {
4299
        return lastComparison;
4300
      }
132 ashish 4301
      lastComparison = TBaseHelper.compareTo(from_date, typedOther.from_date);
68 ashish 4302
      if (lastComparison != 0) {
4303
        return lastComparison;
4304
      }
132 ashish 4305
      lastComparison = Boolean.valueOf(isSetTo_date()).compareTo(isSetTo_date());
68 ashish 4306
      if (lastComparison != 0) {
4307
        return lastComparison;
4308
      }
132 ashish 4309
      lastComparison = TBaseHelper.compareTo(to_date, typedOther.to_date);
68 ashish 4310
      if (lastComparison != 0) {
4311
        return lastComparison;
4312
      }
4313
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
4314
      if (lastComparison != 0) {
4315
        return lastComparison;
4316
      }
4317
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
4318
      if (lastComparison != 0) {
4319
        return lastComparison;
4320
      }
4321
      return 0;
4322
    }
4323
 
4324
    public void read(TProtocol iprot) throws TException {
4325
      TField field;
4326
      iprot.readStructBegin();
4327
      while (true)
4328
      {
4329
        field = iprot.readFieldBegin();
4330
        if (field.type == TType.STOP) { 
4331
          break;
4332
        }
4333
        _Fields fieldId = _Fields.findByThriftId(field.id);
4334
        if (fieldId == null) {
4335
          TProtocolUtil.skip(iprot, field.type);
4336
        } else {
4337
          switch (fieldId) {
4338
            case CUSTOMER_ID:
4339
              if (field.type == TType.I64) {
4340
                this.customerId = iprot.readI64();
4341
                setCustomerIdIsSet(true);
4342
              } else { 
4343
                TProtocolUtil.skip(iprot, field.type);
4344
              }
4345
              break;
132 ashish 4346
            case FROM_DATE:
68 ashish 4347
              if (field.type == TType.I64) {
132 ashish 4348
                this.from_date = iprot.readI64();
4349
                setFrom_dateIsSet(true);
68 ashish 4350
              } else { 
4351
                TProtocolUtil.skip(iprot, field.type);
4352
              }
4353
              break;
132 ashish 4354
            case TO_DATE:
68 ashish 4355
              if (field.type == TType.I64) {
132 ashish 4356
                this.to_date = iprot.readI64();
4357
                setTo_dateIsSet(true);
68 ashish 4358
              } else { 
4359
                TProtocolUtil.skip(iprot, field.type);
4360
              }
4361
              break;
4362
            case STATUS:
4363
              if (field.type == TType.I32) {
4364
                this.status = TransactionStatus.findByValue(iprot.readI32());
4365
              } else { 
4366
                TProtocolUtil.skip(iprot, field.type);
4367
              }
4368
              break;
4369
          }
4370
          iprot.readFieldEnd();
4371
        }
4372
      }
4373
      iprot.readStructEnd();
4374
      validate();
4375
    }
4376
 
4377
    public void write(TProtocol oprot) throws TException {
4378
      validate();
4379
 
4380
      oprot.writeStructBegin(STRUCT_DESC);
4381
      oprot.writeFieldBegin(CUSTOMER_ID_FIELD_DESC);
4382
      oprot.writeI64(this.customerId);
4383
      oprot.writeFieldEnd();
132 ashish 4384
      oprot.writeFieldBegin(FROM_DATE_FIELD_DESC);
4385
      oprot.writeI64(this.from_date);
68 ashish 4386
      oprot.writeFieldEnd();
132 ashish 4387
      oprot.writeFieldBegin(TO_DATE_FIELD_DESC);
4388
      oprot.writeI64(this.to_date);
68 ashish 4389
      oprot.writeFieldEnd();
4390
      if (this.status != null) {
4391
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
4392
        oprot.writeI32(this.status.getValue());
4393
        oprot.writeFieldEnd();
4394
      }
4395
      oprot.writeFieldStop();
4396
      oprot.writeStructEnd();
4397
    }
4398
 
4399
    @Override
4400
    public String toString() {
4401
      StringBuilder sb = new StringBuilder("getTransactionsForCustomer_args(");
4402
      boolean first = true;
4403
 
4404
      sb.append("customerId:");
4405
      sb.append(this.customerId);
4406
      first = false;
4407
      if (!first) sb.append(", ");
132 ashish 4408
      sb.append("from_date:");
4409
      sb.append(this.from_date);
68 ashish 4410
      first = false;
4411
      if (!first) sb.append(", ");
132 ashish 4412
      sb.append("to_date:");
4413
      sb.append(this.to_date);
68 ashish 4414
      first = false;
4415
      if (!first) sb.append(", ");
4416
      sb.append("status:");
4417
      if (this.status == null) {
4418
        sb.append("null");
4419
      } else {
4420
        String status_name = status.name();
4421
        if (status_name != null) {
4422
          sb.append(status_name);
4423
          sb.append(" (");
4424
        }
4425
        sb.append(this.status);
4426
        if (status_name != null) {
4427
          sb.append(")");
4428
        }
4429
      }
4430
      first = false;
4431
      sb.append(")");
4432
      return sb.toString();
4433
    }
4434
 
4435
    public void validate() throws TException {
4436
      // check for required fields
4437
    }
4438
 
4439
  }
4440
 
684 chandransh 4441
  public static class getTransactionsForCustomer_result implements TBase<getTransactionsForCustomer_result._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionsForCustomer_result>   {
68 ashish 4442
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionsForCustomer_result");
4443
 
4444
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
4445
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
4446
 
4447
    private List<Transaction> success;
4448
    private TransactionServiceException ex;
4449
 
4450
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4451
    public enum _Fields implements TFieldIdEnum {
4452
      SUCCESS((short)0, "success"),
4453
      EX((short)1, "ex");
4454
 
4455
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4456
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4457
 
4458
      static {
4459
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4460
          byId.put((int)field._thriftId, field);
4461
          byName.put(field.getFieldName(), field);
4462
        }
4463
      }
4464
 
4465
      /**
4466
       * Find the _Fields constant that matches fieldId, or null if its not found.
4467
       */
4468
      public static _Fields findByThriftId(int fieldId) {
4469
        return byId.get(fieldId);
4470
      }
4471
 
4472
      /**
4473
       * Find the _Fields constant that matches fieldId, throwing an exception
4474
       * if it is not found.
4475
       */
4476
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4477
        _Fields fields = findByThriftId(fieldId);
4478
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4479
        return fields;
4480
      }
4481
 
4482
      /**
4483
       * Find the _Fields constant that matches name, or null if its not found.
4484
       */
4485
      public static _Fields findByName(String name) {
4486
        return byName.get(name);
4487
      }
4488
 
4489
      private final short _thriftId;
4490
      private final String _fieldName;
4491
 
4492
      _Fields(short thriftId, String fieldName) {
4493
        _thriftId = thriftId;
4494
        _fieldName = fieldName;
4495
      }
4496
 
4497
      public short getThriftFieldId() {
4498
        return _thriftId;
4499
      }
4500
 
4501
      public String getFieldName() {
4502
        return _fieldName;
4503
      }
4504
    }
4505
 
4506
    // isset id assignments
4507
 
4508
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
4509
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
4510
          new ListMetaData(TType.LIST, 
4511
              new StructMetaData(TType.STRUCT, Transaction.class))));
4512
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
4513
          new FieldValueMetaData(TType.STRUCT)));
4514
    }});
4515
 
4516
    static {
4517
      FieldMetaData.addStructMetaDataMap(getTransactionsForCustomer_result.class, metaDataMap);
4518
    }
4519
 
4520
    public getTransactionsForCustomer_result() {
4521
    }
4522
 
4523
    public getTransactionsForCustomer_result(
4524
      List<Transaction> success,
4525
      TransactionServiceException ex)
4526
    {
4527
      this();
4528
      this.success = success;
4529
      this.ex = ex;
4530
    }
4531
 
4532
    /**
4533
     * Performs a deep copy on <i>other</i>.
4534
     */
4535
    public getTransactionsForCustomer_result(getTransactionsForCustomer_result other) {
4536
      if (other.isSetSuccess()) {
4537
        List<Transaction> __this__success = new ArrayList<Transaction>();
4538
        for (Transaction other_element : other.success) {
4539
          __this__success.add(new Transaction(other_element));
4540
        }
4541
        this.success = __this__success;
4542
      }
4543
      if (other.isSetEx()) {
4544
        this.ex = new TransactionServiceException(other.ex);
4545
      }
4546
    }
4547
 
4548
    public getTransactionsForCustomer_result deepCopy() {
4549
      return new getTransactionsForCustomer_result(this);
4550
    }
4551
 
4552
    @Deprecated
4553
    public getTransactionsForCustomer_result clone() {
4554
      return new getTransactionsForCustomer_result(this);
4555
    }
4556
 
4557
    public int getSuccessSize() {
4558
      return (this.success == null) ? 0 : this.success.size();
4559
    }
4560
 
4561
    public java.util.Iterator<Transaction> getSuccessIterator() {
4562
      return (this.success == null) ? null : this.success.iterator();
4563
    }
4564
 
4565
    public void addToSuccess(Transaction elem) {
4566
      if (this.success == null) {
4567
        this.success = new ArrayList<Transaction>();
4568
      }
4569
      this.success.add(elem);
4570
    }
4571
 
4572
    public List<Transaction> getSuccess() {
4573
      return this.success;
4574
    }
4575
 
4576
    public getTransactionsForCustomer_result setSuccess(List<Transaction> success) {
4577
      this.success = success;
4578
      return this;
4579
    }
4580
 
4581
    public void unsetSuccess() {
4582
      this.success = null;
4583
    }
4584
 
4585
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
4586
    public boolean isSetSuccess() {
4587
      return this.success != null;
4588
    }
4589
 
4590
    public void setSuccessIsSet(boolean value) {
4591
      if (!value) {
4592
        this.success = null;
4593
      }
4594
    }
4595
 
4596
    public TransactionServiceException getEx() {
4597
      return this.ex;
4598
    }
4599
 
4600
    public getTransactionsForCustomer_result setEx(TransactionServiceException ex) {
4601
      this.ex = ex;
4602
      return this;
4603
    }
4604
 
4605
    public void unsetEx() {
4606
      this.ex = null;
4607
    }
4608
 
4609
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
4610
    public boolean isSetEx() {
4611
      return this.ex != null;
4612
    }
4613
 
4614
    public void setExIsSet(boolean value) {
4615
      if (!value) {
4616
        this.ex = null;
4617
      }
4618
    }
4619
 
4620
    public void setFieldValue(_Fields field, Object value) {
4621
      switch (field) {
4622
      case SUCCESS:
4623
        if (value == null) {
4624
          unsetSuccess();
4625
        } else {
4626
          setSuccess((List<Transaction>)value);
4627
        }
4628
        break;
4629
 
4630
      case EX:
4631
        if (value == null) {
4632
          unsetEx();
4633
        } else {
4634
          setEx((TransactionServiceException)value);
4635
        }
4636
        break;
4637
 
4638
      }
4639
    }
4640
 
4641
    public void setFieldValue(int fieldID, Object value) {
4642
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4643
    }
4644
 
4645
    public Object getFieldValue(_Fields field) {
4646
      switch (field) {
4647
      case SUCCESS:
4648
        return getSuccess();
4649
 
4650
      case EX:
4651
        return getEx();
4652
 
4653
      }
4654
      throw new IllegalStateException();
4655
    }
4656
 
4657
    public Object getFieldValue(int fieldId) {
4658
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4659
    }
4660
 
4661
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4662
    public boolean isSet(_Fields field) {
4663
      switch (field) {
4664
      case SUCCESS:
4665
        return isSetSuccess();
4666
      case EX:
4667
        return isSetEx();
4668
      }
4669
      throw new IllegalStateException();
4670
    }
4671
 
4672
    public boolean isSet(int fieldID) {
4673
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4674
    }
4675
 
4676
    @Override
4677
    public boolean equals(Object that) {
4678
      if (that == null)
4679
        return false;
4680
      if (that instanceof getTransactionsForCustomer_result)
4681
        return this.equals((getTransactionsForCustomer_result)that);
4682
      return false;
4683
    }
4684
 
4685
    public boolean equals(getTransactionsForCustomer_result that) {
4686
      if (that == null)
4687
        return false;
4688
 
4689
      boolean this_present_success = true && this.isSetSuccess();
4690
      boolean that_present_success = true && that.isSetSuccess();
4691
      if (this_present_success || that_present_success) {
4692
        if (!(this_present_success && that_present_success))
4693
          return false;
4694
        if (!this.success.equals(that.success))
4695
          return false;
4696
      }
4697
 
4698
      boolean this_present_ex = true && this.isSetEx();
4699
      boolean that_present_ex = true && that.isSetEx();
4700
      if (this_present_ex || that_present_ex) {
4701
        if (!(this_present_ex && that_present_ex))
4702
          return false;
4703
        if (!this.ex.equals(that.ex))
4704
          return false;
4705
      }
4706
 
4707
      return true;
4708
    }
4709
 
4710
    @Override
4711
    public int hashCode() {
4712
      return 0;
4713
    }
4714
 
684 chandransh 4715
    public int compareTo(getTransactionsForCustomer_result other) {
4716
      if (!getClass().equals(other.getClass())) {
4717
        return getClass().getName().compareTo(other.getClass().getName());
4718
      }
4719
 
4720
      int lastComparison = 0;
4721
      getTransactionsForCustomer_result typedOther = (getTransactionsForCustomer_result)other;
4722
 
4723
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
4724
      if (lastComparison != 0) {
4725
        return lastComparison;
4726
      }
4727
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
4728
      if (lastComparison != 0) {
4729
        return lastComparison;
4730
      }
4731
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
4732
      if (lastComparison != 0) {
4733
        return lastComparison;
4734
      }
4735
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
4736
      if (lastComparison != 0) {
4737
        return lastComparison;
4738
      }
4739
      return 0;
4740
    }
4741
 
68 ashish 4742
    public void read(TProtocol iprot) throws TException {
4743
      TField field;
4744
      iprot.readStructBegin();
4745
      while (true)
4746
      {
4747
        field = iprot.readFieldBegin();
4748
        if (field.type == TType.STOP) { 
4749
          break;
4750
        }
4751
        _Fields fieldId = _Fields.findByThriftId(field.id);
4752
        if (fieldId == null) {
4753
          TProtocolUtil.skip(iprot, field.type);
4754
        } else {
4755
          switch (fieldId) {
4756
            case SUCCESS:
4757
              if (field.type == TType.LIST) {
4758
                {
684 chandransh 4759
                  TList _list8 = iprot.readListBegin();
4760
                  this.success = new ArrayList<Transaction>(_list8.size);
4761
                  for (int _i9 = 0; _i9 < _list8.size; ++_i9)
68 ashish 4762
                  {
684 chandransh 4763
                    Transaction _elem10;
4764
                    _elem10 = new Transaction();
4765
                    _elem10.read(iprot);
4766
                    this.success.add(_elem10);
68 ashish 4767
                  }
4768
                  iprot.readListEnd();
4769
                }
4770
              } else { 
4771
                TProtocolUtil.skip(iprot, field.type);
4772
              }
4773
              break;
4774
            case EX:
4775
              if (field.type == TType.STRUCT) {
4776
                this.ex = new TransactionServiceException();
4777
                this.ex.read(iprot);
4778
              } else { 
4779
                TProtocolUtil.skip(iprot, field.type);
4780
              }
4781
              break;
4782
          }
4783
          iprot.readFieldEnd();
4784
        }
4785
      }
4786
      iprot.readStructEnd();
4787
      validate();
4788
    }
4789
 
4790
    public void write(TProtocol oprot) throws TException {
4791
      oprot.writeStructBegin(STRUCT_DESC);
4792
 
4793
      if (this.isSetSuccess()) {
4794
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
4795
        {
4796
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
684 chandransh 4797
          for (Transaction _iter11 : this.success)
68 ashish 4798
          {
684 chandransh 4799
            _iter11.write(oprot);
68 ashish 4800
          }
4801
          oprot.writeListEnd();
4802
        }
4803
        oprot.writeFieldEnd();
4804
      } else if (this.isSetEx()) {
4805
        oprot.writeFieldBegin(EX_FIELD_DESC);
4806
        this.ex.write(oprot);
4807
        oprot.writeFieldEnd();
4808
      }
4809
      oprot.writeFieldStop();
4810
      oprot.writeStructEnd();
4811
    }
4812
 
4813
    @Override
4814
    public String toString() {
4815
      StringBuilder sb = new StringBuilder("getTransactionsForCustomer_result(");
4816
      boolean first = true;
4817
 
4818
      sb.append("success:");
4819
      if (this.success == null) {
4820
        sb.append("null");
4821
      } else {
4822
        sb.append(this.success);
4823
      }
4824
      first = false;
4825
      if (!first) sb.append(", ");
4826
      sb.append("ex:");
4827
      if (this.ex == null) {
4828
        sb.append("null");
4829
      } else {
4830
        sb.append(this.ex);
4831
      }
4832
      first = false;
4833
      sb.append(")");
4834
      return sb.toString();
4835
    }
4836
 
4837
    public void validate() throws TException {
4838
      // check for required fields
4839
    }
4840
 
4841
  }
4842
 
132 ashish 4843
  public static class getTransactionsForShoppingCartId_args implements TBase<getTransactionsForShoppingCartId_args._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionsForShoppingCartId_args>   {
4844
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionsForShoppingCartId_args");
4845
 
4846
    private static final TField SHOPPING_CART_ID_FIELD_DESC = new TField("shoppingCartId", TType.I64, (short)1);
4847
 
4848
    private long shoppingCartId;
4849
 
4850
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4851
    public enum _Fields implements TFieldIdEnum {
4852
      SHOPPING_CART_ID((short)1, "shoppingCartId");
4853
 
4854
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4855
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4856
 
4857
      static {
4858
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4859
          byId.put((int)field._thriftId, field);
4860
          byName.put(field.getFieldName(), field);
4861
        }
4862
      }
4863
 
4864
      /**
4865
       * Find the _Fields constant that matches fieldId, or null if its not found.
4866
       */
4867
      public static _Fields findByThriftId(int fieldId) {
4868
        return byId.get(fieldId);
4869
      }
4870
 
4871
      /**
4872
       * Find the _Fields constant that matches fieldId, throwing an exception
4873
       * if it is not found.
4874
       */
4875
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4876
        _Fields fields = findByThriftId(fieldId);
4877
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4878
        return fields;
4879
      }
4880
 
4881
      /**
4882
       * Find the _Fields constant that matches name, or null if its not found.
4883
       */
4884
      public static _Fields findByName(String name) {
4885
        return byName.get(name);
4886
      }
4887
 
4888
      private final short _thriftId;
4889
      private final String _fieldName;
4890
 
4891
      _Fields(short thriftId, String fieldName) {
4892
        _thriftId = thriftId;
4893
        _fieldName = fieldName;
4894
      }
4895
 
4896
      public short getThriftFieldId() {
4897
        return _thriftId;
4898
      }
4899
 
4900
      public String getFieldName() {
4901
        return _fieldName;
4902
      }
4903
    }
4904
 
4905
    // isset id assignments
4906
    private static final int __SHOPPINGCARTID_ISSET_ID = 0;
4907
    private BitSet __isset_bit_vector = new BitSet(1);
4908
 
4909
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
4910
      put(_Fields.SHOPPING_CART_ID, new FieldMetaData("shoppingCartId", TFieldRequirementType.DEFAULT, 
4911
          new FieldValueMetaData(TType.I64)));
4912
    }});
4913
 
4914
    static {
4915
      FieldMetaData.addStructMetaDataMap(getTransactionsForShoppingCartId_args.class, metaDataMap);
4916
    }
4917
 
4918
    public getTransactionsForShoppingCartId_args() {
4919
    }
4920
 
4921
    public getTransactionsForShoppingCartId_args(
4922
      long shoppingCartId)
4923
    {
4924
      this();
4925
      this.shoppingCartId = shoppingCartId;
4926
      setShoppingCartIdIsSet(true);
4927
    }
4928
 
4929
    /**
4930
     * Performs a deep copy on <i>other</i>.
4931
     */
4932
    public getTransactionsForShoppingCartId_args(getTransactionsForShoppingCartId_args other) {
4933
      __isset_bit_vector.clear();
4934
      __isset_bit_vector.or(other.__isset_bit_vector);
4935
      this.shoppingCartId = other.shoppingCartId;
4936
    }
4937
 
4938
    public getTransactionsForShoppingCartId_args deepCopy() {
4939
      return new getTransactionsForShoppingCartId_args(this);
4940
    }
4941
 
4942
    @Deprecated
4943
    public getTransactionsForShoppingCartId_args clone() {
4944
      return new getTransactionsForShoppingCartId_args(this);
4945
    }
4946
 
4947
    public long getShoppingCartId() {
4948
      return this.shoppingCartId;
4949
    }
4950
 
4951
    public getTransactionsForShoppingCartId_args setShoppingCartId(long shoppingCartId) {
4952
      this.shoppingCartId = shoppingCartId;
4953
      setShoppingCartIdIsSet(true);
4954
      return this;
4955
    }
4956
 
4957
    public void unsetShoppingCartId() {
4958
      __isset_bit_vector.clear(__SHOPPINGCARTID_ISSET_ID);
4959
    }
4960
 
4961
    /** Returns true if field shoppingCartId is set (has been asigned a value) and false otherwise */
4962
    public boolean isSetShoppingCartId() {
4963
      return __isset_bit_vector.get(__SHOPPINGCARTID_ISSET_ID);
4964
    }
4965
 
4966
    public void setShoppingCartIdIsSet(boolean value) {
4967
      __isset_bit_vector.set(__SHOPPINGCARTID_ISSET_ID, value);
4968
    }
4969
 
4970
    public void setFieldValue(_Fields field, Object value) {
4971
      switch (field) {
4972
      case SHOPPING_CART_ID:
4973
        if (value == null) {
4974
          unsetShoppingCartId();
4975
        } else {
4976
          setShoppingCartId((Long)value);
4977
        }
4978
        break;
4979
 
4980
      }
4981
    }
4982
 
4983
    public void setFieldValue(int fieldID, Object value) {
4984
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4985
    }
4986
 
4987
    public Object getFieldValue(_Fields field) {
4988
      switch (field) {
4989
      case SHOPPING_CART_ID:
4990
        return new Long(getShoppingCartId());
4991
 
4992
      }
4993
      throw new IllegalStateException();
4994
    }
4995
 
4996
    public Object getFieldValue(int fieldId) {
4997
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4998
    }
4999
 
5000
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5001
    public boolean isSet(_Fields field) {
5002
      switch (field) {
5003
      case SHOPPING_CART_ID:
5004
        return isSetShoppingCartId();
5005
      }
5006
      throw new IllegalStateException();
5007
    }
5008
 
5009
    public boolean isSet(int fieldID) {
5010
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5011
    }
5012
 
5013
    @Override
5014
    public boolean equals(Object that) {
5015
      if (that == null)
5016
        return false;
5017
      if (that instanceof getTransactionsForShoppingCartId_args)
5018
        return this.equals((getTransactionsForShoppingCartId_args)that);
5019
      return false;
5020
    }
5021
 
5022
    public boolean equals(getTransactionsForShoppingCartId_args that) {
5023
      if (that == null)
5024
        return false;
5025
 
5026
      boolean this_present_shoppingCartId = true;
5027
      boolean that_present_shoppingCartId = true;
5028
      if (this_present_shoppingCartId || that_present_shoppingCartId) {
5029
        if (!(this_present_shoppingCartId && that_present_shoppingCartId))
5030
          return false;
5031
        if (this.shoppingCartId != that.shoppingCartId)
5032
          return false;
5033
      }
5034
 
5035
      return true;
5036
    }
5037
 
5038
    @Override
5039
    public int hashCode() {
5040
      return 0;
5041
    }
5042
 
5043
    public int compareTo(getTransactionsForShoppingCartId_args other) {
5044
      if (!getClass().equals(other.getClass())) {
5045
        return getClass().getName().compareTo(other.getClass().getName());
5046
      }
5047
 
5048
      int lastComparison = 0;
5049
      getTransactionsForShoppingCartId_args typedOther = (getTransactionsForShoppingCartId_args)other;
5050
 
5051
      lastComparison = Boolean.valueOf(isSetShoppingCartId()).compareTo(isSetShoppingCartId());
5052
      if (lastComparison != 0) {
5053
        return lastComparison;
5054
      }
5055
      lastComparison = TBaseHelper.compareTo(shoppingCartId, typedOther.shoppingCartId);
5056
      if (lastComparison != 0) {
5057
        return lastComparison;
5058
      }
5059
      return 0;
5060
    }
5061
 
5062
    public void read(TProtocol iprot) throws TException {
5063
      TField field;
5064
      iprot.readStructBegin();
5065
      while (true)
5066
      {
5067
        field = iprot.readFieldBegin();
5068
        if (field.type == TType.STOP) { 
5069
          break;
5070
        }
5071
        _Fields fieldId = _Fields.findByThriftId(field.id);
5072
        if (fieldId == null) {
5073
          TProtocolUtil.skip(iprot, field.type);
5074
        } else {
5075
          switch (fieldId) {
5076
            case SHOPPING_CART_ID:
5077
              if (field.type == TType.I64) {
5078
                this.shoppingCartId = iprot.readI64();
5079
                setShoppingCartIdIsSet(true);
5080
              } else { 
5081
                TProtocolUtil.skip(iprot, field.type);
5082
              }
5083
              break;
5084
          }
5085
          iprot.readFieldEnd();
5086
        }
5087
      }
5088
      iprot.readStructEnd();
5089
      validate();
5090
    }
5091
 
5092
    public void write(TProtocol oprot) throws TException {
5093
      validate();
5094
 
5095
      oprot.writeStructBegin(STRUCT_DESC);
5096
      oprot.writeFieldBegin(SHOPPING_CART_ID_FIELD_DESC);
5097
      oprot.writeI64(this.shoppingCartId);
5098
      oprot.writeFieldEnd();
5099
      oprot.writeFieldStop();
5100
      oprot.writeStructEnd();
5101
    }
5102
 
5103
    @Override
5104
    public String toString() {
5105
      StringBuilder sb = new StringBuilder("getTransactionsForShoppingCartId_args(");
5106
      boolean first = true;
5107
 
5108
      sb.append("shoppingCartId:");
5109
      sb.append(this.shoppingCartId);
5110
      first = false;
5111
      sb.append(")");
5112
      return sb.toString();
5113
    }
5114
 
5115
    public void validate() throws TException {
5116
      // check for required fields
5117
    }
5118
 
5119
  }
5120
 
684 chandransh 5121
  public static class getTransactionsForShoppingCartId_result implements TBase<getTransactionsForShoppingCartId_result._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionsForShoppingCartId_result>   {
132 ashish 5122
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionsForShoppingCartId_result");
5123
 
5124
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
5125
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
5126
 
5127
    private List<Transaction> success;
5128
    private TransactionServiceException ex;
5129
 
5130
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5131
    public enum _Fields implements TFieldIdEnum {
5132
      SUCCESS((short)0, "success"),
5133
      EX((short)1, "ex");
5134
 
5135
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5136
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5137
 
5138
      static {
5139
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5140
          byId.put((int)field._thriftId, field);
5141
          byName.put(field.getFieldName(), field);
5142
        }
5143
      }
5144
 
5145
      /**
5146
       * Find the _Fields constant that matches fieldId, or null if its not found.
5147
       */
5148
      public static _Fields findByThriftId(int fieldId) {
5149
        return byId.get(fieldId);
5150
      }
5151
 
5152
      /**
5153
       * Find the _Fields constant that matches fieldId, throwing an exception
5154
       * if it is not found.
5155
       */
5156
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5157
        _Fields fields = findByThriftId(fieldId);
5158
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5159
        return fields;
5160
      }
5161
 
5162
      /**
5163
       * Find the _Fields constant that matches name, or null if its not found.
5164
       */
5165
      public static _Fields findByName(String name) {
5166
        return byName.get(name);
5167
      }
5168
 
5169
      private final short _thriftId;
5170
      private final String _fieldName;
5171
 
5172
      _Fields(short thriftId, String fieldName) {
5173
        _thriftId = thriftId;
5174
        _fieldName = fieldName;
5175
      }
5176
 
5177
      public short getThriftFieldId() {
5178
        return _thriftId;
5179
      }
5180
 
5181
      public String getFieldName() {
5182
        return _fieldName;
5183
      }
5184
    }
5185
 
5186
    // isset id assignments
5187
 
5188
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
5189
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
5190
          new ListMetaData(TType.LIST, 
5191
              new StructMetaData(TType.STRUCT, Transaction.class))));
5192
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
5193
          new FieldValueMetaData(TType.STRUCT)));
5194
    }});
5195
 
5196
    static {
5197
      FieldMetaData.addStructMetaDataMap(getTransactionsForShoppingCartId_result.class, metaDataMap);
5198
    }
5199
 
5200
    public getTransactionsForShoppingCartId_result() {
5201
    }
5202
 
5203
    public getTransactionsForShoppingCartId_result(
5204
      List<Transaction> success,
5205
      TransactionServiceException ex)
5206
    {
5207
      this();
5208
      this.success = success;
5209
      this.ex = ex;
5210
    }
5211
 
5212
    /**
5213
     * Performs a deep copy on <i>other</i>.
5214
     */
5215
    public getTransactionsForShoppingCartId_result(getTransactionsForShoppingCartId_result other) {
5216
      if (other.isSetSuccess()) {
5217
        List<Transaction> __this__success = new ArrayList<Transaction>();
5218
        for (Transaction other_element : other.success) {
5219
          __this__success.add(new Transaction(other_element));
5220
        }
5221
        this.success = __this__success;
5222
      }
5223
      if (other.isSetEx()) {
5224
        this.ex = new TransactionServiceException(other.ex);
5225
      }
5226
    }
5227
 
5228
    public getTransactionsForShoppingCartId_result deepCopy() {
5229
      return new getTransactionsForShoppingCartId_result(this);
5230
    }
5231
 
5232
    @Deprecated
5233
    public getTransactionsForShoppingCartId_result clone() {
5234
      return new getTransactionsForShoppingCartId_result(this);
5235
    }
5236
 
5237
    public int getSuccessSize() {
5238
      return (this.success == null) ? 0 : this.success.size();
5239
    }
5240
 
5241
    public java.util.Iterator<Transaction> getSuccessIterator() {
5242
      return (this.success == null) ? null : this.success.iterator();
5243
    }
5244
 
5245
    public void addToSuccess(Transaction elem) {
5246
      if (this.success == null) {
5247
        this.success = new ArrayList<Transaction>();
5248
      }
5249
      this.success.add(elem);
5250
    }
5251
 
5252
    public List<Transaction> getSuccess() {
5253
      return this.success;
5254
    }
5255
 
5256
    public getTransactionsForShoppingCartId_result setSuccess(List<Transaction> success) {
5257
      this.success = success;
5258
      return this;
5259
    }
5260
 
5261
    public void unsetSuccess() {
5262
      this.success = null;
5263
    }
5264
 
5265
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
5266
    public boolean isSetSuccess() {
5267
      return this.success != null;
5268
    }
5269
 
5270
    public void setSuccessIsSet(boolean value) {
5271
      if (!value) {
5272
        this.success = null;
5273
      }
5274
    }
5275
 
5276
    public TransactionServiceException getEx() {
5277
      return this.ex;
5278
    }
5279
 
5280
    public getTransactionsForShoppingCartId_result setEx(TransactionServiceException ex) {
5281
      this.ex = ex;
5282
      return this;
5283
    }
5284
 
5285
    public void unsetEx() {
5286
      this.ex = null;
5287
    }
5288
 
5289
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
5290
    public boolean isSetEx() {
5291
      return this.ex != null;
5292
    }
5293
 
5294
    public void setExIsSet(boolean value) {
5295
      if (!value) {
5296
        this.ex = null;
5297
      }
5298
    }
5299
 
5300
    public void setFieldValue(_Fields field, Object value) {
5301
      switch (field) {
5302
      case SUCCESS:
5303
        if (value == null) {
5304
          unsetSuccess();
5305
        } else {
5306
          setSuccess((List<Transaction>)value);
5307
        }
5308
        break;
5309
 
5310
      case EX:
5311
        if (value == null) {
5312
          unsetEx();
5313
        } else {
5314
          setEx((TransactionServiceException)value);
5315
        }
5316
        break;
5317
 
5318
      }
5319
    }
5320
 
5321
    public void setFieldValue(int fieldID, Object value) {
5322
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5323
    }
5324
 
5325
    public Object getFieldValue(_Fields field) {
5326
      switch (field) {
5327
      case SUCCESS:
5328
        return getSuccess();
5329
 
5330
      case EX:
5331
        return getEx();
5332
 
5333
      }
5334
      throw new IllegalStateException();
5335
    }
5336
 
5337
    public Object getFieldValue(int fieldId) {
5338
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5339
    }
5340
 
5341
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5342
    public boolean isSet(_Fields field) {
5343
      switch (field) {
5344
      case SUCCESS:
5345
        return isSetSuccess();
5346
      case EX:
5347
        return isSetEx();
5348
      }
5349
      throw new IllegalStateException();
5350
    }
5351
 
5352
    public boolean isSet(int fieldID) {
5353
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5354
    }
5355
 
5356
    @Override
5357
    public boolean equals(Object that) {
5358
      if (that == null)
5359
        return false;
5360
      if (that instanceof getTransactionsForShoppingCartId_result)
5361
        return this.equals((getTransactionsForShoppingCartId_result)that);
5362
      return false;
5363
    }
5364
 
5365
    public boolean equals(getTransactionsForShoppingCartId_result that) {
5366
      if (that == null)
5367
        return false;
5368
 
5369
      boolean this_present_success = true && this.isSetSuccess();
5370
      boolean that_present_success = true && that.isSetSuccess();
5371
      if (this_present_success || that_present_success) {
5372
        if (!(this_present_success && that_present_success))
5373
          return false;
5374
        if (!this.success.equals(that.success))
5375
          return false;
5376
      }
5377
 
5378
      boolean this_present_ex = true && this.isSetEx();
5379
      boolean that_present_ex = true && that.isSetEx();
5380
      if (this_present_ex || that_present_ex) {
5381
        if (!(this_present_ex && that_present_ex))
5382
          return false;
5383
        if (!this.ex.equals(that.ex))
5384
          return false;
5385
      }
5386
 
5387
      return true;
5388
    }
5389
 
5390
    @Override
5391
    public int hashCode() {
5392
      return 0;
5393
    }
5394
 
684 chandransh 5395
    public int compareTo(getTransactionsForShoppingCartId_result other) {
5396
      if (!getClass().equals(other.getClass())) {
5397
        return getClass().getName().compareTo(other.getClass().getName());
5398
      }
5399
 
5400
      int lastComparison = 0;
5401
      getTransactionsForShoppingCartId_result typedOther = (getTransactionsForShoppingCartId_result)other;
5402
 
5403
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
5404
      if (lastComparison != 0) {
5405
        return lastComparison;
5406
      }
5407
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
5408
      if (lastComparison != 0) {
5409
        return lastComparison;
5410
      }
5411
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
5412
      if (lastComparison != 0) {
5413
        return lastComparison;
5414
      }
5415
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
5416
      if (lastComparison != 0) {
5417
        return lastComparison;
5418
      }
5419
      return 0;
5420
    }
5421
 
132 ashish 5422
    public void read(TProtocol iprot) throws TException {
5423
      TField field;
5424
      iprot.readStructBegin();
5425
      while (true)
5426
      {
5427
        field = iprot.readFieldBegin();
5428
        if (field.type == TType.STOP) { 
5429
          break;
5430
        }
5431
        _Fields fieldId = _Fields.findByThriftId(field.id);
5432
        if (fieldId == null) {
5433
          TProtocolUtil.skip(iprot, field.type);
5434
        } else {
5435
          switch (fieldId) {
5436
            case SUCCESS:
5437
              if (field.type == TType.LIST) {
5438
                {
684 chandransh 5439
                  TList _list12 = iprot.readListBegin();
5440
                  this.success = new ArrayList<Transaction>(_list12.size);
5441
                  for (int _i13 = 0; _i13 < _list12.size; ++_i13)
132 ashish 5442
                  {
684 chandransh 5443
                    Transaction _elem14;
5444
                    _elem14 = new Transaction();
5445
                    _elem14.read(iprot);
5446
                    this.success.add(_elem14);
132 ashish 5447
                  }
5448
                  iprot.readListEnd();
5449
                }
5450
              } else { 
5451
                TProtocolUtil.skip(iprot, field.type);
5452
              }
5453
              break;
5454
            case EX:
5455
              if (field.type == TType.STRUCT) {
5456
                this.ex = new TransactionServiceException();
5457
                this.ex.read(iprot);
5458
              } else { 
5459
                TProtocolUtil.skip(iprot, field.type);
5460
              }
5461
              break;
5462
          }
5463
          iprot.readFieldEnd();
5464
        }
5465
      }
5466
      iprot.readStructEnd();
5467
      validate();
5468
    }
5469
 
5470
    public void write(TProtocol oprot) throws TException {
5471
      oprot.writeStructBegin(STRUCT_DESC);
5472
 
5473
      if (this.isSetSuccess()) {
5474
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
5475
        {
5476
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
684 chandransh 5477
          for (Transaction _iter15 : this.success)
132 ashish 5478
          {
684 chandransh 5479
            _iter15.write(oprot);
132 ashish 5480
          }
5481
          oprot.writeListEnd();
5482
        }
5483
        oprot.writeFieldEnd();
5484
      } else if (this.isSetEx()) {
5485
        oprot.writeFieldBegin(EX_FIELD_DESC);
5486
        this.ex.write(oprot);
5487
        oprot.writeFieldEnd();
5488
      }
5489
      oprot.writeFieldStop();
5490
      oprot.writeStructEnd();
5491
    }
5492
 
5493
    @Override
5494
    public String toString() {
5495
      StringBuilder sb = new StringBuilder("getTransactionsForShoppingCartId_result(");
5496
      boolean first = true;
5497
 
5498
      sb.append("success:");
5499
      if (this.success == null) {
5500
        sb.append("null");
5501
      } else {
5502
        sb.append(this.success);
5503
      }
5504
      first = false;
5505
      if (!first) sb.append(", ");
5506
      sb.append("ex:");
5507
      if (this.ex == null) {
5508
        sb.append("null");
5509
      } else {
5510
        sb.append(this.ex);
5511
      }
5512
      first = false;
5513
      sb.append(")");
5514
      return sb.toString();
5515
    }
5516
 
5517
    public void validate() throws TException {
5518
      // check for required fields
5519
    }
5520
 
5521
  }
5522
 
68 ashish 5523
  public static class getTransactionStatus_args implements TBase<getTransactionStatus_args._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionStatus_args>   {
5524
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionStatus_args");
5525
 
5526
    private static final TField TRANSACTION_ID_FIELD_DESC = new TField("transactionId", TType.I64, (short)1);
5527
 
5528
    private long transactionId;
5529
 
5530
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5531
    public enum _Fields implements TFieldIdEnum {
5532
      TRANSACTION_ID((short)1, "transactionId");
5533
 
5534
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5535
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5536
 
5537
      static {
5538
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5539
          byId.put((int)field._thriftId, field);
5540
          byName.put(field.getFieldName(), field);
5541
        }
5542
      }
5543
 
5544
      /**
5545
       * Find the _Fields constant that matches fieldId, or null if its not found.
5546
       */
5547
      public static _Fields findByThriftId(int fieldId) {
5548
        return byId.get(fieldId);
5549
      }
5550
 
5551
      /**
5552
       * Find the _Fields constant that matches fieldId, throwing an exception
5553
       * if it is not found.
5554
       */
5555
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5556
        _Fields fields = findByThriftId(fieldId);
5557
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5558
        return fields;
5559
      }
5560
 
5561
      /**
5562
       * Find the _Fields constant that matches name, or null if its not found.
5563
       */
5564
      public static _Fields findByName(String name) {
5565
        return byName.get(name);
5566
      }
5567
 
5568
      private final short _thriftId;
5569
      private final String _fieldName;
5570
 
5571
      _Fields(short thriftId, String fieldName) {
5572
        _thriftId = thriftId;
5573
        _fieldName = fieldName;
5574
      }
5575
 
5576
      public short getThriftFieldId() {
5577
        return _thriftId;
5578
      }
5579
 
5580
      public String getFieldName() {
5581
        return _fieldName;
5582
      }
5583
    }
5584
 
5585
    // isset id assignments
5586
    private static final int __TRANSACTIONID_ISSET_ID = 0;
5587
    private BitSet __isset_bit_vector = new BitSet(1);
5588
 
5589
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
5590
      put(_Fields.TRANSACTION_ID, new FieldMetaData("transactionId", TFieldRequirementType.DEFAULT, 
5591
          new FieldValueMetaData(TType.I64)));
5592
    }});
5593
 
5594
    static {
5595
      FieldMetaData.addStructMetaDataMap(getTransactionStatus_args.class, metaDataMap);
5596
    }
5597
 
5598
    public getTransactionStatus_args() {
5599
    }
5600
 
5601
    public getTransactionStatus_args(
5602
      long transactionId)
5603
    {
5604
      this();
5605
      this.transactionId = transactionId;
5606
      setTransactionIdIsSet(true);
5607
    }
5608
 
5609
    /**
5610
     * Performs a deep copy on <i>other</i>.
5611
     */
5612
    public getTransactionStatus_args(getTransactionStatus_args other) {
5613
      __isset_bit_vector.clear();
5614
      __isset_bit_vector.or(other.__isset_bit_vector);
5615
      this.transactionId = other.transactionId;
5616
    }
5617
 
5618
    public getTransactionStatus_args deepCopy() {
5619
      return new getTransactionStatus_args(this);
5620
    }
5621
 
5622
    @Deprecated
5623
    public getTransactionStatus_args clone() {
5624
      return new getTransactionStatus_args(this);
5625
    }
5626
 
5627
    public long getTransactionId() {
5628
      return this.transactionId;
5629
    }
5630
 
5631
    public getTransactionStatus_args setTransactionId(long transactionId) {
5632
      this.transactionId = transactionId;
5633
      setTransactionIdIsSet(true);
5634
      return this;
5635
    }
5636
 
5637
    public void unsetTransactionId() {
5638
      __isset_bit_vector.clear(__TRANSACTIONID_ISSET_ID);
5639
    }
5640
 
5641
    /** Returns true if field transactionId is set (has been asigned a value) and false otherwise */
5642
    public boolean isSetTransactionId() {
5643
      return __isset_bit_vector.get(__TRANSACTIONID_ISSET_ID);
5644
    }
5645
 
5646
    public void setTransactionIdIsSet(boolean value) {
5647
      __isset_bit_vector.set(__TRANSACTIONID_ISSET_ID, value);
5648
    }
5649
 
5650
    public void setFieldValue(_Fields field, Object value) {
5651
      switch (field) {
5652
      case TRANSACTION_ID:
5653
        if (value == null) {
5654
          unsetTransactionId();
5655
        } else {
5656
          setTransactionId((Long)value);
5657
        }
5658
        break;
5659
 
5660
      }
5661
    }
5662
 
5663
    public void setFieldValue(int fieldID, Object value) {
5664
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5665
    }
5666
 
5667
    public Object getFieldValue(_Fields field) {
5668
      switch (field) {
5669
      case TRANSACTION_ID:
5670
        return new Long(getTransactionId());
5671
 
5672
      }
5673
      throw new IllegalStateException();
5674
    }
5675
 
5676
    public Object getFieldValue(int fieldId) {
5677
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5678
    }
5679
 
5680
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5681
    public boolean isSet(_Fields field) {
5682
      switch (field) {
5683
      case TRANSACTION_ID:
5684
        return isSetTransactionId();
5685
      }
5686
      throw new IllegalStateException();
5687
    }
5688
 
5689
    public boolean isSet(int fieldID) {
5690
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5691
    }
5692
 
5693
    @Override
5694
    public boolean equals(Object that) {
5695
      if (that == null)
5696
        return false;
5697
      if (that instanceof getTransactionStatus_args)
5698
        return this.equals((getTransactionStatus_args)that);
5699
      return false;
5700
    }
5701
 
5702
    public boolean equals(getTransactionStatus_args that) {
5703
      if (that == null)
5704
        return false;
5705
 
5706
      boolean this_present_transactionId = true;
5707
      boolean that_present_transactionId = true;
5708
      if (this_present_transactionId || that_present_transactionId) {
5709
        if (!(this_present_transactionId && that_present_transactionId))
5710
          return false;
5711
        if (this.transactionId != that.transactionId)
5712
          return false;
5713
      }
5714
 
5715
      return true;
5716
    }
5717
 
5718
    @Override
5719
    public int hashCode() {
5720
      return 0;
5721
    }
5722
 
5723
    public int compareTo(getTransactionStatus_args other) {
5724
      if (!getClass().equals(other.getClass())) {
5725
        return getClass().getName().compareTo(other.getClass().getName());
5726
      }
5727
 
5728
      int lastComparison = 0;
5729
      getTransactionStatus_args typedOther = (getTransactionStatus_args)other;
5730
 
5731
      lastComparison = Boolean.valueOf(isSetTransactionId()).compareTo(isSetTransactionId());
5732
      if (lastComparison != 0) {
5733
        return lastComparison;
5734
      }
5735
      lastComparison = TBaseHelper.compareTo(transactionId, typedOther.transactionId);
5736
      if (lastComparison != 0) {
5737
        return lastComparison;
5738
      }
5739
      return 0;
5740
    }
5741
 
5742
    public void read(TProtocol iprot) throws TException {
5743
      TField field;
5744
      iprot.readStructBegin();
5745
      while (true)
5746
      {
5747
        field = iprot.readFieldBegin();
5748
        if (field.type == TType.STOP) { 
5749
          break;
5750
        }
5751
        _Fields fieldId = _Fields.findByThriftId(field.id);
5752
        if (fieldId == null) {
5753
          TProtocolUtil.skip(iprot, field.type);
5754
        } else {
5755
          switch (fieldId) {
5756
            case TRANSACTION_ID:
5757
              if (field.type == TType.I64) {
5758
                this.transactionId = iprot.readI64();
5759
                setTransactionIdIsSet(true);
5760
              } else { 
5761
                TProtocolUtil.skip(iprot, field.type);
5762
              }
5763
              break;
5764
          }
5765
          iprot.readFieldEnd();
5766
        }
5767
      }
5768
      iprot.readStructEnd();
5769
      validate();
5770
    }
5771
 
5772
    public void write(TProtocol oprot) throws TException {
5773
      validate();
5774
 
5775
      oprot.writeStructBegin(STRUCT_DESC);
5776
      oprot.writeFieldBegin(TRANSACTION_ID_FIELD_DESC);
5777
      oprot.writeI64(this.transactionId);
5778
      oprot.writeFieldEnd();
5779
      oprot.writeFieldStop();
5780
      oprot.writeStructEnd();
5781
    }
5782
 
5783
    @Override
5784
    public String toString() {
5785
      StringBuilder sb = new StringBuilder("getTransactionStatus_args(");
5786
      boolean first = true;
5787
 
5788
      sb.append("transactionId:");
5789
      sb.append(this.transactionId);
5790
      first = false;
5791
      sb.append(")");
5792
      return sb.toString();
5793
    }
5794
 
5795
    public void validate() throws TException {
5796
      // check for required fields
5797
    }
5798
 
5799
  }
5800
 
5801
  public static class getTransactionStatus_result implements TBase<getTransactionStatus_result._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionStatus_result>   {
5802
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionStatus_result");
5803
 
5804
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I32, (short)0);
5805
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
5806
 
5807
    private TransactionStatus success;
5808
    private TransactionServiceException ex;
5809
 
5810
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5811
    public enum _Fields implements TFieldIdEnum {
5812
      /**
5813
       * 
5814
       * @see TransactionStatus
5815
       */
5816
      SUCCESS((short)0, "success"),
5817
      EX((short)1, "ex");
5818
 
5819
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5820
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5821
 
5822
      static {
5823
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5824
          byId.put((int)field._thriftId, field);
5825
          byName.put(field.getFieldName(), field);
5826
        }
5827
      }
5828
 
5829
      /**
5830
       * Find the _Fields constant that matches fieldId, or null if its not found.
5831
       */
5832
      public static _Fields findByThriftId(int fieldId) {
5833
        return byId.get(fieldId);
5834
      }
5835
 
5836
      /**
5837
       * Find the _Fields constant that matches fieldId, throwing an exception
5838
       * if it is not found.
5839
       */
5840
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5841
        _Fields fields = findByThriftId(fieldId);
5842
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5843
        return fields;
5844
      }
5845
 
5846
      /**
5847
       * Find the _Fields constant that matches name, or null if its not found.
5848
       */
5849
      public static _Fields findByName(String name) {
5850
        return byName.get(name);
5851
      }
5852
 
5853
      private final short _thriftId;
5854
      private final String _fieldName;
5855
 
5856
      _Fields(short thriftId, String fieldName) {
5857
        _thriftId = thriftId;
5858
        _fieldName = fieldName;
5859
      }
5860
 
5861
      public short getThriftFieldId() {
5862
        return _thriftId;
5863
      }
5864
 
5865
      public String getFieldName() {
5866
        return _fieldName;
5867
      }
5868
    }
5869
 
5870
    // isset id assignments
5871
 
5872
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
5873
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
5874
          new EnumMetaData(TType.ENUM, TransactionStatus.class)));
5875
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
5876
          new FieldValueMetaData(TType.STRUCT)));
5877
    }});
5878
 
5879
    static {
5880
      FieldMetaData.addStructMetaDataMap(getTransactionStatus_result.class, metaDataMap);
5881
    }
5882
 
5883
    public getTransactionStatus_result() {
5884
    }
5885
 
5886
    public getTransactionStatus_result(
5887
      TransactionStatus success,
5888
      TransactionServiceException ex)
5889
    {
5890
      this();
5891
      this.success = success;
5892
      this.ex = ex;
5893
    }
5894
 
5895
    /**
5896
     * Performs a deep copy on <i>other</i>.
5897
     */
5898
    public getTransactionStatus_result(getTransactionStatus_result other) {
5899
      if (other.isSetSuccess()) {
5900
        this.success = other.success;
5901
      }
5902
      if (other.isSetEx()) {
5903
        this.ex = new TransactionServiceException(other.ex);
5904
      }
5905
    }
5906
 
5907
    public getTransactionStatus_result deepCopy() {
5908
      return new getTransactionStatus_result(this);
5909
    }
5910
 
5911
    @Deprecated
5912
    public getTransactionStatus_result clone() {
5913
      return new getTransactionStatus_result(this);
5914
    }
5915
 
5916
    /**
5917
     * 
5918
     * @see TransactionStatus
5919
     */
5920
    public TransactionStatus getSuccess() {
5921
      return this.success;
5922
    }
5923
 
5924
    /**
5925
     * 
5926
     * @see TransactionStatus
5927
     */
5928
    public getTransactionStatus_result setSuccess(TransactionStatus success) {
5929
      this.success = success;
5930
      return this;
5931
    }
5932
 
5933
    public void unsetSuccess() {
5934
      this.success = null;
5935
    }
5936
 
5937
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
5938
    public boolean isSetSuccess() {
5939
      return this.success != null;
5940
    }
5941
 
5942
    public void setSuccessIsSet(boolean value) {
5943
      if (!value) {
5944
        this.success = null;
5945
      }
5946
    }
5947
 
5948
    public TransactionServiceException getEx() {
5949
      return this.ex;
5950
    }
5951
 
5952
    public getTransactionStatus_result setEx(TransactionServiceException ex) {
5953
      this.ex = ex;
5954
      return this;
5955
    }
5956
 
5957
    public void unsetEx() {
5958
      this.ex = null;
5959
    }
5960
 
5961
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
5962
    public boolean isSetEx() {
5963
      return this.ex != null;
5964
    }
5965
 
5966
    public void setExIsSet(boolean value) {
5967
      if (!value) {
5968
        this.ex = null;
5969
      }
5970
    }
5971
 
5972
    public void setFieldValue(_Fields field, Object value) {
5973
      switch (field) {
5974
      case SUCCESS:
5975
        if (value == null) {
5976
          unsetSuccess();
5977
        } else {
5978
          setSuccess((TransactionStatus)value);
5979
        }
5980
        break;
5981
 
5982
      case EX:
5983
        if (value == null) {
5984
          unsetEx();
5985
        } else {
5986
          setEx((TransactionServiceException)value);
5987
        }
5988
        break;
5989
 
5990
      }
5991
    }
5992
 
5993
    public void setFieldValue(int fieldID, Object value) {
5994
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5995
    }
5996
 
5997
    public Object getFieldValue(_Fields field) {
5998
      switch (field) {
5999
      case SUCCESS:
6000
        return getSuccess();
6001
 
6002
      case EX:
6003
        return getEx();
6004
 
6005
      }
6006
      throw new IllegalStateException();
6007
    }
6008
 
6009
    public Object getFieldValue(int fieldId) {
6010
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
6011
    }
6012
 
6013
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
6014
    public boolean isSet(_Fields field) {
6015
      switch (field) {
6016
      case SUCCESS:
6017
        return isSetSuccess();
6018
      case EX:
6019
        return isSetEx();
6020
      }
6021
      throw new IllegalStateException();
6022
    }
6023
 
6024
    public boolean isSet(int fieldID) {
6025
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
6026
    }
6027
 
6028
    @Override
6029
    public boolean equals(Object that) {
6030
      if (that == null)
6031
        return false;
6032
      if (that instanceof getTransactionStatus_result)
6033
        return this.equals((getTransactionStatus_result)that);
6034
      return false;
6035
    }
6036
 
6037
    public boolean equals(getTransactionStatus_result that) {
6038
      if (that == null)
6039
        return false;
6040
 
6041
      boolean this_present_success = true && this.isSetSuccess();
6042
      boolean that_present_success = true && that.isSetSuccess();
6043
      if (this_present_success || that_present_success) {
6044
        if (!(this_present_success && that_present_success))
6045
          return false;
6046
        if (!this.success.equals(that.success))
6047
          return false;
6048
      }
6049
 
6050
      boolean this_present_ex = true && this.isSetEx();
6051
      boolean that_present_ex = true && that.isSetEx();
6052
      if (this_present_ex || that_present_ex) {
6053
        if (!(this_present_ex && that_present_ex))
6054
          return false;
6055
        if (!this.ex.equals(that.ex))
6056
          return false;
6057
      }
6058
 
6059
      return true;
6060
    }
6061
 
6062
    @Override
6063
    public int hashCode() {
6064
      return 0;
6065
    }
6066
 
6067
    public int compareTo(getTransactionStatus_result other) {
6068
      if (!getClass().equals(other.getClass())) {
6069
        return getClass().getName().compareTo(other.getClass().getName());
6070
      }
6071
 
6072
      int lastComparison = 0;
6073
      getTransactionStatus_result typedOther = (getTransactionStatus_result)other;
6074
 
6075
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
6076
      if (lastComparison != 0) {
6077
        return lastComparison;
6078
      }
6079
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
6080
      if (lastComparison != 0) {
6081
        return lastComparison;
6082
      }
6083
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
6084
      if (lastComparison != 0) {
6085
        return lastComparison;
6086
      }
6087
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
6088
      if (lastComparison != 0) {
6089
        return lastComparison;
6090
      }
6091
      return 0;
6092
    }
6093
 
6094
    public void read(TProtocol iprot) throws TException {
6095
      TField field;
6096
      iprot.readStructBegin();
6097
      while (true)
6098
      {
6099
        field = iprot.readFieldBegin();
6100
        if (field.type == TType.STOP) { 
6101
          break;
6102
        }
6103
        _Fields fieldId = _Fields.findByThriftId(field.id);
6104
        if (fieldId == null) {
6105
          TProtocolUtil.skip(iprot, field.type);
6106
        } else {
6107
          switch (fieldId) {
6108
            case SUCCESS:
6109
              if (field.type == TType.I32) {
6110
                this.success = TransactionStatus.findByValue(iprot.readI32());
6111
              } else { 
6112
                TProtocolUtil.skip(iprot, field.type);
6113
              }
6114
              break;
6115
            case EX:
6116
              if (field.type == TType.STRUCT) {
6117
                this.ex = new TransactionServiceException();
6118
                this.ex.read(iprot);
6119
              } else { 
6120
                TProtocolUtil.skip(iprot, field.type);
6121
              }
6122
              break;
6123
          }
6124
          iprot.readFieldEnd();
6125
        }
6126
      }
6127
      iprot.readStructEnd();
6128
      validate();
6129
    }
6130
 
6131
    public void write(TProtocol oprot) throws TException {
6132
      oprot.writeStructBegin(STRUCT_DESC);
6133
 
6134
      if (this.isSetSuccess()) {
6135
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
6136
        oprot.writeI32(this.success.getValue());
6137
        oprot.writeFieldEnd();
6138
      } else if (this.isSetEx()) {
6139
        oprot.writeFieldBegin(EX_FIELD_DESC);
6140
        this.ex.write(oprot);
6141
        oprot.writeFieldEnd();
6142
      }
6143
      oprot.writeFieldStop();
6144
      oprot.writeStructEnd();
6145
    }
6146
 
6147
    @Override
6148
    public String toString() {
6149
      StringBuilder sb = new StringBuilder("getTransactionStatus_result(");
6150
      boolean first = true;
6151
 
6152
      sb.append("success:");
6153
      if (this.success == null) {
6154
        sb.append("null");
6155
      } else {
6156
        String success_name = success.name();
6157
        if (success_name != null) {
6158
          sb.append(success_name);
6159
          sb.append(" (");
6160
        }
6161
        sb.append(this.success);
6162
        if (success_name != null) {
6163
          sb.append(")");
6164
        }
6165
      }
6166
      first = false;
6167
      if (!first) sb.append(", ");
6168
      sb.append("ex:");
6169
      if (this.ex == null) {
6170
        sb.append("null");
6171
      } else {
6172
        sb.append(this.ex);
6173
      }
6174
      first = false;
6175
      sb.append(")");
6176
      return sb.toString();
6177
    }
6178
 
6179
    public void validate() throws TException {
6180
      // check for required fields
6181
    }
6182
 
6183
  }
6184
 
6185
  public static class changeTransactionStatus_args implements TBase<changeTransactionStatus_args._Fields>, java.io.Serializable, Cloneable, Comparable<changeTransactionStatus_args>   {
6186
    private static final TStruct STRUCT_DESC = new TStruct("changeTransactionStatus_args");
6187
 
6188
    private static final TField TRANSACTION_ID_FIELD_DESC = new TField("transactionId", TType.I64, (short)1);
6189
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)2);
6190
    private static final TField DESCRIPTION_FIELD_DESC = new TField("description", TType.STRING, (short)3);
6191
 
6192
    private long transactionId;
6193
    private TransactionStatus status;
6194
    private String description;
6195
 
6196
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6197
    public enum _Fields implements TFieldIdEnum {
6198
      TRANSACTION_ID((short)1, "transactionId"),
6199
      /**
6200
       * 
6201
       * @see TransactionStatus
6202
       */
6203
      STATUS((short)2, "status"),
6204
      DESCRIPTION((short)3, "description");
6205
 
6206
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
6207
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6208
 
6209
      static {
6210
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6211
          byId.put((int)field._thriftId, field);
6212
          byName.put(field.getFieldName(), field);
6213
        }
6214
      }
6215
 
6216
      /**
6217
       * Find the _Fields constant that matches fieldId, or null if its not found.
6218
       */
6219
      public static _Fields findByThriftId(int fieldId) {
6220
        return byId.get(fieldId);
6221
      }
6222
 
6223
      /**
6224
       * Find the _Fields constant that matches fieldId, throwing an exception
6225
       * if it is not found.
6226
       */
6227
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6228
        _Fields fields = findByThriftId(fieldId);
6229
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6230
        return fields;
6231
      }
6232
 
6233
      /**
6234
       * Find the _Fields constant that matches name, or null if its not found.
6235
       */
6236
      public static _Fields findByName(String name) {
6237
        return byName.get(name);
6238
      }
6239
 
6240
      private final short _thriftId;
6241
      private final String _fieldName;
6242
 
6243
      _Fields(short thriftId, String fieldName) {
6244
        _thriftId = thriftId;
6245
        _fieldName = fieldName;
6246
      }
6247
 
6248
      public short getThriftFieldId() {
6249
        return _thriftId;
6250
      }
6251
 
6252
      public String getFieldName() {
6253
        return _fieldName;
6254
      }
6255
    }
6256
 
6257
    // isset id assignments
6258
    private static final int __TRANSACTIONID_ISSET_ID = 0;
6259
    private BitSet __isset_bit_vector = new BitSet(1);
6260
 
6261
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
6262
      put(_Fields.TRANSACTION_ID, new FieldMetaData("transactionId", TFieldRequirementType.DEFAULT, 
6263
          new FieldValueMetaData(TType.I64)));
6264
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
6265
          new EnumMetaData(TType.ENUM, TransactionStatus.class)));
6266
      put(_Fields.DESCRIPTION, new FieldMetaData("description", TFieldRequirementType.DEFAULT, 
6267
          new FieldValueMetaData(TType.STRING)));
6268
    }});
6269
 
6270
    static {
6271
      FieldMetaData.addStructMetaDataMap(changeTransactionStatus_args.class, metaDataMap);
6272
    }
6273
 
6274
    public changeTransactionStatus_args() {
6275
    }
6276
 
6277
    public changeTransactionStatus_args(
6278
      long transactionId,
6279
      TransactionStatus status,
6280
      String description)
6281
    {
6282
      this();
6283
      this.transactionId = transactionId;
6284
      setTransactionIdIsSet(true);
6285
      this.status = status;
6286
      this.description = description;
6287
    }
6288
 
6289
    /**
6290
     * Performs a deep copy on <i>other</i>.
6291
     */
6292
    public changeTransactionStatus_args(changeTransactionStatus_args other) {
6293
      __isset_bit_vector.clear();
6294
      __isset_bit_vector.or(other.__isset_bit_vector);
6295
      this.transactionId = other.transactionId;
6296
      if (other.isSetStatus()) {
6297
        this.status = other.status;
6298
      }
6299
      if (other.isSetDescription()) {
6300
        this.description = other.description;
6301
      }
6302
    }
6303
 
6304
    public changeTransactionStatus_args deepCopy() {
6305
      return new changeTransactionStatus_args(this);
6306
    }
6307
 
6308
    @Deprecated
6309
    public changeTransactionStatus_args clone() {
6310
      return new changeTransactionStatus_args(this);
6311
    }
6312
 
6313
    public long getTransactionId() {
6314
      return this.transactionId;
6315
    }
6316
 
6317
    public changeTransactionStatus_args setTransactionId(long transactionId) {
6318
      this.transactionId = transactionId;
6319
      setTransactionIdIsSet(true);
6320
      return this;
6321
    }
6322
 
6323
    public void unsetTransactionId() {
6324
      __isset_bit_vector.clear(__TRANSACTIONID_ISSET_ID);
6325
    }
6326
 
6327
    /** Returns true if field transactionId is set (has been asigned a value) and false otherwise */
6328
    public boolean isSetTransactionId() {
6329
      return __isset_bit_vector.get(__TRANSACTIONID_ISSET_ID);
6330
    }
6331
 
6332
    public void setTransactionIdIsSet(boolean value) {
6333
      __isset_bit_vector.set(__TRANSACTIONID_ISSET_ID, value);
6334
    }
6335
 
6336
    /**
6337
     * 
6338
     * @see TransactionStatus
6339
     */
6340
    public TransactionStatus getStatus() {
6341
      return this.status;
6342
    }
6343
 
6344
    /**
6345
     * 
6346
     * @see TransactionStatus
6347
     */
6348
    public changeTransactionStatus_args setStatus(TransactionStatus status) {
6349
      this.status = status;
6350
      return this;
6351
    }
6352
 
6353
    public void unsetStatus() {
6354
      this.status = null;
6355
    }
6356
 
6357
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
6358
    public boolean isSetStatus() {
6359
      return this.status != null;
6360
    }
6361
 
6362
    public void setStatusIsSet(boolean value) {
6363
      if (!value) {
6364
        this.status = null;
6365
      }
6366
    }
6367
 
6368
    public String getDescription() {
6369
      return this.description;
6370
    }
6371
 
6372
    public changeTransactionStatus_args setDescription(String description) {
6373
      this.description = description;
6374
      return this;
6375
    }
6376
 
6377
    public void unsetDescription() {
6378
      this.description = null;
6379
    }
6380
 
6381
    /** Returns true if field description is set (has been asigned a value) and false otherwise */
6382
    public boolean isSetDescription() {
6383
      return this.description != null;
6384
    }
6385
 
6386
    public void setDescriptionIsSet(boolean value) {
6387
      if (!value) {
6388
        this.description = null;
6389
      }
6390
    }
6391
 
6392
    public void setFieldValue(_Fields field, Object value) {
6393
      switch (field) {
6394
      case TRANSACTION_ID:
6395
        if (value == null) {
6396
          unsetTransactionId();
6397
        } else {
6398
          setTransactionId((Long)value);
6399
        }
6400
        break;
6401
 
6402
      case STATUS:
6403
        if (value == null) {
6404
          unsetStatus();
6405
        } else {
6406
          setStatus((TransactionStatus)value);
6407
        }
6408
        break;
6409
 
6410
      case DESCRIPTION:
6411
        if (value == null) {
6412
          unsetDescription();
6413
        } else {
6414
          setDescription((String)value);
6415
        }
6416
        break;
6417
 
6418
      }
6419
    }
6420
 
6421
    public void setFieldValue(int fieldID, Object value) {
6422
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
6423
    }
6424
 
6425
    public Object getFieldValue(_Fields field) {
6426
      switch (field) {
6427
      case TRANSACTION_ID:
6428
        return new Long(getTransactionId());
6429
 
6430
      case STATUS:
6431
        return getStatus();
6432
 
6433
      case DESCRIPTION:
6434
        return getDescription();
6435
 
6436
      }
6437
      throw new IllegalStateException();
6438
    }
6439
 
6440
    public Object getFieldValue(int fieldId) {
6441
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
6442
    }
6443
 
6444
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
6445
    public boolean isSet(_Fields field) {
6446
      switch (field) {
6447
      case TRANSACTION_ID:
6448
        return isSetTransactionId();
6449
      case STATUS:
6450
        return isSetStatus();
6451
      case DESCRIPTION:
6452
        return isSetDescription();
6453
      }
6454
      throw new IllegalStateException();
6455
    }
6456
 
6457
    public boolean isSet(int fieldID) {
6458
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
6459
    }
6460
 
6461
    @Override
6462
    public boolean equals(Object that) {
6463
      if (that == null)
6464
        return false;
6465
      if (that instanceof changeTransactionStatus_args)
6466
        return this.equals((changeTransactionStatus_args)that);
6467
      return false;
6468
    }
6469
 
6470
    public boolean equals(changeTransactionStatus_args that) {
6471
      if (that == null)
6472
        return false;
6473
 
6474
      boolean this_present_transactionId = true;
6475
      boolean that_present_transactionId = true;
6476
      if (this_present_transactionId || that_present_transactionId) {
6477
        if (!(this_present_transactionId && that_present_transactionId))
6478
          return false;
6479
        if (this.transactionId != that.transactionId)
6480
          return false;
6481
      }
6482
 
6483
      boolean this_present_status = true && this.isSetStatus();
6484
      boolean that_present_status = true && that.isSetStatus();
6485
      if (this_present_status || that_present_status) {
6486
        if (!(this_present_status && that_present_status))
6487
          return false;
6488
        if (!this.status.equals(that.status))
6489
          return false;
6490
      }
6491
 
6492
      boolean this_present_description = true && this.isSetDescription();
6493
      boolean that_present_description = true && that.isSetDescription();
6494
      if (this_present_description || that_present_description) {
6495
        if (!(this_present_description && that_present_description))
6496
          return false;
6497
        if (!this.description.equals(that.description))
6498
          return false;
6499
      }
6500
 
6501
      return true;
6502
    }
6503
 
6504
    @Override
6505
    public int hashCode() {
6506
      return 0;
6507
    }
6508
 
6509
    public int compareTo(changeTransactionStatus_args other) {
6510
      if (!getClass().equals(other.getClass())) {
6511
        return getClass().getName().compareTo(other.getClass().getName());
6512
      }
6513
 
6514
      int lastComparison = 0;
6515
      changeTransactionStatus_args typedOther = (changeTransactionStatus_args)other;
6516
 
6517
      lastComparison = Boolean.valueOf(isSetTransactionId()).compareTo(isSetTransactionId());
6518
      if (lastComparison != 0) {
6519
        return lastComparison;
6520
      }
6521
      lastComparison = TBaseHelper.compareTo(transactionId, typedOther.transactionId);
6522
      if (lastComparison != 0) {
6523
        return lastComparison;
6524
      }
6525
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
6526
      if (lastComparison != 0) {
6527
        return lastComparison;
6528
      }
6529
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
6530
      if (lastComparison != 0) {
6531
        return lastComparison;
6532
      }
6533
      lastComparison = Boolean.valueOf(isSetDescription()).compareTo(isSetDescription());
6534
      if (lastComparison != 0) {
6535
        return lastComparison;
6536
      }
6537
      lastComparison = TBaseHelper.compareTo(description, typedOther.description);
6538
      if (lastComparison != 0) {
6539
        return lastComparison;
6540
      }
6541
      return 0;
6542
    }
6543
 
6544
    public void read(TProtocol iprot) throws TException {
6545
      TField field;
6546
      iprot.readStructBegin();
6547
      while (true)
6548
      {
6549
        field = iprot.readFieldBegin();
6550
        if (field.type == TType.STOP) { 
6551
          break;
6552
        }
6553
        _Fields fieldId = _Fields.findByThriftId(field.id);
6554
        if (fieldId == null) {
6555
          TProtocolUtil.skip(iprot, field.type);
6556
        } else {
6557
          switch (fieldId) {
6558
            case TRANSACTION_ID:
6559
              if (field.type == TType.I64) {
6560
                this.transactionId = iprot.readI64();
6561
                setTransactionIdIsSet(true);
6562
              } else { 
6563
                TProtocolUtil.skip(iprot, field.type);
6564
              }
6565
              break;
6566
            case STATUS:
6567
              if (field.type == TType.I32) {
6568
                this.status = TransactionStatus.findByValue(iprot.readI32());
6569
              } else { 
6570
                TProtocolUtil.skip(iprot, field.type);
6571
              }
6572
              break;
6573
            case DESCRIPTION:
6574
              if (field.type == TType.STRING) {
6575
                this.description = iprot.readString();
6576
              } else { 
6577
                TProtocolUtil.skip(iprot, field.type);
6578
              }
6579
              break;
6580
          }
6581
          iprot.readFieldEnd();
6582
        }
6583
      }
6584
      iprot.readStructEnd();
6585
      validate();
6586
    }
6587
 
6588
    public void write(TProtocol oprot) throws TException {
6589
      validate();
6590
 
6591
      oprot.writeStructBegin(STRUCT_DESC);
6592
      oprot.writeFieldBegin(TRANSACTION_ID_FIELD_DESC);
6593
      oprot.writeI64(this.transactionId);
6594
      oprot.writeFieldEnd();
6595
      if (this.status != null) {
6596
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
6597
        oprot.writeI32(this.status.getValue());
6598
        oprot.writeFieldEnd();
6599
      }
6600
      if (this.description != null) {
6601
        oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC);
6602
        oprot.writeString(this.description);
6603
        oprot.writeFieldEnd();
6604
      }
6605
      oprot.writeFieldStop();
6606
      oprot.writeStructEnd();
6607
    }
6608
 
6609
    @Override
6610
    public String toString() {
6611
      StringBuilder sb = new StringBuilder("changeTransactionStatus_args(");
6612
      boolean first = true;
6613
 
6614
      sb.append("transactionId:");
6615
      sb.append(this.transactionId);
6616
      first = false;
6617
      if (!first) sb.append(", ");
6618
      sb.append("status:");
6619
      if (this.status == null) {
6620
        sb.append("null");
6621
      } else {
6622
        String status_name = status.name();
6623
        if (status_name != null) {
6624
          sb.append(status_name);
6625
          sb.append(" (");
6626
        }
6627
        sb.append(this.status);
6628
        if (status_name != null) {
6629
          sb.append(")");
6630
        }
6631
      }
6632
      first = false;
6633
      if (!first) sb.append(", ");
6634
      sb.append("description:");
6635
      if (this.description == null) {
6636
        sb.append("null");
6637
      } else {
6638
        sb.append(this.description);
6639
      }
6640
      first = false;
6641
      sb.append(")");
6642
      return sb.toString();
6643
    }
6644
 
6645
    public void validate() throws TException {
6646
      // check for required fields
6647
    }
6648
 
6649
  }
6650
 
6651
  public static class changeTransactionStatus_result implements TBase<changeTransactionStatus_result._Fields>, java.io.Serializable, Cloneable, Comparable<changeTransactionStatus_result>   {
6652
    private static final TStruct STRUCT_DESC = new TStruct("changeTransactionStatus_result");
6653
 
6654
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
6655
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
6656
 
6657
    private boolean success;
6658
    private TransactionServiceException ex;
6659
 
6660
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6661
    public enum _Fields implements TFieldIdEnum {
6662
      SUCCESS((short)0, "success"),
6663
      EX((short)1, "ex");
6664
 
6665
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
6666
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6667
 
6668
      static {
6669
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6670
          byId.put((int)field._thriftId, field);
6671
          byName.put(field.getFieldName(), field);
6672
        }
6673
      }
6674
 
6675
      /**
6676
       * Find the _Fields constant that matches fieldId, or null if its not found.
6677
       */
6678
      public static _Fields findByThriftId(int fieldId) {
6679
        return byId.get(fieldId);
6680
      }
6681
 
6682
      /**
6683
       * Find the _Fields constant that matches fieldId, throwing an exception
6684
       * if it is not found.
6685
       */
6686
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6687
        _Fields fields = findByThriftId(fieldId);
6688
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6689
        return fields;
6690
      }
6691
 
6692
      /**
6693
       * Find the _Fields constant that matches name, or null if its not found.
6694
       */
6695
      public static _Fields findByName(String name) {
6696
        return byName.get(name);
6697
      }
6698
 
6699
      private final short _thriftId;
6700
      private final String _fieldName;
6701
 
6702
      _Fields(short thriftId, String fieldName) {
6703
        _thriftId = thriftId;
6704
        _fieldName = fieldName;
6705
      }
6706
 
6707
      public short getThriftFieldId() {
6708
        return _thriftId;
6709
      }
6710
 
6711
      public String getFieldName() {
6712
        return _fieldName;
6713
      }
6714
    }
6715
 
6716
    // isset id assignments
6717
    private static final int __SUCCESS_ISSET_ID = 0;
6718
    private BitSet __isset_bit_vector = new BitSet(1);
6719
 
6720
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
6721
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
6722
          new FieldValueMetaData(TType.BOOL)));
6723
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
6724
          new FieldValueMetaData(TType.STRUCT)));
6725
    }});
6726
 
6727
    static {
6728
      FieldMetaData.addStructMetaDataMap(changeTransactionStatus_result.class, metaDataMap);
6729
    }
6730
 
6731
    public changeTransactionStatus_result() {
6732
    }
6733
 
6734
    public changeTransactionStatus_result(
6735
      boolean success,
6736
      TransactionServiceException ex)
6737
    {
6738
      this();
6739
      this.success = success;
6740
      setSuccessIsSet(true);
6741
      this.ex = ex;
6742
    }
6743
 
6744
    /**
6745
     * Performs a deep copy on <i>other</i>.
6746
     */
6747
    public changeTransactionStatus_result(changeTransactionStatus_result other) {
6748
      __isset_bit_vector.clear();
6749
      __isset_bit_vector.or(other.__isset_bit_vector);
6750
      this.success = other.success;
6751
      if (other.isSetEx()) {
6752
        this.ex = new TransactionServiceException(other.ex);
6753
      }
6754
    }
6755
 
6756
    public changeTransactionStatus_result deepCopy() {
6757
      return new changeTransactionStatus_result(this);
6758
    }
6759
 
6760
    @Deprecated
6761
    public changeTransactionStatus_result clone() {
6762
      return new changeTransactionStatus_result(this);
6763
    }
6764
 
6765
    public boolean isSuccess() {
6766
      return this.success;
6767
    }
6768
 
6769
    public changeTransactionStatus_result setSuccess(boolean success) {
6770
      this.success = success;
6771
      setSuccessIsSet(true);
6772
      return this;
6773
    }
6774
 
6775
    public void unsetSuccess() {
6776
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
6777
    }
6778
 
6779
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
6780
    public boolean isSetSuccess() {
6781
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
6782
    }
6783
 
6784
    public void setSuccessIsSet(boolean value) {
6785
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
6786
    }
6787
 
6788
    public TransactionServiceException getEx() {
6789
      return this.ex;
6790
    }
6791
 
6792
    public changeTransactionStatus_result setEx(TransactionServiceException ex) {
6793
      this.ex = ex;
6794
      return this;
6795
    }
6796
 
6797
    public void unsetEx() {
6798
      this.ex = null;
6799
    }
6800
 
6801
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
6802
    public boolean isSetEx() {
6803
      return this.ex != null;
6804
    }
6805
 
6806
    public void setExIsSet(boolean value) {
6807
      if (!value) {
6808
        this.ex = null;
6809
      }
6810
    }
6811
 
6812
    public void setFieldValue(_Fields field, Object value) {
6813
      switch (field) {
6814
      case SUCCESS:
6815
        if (value == null) {
6816
          unsetSuccess();
6817
        } else {
6818
          setSuccess((Boolean)value);
6819
        }
6820
        break;
6821
 
6822
      case EX:
6823
        if (value == null) {
6824
          unsetEx();
6825
        } else {
6826
          setEx((TransactionServiceException)value);
6827
        }
6828
        break;
6829
 
6830
      }
6831
    }
6832
 
6833
    public void setFieldValue(int fieldID, Object value) {
6834
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
6835
    }
6836
 
6837
    public Object getFieldValue(_Fields field) {
6838
      switch (field) {
6839
      case SUCCESS:
6840
        return new Boolean(isSuccess());
6841
 
6842
      case EX:
6843
        return getEx();
6844
 
6845
      }
6846
      throw new IllegalStateException();
6847
    }
6848
 
6849
    public Object getFieldValue(int fieldId) {
6850
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
6851
    }
6852
 
6853
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
6854
    public boolean isSet(_Fields field) {
6855
      switch (field) {
6856
      case SUCCESS:
6857
        return isSetSuccess();
6858
      case EX:
6859
        return isSetEx();
6860
      }
6861
      throw new IllegalStateException();
6862
    }
6863
 
6864
    public boolean isSet(int fieldID) {
6865
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
6866
    }
6867
 
6868
    @Override
6869
    public boolean equals(Object that) {
6870
      if (that == null)
6871
        return false;
6872
      if (that instanceof changeTransactionStatus_result)
6873
        return this.equals((changeTransactionStatus_result)that);
6874
      return false;
6875
    }
6876
 
6877
    public boolean equals(changeTransactionStatus_result that) {
6878
      if (that == null)
6879
        return false;
6880
 
6881
      boolean this_present_success = true;
6882
      boolean that_present_success = true;
6883
      if (this_present_success || that_present_success) {
6884
        if (!(this_present_success && that_present_success))
6885
          return false;
6886
        if (this.success != that.success)
6887
          return false;
6888
      }
6889
 
6890
      boolean this_present_ex = true && this.isSetEx();
6891
      boolean that_present_ex = true && that.isSetEx();
6892
      if (this_present_ex || that_present_ex) {
6893
        if (!(this_present_ex && that_present_ex))
6894
          return false;
6895
        if (!this.ex.equals(that.ex))
6896
          return false;
6897
      }
6898
 
6899
      return true;
6900
    }
6901
 
6902
    @Override
6903
    public int hashCode() {
6904
      return 0;
6905
    }
6906
 
6907
    public int compareTo(changeTransactionStatus_result other) {
6908
      if (!getClass().equals(other.getClass())) {
6909
        return getClass().getName().compareTo(other.getClass().getName());
6910
      }
6911
 
6912
      int lastComparison = 0;
6913
      changeTransactionStatus_result typedOther = (changeTransactionStatus_result)other;
6914
 
6915
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
6916
      if (lastComparison != 0) {
6917
        return lastComparison;
6918
      }
6919
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
6920
      if (lastComparison != 0) {
6921
        return lastComparison;
6922
      }
6923
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
6924
      if (lastComparison != 0) {
6925
        return lastComparison;
6926
      }
6927
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
6928
      if (lastComparison != 0) {
6929
        return lastComparison;
6930
      }
6931
      return 0;
6932
    }
6933
 
6934
    public void read(TProtocol iprot) throws TException {
6935
      TField field;
6936
      iprot.readStructBegin();
6937
      while (true)
6938
      {
6939
        field = iprot.readFieldBegin();
6940
        if (field.type == TType.STOP) { 
6941
          break;
6942
        }
6943
        _Fields fieldId = _Fields.findByThriftId(field.id);
6944
        if (fieldId == null) {
6945
          TProtocolUtil.skip(iprot, field.type);
6946
        } else {
6947
          switch (fieldId) {
6948
            case SUCCESS:
6949
              if (field.type == TType.BOOL) {
6950
                this.success = iprot.readBool();
6951
                setSuccessIsSet(true);
6952
              } else { 
6953
                TProtocolUtil.skip(iprot, field.type);
6954
              }
6955
              break;
6956
            case EX:
6957
              if (field.type == TType.STRUCT) {
6958
                this.ex = new TransactionServiceException();
6959
                this.ex.read(iprot);
6960
              } else { 
6961
                TProtocolUtil.skip(iprot, field.type);
6962
              }
6963
              break;
6964
          }
6965
          iprot.readFieldEnd();
6966
        }
6967
      }
6968
      iprot.readStructEnd();
6969
      validate();
6970
    }
6971
 
6972
    public void write(TProtocol oprot) throws TException {
6973
      oprot.writeStructBegin(STRUCT_DESC);
6974
 
6975
      if (this.isSetSuccess()) {
6976
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
6977
        oprot.writeBool(this.success);
6978
        oprot.writeFieldEnd();
6979
      } else if (this.isSetEx()) {
6980
        oprot.writeFieldBegin(EX_FIELD_DESC);
6981
        this.ex.write(oprot);
6982
        oprot.writeFieldEnd();
6983
      }
6984
      oprot.writeFieldStop();
6985
      oprot.writeStructEnd();
6986
    }
6987
 
6988
    @Override
6989
    public String toString() {
6990
      StringBuilder sb = new StringBuilder("changeTransactionStatus_result(");
6991
      boolean first = true;
6992
 
6993
      sb.append("success:");
6994
      sb.append(this.success);
6995
      first = false;
6996
      if (!first) sb.append(", ");
6997
      sb.append("ex:");
6998
      if (this.ex == null) {
6999
        sb.append("null");
7000
      } else {
7001
        sb.append(this.ex);
7002
      }
7003
      first = false;
7004
      sb.append(")");
7005
      return sb.toString();
7006
    }
7007
 
7008
    public void validate() throws TException {
7009
      // check for required fields
7010
    }
7011
 
7012
  }
7013
 
1398 varun.gupt 7014
  public static class enqueueTransactionInfoEmail_args implements TBase<enqueueTransactionInfoEmail_args._Fields>, java.io.Serializable, Cloneable, Comparable<enqueueTransactionInfoEmail_args>   {
7015
    private static final TStruct STRUCT_DESC = new TStruct("enqueueTransactionInfoEmail_args");
1382 varun.gupt 7016
 
7017
    private static final TField TRANSACTION_ID_FIELD_DESC = new TField("transactionId", TType.I64, (short)1);
7018
 
7019
    private long transactionId;
7020
 
7021
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7022
    public enum _Fields implements TFieldIdEnum {
7023
      TRANSACTION_ID((short)1, "transactionId");
7024
 
7025
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
7026
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7027
 
7028
      static {
7029
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7030
          byId.put((int)field._thriftId, field);
7031
          byName.put(field.getFieldName(), field);
7032
        }
7033
      }
7034
 
7035
      /**
7036
       * Find the _Fields constant that matches fieldId, or null if its not found.
7037
       */
7038
      public static _Fields findByThriftId(int fieldId) {
7039
        return byId.get(fieldId);
7040
      }
7041
 
7042
      /**
7043
       * Find the _Fields constant that matches fieldId, throwing an exception
7044
       * if it is not found.
7045
       */
7046
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7047
        _Fields fields = findByThriftId(fieldId);
7048
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7049
        return fields;
7050
      }
7051
 
7052
      /**
7053
       * Find the _Fields constant that matches name, or null if its not found.
7054
       */
7055
      public static _Fields findByName(String name) {
7056
        return byName.get(name);
7057
      }
7058
 
7059
      private final short _thriftId;
7060
      private final String _fieldName;
7061
 
7062
      _Fields(short thriftId, String fieldName) {
7063
        _thriftId = thriftId;
7064
        _fieldName = fieldName;
7065
      }
7066
 
7067
      public short getThriftFieldId() {
7068
        return _thriftId;
7069
      }
7070
 
7071
      public String getFieldName() {
7072
        return _fieldName;
7073
      }
7074
    }
7075
 
7076
    // isset id assignments
7077
    private static final int __TRANSACTIONID_ISSET_ID = 0;
7078
    private BitSet __isset_bit_vector = new BitSet(1);
7079
 
7080
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
7081
      put(_Fields.TRANSACTION_ID, new FieldMetaData("transactionId", TFieldRequirementType.DEFAULT, 
7082
          new FieldValueMetaData(TType.I64)));
7083
    }});
7084
 
7085
    static {
1398 varun.gupt 7086
      FieldMetaData.addStructMetaDataMap(enqueueTransactionInfoEmail_args.class, metaDataMap);
1382 varun.gupt 7087
    }
7088
 
1398 varun.gupt 7089
    public enqueueTransactionInfoEmail_args() {
1382 varun.gupt 7090
    }
7091
 
1398 varun.gupt 7092
    public enqueueTransactionInfoEmail_args(
1382 varun.gupt 7093
      long transactionId)
7094
    {
7095
      this();
7096
      this.transactionId = transactionId;
7097
      setTransactionIdIsSet(true);
7098
    }
7099
 
7100
    /**
7101
     * Performs a deep copy on <i>other</i>.
7102
     */
1398 varun.gupt 7103
    public enqueueTransactionInfoEmail_args(enqueueTransactionInfoEmail_args other) {
1382 varun.gupt 7104
      __isset_bit_vector.clear();
7105
      __isset_bit_vector.or(other.__isset_bit_vector);
7106
      this.transactionId = other.transactionId;
7107
    }
7108
 
1398 varun.gupt 7109
    public enqueueTransactionInfoEmail_args deepCopy() {
7110
      return new enqueueTransactionInfoEmail_args(this);
1382 varun.gupt 7111
    }
7112
 
7113
    @Deprecated
1398 varun.gupt 7114
    public enqueueTransactionInfoEmail_args clone() {
7115
      return new enqueueTransactionInfoEmail_args(this);
1382 varun.gupt 7116
    }
7117
 
7118
    public long getTransactionId() {
7119
      return this.transactionId;
7120
    }
7121
 
1398 varun.gupt 7122
    public enqueueTransactionInfoEmail_args setTransactionId(long transactionId) {
1382 varun.gupt 7123
      this.transactionId = transactionId;
7124
      setTransactionIdIsSet(true);
7125
      return this;
7126
    }
7127
 
7128
    public void unsetTransactionId() {
7129
      __isset_bit_vector.clear(__TRANSACTIONID_ISSET_ID);
7130
    }
7131
 
7132
    /** Returns true if field transactionId is set (has been asigned a value) and false otherwise */
7133
    public boolean isSetTransactionId() {
7134
      return __isset_bit_vector.get(__TRANSACTIONID_ISSET_ID);
7135
    }
7136
 
7137
    public void setTransactionIdIsSet(boolean value) {
7138
      __isset_bit_vector.set(__TRANSACTIONID_ISSET_ID, value);
7139
    }
7140
 
7141
    public void setFieldValue(_Fields field, Object value) {
7142
      switch (field) {
7143
      case TRANSACTION_ID:
7144
        if (value == null) {
7145
          unsetTransactionId();
7146
        } else {
7147
          setTransactionId((Long)value);
7148
        }
7149
        break;
7150
 
7151
      }
7152
    }
7153
 
7154
    public void setFieldValue(int fieldID, Object value) {
7155
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
7156
    }
7157
 
7158
    public Object getFieldValue(_Fields field) {
7159
      switch (field) {
7160
      case TRANSACTION_ID:
7161
        return new Long(getTransactionId());
7162
 
7163
      }
7164
      throw new IllegalStateException();
7165
    }
7166
 
7167
    public Object getFieldValue(int fieldId) {
7168
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
7169
    }
7170
 
7171
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
7172
    public boolean isSet(_Fields field) {
7173
      switch (field) {
7174
      case TRANSACTION_ID:
7175
        return isSetTransactionId();
7176
      }
7177
      throw new IllegalStateException();
7178
    }
7179
 
7180
    public boolean isSet(int fieldID) {
7181
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
7182
    }
7183
 
7184
    @Override
7185
    public boolean equals(Object that) {
7186
      if (that == null)
7187
        return false;
1398 varun.gupt 7188
      if (that instanceof enqueueTransactionInfoEmail_args)
7189
        return this.equals((enqueueTransactionInfoEmail_args)that);
1382 varun.gupt 7190
      return false;
7191
    }
7192
 
1398 varun.gupt 7193
    public boolean equals(enqueueTransactionInfoEmail_args that) {
1382 varun.gupt 7194
      if (that == null)
7195
        return false;
7196
 
7197
      boolean this_present_transactionId = true;
7198
      boolean that_present_transactionId = true;
7199
      if (this_present_transactionId || that_present_transactionId) {
7200
        if (!(this_present_transactionId && that_present_transactionId))
7201
          return false;
7202
        if (this.transactionId != that.transactionId)
7203
          return false;
7204
      }
7205
 
7206
      return true;
7207
    }
7208
 
7209
    @Override
7210
    public int hashCode() {
7211
      return 0;
7212
    }
7213
 
1398 varun.gupt 7214
    public int compareTo(enqueueTransactionInfoEmail_args other) {
1382 varun.gupt 7215
      if (!getClass().equals(other.getClass())) {
7216
        return getClass().getName().compareTo(other.getClass().getName());
7217
      }
7218
 
7219
      int lastComparison = 0;
1398 varun.gupt 7220
      enqueueTransactionInfoEmail_args typedOther = (enqueueTransactionInfoEmail_args)other;
1382 varun.gupt 7221
 
7222
      lastComparison = Boolean.valueOf(isSetTransactionId()).compareTo(isSetTransactionId());
7223
      if (lastComparison != 0) {
7224
        return lastComparison;
7225
      }
7226
      lastComparison = TBaseHelper.compareTo(transactionId, typedOther.transactionId);
7227
      if (lastComparison != 0) {
7228
        return lastComparison;
7229
      }
7230
      return 0;
7231
    }
7232
 
7233
    public void read(TProtocol iprot) throws TException {
7234
      TField field;
7235
      iprot.readStructBegin();
7236
      while (true)
7237
      {
7238
        field = iprot.readFieldBegin();
7239
        if (field.type == TType.STOP) { 
7240
          break;
7241
        }
7242
        _Fields fieldId = _Fields.findByThriftId(field.id);
7243
        if (fieldId == null) {
7244
          TProtocolUtil.skip(iprot, field.type);
7245
        } else {
7246
          switch (fieldId) {
7247
            case TRANSACTION_ID:
7248
              if (field.type == TType.I64) {
7249
                this.transactionId = iprot.readI64();
7250
                setTransactionIdIsSet(true);
7251
              } else { 
7252
                TProtocolUtil.skip(iprot, field.type);
7253
              }
7254
              break;
7255
          }
7256
          iprot.readFieldEnd();
7257
        }
7258
      }
7259
      iprot.readStructEnd();
7260
      validate();
7261
    }
7262
 
7263
    public void write(TProtocol oprot) throws TException {
7264
      validate();
7265
 
7266
      oprot.writeStructBegin(STRUCT_DESC);
7267
      oprot.writeFieldBegin(TRANSACTION_ID_FIELD_DESC);
7268
      oprot.writeI64(this.transactionId);
7269
      oprot.writeFieldEnd();
7270
      oprot.writeFieldStop();
7271
      oprot.writeStructEnd();
7272
    }
7273
 
7274
    @Override
7275
    public String toString() {
1398 varun.gupt 7276
      StringBuilder sb = new StringBuilder("enqueueTransactionInfoEmail_args(");
1382 varun.gupt 7277
      boolean first = true;
7278
 
7279
      sb.append("transactionId:");
7280
      sb.append(this.transactionId);
7281
      first = false;
7282
      sb.append(")");
7283
      return sb.toString();
7284
    }
7285
 
7286
    public void validate() throws TException {
7287
      // check for required fields
7288
    }
7289
 
7290
  }
7291
 
1398 varun.gupt 7292
  public static class enqueueTransactionInfoEmail_result implements TBase<enqueueTransactionInfoEmail_result._Fields>, java.io.Serializable, Cloneable, Comparable<enqueueTransactionInfoEmail_result>   {
7293
    private static final TStruct STRUCT_DESC = new TStruct("enqueueTransactionInfoEmail_result");
1382 varun.gupt 7294
 
7295
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
7296
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
7297
 
7298
    private boolean success;
7299
    private TransactionServiceException ex;
7300
 
7301
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7302
    public enum _Fields implements TFieldIdEnum {
7303
      SUCCESS((short)0, "success"),
7304
      EX((short)1, "ex");
7305
 
7306
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
7307
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7308
 
7309
      static {
7310
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7311
          byId.put((int)field._thriftId, field);
7312
          byName.put(field.getFieldName(), field);
7313
        }
7314
      }
7315
 
7316
      /**
7317
       * Find the _Fields constant that matches fieldId, or null if its not found.
7318
       */
7319
      public static _Fields findByThriftId(int fieldId) {
7320
        return byId.get(fieldId);
7321
      }
7322
 
7323
      /**
7324
       * Find the _Fields constant that matches fieldId, throwing an exception
7325
       * if it is not found.
7326
       */
7327
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7328
        _Fields fields = findByThriftId(fieldId);
7329
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7330
        return fields;
7331
      }
7332
 
7333
      /**
7334
       * Find the _Fields constant that matches name, or null if its not found.
7335
       */
7336
      public static _Fields findByName(String name) {
7337
        return byName.get(name);
7338
      }
7339
 
7340
      private final short _thriftId;
7341
      private final String _fieldName;
7342
 
7343
      _Fields(short thriftId, String fieldName) {
7344
        _thriftId = thriftId;
7345
        _fieldName = fieldName;
7346
      }
7347
 
7348
      public short getThriftFieldId() {
7349
        return _thriftId;
7350
      }
7351
 
7352
      public String getFieldName() {
7353
        return _fieldName;
7354
      }
7355
    }
7356
 
7357
    // isset id assignments
7358
    private static final int __SUCCESS_ISSET_ID = 0;
7359
    private BitSet __isset_bit_vector = new BitSet(1);
7360
 
7361
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
7362
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
7363
          new FieldValueMetaData(TType.BOOL)));
7364
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
7365
          new FieldValueMetaData(TType.STRUCT)));
7366
    }});
7367
 
7368
    static {
1398 varun.gupt 7369
      FieldMetaData.addStructMetaDataMap(enqueueTransactionInfoEmail_result.class, metaDataMap);
1382 varun.gupt 7370
    }
7371
 
1398 varun.gupt 7372
    public enqueueTransactionInfoEmail_result() {
1382 varun.gupt 7373
    }
7374
 
1398 varun.gupt 7375
    public enqueueTransactionInfoEmail_result(
1382 varun.gupt 7376
      boolean success,
7377
      TransactionServiceException ex)
7378
    {
7379
      this();
7380
      this.success = success;
7381
      setSuccessIsSet(true);
7382
      this.ex = ex;
7383
    }
7384
 
7385
    /**
7386
     * Performs a deep copy on <i>other</i>.
7387
     */
1398 varun.gupt 7388
    public enqueueTransactionInfoEmail_result(enqueueTransactionInfoEmail_result other) {
1382 varun.gupt 7389
      __isset_bit_vector.clear();
7390
      __isset_bit_vector.or(other.__isset_bit_vector);
7391
      this.success = other.success;
7392
      if (other.isSetEx()) {
7393
        this.ex = new TransactionServiceException(other.ex);
7394
      }
7395
    }
7396
 
1398 varun.gupt 7397
    public enqueueTransactionInfoEmail_result deepCopy() {
7398
      return new enqueueTransactionInfoEmail_result(this);
1382 varun.gupt 7399
    }
7400
 
7401
    @Deprecated
1398 varun.gupt 7402
    public enqueueTransactionInfoEmail_result clone() {
7403
      return new enqueueTransactionInfoEmail_result(this);
1382 varun.gupt 7404
    }
7405
 
7406
    public boolean isSuccess() {
7407
      return this.success;
7408
    }
7409
 
1398 varun.gupt 7410
    public enqueueTransactionInfoEmail_result setSuccess(boolean success) {
1382 varun.gupt 7411
      this.success = success;
7412
      setSuccessIsSet(true);
7413
      return this;
7414
    }
7415
 
7416
    public void unsetSuccess() {
7417
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
7418
    }
7419
 
7420
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
7421
    public boolean isSetSuccess() {
7422
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
7423
    }
7424
 
7425
    public void setSuccessIsSet(boolean value) {
7426
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
7427
    }
7428
 
7429
    public TransactionServiceException getEx() {
7430
      return this.ex;
7431
    }
7432
 
1398 varun.gupt 7433
    public enqueueTransactionInfoEmail_result setEx(TransactionServiceException ex) {
1382 varun.gupt 7434
      this.ex = ex;
7435
      return this;
7436
    }
7437
 
7438
    public void unsetEx() {
7439
      this.ex = null;
7440
    }
7441
 
7442
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
7443
    public boolean isSetEx() {
7444
      return this.ex != null;
7445
    }
7446
 
7447
    public void setExIsSet(boolean value) {
7448
      if (!value) {
7449
        this.ex = null;
7450
      }
7451
    }
7452
 
7453
    public void setFieldValue(_Fields field, Object value) {
7454
      switch (field) {
7455
      case SUCCESS:
7456
        if (value == null) {
7457
          unsetSuccess();
7458
        } else {
7459
          setSuccess((Boolean)value);
7460
        }
7461
        break;
7462
 
7463
      case EX:
7464
        if (value == null) {
7465
          unsetEx();
7466
        } else {
7467
          setEx((TransactionServiceException)value);
7468
        }
7469
        break;
7470
 
7471
      }
7472
    }
7473
 
7474
    public void setFieldValue(int fieldID, Object value) {
7475
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
7476
    }
7477
 
7478
    public Object getFieldValue(_Fields field) {
7479
      switch (field) {
7480
      case SUCCESS:
7481
        return new Boolean(isSuccess());
7482
 
7483
      case EX:
7484
        return getEx();
7485
 
7486
      }
7487
      throw new IllegalStateException();
7488
    }
7489
 
7490
    public Object getFieldValue(int fieldId) {
7491
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
7492
    }
7493
 
7494
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
7495
    public boolean isSet(_Fields field) {
7496
      switch (field) {
7497
      case SUCCESS:
7498
        return isSetSuccess();
7499
      case EX:
7500
        return isSetEx();
7501
      }
7502
      throw new IllegalStateException();
7503
    }
7504
 
7505
    public boolean isSet(int fieldID) {
7506
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
7507
    }
7508
 
7509
    @Override
7510
    public boolean equals(Object that) {
7511
      if (that == null)
7512
        return false;
1398 varun.gupt 7513
      if (that instanceof enqueueTransactionInfoEmail_result)
7514
        return this.equals((enqueueTransactionInfoEmail_result)that);
1382 varun.gupt 7515
      return false;
7516
    }
7517
 
1398 varun.gupt 7518
    public boolean equals(enqueueTransactionInfoEmail_result that) {
1382 varun.gupt 7519
      if (that == null)
7520
        return false;
7521
 
7522
      boolean this_present_success = true;
7523
      boolean that_present_success = true;
7524
      if (this_present_success || that_present_success) {
7525
        if (!(this_present_success && that_present_success))
7526
          return false;
7527
        if (this.success != that.success)
7528
          return false;
7529
      }
7530
 
7531
      boolean this_present_ex = true && this.isSetEx();
7532
      boolean that_present_ex = true && that.isSetEx();
7533
      if (this_present_ex || that_present_ex) {
7534
        if (!(this_present_ex && that_present_ex))
7535
          return false;
7536
        if (!this.ex.equals(that.ex))
7537
          return false;
7538
      }
7539
 
7540
      return true;
7541
    }
7542
 
7543
    @Override
7544
    public int hashCode() {
7545
      return 0;
7546
    }
7547
 
1398 varun.gupt 7548
    public int compareTo(enqueueTransactionInfoEmail_result other) {
1382 varun.gupt 7549
      if (!getClass().equals(other.getClass())) {
7550
        return getClass().getName().compareTo(other.getClass().getName());
7551
      }
7552
 
7553
      int lastComparison = 0;
1398 varun.gupt 7554
      enqueueTransactionInfoEmail_result typedOther = (enqueueTransactionInfoEmail_result)other;
1382 varun.gupt 7555
 
7556
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
7557
      if (lastComparison != 0) {
7558
        return lastComparison;
7559
      }
7560
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
7561
      if (lastComparison != 0) {
7562
        return lastComparison;
7563
      }
7564
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
7565
      if (lastComparison != 0) {
7566
        return lastComparison;
7567
      }
7568
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
7569
      if (lastComparison != 0) {
7570
        return lastComparison;
7571
      }
7572
      return 0;
7573
    }
7574
 
7575
    public void read(TProtocol iprot) throws TException {
7576
      TField field;
7577
      iprot.readStructBegin();
7578
      while (true)
7579
      {
7580
        field = iprot.readFieldBegin();
7581
        if (field.type == TType.STOP) { 
7582
          break;
7583
        }
7584
        _Fields fieldId = _Fields.findByThriftId(field.id);
7585
        if (fieldId == null) {
7586
          TProtocolUtil.skip(iprot, field.type);
7587
        } else {
7588
          switch (fieldId) {
7589
            case SUCCESS:
7590
              if (field.type == TType.BOOL) {
7591
                this.success = iprot.readBool();
7592
                setSuccessIsSet(true);
7593
              } else { 
7594
                TProtocolUtil.skip(iprot, field.type);
7595
              }
7596
              break;
7597
            case EX:
7598
              if (field.type == TType.STRUCT) {
7599
                this.ex = new TransactionServiceException();
7600
                this.ex.read(iprot);
7601
              } else { 
7602
                TProtocolUtil.skip(iprot, field.type);
7603
              }
7604
              break;
7605
          }
7606
          iprot.readFieldEnd();
7607
        }
7608
      }
7609
      iprot.readStructEnd();
7610
      validate();
7611
    }
7612
 
7613
    public void write(TProtocol oprot) throws TException {
7614
      oprot.writeStructBegin(STRUCT_DESC);
7615
 
7616
      if (this.isSetSuccess()) {
7617
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
7618
        oprot.writeBool(this.success);
7619
        oprot.writeFieldEnd();
7620
      } else if (this.isSetEx()) {
7621
        oprot.writeFieldBegin(EX_FIELD_DESC);
7622
        this.ex.write(oprot);
7623
        oprot.writeFieldEnd();
7624
      }
7625
      oprot.writeFieldStop();
7626
      oprot.writeStructEnd();
7627
    }
7628
 
7629
    @Override
7630
    public String toString() {
1398 varun.gupt 7631
      StringBuilder sb = new StringBuilder("enqueueTransactionInfoEmail_result(");
1382 varun.gupt 7632
      boolean first = true;
7633
 
7634
      sb.append("success:");
7635
      sb.append(this.success);
7636
      first = false;
7637
      if (!first) sb.append(", ");
7638
      sb.append("ex:");
7639
      if (this.ex == null) {
7640
        sb.append("null");
7641
      } else {
7642
        sb.append(this.ex);
7643
      }
7644
      first = false;
7645
      sb.append(")");
7646
      return sb.toString();
7647
    }
7648
 
7649
    public void validate() throws TException {
7650
      // check for required fields
7651
    }
7652
 
7653
  }
7654
 
483 rajveer 7655
  public static class getAllOrders_args implements TBase<getAllOrders_args._Fields>, java.io.Serializable, Cloneable, Comparable<getAllOrders_args>   {
7656
    private static final TStruct STRUCT_DESC = new TStruct("getAllOrders_args");
68 ashish 7657
 
483 rajveer 7658
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)1);
7659
    private static final TField FROM_DATE_FIELD_DESC = new TField("from_date", TType.I64, (short)2);
7660
    private static final TField TO_DATE_FIELD_DESC = new TField("to_date", TType.I64, (short)3);
7661
    private static final TField WAREHOUSE_ID_FIELD_DESC = new TField("warehouse_id", TType.I64, (short)4);
68 ashish 7662
 
483 rajveer 7663
    private OrderStatus status;
7664
    private long from_date;
7665
    private long to_date;
7666
    private long warehouse_id;
68 ashish 7667
 
7668
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7669
    public enum _Fields implements TFieldIdEnum {
483 rajveer 7670
      /**
7671
       * 
7672
       * @see OrderStatus
7673
       */
7674
      STATUS((short)1, "status"),
7675
      FROM_DATE((short)2, "from_date"),
7676
      TO_DATE((short)3, "to_date"),
7677
      WAREHOUSE_ID((short)4, "warehouse_id");
68 ashish 7678
 
7679
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
7680
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7681
 
7682
      static {
7683
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7684
          byId.put((int)field._thriftId, field);
7685
          byName.put(field.getFieldName(), field);
7686
        }
7687
      }
7688
 
7689
      /**
7690
       * Find the _Fields constant that matches fieldId, or null if its not found.
7691
       */
7692
      public static _Fields findByThriftId(int fieldId) {
7693
        return byId.get(fieldId);
7694
      }
7695
 
7696
      /**
7697
       * Find the _Fields constant that matches fieldId, throwing an exception
7698
       * if it is not found.
7699
       */
7700
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7701
        _Fields fields = findByThriftId(fieldId);
7702
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7703
        return fields;
7704
      }
7705
 
7706
      /**
7707
       * Find the _Fields constant that matches name, or null if its not found.
7708
       */
7709
      public static _Fields findByName(String name) {
7710
        return byName.get(name);
7711
      }
7712
 
7713
      private final short _thriftId;
7714
      private final String _fieldName;
7715
 
7716
      _Fields(short thriftId, String fieldName) {
7717
        _thriftId = thriftId;
7718
        _fieldName = fieldName;
7719
      }
7720
 
7721
      public short getThriftFieldId() {
7722
        return _thriftId;
7723
      }
7724
 
7725
      public String getFieldName() {
7726
        return _fieldName;
7727
      }
7728
    }
7729
 
7730
    // isset id assignments
483 rajveer 7731
    private static final int __FROM_DATE_ISSET_ID = 0;
7732
    private static final int __TO_DATE_ISSET_ID = 1;
7733
    private static final int __WAREHOUSE_ID_ISSET_ID = 2;
7734
    private BitSet __isset_bit_vector = new BitSet(3);
68 ashish 7735
 
7736
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 7737
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
7738
          new EnumMetaData(TType.ENUM, OrderStatus.class)));
7739
      put(_Fields.FROM_DATE, new FieldMetaData("from_date", TFieldRequirementType.DEFAULT, 
68 ashish 7740
          new FieldValueMetaData(TType.I64)));
483 rajveer 7741
      put(_Fields.TO_DATE, new FieldMetaData("to_date", TFieldRequirementType.DEFAULT, 
7742
          new FieldValueMetaData(TType.I64)));
7743
      put(_Fields.WAREHOUSE_ID, new FieldMetaData("warehouse_id", TFieldRequirementType.DEFAULT, 
7744
          new FieldValueMetaData(TType.I64)));
68 ashish 7745
    }});
7746
 
7747
    static {
483 rajveer 7748
      FieldMetaData.addStructMetaDataMap(getAllOrders_args.class, metaDataMap);
68 ashish 7749
    }
7750
 
483 rajveer 7751
    public getAllOrders_args() {
68 ashish 7752
    }
7753
 
483 rajveer 7754
    public getAllOrders_args(
7755
      OrderStatus status,
7756
      long from_date,
7757
      long to_date,
7758
      long warehouse_id)
68 ashish 7759
    {
7760
      this();
483 rajveer 7761
      this.status = status;
7762
      this.from_date = from_date;
7763
      setFrom_dateIsSet(true);
7764
      this.to_date = to_date;
7765
      setTo_dateIsSet(true);
7766
      this.warehouse_id = warehouse_id;
7767
      setWarehouse_idIsSet(true);
68 ashish 7768
    }
7769
 
7770
    /**
7771
     * Performs a deep copy on <i>other</i>.
7772
     */
483 rajveer 7773
    public getAllOrders_args(getAllOrders_args other) {
68 ashish 7774
      __isset_bit_vector.clear();
7775
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 7776
      if (other.isSetStatus()) {
7777
        this.status = other.status;
7778
      }
7779
      this.from_date = other.from_date;
7780
      this.to_date = other.to_date;
7781
      this.warehouse_id = other.warehouse_id;
68 ashish 7782
    }
7783
 
483 rajveer 7784
    public getAllOrders_args deepCopy() {
7785
      return new getAllOrders_args(this);
68 ashish 7786
    }
7787
 
7788
    @Deprecated
483 rajveer 7789
    public getAllOrders_args clone() {
7790
      return new getAllOrders_args(this);
68 ashish 7791
    }
7792
 
483 rajveer 7793
    /**
7794
     * 
7795
     * @see OrderStatus
7796
     */
7797
    public OrderStatus getStatus() {
7798
      return this.status;
68 ashish 7799
    }
7800
 
483 rajveer 7801
    /**
7802
     * 
7803
     * @see OrderStatus
7804
     */
7805
    public getAllOrders_args setStatus(OrderStatus status) {
7806
      this.status = status;
68 ashish 7807
      return this;
7808
    }
7809
 
483 rajveer 7810
    public void unsetStatus() {
7811
      this.status = null;
68 ashish 7812
    }
7813
 
483 rajveer 7814
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
7815
    public boolean isSetStatus() {
7816
      return this.status != null;
68 ashish 7817
    }
7818
 
483 rajveer 7819
    public void setStatusIsSet(boolean value) {
7820
      if (!value) {
7821
        this.status = null;
68 ashish 7822
      }
7823
    }
7824
 
483 rajveer 7825
    public long getFrom_date() {
7826
      return this.from_date;
68 ashish 7827
    }
7828
 
483 rajveer 7829
    public getAllOrders_args setFrom_date(long from_date) {
7830
      this.from_date = from_date;
7831
      setFrom_dateIsSet(true);
7832
      return this;
68 ashish 7833
    }
7834
 
483 rajveer 7835
    public void unsetFrom_date() {
7836
      __isset_bit_vector.clear(__FROM_DATE_ISSET_ID);
68 ashish 7837
    }
7838
 
483 rajveer 7839
    /** Returns true if field from_date is set (has been asigned a value) and false otherwise */
7840
    public boolean isSetFrom_date() {
7841
      return __isset_bit_vector.get(__FROM_DATE_ISSET_ID);
68 ashish 7842
    }
7843
 
483 rajveer 7844
    public void setFrom_dateIsSet(boolean value) {
7845
      __isset_bit_vector.set(__FROM_DATE_ISSET_ID, value);
68 ashish 7846
    }
7847
 
483 rajveer 7848
    public long getTo_date() {
7849
      return this.to_date;
68 ashish 7850
    }
7851
 
483 rajveer 7852
    public getAllOrders_args setTo_date(long to_date) {
7853
      this.to_date = to_date;
7854
      setTo_dateIsSet(true);
68 ashish 7855
      return this;
7856
    }
7857
 
483 rajveer 7858
    public void unsetTo_date() {
7859
      __isset_bit_vector.clear(__TO_DATE_ISSET_ID);
68 ashish 7860
    }
7861
 
483 rajveer 7862
    /** Returns true if field to_date is set (has been asigned a value) and false otherwise */
7863
    public boolean isSetTo_date() {
7864
      return __isset_bit_vector.get(__TO_DATE_ISSET_ID);
68 ashish 7865
    }
7866
 
483 rajveer 7867
    public void setTo_dateIsSet(boolean value) {
7868
      __isset_bit_vector.set(__TO_DATE_ISSET_ID, value);
68 ashish 7869
    }
7870
 
483 rajveer 7871
    public long getWarehouse_id() {
7872
      return this.warehouse_id;
68 ashish 7873
    }
7874
 
483 rajveer 7875
    public getAllOrders_args setWarehouse_id(long warehouse_id) {
7876
      this.warehouse_id = warehouse_id;
7877
      setWarehouse_idIsSet(true);
68 ashish 7878
      return this;
7879
    }
7880
 
483 rajveer 7881
    public void unsetWarehouse_id() {
7882
      __isset_bit_vector.clear(__WAREHOUSE_ID_ISSET_ID);
68 ashish 7883
    }
7884
 
483 rajveer 7885
    /** Returns true if field warehouse_id is set (has been asigned a value) and false otherwise */
7886
    public boolean isSetWarehouse_id() {
7887
      return __isset_bit_vector.get(__WAREHOUSE_ID_ISSET_ID);
68 ashish 7888
    }
7889
 
483 rajveer 7890
    public void setWarehouse_idIsSet(boolean value) {
7891
      __isset_bit_vector.set(__WAREHOUSE_ID_ISSET_ID, value);
68 ashish 7892
    }
7893
 
7894
    public void setFieldValue(_Fields field, Object value) {
7895
      switch (field) {
483 rajveer 7896
      case STATUS:
68 ashish 7897
        if (value == null) {
483 rajveer 7898
          unsetStatus();
68 ashish 7899
        } else {
483 rajveer 7900
          setStatus((OrderStatus)value);
68 ashish 7901
        }
7902
        break;
7903
 
483 rajveer 7904
      case FROM_DATE:
68 ashish 7905
        if (value == null) {
483 rajveer 7906
          unsetFrom_date();
68 ashish 7907
        } else {
483 rajveer 7908
          setFrom_date((Long)value);
68 ashish 7909
        }
7910
        break;
7911
 
483 rajveer 7912
      case TO_DATE:
7913
        if (value == null) {
7914
          unsetTo_date();
7915
        } else {
7916
          setTo_date((Long)value);
7917
        }
7918
        break;
7919
 
7920
      case WAREHOUSE_ID:
7921
        if (value == null) {
7922
          unsetWarehouse_id();
7923
        } else {
7924
          setWarehouse_id((Long)value);
7925
        }
7926
        break;
7927
 
68 ashish 7928
      }
7929
    }
7930
 
7931
    public void setFieldValue(int fieldID, Object value) {
7932
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
7933
    }
7934
 
7935
    public Object getFieldValue(_Fields field) {
7936
      switch (field) {
483 rajveer 7937
      case STATUS:
7938
        return getStatus();
68 ashish 7939
 
483 rajveer 7940
      case FROM_DATE:
7941
        return new Long(getFrom_date());
68 ashish 7942
 
483 rajveer 7943
      case TO_DATE:
7944
        return new Long(getTo_date());
7945
 
7946
      case WAREHOUSE_ID:
7947
        return new Long(getWarehouse_id());
7948
 
68 ashish 7949
      }
7950
      throw new IllegalStateException();
7951
    }
7952
 
7953
    public Object getFieldValue(int fieldId) {
7954
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
7955
    }
7956
 
7957
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
7958
    public boolean isSet(_Fields field) {
7959
      switch (field) {
483 rajveer 7960
      case STATUS:
7961
        return isSetStatus();
7962
      case FROM_DATE:
7963
        return isSetFrom_date();
7964
      case TO_DATE:
7965
        return isSetTo_date();
7966
      case WAREHOUSE_ID:
7967
        return isSetWarehouse_id();
68 ashish 7968
      }
7969
      throw new IllegalStateException();
7970
    }
7971
 
7972
    public boolean isSet(int fieldID) {
7973
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
7974
    }
7975
 
7976
    @Override
7977
    public boolean equals(Object that) {
7978
      if (that == null)
7979
        return false;
483 rajveer 7980
      if (that instanceof getAllOrders_args)
7981
        return this.equals((getAllOrders_args)that);
68 ashish 7982
      return false;
7983
    }
7984
 
483 rajveer 7985
    public boolean equals(getAllOrders_args that) {
68 ashish 7986
      if (that == null)
7987
        return false;
7988
 
483 rajveer 7989
      boolean this_present_status = true && this.isSetStatus();
7990
      boolean that_present_status = true && that.isSetStatus();
7991
      if (this_present_status || that_present_status) {
7992
        if (!(this_present_status && that_present_status))
68 ashish 7993
          return false;
483 rajveer 7994
        if (!this.status.equals(that.status))
68 ashish 7995
          return false;
7996
      }
7997
 
483 rajveer 7998
      boolean this_present_from_date = true;
7999
      boolean that_present_from_date = true;
8000
      if (this_present_from_date || that_present_from_date) {
8001
        if (!(this_present_from_date && that_present_from_date))
68 ashish 8002
          return false;
483 rajveer 8003
        if (this.from_date != that.from_date)
68 ashish 8004
          return false;
8005
      }
8006
 
483 rajveer 8007
      boolean this_present_to_date = true;
8008
      boolean that_present_to_date = true;
8009
      if (this_present_to_date || that_present_to_date) {
8010
        if (!(this_present_to_date && that_present_to_date))
8011
          return false;
8012
        if (this.to_date != that.to_date)
8013
          return false;
68 ashish 8014
      }
8015
 
483 rajveer 8016
      boolean this_present_warehouse_id = true;
8017
      boolean that_present_warehouse_id = true;
8018
      if (this_present_warehouse_id || that_present_warehouse_id) {
8019
        if (!(this_present_warehouse_id && that_present_warehouse_id))
68 ashish 8020
          return false;
483 rajveer 8021
        if (this.warehouse_id != that.warehouse_id)
68 ashish 8022
          return false;
8023
      }
8024
 
8025
      return true;
8026
    }
8027
 
8028
    @Override
8029
    public int hashCode() {
8030
      return 0;
8031
    }
8032
 
483 rajveer 8033
    public int compareTo(getAllOrders_args other) {
68 ashish 8034
      if (!getClass().equals(other.getClass())) {
8035
        return getClass().getName().compareTo(other.getClass().getName());
8036
      }
8037
 
8038
      int lastComparison = 0;
483 rajveer 8039
      getAllOrders_args typedOther = (getAllOrders_args)other;
68 ashish 8040
 
483 rajveer 8041
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
68 ashish 8042
      if (lastComparison != 0) {
8043
        return lastComparison;
8044
      }
483 rajveer 8045
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
68 ashish 8046
      if (lastComparison != 0) {
8047
        return lastComparison;
8048
      }
483 rajveer 8049
      lastComparison = Boolean.valueOf(isSetFrom_date()).compareTo(isSetFrom_date());
8050
      if (lastComparison != 0) {
8051
        return lastComparison;
8052
      }
8053
      lastComparison = TBaseHelper.compareTo(from_date, typedOther.from_date);
8054
      if (lastComparison != 0) {
8055
        return lastComparison;
8056
      }
8057
      lastComparison = Boolean.valueOf(isSetTo_date()).compareTo(isSetTo_date());
8058
      if (lastComparison != 0) {
8059
        return lastComparison;
8060
      }
8061
      lastComparison = TBaseHelper.compareTo(to_date, typedOther.to_date);
8062
      if (lastComparison != 0) {
8063
        return lastComparison;
8064
      }
8065
      lastComparison = Boolean.valueOf(isSetWarehouse_id()).compareTo(isSetWarehouse_id());
8066
      if (lastComparison != 0) {
8067
        return lastComparison;
8068
      }
8069
      lastComparison = TBaseHelper.compareTo(warehouse_id, typedOther.warehouse_id);
8070
      if (lastComparison != 0) {
8071
        return lastComparison;
8072
      }
68 ashish 8073
      return 0;
8074
    }
8075
 
8076
    public void read(TProtocol iprot) throws TException {
8077
      TField field;
8078
      iprot.readStructBegin();
8079
      while (true)
8080
      {
8081
        field = iprot.readFieldBegin();
8082
        if (field.type == TType.STOP) { 
8083
          break;
8084
        }
8085
        _Fields fieldId = _Fields.findByThriftId(field.id);
8086
        if (fieldId == null) {
8087
          TProtocolUtil.skip(iprot, field.type);
8088
        } else {
8089
          switch (fieldId) {
483 rajveer 8090
            case STATUS:
8091
              if (field.type == TType.I32) {
8092
                this.status = OrderStatus.findByValue(iprot.readI32());
8093
              } else { 
8094
                TProtocolUtil.skip(iprot, field.type);
8095
              }
8096
              break;
8097
            case FROM_DATE:
68 ashish 8098
              if (field.type == TType.I64) {
483 rajveer 8099
                this.from_date = iprot.readI64();
8100
                setFrom_dateIsSet(true);
68 ashish 8101
              } else { 
8102
                TProtocolUtil.skip(iprot, field.type);
8103
              }
8104
              break;
483 rajveer 8105
            case TO_DATE:
8106
              if (field.type == TType.I64) {
8107
                this.to_date = iprot.readI64();
8108
                setTo_dateIsSet(true);
8109
              } else { 
8110
                TProtocolUtil.skip(iprot, field.type);
8111
              }
8112
              break;
8113
            case WAREHOUSE_ID:
8114
              if (field.type == TType.I64) {
8115
                this.warehouse_id = iprot.readI64();
8116
                setWarehouse_idIsSet(true);
8117
              } else { 
8118
                TProtocolUtil.skip(iprot, field.type);
8119
              }
8120
              break;
68 ashish 8121
          }
8122
          iprot.readFieldEnd();
8123
        }
8124
      }
8125
      iprot.readStructEnd();
8126
      validate();
8127
    }
8128
 
8129
    public void write(TProtocol oprot) throws TException {
8130
      validate();
8131
 
8132
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 8133
      if (this.status != null) {
8134
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
8135
        oprot.writeI32(this.status.getValue());
8136
        oprot.writeFieldEnd();
8137
      }
8138
      oprot.writeFieldBegin(FROM_DATE_FIELD_DESC);
8139
      oprot.writeI64(this.from_date);
68 ashish 8140
      oprot.writeFieldEnd();
483 rajveer 8141
      oprot.writeFieldBegin(TO_DATE_FIELD_DESC);
8142
      oprot.writeI64(this.to_date);
8143
      oprot.writeFieldEnd();
8144
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
8145
      oprot.writeI64(this.warehouse_id);
8146
      oprot.writeFieldEnd();
68 ashish 8147
      oprot.writeFieldStop();
8148
      oprot.writeStructEnd();
8149
    }
8150
 
8151
    @Override
8152
    public String toString() {
483 rajveer 8153
      StringBuilder sb = new StringBuilder("getAllOrders_args(");
68 ashish 8154
      boolean first = true;
8155
 
483 rajveer 8156
      sb.append("status:");
8157
      if (this.status == null) {
8158
        sb.append("null");
8159
      } else {
8160
        String status_name = status.name();
8161
        if (status_name != null) {
8162
          sb.append(status_name);
8163
          sb.append(" (");
8164
        }
8165
        sb.append(this.status);
8166
        if (status_name != null) {
8167
          sb.append(")");
8168
        }
8169
      }
68 ashish 8170
      first = false;
483 rajveer 8171
      if (!first) sb.append(", ");
8172
      sb.append("from_date:");
8173
      sb.append(this.from_date);
8174
      first = false;
8175
      if (!first) sb.append(", ");
8176
      sb.append("to_date:");
8177
      sb.append(this.to_date);
8178
      first = false;
8179
      if (!first) sb.append(", ");
8180
      sb.append("warehouse_id:");
8181
      sb.append(this.warehouse_id);
8182
      first = false;
68 ashish 8183
      sb.append(")");
8184
      return sb.toString();
8185
    }
8186
 
8187
    public void validate() throws TException {
8188
      // check for required fields
8189
    }
8190
 
8191
  }
8192
 
483 rajveer 8193
  public static class getAllOrders_result implements TBase<getAllOrders_result._Fields>, java.io.Serializable, Cloneable, Comparable<getAllOrders_result>   {
8194
    private static final TStruct STRUCT_DESC = new TStruct("getAllOrders_result");
68 ashish 8195
 
483 rajveer 8196
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
68 ashish 8197
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
8198
 
483 rajveer 8199
    private List<Order> success;
68 ashish 8200
    private TransactionServiceException ex;
8201
 
8202
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8203
    public enum _Fields implements TFieldIdEnum {
8204
      SUCCESS((short)0, "success"),
8205
      EX((short)1, "ex");
8206
 
8207
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
8208
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8209
 
8210
      static {
8211
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8212
          byId.put((int)field._thriftId, field);
8213
          byName.put(field.getFieldName(), field);
8214
        }
8215
      }
8216
 
8217
      /**
8218
       * Find the _Fields constant that matches fieldId, or null if its not found.
8219
       */
8220
      public static _Fields findByThriftId(int fieldId) {
8221
        return byId.get(fieldId);
8222
      }
8223
 
8224
      /**
8225
       * Find the _Fields constant that matches fieldId, throwing an exception
8226
       * if it is not found.
8227
       */
8228
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8229
        _Fields fields = findByThriftId(fieldId);
8230
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8231
        return fields;
8232
      }
8233
 
8234
      /**
8235
       * Find the _Fields constant that matches name, or null if its not found.
8236
       */
8237
      public static _Fields findByName(String name) {
8238
        return byName.get(name);
8239
      }
8240
 
8241
      private final short _thriftId;
8242
      private final String _fieldName;
8243
 
8244
      _Fields(short thriftId, String fieldName) {
8245
        _thriftId = thriftId;
8246
        _fieldName = fieldName;
8247
      }
8248
 
8249
      public short getThriftFieldId() {
8250
        return _thriftId;
8251
      }
8252
 
8253
      public String getFieldName() {
8254
        return _fieldName;
8255
      }
8256
    }
8257
 
8258
    // isset id assignments
8259
 
8260
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
8261
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
483 rajveer 8262
          new ListMetaData(TType.LIST, 
8263
              new StructMetaData(TType.STRUCT, Order.class))));
68 ashish 8264
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
8265
          new FieldValueMetaData(TType.STRUCT)));
8266
    }});
8267
 
8268
    static {
483 rajveer 8269
      FieldMetaData.addStructMetaDataMap(getAllOrders_result.class, metaDataMap);
68 ashish 8270
    }
8271
 
483 rajveer 8272
    public getAllOrders_result() {
68 ashish 8273
    }
8274
 
483 rajveer 8275
    public getAllOrders_result(
8276
      List<Order> success,
68 ashish 8277
      TransactionServiceException ex)
8278
    {
8279
      this();
8280
      this.success = success;
8281
      this.ex = ex;
8282
    }
8283
 
8284
    /**
8285
     * Performs a deep copy on <i>other</i>.
8286
     */
483 rajveer 8287
    public getAllOrders_result(getAllOrders_result other) {
68 ashish 8288
      if (other.isSetSuccess()) {
483 rajveer 8289
        List<Order> __this__success = new ArrayList<Order>();
8290
        for (Order other_element : other.success) {
8291
          __this__success.add(new Order(other_element));
8292
        }
8293
        this.success = __this__success;
68 ashish 8294
      }
8295
      if (other.isSetEx()) {
8296
        this.ex = new TransactionServiceException(other.ex);
8297
      }
8298
    }
8299
 
483 rajveer 8300
    public getAllOrders_result deepCopy() {
8301
      return new getAllOrders_result(this);
68 ashish 8302
    }
8303
 
8304
    @Deprecated
483 rajveer 8305
    public getAllOrders_result clone() {
8306
      return new getAllOrders_result(this);
68 ashish 8307
    }
8308
 
483 rajveer 8309
    public int getSuccessSize() {
8310
      return (this.success == null) ? 0 : this.success.size();
8311
    }
8312
 
8313
    public java.util.Iterator<Order> getSuccessIterator() {
8314
      return (this.success == null) ? null : this.success.iterator();
8315
    }
8316
 
8317
    public void addToSuccess(Order elem) {
8318
      if (this.success == null) {
8319
        this.success = new ArrayList<Order>();
8320
      }
8321
      this.success.add(elem);
8322
    }
8323
 
8324
    public List<Order> getSuccess() {
68 ashish 8325
      return this.success;
8326
    }
8327
 
483 rajveer 8328
    public getAllOrders_result setSuccess(List<Order> success) {
68 ashish 8329
      this.success = success;
8330
      return this;
8331
    }
8332
 
8333
    public void unsetSuccess() {
8334
      this.success = null;
8335
    }
8336
 
8337
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
8338
    public boolean isSetSuccess() {
8339
      return this.success != null;
8340
    }
8341
 
8342
    public void setSuccessIsSet(boolean value) {
8343
      if (!value) {
8344
        this.success = null;
8345
      }
8346
    }
8347
 
8348
    public TransactionServiceException getEx() {
8349
      return this.ex;
8350
    }
8351
 
483 rajveer 8352
    public getAllOrders_result setEx(TransactionServiceException ex) {
68 ashish 8353
      this.ex = ex;
8354
      return this;
8355
    }
8356
 
8357
    public void unsetEx() {
8358
      this.ex = null;
8359
    }
8360
 
8361
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
8362
    public boolean isSetEx() {
8363
      return this.ex != null;
8364
    }
8365
 
8366
    public void setExIsSet(boolean value) {
8367
      if (!value) {
8368
        this.ex = null;
8369
      }
8370
    }
8371
 
8372
    public void setFieldValue(_Fields field, Object value) {
8373
      switch (field) {
8374
      case SUCCESS:
8375
        if (value == null) {
8376
          unsetSuccess();
8377
        } else {
483 rajveer 8378
          setSuccess((List<Order>)value);
68 ashish 8379
        }
8380
        break;
8381
 
8382
      case EX:
8383
        if (value == null) {
8384
          unsetEx();
8385
        } else {
8386
          setEx((TransactionServiceException)value);
8387
        }
8388
        break;
8389
 
8390
      }
8391
    }
8392
 
8393
    public void setFieldValue(int fieldID, Object value) {
8394
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
8395
    }
8396
 
8397
    public Object getFieldValue(_Fields field) {
8398
      switch (field) {
8399
      case SUCCESS:
8400
        return getSuccess();
8401
 
8402
      case EX:
8403
        return getEx();
8404
 
8405
      }
8406
      throw new IllegalStateException();
8407
    }
8408
 
8409
    public Object getFieldValue(int fieldId) {
8410
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
8411
    }
8412
 
8413
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
8414
    public boolean isSet(_Fields field) {
8415
      switch (field) {
8416
      case SUCCESS:
8417
        return isSetSuccess();
8418
      case EX:
8419
        return isSetEx();
8420
      }
8421
      throw new IllegalStateException();
8422
    }
8423
 
8424
    public boolean isSet(int fieldID) {
8425
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
8426
    }
8427
 
8428
    @Override
8429
    public boolean equals(Object that) {
8430
      if (that == null)
8431
        return false;
483 rajveer 8432
      if (that instanceof getAllOrders_result)
8433
        return this.equals((getAllOrders_result)that);
68 ashish 8434
      return false;
8435
    }
8436
 
483 rajveer 8437
    public boolean equals(getAllOrders_result that) {
68 ashish 8438
      if (that == null)
8439
        return false;
8440
 
8441
      boolean this_present_success = true && this.isSetSuccess();
8442
      boolean that_present_success = true && that.isSetSuccess();
8443
      if (this_present_success || that_present_success) {
8444
        if (!(this_present_success && that_present_success))
8445
          return false;
8446
        if (!this.success.equals(that.success))
8447
          return false;
8448
      }
8449
 
8450
      boolean this_present_ex = true && this.isSetEx();
8451
      boolean that_present_ex = true && that.isSetEx();
8452
      if (this_present_ex || that_present_ex) {
8453
        if (!(this_present_ex && that_present_ex))
8454
          return false;
8455
        if (!this.ex.equals(that.ex))
8456
          return false;
8457
      }
8458
 
8459
      return true;
8460
    }
8461
 
8462
    @Override
8463
    public int hashCode() {
8464
      return 0;
8465
    }
8466
 
483 rajveer 8467
    public int compareTo(getAllOrders_result other) {
8468
      if (!getClass().equals(other.getClass())) {
8469
        return getClass().getName().compareTo(other.getClass().getName());
8470
      }
8471
 
8472
      int lastComparison = 0;
8473
      getAllOrders_result typedOther = (getAllOrders_result)other;
8474
 
8475
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
8476
      if (lastComparison != 0) {
8477
        return lastComparison;
8478
      }
8479
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
8480
      if (lastComparison != 0) {
8481
        return lastComparison;
8482
      }
8483
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
8484
      if (lastComparison != 0) {
8485
        return lastComparison;
8486
      }
8487
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
8488
      if (lastComparison != 0) {
8489
        return lastComparison;
8490
      }
8491
      return 0;
8492
    }
8493
 
68 ashish 8494
    public void read(TProtocol iprot) throws TException {
8495
      TField field;
8496
      iprot.readStructBegin();
8497
      while (true)
8498
      {
8499
        field = iprot.readFieldBegin();
8500
        if (field.type == TType.STOP) { 
8501
          break;
8502
        }
8503
        _Fields fieldId = _Fields.findByThriftId(field.id);
8504
        if (fieldId == null) {
8505
          TProtocolUtil.skip(iprot, field.type);
8506
        } else {
8507
          switch (fieldId) {
8508
            case SUCCESS:
483 rajveer 8509
              if (field.type == TType.LIST) {
8510
                {
684 chandransh 8511
                  TList _list16 = iprot.readListBegin();
8512
                  this.success = new ArrayList<Order>(_list16.size);
8513
                  for (int _i17 = 0; _i17 < _list16.size; ++_i17)
483 rajveer 8514
                  {
684 chandransh 8515
                    Order _elem18;
8516
                    _elem18 = new Order();
8517
                    _elem18.read(iprot);
8518
                    this.success.add(_elem18);
483 rajveer 8519
                  }
8520
                  iprot.readListEnd();
8521
                }
68 ashish 8522
              } else { 
8523
                TProtocolUtil.skip(iprot, field.type);
8524
              }
8525
              break;
8526
            case EX:
8527
              if (field.type == TType.STRUCT) {
8528
                this.ex = new TransactionServiceException();
8529
                this.ex.read(iprot);
8530
              } else { 
8531
                TProtocolUtil.skip(iprot, field.type);
8532
              }
8533
              break;
8534
          }
8535
          iprot.readFieldEnd();
8536
        }
8537
      }
8538
      iprot.readStructEnd();
8539
      validate();
8540
    }
8541
 
8542
    public void write(TProtocol oprot) throws TException {
8543
      oprot.writeStructBegin(STRUCT_DESC);
8544
 
8545
      if (this.isSetSuccess()) {
8546
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
483 rajveer 8547
        {
8548
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
684 chandransh 8549
          for (Order _iter19 : this.success)
483 rajveer 8550
          {
684 chandransh 8551
            _iter19.write(oprot);
483 rajveer 8552
          }
8553
          oprot.writeListEnd();
8554
        }
68 ashish 8555
        oprot.writeFieldEnd();
8556
      } else if (this.isSetEx()) {
8557
        oprot.writeFieldBegin(EX_FIELD_DESC);
8558
        this.ex.write(oprot);
8559
        oprot.writeFieldEnd();
8560
      }
8561
      oprot.writeFieldStop();
8562
      oprot.writeStructEnd();
8563
    }
8564
 
8565
    @Override
8566
    public String toString() {
483 rajveer 8567
      StringBuilder sb = new StringBuilder("getAllOrders_result(");
68 ashish 8568
      boolean first = true;
8569
 
8570
      sb.append("success:");
8571
      if (this.success == null) {
8572
        sb.append("null");
8573
      } else {
8574
        sb.append(this.success);
8575
      }
8576
      first = false;
8577
      if (!first) sb.append(", ");
8578
      sb.append("ex:");
8579
      if (this.ex == null) {
8580
        sb.append("null");
8581
      } else {
8582
        sb.append(this.ex);
8583
      }
8584
      first = false;
8585
      sb.append(")");
8586
      return sb.toString();
8587
    }
8588
 
8589
    public void validate() throws TException {
8590
      // check for required fields
8591
    }
8592
 
8593
  }
8594
 
1022 varun.gupt 8595
  public static class getOrdersByBillingDate_args implements TBase<getOrdersByBillingDate_args._Fields>, java.io.Serializable, Cloneable, Comparable<getOrdersByBillingDate_args>   {
8596
    private static final TStruct STRUCT_DESC = new TStruct("getOrdersByBillingDate_args");
8597
 
8598
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)1);
8599
    private static final TField START_BILLING_DATE_FIELD_DESC = new TField("start_billing_date", TType.I64, (short)2);
8600
    private static final TField END_BILLING_DATE_FIELD_DESC = new TField("end_billing_date", TType.I64, (short)3);
8601
    private static final TField WAREHOUSE_ID_FIELD_DESC = new TField("warehouse_id", TType.I64, (short)4);
8602
 
8603
    private OrderStatus status;
8604
    private long start_billing_date;
8605
    private long end_billing_date;
8606
    private long warehouse_id;
8607
 
8608
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8609
    public enum _Fields implements TFieldIdEnum {
8610
      /**
8611
       * 
8612
       * @see OrderStatus
8613
       */
8614
      STATUS((short)1, "status"),
8615
      START_BILLING_DATE((short)2, "start_billing_date"),
8616
      END_BILLING_DATE((short)3, "end_billing_date"),
8617
      WAREHOUSE_ID((short)4, "warehouse_id");
8618
 
8619
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
8620
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8621
 
8622
      static {
8623
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8624
          byId.put((int)field._thriftId, field);
8625
          byName.put(field.getFieldName(), field);
8626
        }
8627
      }
8628
 
8629
      /**
8630
       * Find the _Fields constant that matches fieldId, or null if its not found.
8631
       */
8632
      public static _Fields findByThriftId(int fieldId) {
8633
        return byId.get(fieldId);
8634
      }
8635
 
8636
      /**
8637
       * Find the _Fields constant that matches fieldId, throwing an exception
8638
       * if it is not found.
8639
       */
8640
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8641
        _Fields fields = findByThriftId(fieldId);
8642
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8643
        return fields;
8644
      }
8645
 
8646
      /**
8647
       * Find the _Fields constant that matches name, or null if its not found.
8648
       */
8649
      public static _Fields findByName(String name) {
8650
        return byName.get(name);
8651
      }
8652
 
8653
      private final short _thriftId;
8654
      private final String _fieldName;
8655
 
8656
      _Fields(short thriftId, String fieldName) {
8657
        _thriftId = thriftId;
8658
        _fieldName = fieldName;
8659
      }
8660
 
8661
      public short getThriftFieldId() {
8662
        return _thriftId;
8663
      }
8664
 
8665
      public String getFieldName() {
8666
        return _fieldName;
8667
      }
8668
    }
8669
 
8670
    // isset id assignments
8671
    private static final int __START_BILLING_DATE_ISSET_ID = 0;
8672
    private static final int __END_BILLING_DATE_ISSET_ID = 1;
8673
    private static final int __WAREHOUSE_ID_ISSET_ID = 2;
8674
    private BitSet __isset_bit_vector = new BitSet(3);
8675
 
8676
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
8677
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
8678
          new EnumMetaData(TType.ENUM, OrderStatus.class)));
8679
      put(_Fields.START_BILLING_DATE, new FieldMetaData("start_billing_date", TFieldRequirementType.DEFAULT, 
8680
          new FieldValueMetaData(TType.I64)));
8681
      put(_Fields.END_BILLING_DATE, new FieldMetaData("end_billing_date", TFieldRequirementType.DEFAULT, 
8682
          new FieldValueMetaData(TType.I64)));
8683
      put(_Fields.WAREHOUSE_ID, new FieldMetaData("warehouse_id", TFieldRequirementType.DEFAULT, 
8684
          new FieldValueMetaData(TType.I64)));
8685
    }});
8686
 
8687
    static {
8688
      FieldMetaData.addStructMetaDataMap(getOrdersByBillingDate_args.class, metaDataMap);
8689
    }
8690
 
8691
    public getOrdersByBillingDate_args() {
8692
    }
8693
 
8694
    public getOrdersByBillingDate_args(
8695
      OrderStatus status,
8696
      long start_billing_date,
8697
      long end_billing_date,
8698
      long warehouse_id)
8699
    {
8700
      this();
8701
      this.status = status;
8702
      this.start_billing_date = start_billing_date;
8703
      setStart_billing_dateIsSet(true);
8704
      this.end_billing_date = end_billing_date;
8705
      setEnd_billing_dateIsSet(true);
8706
      this.warehouse_id = warehouse_id;
8707
      setWarehouse_idIsSet(true);
8708
    }
8709
 
8710
    /**
8711
     * Performs a deep copy on <i>other</i>.
8712
     */
8713
    public getOrdersByBillingDate_args(getOrdersByBillingDate_args other) {
8714
      __isset_bit_vector.clear();
8715
      __isset_bit_vector.or(other.__isset_bit_vector);
8716
      if (other.isSetStatus()) {
8717
        this.status = other.status;
8718
      }
8719
      this.start_billing_date = other.start_billing_date;
8720
      this.end_billing_date = other.end_billing_date;
8721
      this.warehouse_id = other.warehouse_id;
8722
    }
8723
 
8724
    public getOrdersByBillingDate_args deepCopy() {
8725
      return new getOrdersByBillingDate_args(this);
8726
    }
8727
 
8728
    @Deprecated
8729
    public getOrdersByBillingDate_args clone() {
8730
      return new getOrdersByBillingDate_args(this);
8731
    }
8732
 
8733
    /**
8734
     * 
8735
     * @see OrderStatus
8736
     */
8737
    public OrderStatus getStatus() {
8738
      return this.status;
8739
    }
8740
 
8741
    /**
8742
     * 
8743
     * @see OrderStatus
8744
     */
8745
    public getOrdersByBillingDate_args setStatus(OrderStatus status) {
8746
      this.status = status;
8747
      return this;
8748
    }
8749
 
8750
    public void unsetStatus() {
8751
      this.status = null;
8752
    }
8753
 
8754
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
8755
    public boolean isSetStatus() {
8756
      return this.status != null;
8757
    }
8758
 
8759
    public void setStatusIsSet(boolean value) {
8760
      if (!value) {
8761
        this.status = null;
8762
      }
8763
    }
8764
 
8765
    public long getStart_billing_date() {
8766
      return this.start_billing_date;
8767
    }
8768
 
8769
    public getOrdersByBillingDate_args setStart_billing_date(long start_billing_date) {
8770
      this.start_billing_date = start_billing_date;
8771
      setStart_billing_dateIsSet(true);
8772
      return this;
8773
    }
8774
 
8775
    public void unsetStart_billing_date() {
8776
      __isset_bit_vector.clear(__START_BILLING_DATE_ISSET_ID);
8777
    }
8778
 
8779
    /** Returns true if field start_billing_date is set (has been asigned a value) and false otherwise */
8780
    public boolean isSetStart_billing_date() {
8781
      return __isset_bit_vector.get(__START_BILLING_DATE_ISSET_ID);
8782
    }
8783
 
8784
    public void setStart_billing_dateIsSet(boolean value) {
8785
      __isset_bit_vector.set(__START_BILLING_DATE_ISSET_ID, value);
8786
    }
8787
 
8788
    public long getEnd_billing_date() {
8789
      return this.end_billing_date;
8790
    }
8791
 
8792
    public getOrdersByBillingDate_args setEnd_billing_date(long end_billing_date) {
8793
      this.end_billing_date = end_billing_date;
8794
      setEnd_billing_dateIsSet(true);
8795
      return this;
8796
    }
8797
 
8798
    public void unsetEnd_billing_date() {
8799
      __isset_bit_vector.clear(__END_BILLING_DATE_ISSET_ID);
8800
    }
8801
 
8802
    /** Returns true if field end_billing_date is set (has been asigned a value) and false otherwise */
8803
    public boolean isSetEnd_billing_date() {
8804
      return __isset_bit_vector.get(__END_BILLING_DATE_ISSET_ID);
8805
    }
8806
 
8807
    public void setEnd_billing_dateIsSet(boolean value) {
8808
      __isset_bit_vector.set(__END_BILLING_DATE_ISSET_ID, value);
8809
    }
8810
 
8811
    public long getWarehouse_id() {
8812
      return this.warehouse_id;
8813
    }
8814
 
8815
    public getOrdersByBillingDate_args setWarehouse_id(long warehouse_id) {
8816
      this.warehouse_id = warehouse_id;
8817
      setWarehouse_idIsSet(true);
8818
      return this;
8819
    }
8820
 
8821
    public void unsetWarehouse_id() {
8822
      __isset_bit_vector.clear(__WAREHOUSE_ID_ISSET_ID);
8823
    }
8824
 
8825
    /** Returns true if field warehouse_id is set (has been asigned a value) and false otherwise */
8826
    public boolean isSetWarehouse_id() {
8827
      return __isset_bit_vector.get(__WAREHOUSE_ID_ISSET_ID);
8828
    }
8829
 
8830
    public void setWarehouse_idIsSet(boolean value) {
8831
      __isset_bit_vector.set(__WAREHOUSE_ID_ISSET_ID, value);
8832
    }
8833
 
8834
    public void setFieldValue(_Fields field, Object value) {
8835
      switch (field) {
8836
      case STATUS:
8837
        if (value == null) {
8838
          unsetStatus();
8839
        } else {
8840
          setStatus((OrderStatus)value);
8841
        }
8842
        break;
8843
 
8844
      case START_BILLING_DATE:
8845
        if (value == null) {
8846
          unsetStart_billing_date();
8847
        } else {
8848
          setStart_billing_date((Long)value);
8849
        }
8850
        break;
8851
 
8852
      case END_BILLING_DATE:
8853
        if (value == null) {
8854
          unsetEnd_billing_date();
8855
        } else {
8856
          setEnd_billing_date((Long)value);
8857
        }
8858
        break;
8859
 
8860
      case WAREHOUSE_ID:
8861
        if (value == null) {
8862
          unsetWarehouse_id();
8863
        } else {
8864
          setWarehouse_id((Long)value);
8865
        }
8866
        break;
8867
 
8868
      }
8869
    }
8870
 
8871
    public void setFieldValue(int fieldID, Object value) {
8872
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
8873
    }
8874
 
8875
    public Object getFieldValue(_Fields field) {
8876
      switch (field) {
8877
      case STATUS:
8878
        return getStatus();
8879
 
8880
      case START_BILLING_DATE:
8881
        return new Long(getStart_billing_date());
8882
 
8883
      case END_BILLING_DATE:
8884
        return new Long(getEnd_billing_date());
8885
 
8886
      case WAREHOUSE_ID:
8887
        return new Long(getWarehouse_id());
8888
 
8889
      }
8890
      throw new IllegalStateException();
8891
    }
8892
 
8893
    public Object getFieldValue(int fieldId) {
8894
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
8895
    }
8896
 
8897
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
8898
    public boolean isSet(_Fields field) {
8899
      switch (field) {
8900
      case STATUS:
8901
        return isSetStatus();
8902
      case START_BILLING_DATE:
8903
        return isSetStart_billing_date();
8904
      case END_BILLING_DATE:
8905
        return isSetEnd_billing_date();
8906
      case WAREHOUSE_ID:
8907
        return isSetWarehouse_id();
8908
      }
8909
      throw new IllegalStateException();
8910
    }
8911
 
8912
    public boolean isSet(int fieldID) {
8913
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
8914
    }
8915
 
8916
    @Override
8917
    public boolean equals(Object that) {
8918
      if (that == null)
8919
        return false;
8920
      if (that instanceof getOrdersByBillingDate_args)
8921
        return this.equals((getOrdersByBillingDate_args)that);
8922
      return false;
8923
    }
8924
 
8925
    public boolean equals(getOrdersByBillingDate_args that) {
8926
      if (that == null)
8927
        return false;
8928
 
8929
      boolean this_present_status = true && this.isSetStatus();
8930
      boolean that_present_status = true && that.isSetStatus();
8931
      if (this_present_status || that_present_status) {
8932
        if (!(this_present_status && that_present_status))
8933
          return false;
8934
        if (!this.status.equals(that.status))
8935
          return false;
8936
      }
8937
 
8938
      boolean this_present_start_billing_date = true;
8939
      boolean that_present_start_billing_date = true;
8940
      if (this_present_start_billing_date || that_present_start_billing_date) {
8941
        if (!(this_present_start_billing_date && that_present_start_billing_date))
8942
          return false;
8943
        if (this.start_billing_date != that.start_billing_date)
8944
          return false;
8945
      }
8946
 
8947
      boolean this_present_end_billing_date = true;
8948
      boolean that_present_end_billing_date = true;
8949
      if (this_present_end_billing_date || that_present_end_billing_date) {
8950
        if (!(this_present_end_billing_date && that_present_end_billing_date))
8951
          return false;
8952
        if (this.end_billing_date != that.end_billing_date)
8953
          return false;
8954
      }
8955
 
8956
      boolean this_present_warehouse_id = true;
8957
      boolean that_present_warehouse_id = true;
8958
      if (this_present_warehouse_id || that_present_warehouse_id) {
8959
        if (!(this_present_warehouse_id && that_present_warehouse_id))
8960
          return false;
8961
        if (this.warehouse_id != that.warehouse_id)
8962
          return false;
8963
      }
8964
 
8965
      return true;
8966
    }
8967
 
8968
    @Override
8969
    public int hashCode() {
8970
      return 0;
8971
    }
8972
 
8973
    public int compareTo(getOrdersByBillingDate_args other) {
8974
      if (!getClass().equals(other.getClass())) {
8975
        return getClass().getName().compareTo(other.getClass().getName());
8976
      }
8977
 
8978
      int lastComparison = 0;
8979
      getOrdersByBillingDate_args typedOther = (getOrdersByBillingDate_args)other;
8980
 
8981
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
8982
      if (lastComparison != 0) {
8983
        return lastComparison;
8984
      }
8985
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
8986
      if (lastComparison != 0) {
8987
        return lastComparison;
8988
      }
8989
      lastComparison = Boolean.valueOf(isSetStart_billing_date()).compareTo(isSetStart_billing_date());
8990
      if (lastComparison != 0) {
8991
        return lastComparison;
8992
      }
8993
      lastComparison = TBaseHelper.compareTo(start_billing_date, typedOther.start_billing_date);
8994
      if (lastComparison != 0) {
8995
        return lastComparison;
8996
      }
8997
      lastComparison = Boolean.valueOf(isSetEnd_billing_date()).compareTo(isSetEnd_billing_date());
8998
      if (lastComparison != 0) {
8999
        return lastComparison;
9000
      }
9001
      lastComparison = TBaseHelper.compareTo(end_billing_date, typedOther.end_billing_date);
9002
      if (lastComparison != 0) {
9003
        return lastComparison;
9004
      }
9005
      lastComparison = Boolean.valueOf(isSetWarehouse_id()).compareTo(isSetWarehouse_id());
9006
      if (lastComparison != 0) {
9007
        return lastComparison;
9008
      }
9009
      lastComparison = TBaseHelper.compareTo(warehouse_id, typedOther.warehouse_id);
9010
      if (lastComparison != 0) {
9011
        return lastComparison;
9012
      }
9013
      return 0;
9014
    }
9015
 
9016
    public void read(TProtocol iprot) throws TException {
9017
      TField field;
9018
      iprot.readStructBegin();
9019
      while (true)
9020
      {
9021
        field = iprot.readFieldBegin();
9022
        if (field.type == TType.STOP) { 
9023
          break;
9024
        }
9025
        _Fields fieldId = _Fields.findByThriftId(field.id);
9026
        if (fieldId == null) {
9027
          TProtocolUtil.skip(iprot, field.type);
9028
        } else {
9029
          switch (fieldId) {
9030
            case STATUS:
9031
              if (field.type == TType.I32) {
9032
                this.status = OrderStatus.findByValue(iprot.readI32());
9033
              } else { 
9034
                TProtocolUtil.skip(iprot, field.type);
9035
              }
9036
              break;
9037
            case START_BILLING_DATE:
9038
              if (field.type == TType.I64) {
9039
                this.start_billing_date = iprot.readI64();
9040
                setStart_billing_dateIsSet(true);
9041
              } else { 
9042
                TProtocolUtil.skip(iprot, field.type);
9043
              }
9044
              break;
9045
            case END_BILLING_DATE:
9046
              if (field.type == TType.I64) {
9047
                this.end_billing_date = iprot.readI64();
9048
                setEnd_billing_dateIsSet(true);
9049
              } else { 
9050
                TProtocolUtil.skip(iprot, field.type);
9051
              }
9052
              break;
9053
            case WAREHOUSE_ID:
9054
              if (field.type == TType.I64) {
9055
                this.warehouse_id = iprot.readI64();
9056
                setWarehouse_idIsSet(true);
9057
              } else { 
9058
                TProtocolUtil.skip(iprot, field.type);
9059
              }
9060
              break;
9061
          }
9062
          iprot.readFieldEnd();
9063
        }
9064
      }
9065
      iprot.readStructEnd();
9066
      validate();
9067
    }
9068
 
9069
    public void write(TProtocol oprot) throws TException {
9070
      validate();
9071
 
9072
      oprot.writeStructBegin(STRUCT_DESC);
9073
      if (this.status != null) {
9074
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
9075
        oprot.writeI32(this.status.getValue());
9076
        oprot.writeFieldEnd();
9077
      }
9078
      oprot.writeFieldBegin(START_BILLING_DATE_FIELD_DESC);
9079
      oprot.writeI64(this.start_billing_date);
9080
      oprot.writeFieldEnd();
9081
      oprot.writeFieldBegin(END_BILLING_DATE_FIELD_DESC);
9082
      oprot.writeI64(this.end_billing_date);
9083
      oprot.writeFieldEnd();
9084
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
9085
      oprot.writeI64(this.warehouse_id);
9086
      oprot.writeFieldEnd();
9087
      oprot.writeFieldStop();
9088
      oprot.writeStructEnd();
9089
    }
9090
 
9091
    @Override
9092
    public String toString() {
9093
      StringBuilder sb = new StringBuilder("getOrdersByBillingDate_args(");
9094
      boolean first = true;
9095
 
9096
      sb.append("status:");
9097
      if (this.status == null) {
9098
        sb.append("null");
9099
      } else {
9100
        String status_name = status.name();
9101
        if (status_name != null) {
9102
          sb.append(status_name);
9103
          sb.append(" (");
9104
        }
9105
        sb.append(this.status);
9106
        if (status_name != null) {
9107
          sb.append(")");
9108
        }
9109
      }
9110
      first = false;
9111
      if (!first) sb.append(", ");
9112
      sb.append("start_billing_date:");
9113
      sb.append(this.start_billing_date);
9114
      first = false;
9115
      if (!first) sb.append(", ");
9116
      sb.append("end_billing_date:");
9117
      sb.append(this.end_billing_date);
9118
      first = false;
9119
      if (!first) sb.append(", ");
9120
      sb.append("warehouse_id:");
9121
      sb.append(this.warehouse_id);
9122
      first = false;
9123
      sb.append(")");
9124
      return sb.toString();
9125
    }
9126
 
9127
    public void validate() throws TException {
9128
      // check for required fields
9129
    }
9130
 
9131
  }
9132
 
9133
  public static class getOrdersByBillingDate_result implements TBase<getOrdersByBillingDate_result._Fields>, java.io.Serializable, Cloneable, Comparable<getOrdersByBillingDate_result>   {
9134
    private static final TStruct STRUCT_DESC = new TStruct("getOrdersByBillingDate_result");
9135
 
9136
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
9137
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
9138
 
9139
    private List<Order> success;
9140
    private TransactionServiceException ex;
9141
 
9142
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9143
    public enum _Fields implements TFieldIdEnum {
9144
      SUCCESS((short)0, "success"),
9145
      EX((short)1, "ex");
9146
 
9147
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
9148
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9149
 
9150
      static {
9151
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9152
          byId.put((int)field._thriftId, field);
9153
          byName.put(field.getFieldName(), field);
9154
        }
9155
      }
9156
 
9157
      /**
9158
       * Find the _Fields constant that matches fieldId, or null if its not found.
9159
       */
9160
      public static _Fields findByThriftId(int fieldId) {
9161
        return byId.get(fieldId);
9162
      }
9163
 
9164
      /**
9165
       * Find the _Fields constant that matches fieldId, throwing an exception
9166
       * if it is not found.
9167
       */
9168
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9169
        _Fields fields = findByThriftId(fieldId);
9170
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9171
        return fields;
9172
      }
9173
 
9174
      /**
9175
       * Find the _Fields constant that matches name, or null if its not found.
9176
       */
9177
      public static _Fields findByName(String name) {
9178
        return byName.get(name);
9179
      }
9180
 
9181
      private final short _thriftId;
9182
      private final String _fieldName;
9183
 
9184
      _Fields(short thriftId, String fieldName) {
9185
        _thriftId = thriftId;
9186
        _fieldName = fieldName;
9187
      }
9188
 
9189
      public short getThriftFieldId() {
9190
        return _thriftId;
9191
      }
9192
 
9193
      public String getFieldName() {
9194
        return _fieldName;
9195
      }
9196
    }
9197
 
9198
    // isset id assignments
9199
 
9200
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
9201
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
9202
          new ListMetaData(TType.LIST, 
9203
              new StructMetaData(TType.STRUCT, Order.class))));
9204
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
9205
          new FieldValueMetaData(TType.STRUCT)));
9206
    }});
9207
 
9208
    static {
9209
      FieldMetaData.addStructMetaDataMap(getOrdersByBillingDate_result.class, metaDataMap);
9210
    }
9211
 
9212
    public getOrdersByBillingDate_result() {
9213
    }
9214
 
9215
    public getOrdersByBillingDate_result(
9216
      List<Order> success,
9217
      TransactionServiceException ex)
9218
    {
9219
      this();
9220
      this.success = success;
9221
      this.ex = ex;
9222
    }
9223
 
9224
    /**
9225
     * Performs a deep copy on <i>other</i>.
9226
     */
9227
    public getOrdersByBillingDate_result(getOrdersByBillingDate_result other) {
9228
      if (other.isSetSuccess()) {
9229
        List<Order> __this__success = new ArrayList<Order>();
9230
        for (Order other_element : other.success) {
9231
          __this__success.add(new Order(other_element));
9232
        }
9233
        this.success = __this__success;
9234
      }
9235
      if (other.isSetEx()) {
9236
        this.ex = new TransactionServiceException(other.ex);
9237
      }
9238
    }
9239
 
9240
    public getOrdersByBillingDate_result deepCopy() {
9241
      return new getOrdersByBillingDate_result(this);
9242
    }
9243
 
9244
    @Deprecated
9245
    public getOrdersByBillingDate_result clone() {
9246
      return new getOrdersByBillingDate_result(this);
9247
    }
9248
 
9249
    public int getSuccessSize() {
9250
      return (this.success == null) ? 0 : this.success.size();
9251
    }
9252
 
9253
    public java.util.Iterator<Order> getSuccessIterator() {
9254
      return (this.success == null) ? null : this.success.iterator();
9255
    }
9256
 
9257
    public void addToSuccess(Order elem) {
9258
      if (this.success == null) {
9259
        this.success = new ArrayList<Order>();
9260
      }
9261
      this.success.add(elem);
9262
    }
9263
 
9264
    public List<Order> getSuccess() {
9265
      return this.success;
9266
    }
9267
 
9268
    public getOrdersByBillingDate_result setSuccess(List<Order> success) {
9269
      this.success = success;
9270
      return this;
9271
    }
9272
 
9273
    public void unsetSuccess() {
9274
      this.success = null;
9275
    }
9276
 
9277
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
9278
    public boolean isSetSuccess() {
9279
      return this.success != null;
9280
    }
9281
 
9282
    public void setSuccessIsSet(boolean value) {
9283
      if (!value) {
9284
        this.success = null;
9285
      }
9286
    }
9287
 
9288
    public TransactionServiceException getEx() {
9289
      return this.ex;
9290
    }
9291
 
9292
    public getOrdersByBillingDate_result setEx(TransactionServiceException ex) {
9293
      this.ex = ex;
9294
      return this;
9295
    }
9296
 
9297
    public void unsetEx() {
9298
      this.ex = null;
9299
    }
9300
 
9301
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
9302
    public boolean isSetEx() {
9303
      return this.ex != null;
9304
    }
9305
 
9306
    public void setExIsSet(boolean value) {
9307
      if (!value) {
9308
        this.ex = null;
9309
      }
9310
    }
9311
 
9312
    public void setFieldValue(_Fields field, Object value) {
9313
      switch (field) {
9314
      case SUCCESS:
9315
        if (value == null) {
9316
          unsetSuccess();
9317
        } else {
9318
          setSuccess((List<Order>)value);
9319
        }
9320
        break;
9321
 
9322
      case EX:
9323
        if (value == null) {
9324
          unsetEx();
9325
        } else {
9326
          setEx((TransactionServiceException)value);
9327
        }
9328
        break;
9329
 
9330
      }
9331
    }
9332
 
9333
    public void setFieldValue(int fieldID, Object value) {
9334
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
9335
    }
9336
 
9337
    public Object getFieldValue(_Fields field) {
9338
      switch (field) {
9339
      case SUCCESS:
9340
        return getSuccess();
9341
 
9342
      case EX:
9343
        return getEx();
9344
 
9345
      }
9346
      throw new IllegalStateException();
9347
    }
9348
 
9349
    public Object getFieldValue(int fieldId) {
9350
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
9351
    }
9352
 
9353
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
9354
    public boolean isSet(_Fields field) {
9355
      switch (field) {
9356
      case SUCCESS:
9357
        return isSetSuccess();
9358
      case EX:
9359
        return isSetEx();
9360
      }
9361
      throw new IllegalStateException();
9362
    }
9363
 
9364
    public boolean isSet(int fieldID) {
9365
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
9366
    }
9367
 
9368
    @Override
9369
    public boolean equals(Object that) {
9370
      if (that == null)
9371
        return false;
9372
      if (that instanceof getOrdersByBillingDate_result)
9373
        return this.equals((getOrdersByBillingDate_result)that);
9374
      return false;
9375
    }
9376
 
9377
    public boolean equals(getOrdersByBillingDate_result that) {
9378
      if (that == null)
9379
        return false;
9380
 
9381
      boolean this_present_success = true && this.isSetSuccess();
9382
      boolean that_present_success = true && that.isSetSuccess();
9383
      if (this_present_success || that_present_success) {
9384
        if (!(this_present_success && that_present_success))
9385
          return false;
9386
        if (!this.success.equals(that.success))
9387
          return false;
9388
      }
9389
 
9390
      boolean this_present_ex = true && this.isSetEx();
9391
      boolean that_present_ex = true && that.isSetEx();
9392
      if (this_present_ex || that_present_ex) {
9393
        if (!(this_present_ex && that_present_ex))
9394
          return false;
9395
        if (!this.ex.equals(that.ex))
9396
          return false;
9397
      }
9398
 
9399
      return true;
9400
    }
9401
 
9402
    @Override
9403
    public int hashCode() {
9404
      return 0;
9405
    }
9406
 
9407
    public int compareTo(getOrdersByBillingDate_result other) {
9408
      if (!getClass().equals(other.getClass())) {
9409
        return getClass().getName().compareTo(other.getClass().getName());
9410
      }
9411
 
9412
      int lastComparison = 0;
9413
      getOrdersByBillingDate_result typedOther = (getOrdersByBillingDate_result)other;
9414
 
9415
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
9416
      if (lastComparison != 0) {
9417
        return lastComparison;
9418
      }
9419
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
9420
      if (lastComparison != 0) {
9421
        return lastComparison;
9422
      }
9423
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
9424
      if (lastComparison != 0) {
9425
        return lastComparison;
9426
      }
9427
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
9428
      if (lastComparison != 0) {
9429
        return lastComparison;
9430
      }
9431
      return 0;
9432
    }
9433
 
9434
    public void read(TProtocol iprot) throws TException {
9435
      TField field;
9436
      iprot.readStructBegin();
9437
      while (true)
9438
      {
9439
        field = iprot.readFieldBegin();
9440
        if (field.type == TType.STOP) { 
9441
          break;
9442
        }
9443
        _Fields fieldId = _Fields.findByThriftId(field.id);
9444
        if (fieldId == null) {
9445
          TProtocolUtil.skip(iprot, field.type);
9446
        } else {
9447
          switch (fieldId) {
9448
            case SUCCESS:
9449
              if (field.type == TType.LIST) {
9450
                {
9451
                  TList _list20 = iprot.readListBegin();
9452
                  this.success = new ArrayList<Order>(_list20.size);
9453
                  for (int _i21 = 0; _i21 < _list20.size; ++_i21)
9454
                  {
9455
                    Order _elem22;
9456
                    _elem22 = new Order();
9457
                    _elem22.read(iprot);
9458
                    this.success.add(_elem22);
9459
                  }
9460
                  iprot.readListEnd();
9461
                }
9462
              } else { 
9463
                TProtocolUtil.skip(iprot, field.type);
9464
              }
9465
              break;
9466
            case EX:
9467
              if (field.type == TType.STRUCT) {
9468
                this.ex = new TransactionServiceException();
9469
                this.ex.read(iprot);
9470
              } else { 
9471
                TProtocolUtil.skip(iprot, field.type);
9472
              }
9473
              break;
9474
          }
9475
          iprot.readFieldEnd();
9476
        }
9477
      }
9478
      iprot.readStructEnd();
9479
      validate();
9480
    }
9481
 
9482
    public void write(TProtocol oprot) throws TException {
9483
      oprot.writeStructBegin(STRUCT_DESC);
9484
 
9485
      if (this.isSetSuccess()) {
9486
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
9487
        {
9488
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
9489
          for (Order _iter23 : this.success)
9490
          {
9491
            _iter23.write(oprot);
9492
          }
9493
          oprot.writeListEnd();
9494
        }
9495
        oprot.writeFieldEnd();
9496
      } else if (this.isSetEx()) {
9497
        oprot.writeFieldBegin(EX_FIELD_DESC);
9498
        this.ex.write(oprot);
9499
        oprot.writeFieldEnd();
9500
      }
9501
      oprot.writeFieldStop();
9502
      oprot.writeStructEnd();
9503
    }
9504
 
9505
    @Override
9506
    public String toString() {
9507
      StringBuilder sb = new StringBuilder("getOrdersByBillingDate_result(");
9508
      boolean first = true;
9509
 
9510
      sb.append("success:");
9511
      if (this.success == null) {
9512
        sb.append("null");
9513
      } else {
9514
        sb.append(this.success);
9515
      }
9516
      first = false;
9517
      if (!first) sb.append(", ");
9518
      sb.append("ex:");
9519
      if (this.ex == null) {
9520
        sb.append("null");
9521
      } else {
9522
        sb.append(this.ex);
9523
      }
9524
      first = false;
9525
      sb.append(")");
9526
      return sb.toString();
9527
    }
9528
 
9529
    public void validate() throws TException {
9530
      // check for required fields
9531
    }
9532
 
9533
  }
9534
 
1382 varun.gupt 9535
  public static class getReturnableOrdersForCustomer_args implements TBase<getReturnableOrdersForCustomer_args._Fields>, java.io.Serializable, Cloneable, Comparable<getReturnableOrdersForCustomer_args>   {
9536
    private static final TStruct STRUCT_DESC = new TStruct("getReturnableOrdersForCustomer_args");
9537
 
9538
    private static final TField CUSTOMER_ID_FIELD_DESC = new TField("customer_id", TType.I64, (short)1);
9539
    private static final TField LIMIT_FIELD_DESC = new TField("limit", TType.I64, (short)2);
9540
 
9541
    private long customer_id;
9542
    private long limit;
9543
 
9544
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9545
    public enum _Fields implements TFieldIdEnum {
9546
      CUSTOMER_ID((short)1, "customer_id"),
9547
      LIMIT((short)2, "limit");
9548
 
9549
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
9550
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9551
 
9552
      static {
9553
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9554
          byId.put((int)field._thriftId, field);
9555
          byName.put(field.getFieldName(), field);
9556
        }
9557
      }
9558
 
9559
      /**
9560
       * Find the _Fields constant that matches fieldId, or null if its not found.
9561
       */
9562
      public static _Fields findByThriftId(int fieldId) {
9563
        return byId.get(fieldId);
9564
      }
9565
 
9566
      /**
9567
       * Find the _Fields constant that matches fieldId, throwing an exception
9568
       * if it is not found.
9569
       */
9570
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9571
        _Fields fields = findByThriftId(fieldId);
9572
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9573
        return fields;
9574
      }
9575
 
9576
      /**
9577
       * Find the _Fields constant that matches name, or null if its not found.
9578
       */
9579
      public static _Fields findByName(String name) {
9580
        return byName.get(name);
9581
      }
9582
 
9583
      private final short _thriftId;
9584
      private final String _fieldName;
9585
 
9586
      _Fields(short thriftId, String fieldName) {
9587
        _thriftId = thriftId;
9588
        _fieldName = fieldName;
9589
      }
9590
 
9591
      public short getThriftFieldId() {
9592
        return _thriftId;
9593
      }
9594
 
9595
      public String getFieldName() {
9596
        return _fieldName;
9597
      }
9598
    }
9599
 
9600
    // isset id assignments
9601
    private static final int __CUSTOMER_ID_ISSET_ID = 0;
9602
    private static final int __LIMIT_ISSET_ID = 1;
9603
    private BitSet __isset_bit_vector = new BitSet(2);
9604
 
9605
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
9606
      put(_Fields.CUSTOMER_ID, new FieldMetaData("customer_id", TFieldRequirementType.DEFAULT, 
9607
          new FieldValueMetaData(TType.I64)));
9608
      put(_Fields.LIMIT, new FieldMetaData("limit", TFieldRequirementType.DEFAULT, 
9609
          new FieldValueMetaData(TType.I64)));
9610
    }});
9611
 
9612
    static {
9613
      FieldMetaData.addStructMetaDataMap(getReturnableOrdersForCustomer_args.class, metaDataMap);
9614
    }
9615
 
9616
    public getReturnableOrdersForCustomer_args() {
9617
    }
9618
 
9619
    public getReturnableOrdersForCustomer_args(
9620
      long customer_id,
9621
      long limit)
9622
    {
9623
      this();
9624
      this.customer_id = customer_id;
9625
      setCustomer_idIsSet(true);
9626
      this.limit = limit;
9627
      setLimitIsSet(true);
9628
    }
9629
 
9630
    /**
9631
     * Performs a deep copy on <i>other</i>.
9632
     */
9633
    public getReturnableOrdersForCustomer_args(getReturnableOrdersForCustomer_args other) {
9634
      __isset_bit_vector.clear();
9635
      __isset_bit_vector.or(other.__isset_bit_vector);
9636
      this.customer_id = other.customer_id;
9637
      this.limit = other.limit;
9638
    }
9639
 
9640
    public getReturnableOrdersForCustomer_args deepCopy() {
9641
      return new getReturnableOrdersForCustomer_args(this);
9642
    }
9643
 
9644
    @Deprecated
9645
    public getReturnableOrdersForCustomer_args clone() {
9646
      return new getReturnableOrdersForCustomer_args(this);
9647
    }
9648
 
9649
    public long getCustomer_id() {
9650
      return this.customer_id;
9651
    }
9652
 
9653
    public getReturnableOrdersForCustomer_args setCustomer_id(long customer_id) {
9654
      this.customer_id = customer_id;
9655
      setCustomer_idIsSet(true);
9656
      return this;
9657
    }
9658
 
9659
    public void unsetCustomer_id() {
9660
      __isset_bit_vector.clear(__CUSTOMER_ID_ISSET_ID);
9661
    }
9662
 
9663
    /** Returns true if field customer_id is set (has been asigned a value) and false otherwise */
9664
    public boolean isSetCustomer_id() {
9665
      return __isset_bit_vector.get(__CUSTOMER_ID_ISSET_ID);
9666
    }
9667
 
9668
    public void setCustomer_idIsSet(boolean value) {
9669
      __isset_bit_vector.set(__CUSTOMER_ID_ISSET_ID, value);
9670
    }
9671
 
9672
    public long getLimit() {
9673
      return this.limit;
9674
    }
9675
 
9676
    public getReturnableOrdersForCustomer_args setLimit(long limit) {
9677
      this.limit = limit;
9678
      setLimitIsSet(true);
9679
      return this;
9680
    }
9681
 
9682
    public void unsetLimit() {
9683
      __isset_bit_vector.clear(__LIMIT_ISSET_ID);
9684
    }
9685
 
9686
    /** Returns true if field limit is set (has been asigned a value) and false otherwise */
9687
    public boolean isSetLimit() {
9688
      return __isset_bit_vector.get(__LIMIT_ISSET_ID);
9689
    }
9690
 
9691
    public void setLimitIsSet(boolean value) {
9692
      __isset_bit_vector.set(__LIMIT_ISSET_ID, value);
9693
    }
9694
 
9695
    public void setFieldValue(_Fields field, Object value) {
9696
      switch (field) {
9697
      case CUSTOMER_ID:
9698
        if (value == null) {
9699
          unsetCustomer_id();
9700
        } else {
9701
          setCustomer_id((Long)value);
9702
        }
9703
        break;
9704
 
9705
      case LIMIT:
9706
        if (value == null) {
9707
          unsetLimit();
9708
        } else {
9709
          setLimit((Long)value);
9710
        }
9711
        break;
9712
 
9713
      }
9714
    }
9715
 
9716
    public void setFieldValue(int fieldID, Object value) {
9717
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
9718
    }
9719
 
9720
    public Object getFieldValue(_Fields field) {
9721
      switch (field) {
9722
      case CUSTOMER_ID:
9723
        return new Long(getCustomer_id());
9724
 
9725
      case LIMIT:
9726
        return new Long(getLimit());
9727
 
9728
      }
9729
      throw new IllegalStateException();
9730
    }
9731
 
9732
    public Object getFieldValue(int fieldId) {
9733
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
9734
    }
9735
 
9736
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
9737
    public boolean isSet(_Fields field) {
9738
      switch (field) {
9739
      case CUSTOMER_ID:
9740
        return isSetCustomer_id();
9741
      case LIMIT:
9742
        return isSetLimit();
9743
      }
9744
      throw new IllegalStateException();
9745
    }
9746
 
9747
    public boolean isSet(int fieldID) {
9748
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
9749
    }
9750
 
9751
    @Override
9752
    public boolean equals(Object that) {
9753
      if (that == null)
9754
        return false;
9755
      if (that instanceof getReturnableOrdersForCustomer_args)
9756
        return this.equals((getReturnableOrdersForCustomer_args)that);
9757
      return false;
9758
    }
9759
 
9760
    public boolean equals(getReturnableOrdersForCustomer_args that) {
9761
      if (that == null)
9762
        return false;
9763
 
9764
      boolean this_present_customer_id = true;
9765
      boolean that_present_customer_id = true;
9766
      if (this_present_customer_id || that_present_customer_id) {
9767
        if (!(this_present_customer_id && that_present_customer_id))
9768
          return false;
9769
        if (this.customer_id != that.customer_id)
9770
          return false;
9771
      }
9772
 
9773
      boolean this_present_limit = true;
9774
      boolean that_present_limit = true;
9775
      if (this_present_limit || that_present_limit) {
9776
        if (!(this_present_limit && that_present_limit))
9777
          return false;
9778
        if (this.limit != that.limit)
9779
          return false;
9780
      }
9781
 
9782
      return true;
9783
    }
9784
 
9785
    @Override
9786
    public int hashCode() {
9787
      return 0;
9788
    }
9789
 
9790
    public int compareTo(getReturnableOrdersForCustomer_args other) {
9791
      if (!getClass().equals(other.getClass())) {
9792
        return getClass().getName().compareTo(other.getClass().getName());
9793
      }
9794
 
9795
      int lastComparison = 0;
9796
      getReturnableOrdersForCustomer_args typedOther = (getReturnableOrdersForCustomer_args)other;
9797
 
9798
      lastComparison = Boolean.valueOf(isSetCustomer_id()).compareTo(isSetCustomer_id());
9799
      if (lastComparison != 0) {
9800
        return lastComparison;
9801
      }
9802
      lastComparison = TBaseHelper.compareTo(customer_id, typedOther.customer_id);
9803
      if (lastComparison != 0) {
9804
        return lastComparison;
9805
      }
9806
      lastComparison = Boolean.valueOf(isSetLimit()).compareTo(isSetLimit());
9807
      if (lastComparison != 0) {
9808
        return lastComparison;
9809
      }
9810
      lastComparison = TBaseHelper.compareTo(limit, typedOther.limit);
9811
      if (lastComparison != 0) {
9812
        return lastComparison;
9813
      }
9814
      return 0;
9815
    }
9816
 
9817
    public void read(TProtocol iprot) throws TException {
9818
      TField field;
9819
      iprot.readStructBegin();
9820
      while (true)
9821
      {
9822
        field = iprot.readFieldBegin();
9823
        if (field.type == TType.STOP) { 
9824
          break;
9825
        }
9826
        _Fields fieldId = _Fields.findByThriftId(field.id);
9827
        if (fieldId == null) {
9828
          TProtocolUtil.skip(iprot, field.type);
9829
        } else {
9830
          switch (fieldId) {
9831
            case CUSTOMER_ID:
9832
              if (field.type == TType.I64) {
9833
                this.customer_id = iprot.readI64();
9834
                setCustomer_idIsSet(true);
9835
              } else { 
9836
                TProtocolUtil.skip(iprot, field.type);
9837
              }
9838
              break;
9839
            case LIMIT:
9840
              if (field.type == TType.I64) {
9841
                this.limit = iprot.readI64();
9842
                setLimitIsSet(true);
9843
              } else { 
9844
                TProtocolUtil.skip(iprot, field.type);
9845
              }
9846
              break;
9847
          }
9848
          iprot.readFieldEnd();
9849
        }
9850
      }
9851
      iprot.readStructEnd();
9852
      validate();
9853
    }
9854
 
9855
    public void write(TProtocol oprot) throws TException {
9856
      validate();
9857
 
9858
      oprot.writeStructBegin(STRUCT_DESC);
9859
      oprot.writeFieldBegin(CUSTOMER_ID_FIELD_DESC);
9860
      oprot.writeI64(this.customer_id);
9861
      oprot.writeFieldEnd();
9862
      oprot.writeFieldBegin(LIMIT_FIELD_DESC);
9863
      oprot.writeI64(this.limit);
9864
      oprot.writeFieldEnd();
9865
      oprot.writeFieldStop();
9866
      oprot.writeStructEnd();
9867
    }
9868
 
9869
    @Override
9870
    public String toString() {
9871
      StringBuilder sb = new StringBuilder("getReturnableOrdersForCustomer_args(");
9872
      boolean first = true;
9873
 
9874
      sb.append("customer_id:");
9875
      sb.append(this.customer_id);
9876
      first = false;
9877
      if (!first) sb.append(", ");
9878
      sb.append("limit:");
9879
      sb.append(this.limit);
9880
      first = false;
9881
      sb.append(")");
9882
      return sb.toString();
9883
    }
9884
 
9885
    public void validate() throws TException {
9886
      // check for required fields
9887
    }
9888
 
9889
  }
9890
 
9891
  public static class getReturnableOrdersForCustomer_result implements TBase<getReturnableOrdersForCustomer_result._Fields>, java.io.Serializable, Cloneable, Comparable<getReturnableOrdersForCustomer_result>   {
9892
    private static final TStruct STRUCT_DESC = new TStruct("getReturnableOrdersForCustomer_result");
9893
 
9894
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
9895
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
9896
 
9897
    private List<Long> success;
9898
    private TransactionServiceException ex;
9899
 
9900
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9901
    public enum _Fields implements TFieldIdEnum {
9902
      SUCCESS((short)0, "success"),
9903
      EX((short)1, "ex");
9904
 
9905
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
9906
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9907
 
9908
      static {
9909
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9910
          byId.put((int)field._thriftId, field);
9911
          byName.put(field.getFieldName(), field);
9912
        }
9913
      }
9914
 
9915
      /**
9916
       * Find the _Fields constant that matches fieldId, or null if its not found.
9917
       */
9918
      public static _Fields findByThriftId(int fieldId) {
9919
        return byId.get(fieldId);
9920
      }
9921
 
9922
      /**
9923
       * Find the _Fields constant that matches fieldId, throwing an exception
9924
       * if it is not found.
9925
       */
9926
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9927
        _Fields fields = findByThriftId(fieldId);
9928
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9929
        return fields;
9930
      }
9931
 
9932
      /**
9933
       * Find the _Fields constant that matches name, or null if its not found.
9934
       */
9935
      public static _Fields findByName(String name) {
9936
        return byName.get(name);
9937
      }
9938
 
9939
      private final short _thriftId;
9940
      private final String _fieldName;
9941
 
9942
      _Fields(short thriftId, String fieldName) {
9943
        _thriftId = thriftId;
9944
        _fieldName = fieldName;
9945
      }
9946
 
9947
      public short getThriftFieldId() {
9948
        return _thriftId;
9949
      }
9950
 
9951
      public String getFieldName() {
9952
        return _fieldName;
9953
      }
9954
    }
9955
 
9956
    // isset id assignments
9957
 
9958
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
9959
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
9960
          new ListMetaData(TType.LIST, 
9961
              new FieldValueMetaData(TType.I64))));
9962
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
9963
          new FieldValueMetaData(TType.STRUCT)));
9964
    }});
9965
 
9966
    static {
9967
      FieldMetaData.addStructMetaDataMap(getReturnableOrdersForCustomer_result.class, metaDataMap);
9968
    }
9969
 
9970
    public getReturnableOrdersForCustomer_result() {
9971
    }
9972
 
9973
    public getReturnableOrdersForCustomer_result(
9974
      List<Long> success,
9975
      TransactionServiceException ex)
9976
    {
9977
      this();
9978
      this.success = success;
9979
      this.ex = ex;
9980
    }
9981
 
9982
    /**
9983
     * Performs a deep copy on <i>other</i>.
9984
     */
9985
    public getReturnableOrdersForCustomer_result(getReturnableOrdersForCustomer_result other) {
9986
      if (other.isSetSuccess()) {
9987
        List<Long> __this__success = new ArrayList<Long>();
9988
        for (Long other_element : other.success) {
9989
          __this__success.add(other_element);
9990
        }
9991
        this.success = __this__success;
9992
      }
9993
      if (other.isSetEx()) {
9994
        this.ex = new TransactionServiceException(other.ex);
9995
      }
9996
    }
9997
 
9998
    public getReturnableOrdersForCustomer_result deepCopy() {
9999
      return new getReturnableOrdersForCustomer_result(this);
10000
    }
10001
 
10002
    @Deprecated
10003
    public getReturnableOrdersForCustomer_result clone() {
10004
      return new getReturnableOrdersForCustomer_result(this);
10005
    }
10006
 
10007
    public int getSuccessSize() {
10008
      return (this.success == null) ? 0 : this.success.size();
10009
    }
10010
 
10011
    public java.util.Iterator<Long> getSuccessIterator() {
10012
      return (this.success == null) ? null : this.success.iterator();
10013
    }
10014
 
10015
    public void addToSuccess(long elem) {
10016
      if (this.success == null) {
10017
        this.success = new ArrayList<Long>();
10018
      }
10019
      this.success.add(elem);
10020
    }
10021
 
10022
    public List<Long> getSuccess() {
10023
      return this.success;
10024
    }
10025
 
10026
    public getReturnableOrdersForCustomer_result setSuccess(List<Long> success) {
10027
      this.success = success;
10028
      return this;
10029
    }
10030
 
10031
    public void unsetSuccess() {
10032
      this.success = null;
10033
    }
10034
 
10035
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
10036
    public boolean isSetSuccess() {
10037
      return this.success != null;
10038
    }
10039
 
10040
    public void setSuccessIsSet(boolean value) {
10041
      if (!value) {
10042
        this.success = null;
10043
      }
10044
    }
10045
 
10046
    public TransactionServiceException getEx() {
10047
      return this.ex;
10048
    }
10049
 
10050
    public getReturnableOrdersForCustomer_result setEx(TransactionServiceException ex) {
10051
      this.ex = ex;
10052
      return this;
10053
    }
10054
 
10055
    public void unsetEx() {
10056
      this.ex = null;
10057
    }
10058
 
10059
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
10060
    public boolean isSetEx() {
10061
      return this.ex != null;
10062
    }
10063
 
10064
    public void setExIsSet(boolean value) {
10065
      if (!value) {
10066
        this.ex = null;
10067
      }
10068
    }
10069
 
10070
    public void setFieldValue(_Fields field, Object value) {
10071
      switch (field) {
10072
      case SUCCESS:
10073
        if (value == null) {
10074
          unsetSuccess();
10075
        } else {
10076
          setSuccess((List<Long>)value);
10077
        }
10078
        break;
10079
 
10080
      case EX:
10081
        if (value == null) {
10082
          unsetEx();
10083
        } else {
10084
          setEx((TransactionServiceException)value);
10085
        }
10086
        break;
10087
 
10088
      }
10089
    }
10090
 
10091
    public void setFieldValue(int fieldID, Object value) {
10092
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
10093
    }
10094
 
10095
    public Object getFieldValue(_Fields field) {
10096
      switch (field) {
10097
      case SUCCESS:
10098
        return getSuccess();
10099
 
10100
      case EX:
10101
        return getEx();
10102
 
10103
      }
10104
      throw new IllegalStateException();
10105
    }
10106
 
10107
    public Object getFieldValue(int fieldId) {
10108
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
10109
    }
10110
 
10111
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
10112
    public boolean isSet(_Fields field) {
10113
      switch (field) {
10114
      case SUCCESS:
10115
        return isSetSuccess();
10116
      case EX:
10117
        return isSetEx();
10118
      }
10119
      throw new IllegalStateException();
10120
    }
10121
 
10122
    public boolean isSet(int fieldID) {
10123
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
10124
    }
10125
 
10126
    @Override
10127
    public boolean equals(Object that) {
10128
      if (that == null)
10129
        return false;
10130
      if (that instanceof getReturnableOrdersForCustomer_result)
10131
        return this.equals((getReturnableOrdersForCustomer_result)that);
10132
      return false;
10133
    }
10134
 
10135
    public boolean equals(getReturnableOrdersForCustomer_result that) {
10136
      if (that == null)
10137
        return false;
10138
 
10139
      boolean this_present_success = true && this.isSetSuccess();
10140
      boolean that_present_success = true && that.isSetSuccess();
10141
      if (this_present_success || that_present_success) {
10142
        if (!(this_present_success && that_present_success))
10143
          return false;
10144
        if (!this.success.equals(that.success))
10145
          return false;
10146
      }
10147
 
10148
      boolean this_present_ex = true && this.isSetEx();
10149
      boolean that_present_ex = true && that.isSetEx();
10150
      if (this_present_ex || that_present_ex) {
10151
        if (!(this_present_ex && that_present_ex))
10152
          return false;
10153
        if (!this.ex.equals(that.ex))
10154
          return false;
10155
      }
10156
 
10157
      return true;
10158
    }
10159
 
10160
    @Override
10161
    public int hashCode() {
10162
      return 0;
10163
    }
10164
 
10165
    public int compareTo(getReturnableOrdersForCustomer_result other) {
10166
      if (!getClass().equals(other.getClass())) {
10167
        return getClass().getName().compareTo(other.getClass().getName());
10168
      }
10169
 
10170
      int lastComparison = 0;
10171
      getReturnableOrdersForCustomer_result typedOther = (getReturnableOrdersForCustomer_result)other;
10172
 
10173
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
10174
      if (lastComparison != 0) {
10175
        return lastComparison;
10176
      }
10177
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
10178
      if (lastComparison != 0) {
10179
        return lastComparison;
10180
      }
10181
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
10182
      if (lastComparison != 0) {
10183
        return lastComparison;
10184
      }
10185
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
10186
      if (lastComparison != 0) {
10187
        return lastComparison;
10188
      }
10189
      return 0;
10190
    }
10191
 
10192
    public void read(TProtocol iprot) throws TException {
10193
      TField field;
10194
      iprot.readStructBegin();
10195
      while (true)
10196
      {
10197
        field = iprot.readFieldBegin();
10198
        if (field.type == TType.STOP) { 
10199
          break;
10200
        }
10201
        _Fields fieldId = _Fields.findByThriftId(field.id);
10202
        if (fieldId == null) {
10203
          TProtocolUtil.skip(iprot, field.type);
10204
        } else {
10205
          switch (fieldId) {
10206
            case SUCCESS:
10207
              if (field.type == TType.LIST) {
10208
                {
10209
                  TList _list24 = iprot.readListBegin();
10210
                  this.success = new ArrayList<Long>(_list24.size);
10211
                  for (int _i25 = 0; _i25 < _list24.size; ++_i25)
10212
                  {
10213
                    long _elem26;
10214
                    _elem26 = iprot.readI64();
10215
                    this.success.add(_elem26);
10216
                  }
10217
                  iprot.readListEnd();
10218
                }
10219
              } else { 
10220
                TProtocolUtil.skip(iprot, field.type);
10221
              }
10222
              break;
10223
            case EX:
10224
              if (field.type == TType.STRUCT) {
10225
                this.ex = new TransactionServiceException();
10226
                this.ex.read(iprot);
10227
              } else { 
10228
                TProtocolUtil.skip(iprot, field.type);
10229
              }
10230
              break;
10231
          }
10232
          iprot.readFieldEnd();
10233
        }
10234
      }
10235
      iprot.readStructEnd();
10236
      validate();
10237
    }
10238
 
10239
    public void write(TProtocol oprot) throws TException {
10240
      oprot.writeStructBegin(STRUCT_DESC);
10241
 
10242
      if (this.isSetSuccess()) {
10243
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
10244
        {
10245
          oprot.writeListBegin(new TList(TType.I64, this.success.size()));
10246
          for (long _iter27 : this.success)
10247
          {
10248
            oprot.writeI64(_iter27);
10249
          }
10250
          oprot.writeListEnd();
10251
        }
10252
        oprot.writeFieldEnd();
10253
      } else if (this.isSetEx()) {
10254
        oprot.writeFieldBegin(EX_FIELD_DESC);
10255
        this.ex.write(oprot);
10256
        oprot.writeFieldEnd();
10257
      }
10258
      oprot.writeFieldStop();
10259
      oprot.writeStructEnd();
10260
    }
10261
 
10262
    @Override
10263
    public String toString() {
10264
      StringBuilder sb = new StringBuilder("getReturnableOrdersForCustomer_result(");
10265
      boolean first = true;
10266
 
10267
      sb.append("success:");
10268
      if (this.success == null) {
10269
        sb.append("null");
10270
      } else {
10271
        sb.append(this.success);
10272
      }
10273
      first = false;
10274
      if (!first) sb.append(", ");
10275
      sb.append("ex:");
10276
      if (this.ex == null) {
10277
        sb.append("null");
10278
      } else {
10279
        sb.append(this.ex);
10280
      }
10281
      first = false;
10282
      sb.append(")");
10283
      return sb.toString();
10284
    }
10285
 
10286
    public void validate() throws TException {
10287
      // check for required fields
10288
    }
10289
 
10290
  }
10291
 
10292
  public static class getCancellableOrdersForCustomer_args implements TBase<getCancellableOrdersForCustomer_args._Fields>, java.io.Serializable, Cloneable, Comparable<getCancellableOrdersForCustomer_args>   {
10293
    private static final TStruct STRUCT_DESC = new TStruct("getCancellableOrdersForCustomer_args");
10294
 
10295
    private static final TField CUSTOMER_ID_FIELD_DESC = new TField("customer_id", TType.I64, (short)1);
10296
    private static final TField LIMIT_FIELD_DESC = new TField("limit", TType.I64, (short)2);
10297
 
10298
    private long customer_id;
10299
    private long limit;
10300
 
10301
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10302
    public enum _Fields implements TFieldIdEnum {
10303
      CUSTOMER_ID((short)1, "customer_id"),
10304
      LIMIT((short)2, "limit");
10305
 
10306
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
10307
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10308
 
10309
      static {
10310
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10311
          byId.put((int)field._thriftId, field);
10312
          byName.put(field.getFieldName(), field);
10313
        }
10314
      }
10315
 
10316
      /**
10317
       * Find the _Fields constant that matches fieldId, or null if its not found.
10318
       */
10319
      public static _Fields findByThriftId(int fieldId) {
10320
        return byId.get(fieldId);
10321
      }
10322
 
10323
      /**
10324
       * Find the _Fields constant that matches fieldId, throwing an exception
10325
       * if it is not found.
10326
       */
10327
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10328
        _Fields fields = findByThriftId(fieldId);
10329
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10330
        return fields;
10331
      }
10332
 
10333
      /**
10334
       * Find the _Fields constant that matches name, or null if its not found.
10335
       */
10336
      public static _Fields findByName(String name) {
10337
        return byName.get(name);
10338
      }
10339
 
10340
      private final short _thriftId;
10341
      private final String _fieldName;
10342
 
10343
      _Fields(short thriftId, String fieldName) {
10344
        _thriftId = thriftId;
10345
        _fieldName = fieldName;
10346
      }
10347
 
10348
      public short getThriftFieldId() {
10349
        return _thriftId;
10350
      }
10351
 
10352
      public String getFieldName() {
10353
        return _fieldName;
10354
      }
10355
    }
10356
 
10357
    // isset id assignments
10358
    private static final int __CUSTOMER_ID_ISSET_ID = 0;
10359
    private static final int __LIMIT_ISSET_ID = 1;
10360
    private BitSet __isset_bit_vector = new BitSet(2);
10361
 
10362
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
10363
      put(_Fields.CUSTOMER_ID, new FieldMetaData("customer_id", TFieldRequirementType.DEFAULT, 
10364
          new FieldValueMetaData(TType.I64)));
10365
      put(_Fields.LIMIT, new FieldMetaData("limit", TFieldRequirementType.DEFAULT, 
10366
          new FieldValueMetaData(TType.I64)));
10367
    }});
10368
 
10369
    static {
10370
      FieldMetaData.addStructMetaDataMap(getCancellableOrdersForCustomer_args.class, metaDataMap);
10371
    }
10372
 
10373
    public getCancellableOrdersForCustomer_args() {
10374
    }
10375
 
10376
    public getCancellableOrdersForCustomer_args(
10377
      long customer_id,
10378
      long limit)
10379
    {
10380
      this();
10381
      this.customer_id = customer_id;
10382
      setCustomer_idIsSet(true);
10383
      this.limit = limit;
10384
      setLimitIsSet(true);
10385
    }
10386
 
10387
    /**
10388
     * Performs a deep copy on <i>other</i>.
10389
     */
10390
    public getCancellableOrdersForCustomer_args(getCancellableOrdersForCustomer_args other) {
10391
      __isset_bit_vector.clear();
10392
      __isset_bit_vector.or(other.__isset_bit_vector);
10393
      this.customer_id = other.customer_id;
10394
      this.limit = other.limit;
10395
    }
10396
 
10397
    public getCancellableOrdersForCustomer_args deepCopy() {
10398
      return new getCancellableOrdersForCustomer_args(this);
10399
    }
10400
 
10401
    @Deprecated
10402
    public getCancellableOrdersForCustomer_args clone() {
10403
      return new getCancellableOrdersForCustomer_args(this);
10404
    }
10405
 
10406
    public long getCustomer_id() {
10407
      return this.customer_id;
10408
    }
10409
 
10410
    public getCancellableOrdersForCustomer_args setCustomer_id(long customer_id) {
10411
      this.customer_id = customer_id;
10412
      setCustomer_idIsSet(true);
10413
      return this;
10414
    }
10415
 
10416
    public void unsetCustomer_id() {
10417
      __isset_bit_vector.clear(__CUSTOMER_ID_ISSET_ID);
10418
    }
10419
 
10420
    /** Returns true if field customer_id is set (has been asigned a value) and false otherwise */
10421
    public boolean isSetCustomer_id() {
10422
      return __isset_bit_vector.get(__CUSTOMER_ID_ISSET_ID);
10423
    }
10424
 
10425
    public void setCustomer_idIsSet(boolean value) {
10426
      __isset_bit_vector.set(__CUSTOMER_ID_ISSET_ID, value);
10427
    }
10428
 
10429
    public long getLimit() {
10430
      return this.limit;
10431
    }
10432
 
10433
    public getCancellableOrdersForCustomer_args setLimit(long limit) {
10434
      this.limit = limit;
10435
      setLimitIsSet(true);
10436
      return this;
10437
    }
10438
 
10439
    public void unsetLimit() {
10440
      __isset_bit_vector.clear(__LIMIT_ISSET_ID);
10441
    }
10442
 
10443
    /** Returns true if field limit is set (has been asigned a value) and false otherwise */
10444
    public boolean isSetLimit() {
10445
      return __isset_bit_vector.get(__LIMIT_ISSET_ID);
10446
    }
10447
 
10448
    public void setLimitIsSet(boolean value) {
10449
      __isset_bit_vector.set(__LIMIT_ISSET_ID, value);
10450
    }
10451
 
10452
    public void setFieldValue(_Fields field, Object value) {
10453
      switch (field) {
10454
      case CUSTOMER_ID:
10455
        if (value == null) {
10456
          unsetCustomer_id();
10457
        } else {
10458
          setCustomer_id((Long)value);
10459
        }
10460
        break;
10461
 
10462
      case LIMIT:
10463
        if (value == null) {
10464
          unsetLimit();
10465
        } else {
10466
          setLimit((Long)value);
10467
        }
10468
        break;
10469
 
10470
      }
10471
    }
10472
 
10473
    public void setFieldValue(int fieldID, Object value) {
10474
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
10475
    }
10476
 
10477
    public Object getFieldValue(_Fields field) {
10478
      switch (field) {
10479
      case CUSTOMER_ID:
10480
        return new Long(getCustomer_id());
10481
 
10482
      case LIMIT:
10483
        return new Long(getLimit());
10484
 
10485
      }
10486
      throw new IllegalStateException();
10487
    }
10488
 
10489
    public Object getFieldValue(int fieldId) {
10490
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
10491
    }
10492
 
10493
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
10494
    public boolean isSet(_Fields field) {
10495
      switch (field) {
10496
      case CUSTOMER_ID:
10497
        return isSetCustomer_id();
10498
      case LIMIT:
10499
        return isSetLimit();
10500
      }
10501
      throw new IllegalStateException();
10502
    }
10503
 
10504
    public boolean isSet(int fieldID) {
10505
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
10506
    }
10507
 
10508
    @Override
10509
    public boolean equals(Object that) {
10510
      if (that == null)
10511
        return false;
10512
      if (that instanceof getCancellableOrdersForCustomer_args)
10513
        return this.equals((getCancellableOrdersForCustomer_args)that);
10514
      return false;
10515
    }
10516
 
10517
    public boolean equals(getCancellableOrdersForCustomer_args that) {
10518
      if (that == null)
10519
        return false;
10520
 
10521
      boolean this_present_customer_id = true;
10522
      boolean that_present_customer_id = true;
10523
      if (this_present_customer_id || that_present_customer_id) {
10524
        if (!(this_present_customer_id && that_present_customer_id))
10525
          return false;
10526
        if (this.customer_id != that.customer_id)
10527
          return false;
10528
      }
10529
 
10530
      boolean this_present_limit = true;
10531
      boolean that_present_limit = true;
10532
      if (this_present_limit || that_present_limit) {
10533
        if (!(this_present_limit && that_present_limit))
10534
          return false;
10535
        if (this.limit != that.limit)
10536
          return false;
10537
      }
10538
 
10539
      return true;
10540
    }
10541
 
10542
    @Override
10543
    public int hashCode() {
10544
      return 0;
10545
    }
10546
 
10547
    public int compareTo(getCancellableOrdersForCustomer_args other) {
10548
      if (!getClass().equals(other.getClass())) {
10549
        return getClass().getName().compareTo(other.getClass().getName());
10550
      }
10551
 
10552
      int lastComparison = 0;
10553
      getCancellableOrdersForCustomer_args typedOther = (getCancellableOrdersForCustomer_args)other;
10554
 
10555
      lastComparison = Boolean.valueOf(isSetCustomer_id()).compareTo(isSetCustomer_id());
10556
      if (lastComparison != 0) {
10557
        return lastComparison;
10558
      }
10559
      lastComparison = TBaseHelper.compareTo(customer_id, typedOther.customer_id);
10560
      if (lastComparison != 0) {
10561
        return lastComparison;
10562
      }
10563
      lastComparison = Boolean.valueOf(isSetLimit()).compareTo(isSetLimit());
10564
      if (lastComparison != 0) {
10565
        return lastComparison;
10566
      }
10567
      lastComparison = TBaseHelper.compareTo(limit, typedOther.limit);
10568
      if (lastComparison != 0) {
10569
        return lastComparison;
10570
      }
10571
      return 0;
10572
    }
10573
 
10574
    public void read(TProtocol iprot) throws TException {
10575
      TField field;
10576
      iprot.readStructBegin();
10577
      while (true)
10578
      {
10579
        field = iprot.readFieldBegin();
10580
        if (field.type == TType.STOP) { 
10581
          break;
10582
        }
10583
        _Fields fieldId = _Fields.findByThriftId(field.id);
10584
        if (fieldId == null) {
10585
          TProtocolUtil.skip(iprot, field.type);
10586
        } else {
10587
          switch (fieldId) {
10588
            case CUSTOMER_ID:
10589
              if (field.type == TType.I64) {
10590
                this.customer_id = iprot.readI64();
10591
                setCustomer_idIsSet(true);
10592
              } else { 
10593
                TProtocolUtil.skip(iprot, field.type);
10594
              }
10595
              break;
10596
            case LIMIT:
10597
              if (field.type == TType.I64) {
10598
                this.limit = iprot.readI64();
10599
                setLimitIsSet(true);
10600
              } else { 
10601
                TProtocolUtil.skip(iprot, field.type);
10602
              }
10603
              break;
10604
          }
10605
          iprot.readFieldEnd();
10606
        }
10607
      }
10608
      iprot.readStructEnd();
10609
      validate();
10610
    }
10611
 
10612
    public void write(TProtocol oprot) throws TException {
10613
      validate();
10614
 
10615
      oprot.writeStructBegin(STRUCT_DESC);
10616
      oprot.writeFieldBegin(CUSTOMER_ID_FIELD_DESC);
10617
      oprot.writeI64(this.customer_id);
10618
      oprot.writeFieldEnd();
10619
      oprot.writeFieldBegin(LIMIT_FIELD_DESC);
10620
      oprot.writeI64(this.limit);
10621
      oprot.writeFieldEnd();
10622
      oprot.writeFieldStop();
10623
      oprot.writeStructEnd();
10624
    }
10625
 
10626
    @Override
10627
    public String toString() {
10628
      StringBuilder sb = new StringBuilder("getCancellableOrdersForCustomer_args(");
10629
      boolean first = true;
10630
 
10631
      sb.append("customer_id:");
10632
      sb.append(this.customer_id);
10633
      first = false;
10634
      if (!first) sb.append(", ");
10635
      sb.append("limit:");
10636
      sb.append(this.limit);
10637
      first = false;
10638
      sb.append(")");
10639
      return sb.toString();
10640
    }
10641
 
10642
    public void validate() throws TException {
10643
      // check for required fields
10644
    }
10645
 
10646
  }
10647
 
10648
  public static class getCancellableOrdersForCustomer_result implements TBase<getCancellableOrdersForCustomer_result._Fields>, java.io.Serializable, Cloneable, Comparable<getCancellableOrdersForCustomer_result>   {
10649
    private static final TStruct STRUCT_DESC = new TStruct("getCancellableOrdersForCustomer_result");
10650
 
10651
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
10652
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
10653
 
10654
    private List<Long> success;
10655
    private TransactionServiceException ex;
10656
 
10657
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10658
    public enum _Fields implements TFieldIdEnum {
10659
      SUCCESS((short)0, "success"),
10660
      EX((short)1, "ex");
10661
 
10662
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
10663
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10664
 
10665
      static {
10666
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10667
          byId.put((int)field._thriftId, field);
10668
          byName.put(field.getFieldName(), field);
10669
        }
10670
      }
10671
 
10672
      /**
10673
       * Find the _Fields constant that matches fieldId, or null if its not found.
10674
       */
10675
      public static _Fields findByThriftId(int fieldId) {
10676
        return byId.get(fieldId);
10677
      }
10678
 
10679
      /**
10680
       * Find the _Fields constant that matches fieldId, throwing an exception
10681
       * if it is not found.
10682
       */
10683
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10684
        _Fields fields = findByThriftId(fieldId);
10685
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10686
        return fields;
10687
      }
10688
 
10689
      /**
10690
       * Find the _Fields constant that matches name, or null if its not found.
10691
       */
10692
      public static _Fields findByName(String name) {
10693
        return byName.get(name);
10694
      }
10695
 
10696
      private final short _thriftId;
10697
      private final String _fieldName;
10698
 
10699
      _Fields(short thriftId, String fieldName) {
10700
        _thriftId = thriftId;
10701
        _fieldName = fieldName;
10702
      }
10703
 
10704
      public short getThriftFieldId() {
10705
        return _thriftId;
10706
      }
10707
 
10708
      public String getFieldName() {
10709
        return _fieldName;
10710
      }
10711
    }
10712
 
10713
    // isset id assignments
10714
 
10715
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
10716
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
10717
          new ListMetaData(TType.LIST, 
10718
              new FieldValueMetaData(TType.I64))));
10719
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
10720
          new FieldValueMetaData(TType.STRUCT)));
10721
    }});
10722
 
10723
    static {
10724
      FieldMetaData.addStructMetaDataMap(getCancellableOrdersForCustomer_result.class, metaDataMap);
10725
    }
10726
 
10727
    public getCancellableOrdersForCustomer_result() {
10728
    }
10729
 
10730
    public getCancellableOrdersForCustomer_result(
10731
      List<Long> success,
10732
      TransactionServiceException ex)
10733
    {
10734
      this();
10735
      this.success = success;
10736
      this.ex = ex;
10737
    }
10738
 
10739
    /**
10740
     * Performs a deep copy on <i>other</i>.
10741
     */
10742
    public getCancellableOrdersForCustomer_result(getCancellableOrdersForCustomer_result other) {
10743
      if (other.isSetSuccess()) {
10744
        List<Long> __this__success = new ArrayList<Long>();
10745
        for (Long other_element : other.success) {
10746
          __this__success.add(other_element);
10747
        }
10748
        this.success = __this__success;
10749
      }
10750
      if (other.isSetEx()) {
10751
        this.ex = new TransactionServiceException(other.ex);
10752
      }
10753
    }
10754
 
10755
    public getCancellableOrdersForCustomer_result deepCopy() {
10756
      return new getCancellableOrdersForCustomer_result(this);
10757
    }
10758
 
10759
    @Deprecated
10760
    public getCancellableOrdersForCustomer_result clone() {
10761
      return new getCancellableOrdersForCustomer_result(this);
10762
    }
10763
 
10764
    public int getSuccessSize() {
10765
      return (this.success == null) ? 0 : this.success.size();
10766
    }
10767
 
10768
    public java.util.Iterator<Long> getSuccessIterator() {
10769
      return (this.success == null) ? null : this.success.iterator();
10770
    }
10771
 
10772
    public void addToSuccess(long elem) {
10773
      if (this.success == null) {
10774
        this.success = new ArrayList<Long>();
10775
      }
10776
      this.success.add(elem);
10777
    }
10778
 
10779
    public List<Long> getSuccess() {
10780
      return this.success;
10781
    }
10782
 
10783
    public getCancellableOrdersForCustomer_result setSuccess(List<Long> success) {
10784
      this.success = success;
10785
      return this;
10786
    }
10787
 
10788
    public void unsetSuccess() {
10789
      this.success = null;
10790
    }
10791
 
10792
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
10793
    public boolean isSetSuccess() {
10794
      return this.success != null;
10795
    }
10796
 
10797
    public void setSuccessIsSet(boolean value) {
10798
      if (!value) {
10799
        this.success = null;
10800
      }
10801
    }
10802
 
10803
    public TransactionServiceException getEx() {
10804
      return this.ex;
10805
    }
10806
 
10807
    public getCancellableOrdersForCustomer_result setEx(TransactionServiceException ex) {
10808
      this.ex = ex;
10809
      return this;
10810
    }
10811
 
10812
    public void unsetEx() {
10813
      this.ex = null;
10814
    }
10815
 
10816
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
10817
    public boolean isSetEx() {
10818
      return this.ex != null;
10819
    }
10820
 
10821
    public void setExIsSet(boolean value) {
10822
      if (!value) {
10823
        this.ex = null;
10824
      }
10825
    }
10826
 
10827
    public void setFieldValue(_Fields field, Object value) {
10828
      switch (field) {
10829
      case SUCCESS:
10830
        if (value == null) {
10831
          unsetSuccess();
10832
        } else {
10833
          setSuccess((List<Long>)value);
10834
        }
10835
        break;
10836
 
10837
      case EX:
10838
        if (value == null) {
10839
          unsetEx();
10840
        } else {
10841
          setEx((TransactionServiceException)value);
10842
        }
10843
        break;
10844
 
10845
      }
10846
    }
10847
 
10848
    public void setFieldValue(int fieldID, Object value) {
10849
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
10850
    }
10851
 
10852
    public Object getFieldValue(_Fields field) {
10853
      switch (field) {
10854
      case SUCCESS:
10855
        return getSuccess();
10856
 
10857
      case EX:
10858
        return getEx();
10859
 
10860
      }
10861
      throw new IllegalStateException();
10862
    }
10863
 
10864
    public Object getFieldValue(int fieldId) {
10865
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
10866
    }
10867
 
10868
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
10869
    public boolean isSet(_Fields field) {
10870
      switch (field) {
10871
      case SUCCESS:
10872
        return isSetSuccess();
10873
      case EX:
10874
        return isSetEx();
10875
      }
10876
      throw new IllegalStateException();
10877
    }
10878
 
10879
    public boolean isSet(int fieldID) {
10880
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
10881
    }
10882
 
10883
    @Override
10884
    public boolean equals(Object that) {
10885
      if (that == null)
10886
        return false;
10887
      if (that instanceof getCancellableOrdersForCustomer_result)
10888
        return this.equals((getCancellableOrdersForCustomer_result)that);
10889
      return false;
10890
    }
10891
 
10892
    public boolean equals(getCancellableOrdersForCustomer_result that) {
10893
      if (that == null)
10894
        return false;
10895
 
10896
      boolean this_present_success = true && this.isSetSuccess();
10897
      boolean that_present_success = true && that.isSetSuccess();
10898
      if (this_present_success || that_present_success) {
10899
        if (!(this_present_success && that_present_success))
10900
          return false;
10901
        if (!this.success.equals(that.success))
10902
          return false;
10903
      }
10904
 
10905
      boolean this_present_ex = true && this.isSetEx();
10906
      boolean that_present_ex = true && that.isSetEx();
10907
      if (this_present_ex || that_present_ex) {
10908
        if (!(this_present_ex && that_present_ex))
10909
          return false;
10910
        if (!this.ex.equals(that.ex))
10911
          return false;
10912
      }
10913
 
10914
      return true;
10915
    }
10916
 
10917
    @Override
10918
    public int hashCode() {
10919
      return 0;
10920
    }
10921
 
10922
    public int compareTo(getCancellableOrdersForCustomer_result other) {
10923
      if (!getClass().equals(other.getClass())) {
10924
        return getClass().getName().compareTo(other.getClass().getName());
10925
      }
10926
 
10927
      int lastComparison = 0;
10928
      getCancellableOrdersForCustomer_result typedOther = (getCancellableOrdersForCustomer_result)other;
10929
 
10930
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
10931
      if (lastComparison != 0) {
10932
        return lastComparison;
10933
      }
10934
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
10935
      if (lastComparison != 0) {
10936
        return lastComparison;
10937
      }
10938
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
10939
      if (lastComparison != 0) {
10940
        return lastComparison;
10941
      }
10942
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
10943
      if (lastComparison != 0) {
10944
        return lastComparison;
10945
      }
10946
      return 0;
10947
    }
10948
 
10949
    public void read(TProtocol iprot) throws TException {
10950
      TField field;
10951
      iprot.readStructBegin();
10952
      while (true)
10953
      {
10954
        field = iprot.readFieldBegin();
10955
        if (field.type == TType.STOP) { 
10956
          break;
10957
        }
10958
        _Fields fieldId = _Fields.findByThriftId(field.id);
10959
        if (fieldId == null) {
10960
          TProtocolUtil.skip(iprot, field.type);
10961
        } else {
10962
          switch (fieldId) {
10963
            case SUCCESS:
10964
              if (field.type == TType.LIST) {
10965
                {
10966
                  TList _list28 = iprot.readListBegin();
10967
                  this.success = new ArrayList<Long>(_list28.size);
10968
                  for (int _i29 = 0; _i29 < _list28.size; ++_i29)
10969
                  {
10970
                    long _elem30;
10971
                    _elem30 = iprot.readI64();
10972
                    this.success.add(_elem30);
10973
                  }
10974
                  iprot.readListEnd();
10975
                }
10976
              } else { 
10977
                TProtocolUtil.skip(iprot, field.type);
10978
              }
10979
              break;
10980
            case EX:
10981
              if (field.type == TType.STRUCT) {
10982
                this.ex = new TransactionServiceException();
10983
                this.ex.read(iprot);
10984
              } else { 
10985
                TProtocolUtil.skip(iprot, field.type);
10986
              }
10987
              break;
10988
          }
10989
          iprot.readFieldEnd();
10990
        }
10991
      }
10992
      iprot.readStructEnd();
10993
      validate();
10994
    }
10995
 
10996
    public void write(TProtocol oprot) throws TException {
10997
      oprot.writeStructBegin(STRUCT_DESC);
10998
 
10999
      if (this.isSetSuccess()) {
11000
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
11001
        {
11002
          oprot.writeListBegin(new TList(TType.I64, this.success.size()));
11003
          for (long _iter31 : this.success)
11004
          {
11005
            oprot.writeI64(_iter31);
11006
          }
11007
          oprot.writeListEnd();
11008
        }
11009
        oprot.writeFieldEnd();
11010
      } else if (this.isSetEx()) {
11011
        oprot.writeFieldBegin(EX_FIELD_DESC);
11012
        this.ex.write(oprot);
11013
        oprot.writeFieldEnd();
11014
      }
11015
      oprot.writeFieldStop();
11016
      oprot.writeStructEnd();
11017
    }
11018
 
11019
    @Override
11020
    public String toString() {
11021
      StringBuilder sb = new StringBuilder("getCancellableOrdersForCustomer_result(");
11022
      boolean first = true;
11023
 
11024
      sb.append("success:");
11025
      if (this.success == null) {
11026
        sb.append("null");
11027
      } else {
11028
        sb.append(this.success);
11029
      }
11030
      first = false;
11031
      if (!first) sb.append(", ");
11032
      sb.append("ex:");
11033
      if (this.ex == null) {
11034
        sb.append("null");
11035
      } else {
11036
        sb.append(this.ex);
11037
      }
11038
      first = false;
11039
      sb.append(")");
11040
      return sb.toString();
11041
    }
11042
 
11043
    public void validate() throws TException {
11044
      // check for required fields
11045
    }
11046
 
11047
  }
11048
 
483 rajveer 11049
  public static class changeOrderStatus_args implements TBase<changeOrderStatus_args._Fields>, java.io.Serializable, Cloneable, Comparable<changeOrderStatus_args>   {
11050
    private static final TStruct STRUCT_DESC = new TStruct("changeOrderStatus_args");
68 ashish 11051
 
483 rajveer 11052
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
11053
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)2);
11054
    private static final TField DESCRIPTION_FIELD_DESC = new TField("description", TType.STRING, (short)3);
68 ashish 11055
 
483 rajveer 11056
    private long orderId;
11057
    private OrderStatus status;
11058
    private String description;
68 ashish 11059
 
11060
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11061
    public enum _Fields implements TFieldIdEnum {
483 rajveer 11062
      ORDER_ID((short)1, "orderId"),
11063
      /**
11064
       * 
11065
       * @see OrderStatus
11066
       */
11067
      STATUS((short)2, "status"),
11068
      DESCRIPTION((short)3, "description");
68 ashish 11069
 
11070
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
11071
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11072
 
11073
      static {
11074
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11075
          byId.put((int)field._thriftId, field);
11076
          byName.put(field.getFieldName(), field);
11077
        }
11078
      }
11079
 
11080
      /**
11081
       * Find the _Fields constant that matches fieldId, or null if its not found.
11082
       */
11083
      public static _Fields findByThriftId(int fieldId) {
11084
        return byId.get(fieldId);
11085
      }
11086
 
11087
      /**
11088
       * Find the _Fields constant that matches fieldId, throwing an exception
11089
       * if it is not found.
11090
       */
11091
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11092
        _Fields fields = findByThriftId(fieldId);
11093
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11094
        return fields;
11095
      }
11096
 
11097
      /**
11098
       * Find the _Fields constant that matches name, or null if its not found.
11099
       */
11100
      public static _Fields findByName(String name) {
11101
        return byName.get(name);
11102
      }
11103
 
11104
      private final short _thriftId;
11105
      private final String _fieldName;
11106
 
11107
      _Fields(short thriftId, String fieldName) {
11108
        _thriftId = thriftId;
11109
        _fieldName = fieldName;
11110
      }
11111
 
11112
      public short getThriftFieldId() {
11113
        return _thriftId;
11114
      }
11115
 
11116
      public String getFieldName() {
11117
        return _fieldName;
11118
      }
11119
    }
11120
 
11121
    // isset id assignments
483 rajveer 11122
    private static final int __ORDERID_ISSET_ID = 0;
68 ashish 11123
    private BitSet __isset_bit_vector = new BitSet(1);
11124
 
11125
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 11126
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
68 ashish 11127
          new FieldValueMetaData(TType.I64)));
483 rajveer 11128
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
11129
          new EnumMetaData(TType.ENUM, OrderStatus.class)));
11130
      put(_Fields.DESCRIPTION, new FieldMetaData("description", TFieldRequirementType.DEFAULT, 
11131
          new FieldValueMetaData(TType.STRING)));
68 ashish 11132
    }});
11133
 
11134
    static {
483 rajveer 11135
      FieldMetaData.addStructMetaDataMap(changeOrderStatus_args.class, metaDataMap);
68 ashish 11136
    }
11137
 
483 rajveer 11138
    public changeOrderStatus_args() {
68 ashish 11139
    }
11140
 
483 rajveer 11141
    public changeOrderStatus_args(
11142
      long orderId,
11143
      OrderStatus status,
11144
      String description)
68 ashish 11145
    {
11146
      this();
483 rajveer 11147
      this.orderId = orderId;
11148
      setOrderIdIsSet(true);
11149
      this.status = status;
11150
      this.description = description;
68 ashish 11151
    }
11152
 
11153
    /**
11154
     * Performs a deep copy on <i>other</i>.
11155
     */
483 rajveer 11156
    public changeOrderStatus_args(changeOrderStatus_args other) {
68 ashish 11157
      __isset_bit_vector.clear();
11158
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 11159
      this.orderId = other.orderId;
11160
      if (other.isSetStatus()) {
11161
        this.status = other.status;
11162
      }
11163
      if (other.isSetDescription()) {
11164
        this.description = other.description;
11165
      }
68 ashish 11166
    }
11167
 
483 rajveer 11168
    public changeOrderStatus_args deepCopy() {
11169
      return new changeOrderStatus_args(this);
68 ashish 11170
    }
11171
 
11172
    @Deprecated
483 rajveer 11173
    public changeOrderStatus_args clone() {
11174
      return new changeOrderStatus_args(this);
68 ashish 11175
    }
11176
 
483 rajveer 11177
    public long getOrderId() {
11178
      return this.orderId;
68 ashish 11179
    }
11180
 
483 rajveer 11181
    public changeOrderStatus_args setOrderId(long orderId) {
11182
      this.orderId = orderId;
11183
      setOrderIdIsSet(true);
68 ashish 11184
      return this;
11185
    }
11186
 
483 rajveer 11187
    public void unsetOrderId() {
11188
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
68 ashish 11189
    }
11190
 
483 rajveer 11191
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
11192
    public boolean isSetOrderId() {
11193
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
68 ashish 11194
    }
11195
 
483 rajveer 11196
    public void setOrderIdIsSet(boolean value) {
11197
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
68 ashish 11198
    }
11199
 
483 rajveer 11200
    /**
11201
     * 
11202
     * @see OrderStatus
11203
     */
11204
    public OrderStatus getStatus() {
11205
      return this.status;
68 ashish 11206
    }
11207
 
11208
    /**
483 rajveer 11209
     * 
11210
     * @see OrderStatus
68 ashish 11211
     */
483 rajveer 11212
    public changeOrderStatus_args setStatus(OrderStatus status) {
11213
      this.status = status;
68 ashish 11214
      return this;
11215
    }
11216
 
483 rajveer 11217
    public void unsetStatus() {
11218
      this.status = null;
68 ashish 11219
    }
11220
 
483 rajveer 11221
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
11222
    public boolean isSetStatus() {
11223
      return this.status != null;
68 ashish 11224
    }
11225
 
483 rajveer 11226
    public void setStatusIsSet(boolean value) {
68 ashish 11227
      if (!value) {
483 rajveer 11228
        this.status = null;
68 ashish 11229
      }
11230
    }
11231
 
483 rajveer 11232
    public String getDescription() {
11233
      return this.description;
68 ashish 11234
    }
11235
 
483 rajveer 11236
    public changeOrderStatus_args setDescription(String description) {
11237
      this.description = description;
68 ashish 11238
      return this;
11239
    }
11240
 
483 rajveer 11241
    public void unsetDescription() {
11242
      this.description = null;
68 ashish 11243
    }
11244
 
483 rajveer 11245
    /** Returns true if field description is set (has been asigned a value) and false otherwise */
11246
    public boolean isSetDescription() {
11247
      return this.description != null;
68 ashish 11248
    }
11249
 
483 rajveer 11250
    public void setDescriptionIsSet(boolean value) {
68 ashish 11251
      if (!value) {
483 rajveer 11252
        this.description = null;
68 ashish 11253
      }
11254
    }
11255
 
11256
    public void setFieldValue(_Fields field, Object value) {
11257
      switch (field) {
483 rajveer 11258
      case ORDER_ID:
68 ashish 11259
        if (value == null) {
483 rajveer 11260
          unsetOrderId();
68 ashish 11261
        } else {
483 rajveer 11262
          setOrderId((Long)value);
68 ashish 11263
        }
11264
        break;
11265
 
483 rajveer 11266
      case STATUS:
68 ashish 11267
        if (value == null) {
483 rajveer 11268
          unsetStatus();
68 ashish 11269
        } else {
483 rajveer 11270
          setStatus((OrderStatus)value);
68 ashish 11271
        }
11272
        break;
11273
 
483 rajveer 11274
      case DESCRIPTION:
11275
        if (value == null) {
11276
          unsetDescription();
11277
        } else {
11278
          setDescription((String)value);
11279
        }
11280
        break;
11281
 
68 ashish 11282
      }
11283
    }
11284
 
11285
    public void setFieldValue(int fieldID, Object value) {
11286
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
11287
    }
11288
 
11289
    public Object getFieldValue(_Fields field) {
11290
      switch (field) {
483 rajveer 11291
      case ORDER_ID:
11292
        return new Long(getOrderId());
68 ashish 11293
 
483 rajveer 11294
      case STATUS:
11295
        return getStatus();
68 ashish 11296
 
483 rajveer 11297
      case DESCRIPTION:
11298
        return getDescription();
11299
 
68 ashish 11300
      }
11301
      throw new IllegalStateException();
11302
    }
11303
 
11304
    public Object getFieldValue(int fieldId) {
11305
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
11306
    }
11307
 
11308
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
11309
    public boolean isSet(_Fields field) {
11310
      switch (field) {
483 rajveer 11311
      case ORDER_ID:
11312
        return isSetOrderId();
11313
      case STATUS:
11314
        return isSetStatus();
11315
      case DESCRIPTION:
11316
        return isSetDescription();
68 ashish 11317
      }
11318
      throw new IllegalStateException();
11319
    }
11320
 
11321
    public boolean isSet(int fieldID) {
11322
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
11323
    }
11324
 
11325
    @Override
11326
    public boolean equals(Object that) {
11327
      if (that == null)
11328
        return false;
483 rajveer 11329
      if (that instanceof changeOrderStatus_args)
11330
        return this.equals((changeOrderStatus_args)that);
68 ashish 11331
      return false;
11332
    }
11333
 
483 rajveer 11334
    public boolean equals(changeOrderStatus_args that) {
68 ashish 11335
      if (that == null)
11336
        return false;
11337
 
483 rajveer 11338
      boolean this_present_orderId = true;
11339
      boolean that_present_orderId = true;
11340
      if (this_present_orderId || that_present_orderId) {
11341
        if (!(this_present_orderId && that_present_orderId))
68 ashish 11342
          return false;
483 rajveer 11343
        if (this.orderId != that.orderId)
68 ashish 11344
          return false;
11345
      }
11346
 
483 rajveer 11347
      boolean this_present_status = true && this.isSetStatus();
11348
      boolean that_present_status = true && that.isSetStatus();
11349
      if (this_present_status || that_present_status) {
11350
        if (!(this_present_status && that_present_status))
68 ashish 11351
          return false;
483 rajveer 11352
        if (!this.status.equals(that.status))
68 ashish 11353
          return false;
11354
      }
11355
 
483 rajveer 11356
      boolean this_present_description = true && this.isSetDescription();
11357
      boolean that_present_description = true && that.isSetDescription();
11358
      if (this_present_description || that_present_description) {
11359
        if (!(this_present_description && that_present_description))
11360
          return false;
11361
        if (!this.description.equals(that.description))
11362
          return false;
11363
      }
11364
 
68 ashish 11365
      return true;
11366
    }
11367
 
11368
    @Override
11369
    public int hashCode() {
11370
      return 0;
11371
    }
11372
 
483 rajveer 11373
    public int compareTo(changeOrderStatus_args other) {
11374
      if (!getClass().equals(other.getClass())) {
11375
        return getClass().getName().compareTo(other.getClass().getName());
68 ashish 11376
      }
11377
 
483 rajveer 11378
      int lastComparison = 0;
11379
      changeOrderStatus_args typedOther = (changeOrderStatus_args)other;
68 ashish 11380
 
483 rajveer 11381
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
11382
      if (lastComparison != 0) {
11383
        return lastComparison;
68 ashish 11384
      }
483 rajveer 11385
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
11386
      if (lastComparison != 0) {
11387
        return lastComparison;
68 ashish 11388
      }
483 rajveer 11389
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
11390
      if (lastComparison != 0) {
11391
        return lastComparison;
68 ashish 11392
      }
483 rajveer 11393
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
11394
      if (lastComparison != 0) {
11395
        return lastComparison;
68 ashish 11396
      }
483 rajveer 11397
      lastComparison = Boolean.valueOf(isSetDescription()).compareTo(isSetDescription());
11398
      if (lastComparison != 0) {
11399
        return lastComparison;
68 ashish 11400
      }
483 rajveer 11401
      lastComparison = TBaseHelper.compareTo(description, typedOther.description);
11402
      if (lastComparison != 0) {
11403
        return lastComparison;
68 ashish 11404
      }
11405
      return 0;
11406
    }
11407
 
11408
    public void read(TProtocol iprot) throws TException {
11409
      TField field;
11410
      iprot.readStructBegin();
11411
      while (true)
11412
      {
11413
        field = iprot.readFieldBegin();
11414
        if (field.type == TType.STOP) { 
11415
          break;
11416
        }
11417
        _Fields fieldId = _Fields.findByThriftId(field.id);
11418
        if (fieldId == null) {
11419
          TProtocolUtil.skip(iprot, field.type);
11420
        } else {
11421
          switch (fieldId) {
483 rajveer 11422
            case ORDER_ID:
68 ashish 11423
              if (field.type == TType.I64) {
483 rajveer 11424
                this.orderId = iprot.readI64();
11425
                setOrderIdIsSet(true);
68 ashish 11426
              } else { 
11427
                TProtocolUtil.skip(iprot, field.type);
11428
              }
11429
              break;
483 rajveer 11430
            case STATUS:
11431
              if (field.type == TType.I32) {
11432
                this.status = OrderStatus.findByValue(iprot.readI32());
68 ashish 11433
              } else { 
11434
                TProtocolUtil.skip(iprot, field.type);
11435
              }
11436
              break;
483 rajveer 11437
            case DESCRIPTION:
11438
              if (field.type == TType.STRING) {
11439
                this.description = iprot.readString();
11440
              } else { 
11441
                TProtocolUtil.skip(iprot, field.type);
11442
              }
11443
              break;
68 ashish 11444
          }
11445
          iprot.readFieldEnd();
11446
        }
11447
      }
11448
      iprot.readStructEnd();
11449
      validate();
11450
    }
11451
 
11452
    public void write(TProtocol oprot) throws TException {
11453
      validate();
11454
 
11455
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 11456
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
11457
      oprot.writeI64(this.orderId);
68 ashish 11458
      oprot.writeFieldEnd();
483 rajveer 11459
      if (this.status != null) {
11460
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
11461
        oprot.writeI32(this.status.getValue());
68 ashish 11462
        oprot.writeFieldEnd();
11463
      }
483 rajveer 11464
      if (this.description != null) {
11465
        oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC);
11466
        oprot.writeString(this.description);
11467
        oprot.writeFieldEnd();
11468
      }
68 ashish 11469
      oprot.writeFieldStop();
11470
      oprot.writeStructEnd();
11471
    }
11472
 
11473
    @Override
11474
    public String toString() {
483 rajveer 11475
      StringBuilder sb = new StringBuilder("changeOrderStatus_args(");
68 ashish 11476
      boolean first = true;
11477
 
483 rajveer 11478
      sb.append("orderId:");
11479
      sb.append(this.orderId);
68 ashish 11480
      first = false;
11481
      if (!first) sb.append(", ");
483 rajveer 11482
      sb.append("status:");
11483
      if (this.status == null) {
68 ashish 11484
        sb.append("null");
11485
      } else {
483 rajveer 11486
        String status_name = status.name();
11487
        if (status_name != null) {
11488
          sb.append(status_name);
11489
          sb.append(" (");
11490
        }
11491
        sb.append(this.status);
11492
        if (status_name != null) {
11493
          sb.append(")");
11494
        }
68 ashish 11495
      }
11496
      first = false;
483 rajveer 11497
      if (!first) sb.append(", ");
11498
      sb.append("description:");
11499
      if (this.description == null) {
11500
        sb.append("null");
11501
      } else {
11502
        sb.append(this.description);
11503
      }
11504
      first = false;
68 ashish 11505
      sb.append(")");
11506
      return sb.toString();
11507
    }
11508
 
11509
    public void validate() throws TException {
11510
      // check for required fields
11511
    }
11512
 
11513
  }
11514
 
483 rajveer 11515
  public static class changeOrderStatus_result implements TBase<changeOrderStatus_result._Fields>, java.io.Serializable, Cloneable, Comparable<changeOrderStatus_result>   {
11516
    private static final TStruct STRUCT_DESC = new TStruct("changeOrderStatus_result");
68 ashish 11517
 
11518
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
11519
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
11520
 
11521
    private boolean success;
11522
    private TransactionServiceException ex;
11523
 
11524
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11525
    public enum _Fields implements TFieldIdEnum {
11526
      SUCCESS((short)0, "success"),
11527
      EX((short)1, "ex");
11528
 
11529
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
11530
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11531
 
11532
      static {
11533
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11534
          byId.put((int)field._thriftId, field);
11535
          byName.put(field.getFieldName(), field);
11536
        }
11537
      }
11538
 
11539
      /**
11540
       * Find the _Fields constant that matches fieldId, or null if its not found.
11541
       */
11542
      public static _Fields findByThriftId(int fieldId) {
11543
        return byId.get(fieldId);
11544
      }
11545
 
11546
      /**
11547
       * Find the _Fields constant that matches fieldId, throwing an exception
11548
       * if it is not found.
11549
       */
11550
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11551
        _Fields fields = findByThriftId(fieldId);
11552
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11553
        return fields;
11554
      }
11555
 
11556
      /**
11557
       * Find the _Fields constant that matches name, or null if its not found.
11558
       */
11559
      public static _Fields findByName(String name) {
11560
        return byName.get(name);
11561
      }
11562
 
11563
      private final short _thriftId;
11564
      private final String _fieldName;
11565
 
11566
      _Fields(short thriftId, String fieldName) {
11567
        _thriftId = thriftId;
11568
        _fieldName = fieldName;
11569
      }
11570
 
11571
      public short getThriftFieldId() {
11572
        return _thriftId;
11573
      }
11574
 
11575
      public String getFieldName() {
11576
        return _fieldName;
11577
      }
11578
    }
11579
 
11580
    // isset id assignments
11581
    private static final int __SUCCESS_ISSET_ID = 0;
11582
    private BitSet __isset_bit_vector = new BitSet(1);
11583
 
11584
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
11585
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
11586
          new FieldValueMetaData(TType.BOOL)));
11587
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
11588
          new FieldValueMetaData(TType.STRUCT)));
11589
    }});
11590
 
11591
    static {
483 rajveer 11592
      FieldMetaData.addStructMetaDataMap(changeOrderStatus_result.class, metaDataMap);
68 ashish 11593
    }
11594
 
483 rajveer 11595
    public changeOrderStatus_result() {
68 ashish 11596
    }
11597
 
483 rajveer 11598
    public changeOrderStatus_result(
68 ashish 11599
      boolean success,
11600
      TransactionServiceException ex)
11601
    {
11602
      this();
11603
      this.success = success;
11604
      setSuccessIsSet(true);
11605
      this.ex = ex;
11606
    }
11607
 
11608
    /**
11609
     * Performs a deep copy on <i>other</i>.
11610
     */
483 rajveer 11611
    public changeOrderStatus_result(changeOrderStatus_result other) {
68 ashish 11612
      __isset_bit_vector.clear();
11613
      __isset_bit_vector.or(other.__isset_bit_vector);
11614
      this.success = other.success;
11615
      if (other.isSetEx()) {
11616
        this.ex = new TransactionServiceException(other.ex);
11617
      }
11618
    }
11619
 
483 rajveer 11620
    public changeOrderStatus_result deepCopy() {
11621
      return new changeOrderStatus_result(this);
68 ashish 11622
    }
11623
 
11624
    @Deprecated
483 rajveer 11625
    public changeOrderStatus_result clone() {
11626
      return new changeOrderStatus_result(this);
68 ashish 11627
    }
11628
 
11629
    public boolean isSuccess() {
11630
      return this.success;
11631
    }
11632
 
483 rajveer 11633
    public changeOrderStatus_result setSuccess(boolean success) {
68 ashish 11634
      this.success = success;
11635
      setSuccessIsSet(true);
11636
      return this;
11637
    }
11638
 
11639
    public void unsetSuccess() {
11640
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
11641
    }
11642
 
11643
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
11644
    public boolean isSetSuccess() {
11645
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
11646
    }
11647
 
11648
    public void setSuccessIsSet(boolean value) {
11649
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
11650
    }
11651
 
11652
    public TransactionServiceException getEx() {
11653
      return this.ex;
11654
    }
11655
 
483 rajveer 11656
    public changeOrderStatus_result setEx(TransactionServiceException ex) {
68 ashish 11657
      this.ex = ex;
11658
      return this;
11659
    }
11660
 
11661
    public void unsetEx() {
11662
      this.ex = null;
11663
    }
11664
 
11665
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
11666
    public boolean isSetEx() {
11667
      return this.ex != null;
11668
    }
11669
 
11670
    public void setExIsSet(boolean value) {
11671
      if (!value) {
11672
        this.ex = null;
11673
      }
11674
    }
11675
 
11676
    public void setFieldValue(_Fields field, Object value) {
11677
      switch (field) {
11678
      case SUCCESS:
11679
        if (value == null) {
11680
          unsetSuccess();
11681
        } else {
11682
          setSuccess((Boolean)value);
11683
        }
11684
        break;
11685
 
11686
      case EX:
11687
        if (value == null) {
11688
          unsetEx();
11689
        } else {
11690
          setEx((TransactionServiceException)value);
11691
        }
11692
        break;
11693
 
11694
      }
11695
    }
11696
 
11697
    public void setFieldValue(int fieldID, Object value) {
11698
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
11699
    }
11700
 
11701
    public Object getFieldValue(_Fields field) {
11702
      switch (field) {
11703
      case SUCCESS:
11704
        return new Boolean(isSuccess());
11705
 
11706
      case EX:
11707
        return getEx();
11708
 
11709
      }
11710
      throw new IllegalStateException();
11711
    }
11712
 
11713
    public Object getFieldValue(int fieldId) {
11714
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
11715
    }
11716
 
11717
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
11718
    public boolean isSet(_Fields field) {
11719
      switch (field) {
11720
      case SUCCESS:
11721
        return isSetSuccess();
11722
      case EX:
11723
        return isSetEx();
11724
      }
11725
      throw new IllegalStateException();
11726
    }
11727
 
11728
    public boolean isSet(int fieldID) {
11729
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
11730
    }
11731
 
11732
    @Override
11733
    public boolean equals(Object that) {
11734
      if (that == null)
11735
        return false;
483 rajveer 11736
      if (that instanceof changeOrderStatus_result)
11737
        return this.equals((changeOrderStatus_result)that);
68 ashish 11738
      return false;
11739
    }
11740
 
483 rajveer 11741
    public boolean equals(changeOrderStatus_result that) {
68 ashish 11742
      if (that == null)
11743
        return false;
11744
 
11745
      boolean this_present_success = true;
11746
      boolean that_present_success = true;
11747
      if (this_present_success || that_present_success) {
11748
        if (!(this_present_success && that_present_success))
11749
          return false;
11750
        if (this.success != that.success)
11751
          return false;
11752
      }
11753
 
11754
      boolean this_present_ex = true && this.isSetEx();
11755
      boolean that_present_ex = true && that.isSetEx();
11756
      if (this_present_ex || that_present_ex) {
11757
        if (!(this_present_ex && that_present_ex))
11758
          return false;
11759
        if (!this.ex.equals(that.ex))
11760
          return false;
11761
      }
11762
 
11763
      return true;
11764
    }
11765
 
11766
    @Override
11767
    public int hashCode() {
11768
      return 0;
11769
    }
11770
 
483 rajveer 11771
    public int compareTo(changeOrderStatus_result other) {
68 ashish 11772
      if (!getClass().equals(other.getClass())) {
11773
        return getClass().getName().compareTo(other.getClass().getName());
11774
      }
11775
 
11776
      int lastComparison = 0;
483 rajveer 11777
      changeOrderStatus_result typedOther = (changeOrderStatus_result)other;
68 ashish 11778
 
11779
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
11780
      if (lastComparison != 0) {
11781
        return lastComparison;
11782
      }
11783
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
11784
      if (lastComparison != 0) {
11785
        return lastComparison;
11786
      }
11787
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
11788
      if (lastComparison != 0) {
11789
        return lastComparison;
11790
      }
11791
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
11792
      if (lastComparison != 0) {
11793
        return lastComparison;
11794
      }
11795
      return 0;
11796
    }
11797
 
11798
    public void read(TProtocol iprot) throws TException {
11799
      TField field;
11800
      iprot.readStructBegin();
11801
      while (true)
11802
      {
11803
        field = iprot.readFieldBegin();
11804
        if (field.type == TType.STOP) { 
11805
          break;
11806
        }
11807
        _Fields fieldId = _Fields.findByThriftId(field.id);
11808
        if (fieldId == null) {
11809
          TProtocolUtil.skip(iprot, field.type);
11810
        } else {
11811
          switch (fieldId) {
11812
            case SUCCESS:
11813
              if (field.type == TType.BOOL) {
11814
                this.success = iprot.readBool();
11815
                setSuccessIsSet(true);
11816
              } else { 
11817
                TProtocolUtil.skip(iprot, field.type);
11818
              }
11819
              break;
11820
            case EX:
11821
              if (field.type == TType.STRUCT) {
11822
                this.ex = new TransactionServiceException();
11823
                this.ex.read(iprot);
11824
              } else { 
11825
                TProtocolUtil.skip(iprot, field.type);
11826
              }
11827
              break;
11828
          }
11829
          iprot.readFieldEnd();
11830
        }
11831
      }
11832
      iprot.readStructEnd();
11833
      validate();
11834
    }
11835
 
11836
    public void write(TProtocol oprot) throws TException {
11837
      oprot.writeStructBegin(STRUCT_DESC);
11838
 
11839
      if (this.isSetSuccess()) {
11840
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
11841
        oprot.writeBool(this.success);
11842
        oprot.writeFieldEnd();
11843
      } else if (this.isSetEx()) {
11844
        oprot.writeFieldBegin(EX_FIELD_DESC);
11845
        this.ex.write(oprot);
11846
        oprot.writeFieldEnd();
11847
      }
11848
      oprot.writeFieldStop();
11849
      oprot.writeStructEnd();
11850
    }
11851
 
11852
    @Override
11853
    public String toString() {
483 rajveer 11854
      StringBuilder sb = new StringBuilder("changeOrderStatus_result(");
68 ashish 11855
      boolean first = true;
11856
 
11857
      sb.append("success:");
11858
      sb.append(this.success);
11859
      first = false;
11860
      if (!first) sb.append(", ");
11861
      sb.append("ex:");
11862
      if (this.ex == null) {
11863
        sb.append("null");
11864
      } else {
11865
        sb.append(this.ex);
11866
      }
11867
      first = false;
11868
      sb.append(")");
11869
      return sb.toString();
11870
    }
11871
 
11872
    public void validate() throws TException {
11873
      // check for required fields
11874
    }
11875
 
11876
  }
11877
 
495 rajveer 11878
  public static class addBillingDetails_args implements TBase<addBillingDetails_args._Fields>, java.io.Serializable, Cloneable, Comparable<addBillingDetails_args>   {
11879
    private static final TStruct STRUCT_DESC = new TStruct("addBillingDetails_args");
11880
 
11881
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
11882
    private static final TField INVOICE_NUMBER_FIELD_DESC = new TField("invoice_number", TType.STRING, (short)2);
1148 chandransh 11883
    private static final TField BILLED_BY_FIELD_DESC = new TField("billed_by", TType.STRING, (short)3);
495 rajveer 11884
 
11885
    private long orderId;
11886
    private String invoice_number;
11887
    private String billed_by;
11888
 
11889
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11890
    public enum _Fields implements TFieldIdEnum {
11891
      ORDER_ID((short)1, "orderId"),
11892
      INVOICE_NUMBER((short)2, "invoice_number"),
1148 chandransh 11893
      BILLED_BY((short)3, "billed_by");
495 rajveer 11894
 
11895
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
11896
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11897
 
11898
      static {
11899
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11900
          byId.put((int)field._thriftId, field);
11901
          byName.put(field.getFieldName(), field);
11902
        }
11903
      }
11904
 
11905
      /**
11906
       * Find the _Fields constant that matches fieldId, or null if its not found.
11907
       */
11908
      public static _Fields findByThriftId(int fieldId) {
11909
        return byId.get(fieldId);
11910
      }
11911
 
11912
      /**
11913
       * Find the _Fields constant that matches fieldId, throwing an exception
11914
       * if it is not found.
11915
       */
11916
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11917
        _Fields fields = findByThriftId(fieldId);
11918
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11919
        return fields;
11920
      }
11921
 
11922
      /**
11923
       * Find the _Fields constant that matches name, or null if its not found.
11924
       */
11925
      public static _Fields findByName(String name) {
11926
        return byName.get(name);
11927
      }
11928
 
11929
      private final short _thriftId;
11930
      private final String _fieldName;
11931
 
11932
      _Fields(short thriftId, String fieldName) {
11933
        _thriftId = thriftId;
11934
        _fieldName = fieldName;
11935
      }
11936
 
11937
      public short getThriftFieldId() {
11938
        return _thriftId;
11939
      }
11940
 
11941
      public String getFieldName() {
11942
        return _fieldName;
11943
      }
11944
    }
11945
 
11946
    // isset id assignments
11947
    private static final int __ORDERID_ISSET_ID = 0;
1148 chandransh 11948
    private BitSet __isset_bit_vector = new BitSet(1);
495 rajveer 11949
 
11950
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
11951
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
11952
          new FieldValueMetaData(TType.I64)));
11953
      put(_Fields.INVOICE_NUMBER, new FieldMetaData("invoice_number", TFieldRequirementType.DEFAULT, 
11954
          new FieldValueMetaData(TType.STRING)));
11955
      put(_Fields.BILLED_BY, new FieldMetaData("billed_by", TFieldRequirementType.DEFAULT, 
11956
          new FieldValueMetaData(TType.STRING)));
11957
    }});
11958
 
11959
    static {
11960
      FieldMetaData.addStructMetaDataMap(addBillingDetails_args.class, metaDataMap);
11961
    }
11962
 
11963
    public addBillingDetails_args() {
11964
    }
11965
 
11966
    public addBillingDetails_args(
11967
      long orderId,
11968
      String invoice_number,
11969
      String billed_by)
11970
    {
11971
      this();
11972
      this.orderId = orderId;
11973
      setOrderIdIsSet(true);
11974
      this.invoice_number = invoice_number;
11975
      this.billed_by = billed_by;
11976
    }
11977
 
11978
    /**
11979
     * Performs a deep copy on <i>other</i>.
11980
     */
11981
    public addBillingDetails_args(addBillingDetails_args other) {
11982
      __isset_bit_vector.clear();
11983
      __isset_bit_vector.or(other.__isset_bit_vector);
11984
      this.orderId = other.orderId;
11985
      if (other.isSetInvoice_number()) {
11986
        this.invoice_number = other.invoice_number;
11987
      }
11988
      if (other.isSetBilled_by()) {
11989
        this.billed_by = other.billed_by;
11990
      }
11991
    }
11992
 
11993
    public addBillingDetails_args deepCopy() {
11994
      return new addBillingDetails_args(this);
11995
    }
11996
 
11997
    @Deprecated
11998
    public addBillingDetails_args clone() {
11999
      return new addBillingDetails_args(this);
12000
    }
12001
 
12002
    public long getOrderId() {
12003
      return this.orderId;
12004
    }
12005
 
12006
    public addBillingDetails_args setOrderId(long orderId) {
12007
      this.orderId = orderId;
12008
      setOrderIdIsSet(true);
12009
      return this;
12010
    }
12011
 
12012
    public void unsetOrderId() {
12013
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
12014
    }
12015
 
12016
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
12017
    public boolean isSetOrderId() {
12018
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
12019
    }
12020
 
12021
    public void setOrderIdIsSet(boolean value) {
12022
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
12023
    }
12024
 
12025
    public String getInvoice_number() {
12026
      return this.invoice_number;
12027
    }
12028
 
12029
    public addBillingDetails_args setInvoice_number(String invoice_number) {
12030
      this.invoice_number = invoice_number;
12031
      return this;
12032
    }
12033
 
12034
    public void unsetInvoice_number() {
12035
      this.invoice_number = null;
12036
    }
12037
 
12038
    /** Returns true if field invoice_number is set (has been asigned a value) and false otherwise */
12039
    public boolean isSetInvoice_number() {
12040
      return this.invoice_number != null;
12041
    }
12042
 
12043
    public void setInvoice_numberIsSet(boolean value) {
12044
      if (!value) {
12045
        this.invoice_number = null;
12046
      }
12047
    }
12048
 
12049
    public String getBilled_by() {
12050
      return this.billed_by;
12051
    }
12052
 
12053
    public addBillingDetails_args setBilled_by(String billed_by) {
12054
      this.billed_by = billed_by;
12055
      return this;
12056
    }
12057
 
12058
    public void unsetBilled_by() {
12059
      this.billed_by = null;
12060
    }
12061
 
12062
    /** Returns true if field billed_by is set (has been asigned a value) and false otherwise */
12063
    public boolean isSetBilled_by() {
12064
      return this.billed_by != null;
12065
    }
12066
 
12067
    public void setBilled_byIsSet(boolean value) {
12068
      if (!value) {
12069
        this.billed_by = null;
12070
      }
12071
    }
12072
 
12073
    public void setFieldValue(_Fields field, Object value) {
12074
      switch (field) {
12075
      case ORDER_ID:
12076
        if (value == null) {
12077
          unsetOrderId();
12078
        } else {
12079
          setOrderId((Long)value);
12080
        }
12081
        break;
12082
 
12083
      case INVOICE_NUMBER:
12084
        if (value == null) {
12085
          unsetInvoice_number();
12086
        } else {
12087
          setInvoice_number((String)value);
12088
        }
12089
        break;
12090
 
12091
      case BILLED_BY:
12092
        if (value == null) {
12093
          unsetBilled_by();
12094
        } else {
12095
          setBilled_by((String)value);
12096
        }
12097
        break;
12098
 
12099
      }
12100
    }
12101
 
12102
    public void setFieldValue(int fieldID, Object value) {
12103
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
12104
    }
12105
 
12106
    public Object getFieldValue(_Fields field) {
12107
      switch (field) {
12108
      case ORDER_ID:
12109
        return new Long(getOrderId());
12110
 
12111
      case INVOICE_NUMBER:
12112
        return getInvoice_number();
12113
 
12114
      case BILLED_BY:
12115
        return getBilled_by();
12116
 
12117
      }
12118
      throw new IllegalStateException();
12119
    }
12120
 
12121
    public Object getFieldValue(int fieldId) {
12122
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
12123
    }
12124
 
12125
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
12126
    public boolean isSet(_Fields field) {
12127
      switch (field) {
12128
      case ORDER_ID:
12129
        return isSetOrderId();
12130
      case INVOICE_NUMBER:
12131
        return isSetInvoice_number();
12132
      case BILLED_BY:
12133
        return isSetBilled_by();
12134
      }
12135
      throw new IllegalStateException();
12136
    }
12137
 
12138
    public boolean isSet(int fieldID) {
12139
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
12140
    }
12141
 
12142
    @Override
12143
    public boolean equals(Object that) {
12144
      if (that == null)
12145
        return false;
12146
      if (that instanceof addBillingDetails_args)
12147
        return this.equals((addBillingDetails_args)that);
12148
      return false;
12149
    }
12150
 
12151
    public boolean equals(addBillingDetails_args that) {
12152
      if (that == null)
12153
        return false;
12154
 
12155
      boolean this_present_orderId = true;
12156
      boolean that_present_orderId = true;
12157
      if (this_present_orderId || that_present_orderId) {
12158
        if (!(this_present_orderId && that_present_orderId))
12159
          return false;
12160
        if (this.orderId != that.orderId)
12161
          return false;
12162
      }
12163
 
12164
      boolean this_present_invoice_number = true && this.isSetInvoice_number();
12165
      boolean that_present_invoice_number = true && that.isSetInvoice_number();
12166
      if (this_present_invoice_number || that_present_invoice_number) {
12167
        if (!(this_present_invoice_number && that_present_invoice_number))
12168
          return false;
12169
        if (!this.invoice_number.equals(that.invoice_number))
12170
          return false;
12171
      }
12172
 
12173
      boolean this_present_billed_by = true && this.isSetBilled_by();
12174
      boolean that_present_billed_by = true && that.isSetBilled_by();
12175
      if (this_present_billed_by || that_present_billed_by) {
12176
        if (!(this_present_billed_by && that_present_billed_by))
12177
          return false;
12178
        if (!this.billed_by.equals(that.billed_by))
12179
          return false;
12180
      }
12181
 
12182
      return true;
12183
    }
12184
 
12185
    @Override
12186
    public int hashCode() {
12187
      return 0;
12188
    }
12189
 
12190
    public int compareTo(addBillingDetails_args other) {
12191
      if (!getClass().equals(other.getClass())) {
12192
        return getClass().getName().compareTo(other.getClass().getName());
12193
      }
12194
 
12195
      int lastComparison = 0;
12196
      addBillingDetails_args typedOther = (addBillingDetails_args)other;
12197
 
12198
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
12199
      if (lastComparison != 0) {
12200
        return lastComparison;
12201
      }
12202
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
12203
      if (lastComparison != 0) {
12204
        return lastComparison;
12205
      }
12206
      lastComparison = Boolean.valueOf(isSetInvoice_number()).compareTo(isSetInvoice_number());
12207
      if (lastComparison != 0) {
12208
        return lastComparison;
12209
      }
12210
      lastComparison = TBaseHelper.compareTo(invoice_number, typedOther.invoice_number);
12211
      if (lastComparison != 0) {
12212
        return lastComparison;
12213
      }
12214
      lastComparison = Boolean.valueOf(isSetBilled_by()).compareTo(isSetBilled_by());
12215
      if (lastComparison != 0) {
12216
        return lastComparison;
12217
      }
12218
      lastComparison = TBaseHelper.compareTo(billed_by, typedOther.billed_by);
12219
      if (lastComparison != 0) {
12220
        return lastComparison;
12221
      }
12222
      return 0;
12223
    }
12224
 
12225
    public void read(TProtocol iprot) throws TException {
12226
      TField field;
12227
      iprot.readStructBegin();
12228
      while (true)
12229
      {
12230
        field = iprot.readFieldBegin();
12231
        if (field.type == TType.STOP) { 
12232
          break;
12233
        }
12234
        _Fields fieldId = _Fields.findByThriftId(field.id);
12235
        if (fieldId == null) {
12236
          TProtocolUtil.skip(iprot, field.type);
12237
        } else {
12238
          switch (fieldId) {
12239
            case ORDER_ID:
12240
              if (field.type == TType.I64) {
12241
                this.orderId = iprot.readI64();
12242
                setOrderIdIsSet(true);
12243
              } else { 
12244
                TProtocolUtil.skip(iprot, field.type);
12245
              }
12246
              break;
12247
            case INVOICE_NUMBER:
12248
              if (field.type == TType.STRING) {
12249
                this.invoice_number = iprot.readString();
12250
              } else { 
12251
                TProtocolUtil.skip(iprot, field.type);
12252
              }
12253
              break;
12254
            case BILLED_BY:
12255
              if (field.type == TType.STRING) {
12256
                this.billed_by = iprot.readString();
12257
              } else { 
12258
                TProtocolUtil.skip(iprot, field.type);
12259
              }
12260
              break;
12261
          }
12262
          iprot.readFieldEnd();
12263
        }
12264
      }
12265
      iprot.readStructEnd();
12266
      validate();
12267
    }
12268
 
12269
    public void write(TProtocol oprot) throws TException {
12270
      validate();
12271
 
12272
      oprot.writeStructBegin(STRUCT_DESC);
12273
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
12274
      oprot.writeI64(this.orderId);
12275
      oprot.writeFieldEnd();
12276
      if (this.invoice_number != null) {
12277
        oprot.writeFieldBegin(INVOICE_NUMBER_FIELD_DESC);
12278
        oprot.writeString(this.invoice_number);
12279
        oprot.writeFieldEnd();
12280
      }
12281
      if (this.billed_by != null) {
12282
        oprot.writeFieldBegin(BILLED_BY_FIELD_DESC);
12283
        oprot.writeString(this.billed_by);
12284
        oprot.writeFieldEnd();
12285
      }
12286
      oprot.writeFieldStop();
12287
      oprot.writeStructEnd();
12288
    }
12289
 
12290
    @Override
12291
    public String toString() {
12292
      StringBuilder sb = new StringBuilder("addBillingDetails_args(");
12293
      boolean first = true;
12294
 
12295
      sb.append("orderId:");
12296
      sb.append(this.orderId);
12297
      first = false;
12298
      if (!first) sb.append(", ");
12299
      sb.append("invoice_number:");
12300
      if (this.invoice_number == null) {
12301
        sb.append("null");
12302
      } else {
12303
        sb.append(this.invoice_number);
12304
      }
12305
      first = false;
12306
      if (!first) sb.append(", ");
12307
      sb.append("billed_by:");
12308
      if (this.billed_by == null) {
12309
        sb.append("null");
12310
      } else {
12311
        sb.append(this.billed_by);
12312
      }
12313
      first = false;
12314
      sb.append(")");
12315
      return sb.toString();
12316
    }
12317
 
12318
    public void validate() throws TException {
12319
      // check for required fields
12320
    }
12321
 
12322
  }
12323
 
12324
  public static class addBillingDetails_result implements TBase<addBillingDetails_result._Fields>, java.io.Serializable, Cloneable, Comparable<addBillingDetails_result>   {
12325
    private static final TStruct STRUCT_DESC = new TStruct("addBillingDetails_result");
12326
 
12327
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
12328
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
12329
 
12330
    private boolean success;
12331
    private TransactionServiceException ex;
12332
 
12333
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12334
    public enum _Fields implements TFieldIdEnum {
12335
      SUCCESS((short)0, "success"),
12336
      EX((short)1, "ex");
12337
 
12338
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
12339
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12340
 
12341
      static {
12342
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12343
          byId.put((int)field._thriftId, field);
12344
          byName.put(field.getFieldName(), field);
12345
        }
12346
      }
12347
 
12348
      /**
12349
       * Find the _Fields constant that matches fieldId, or null if its not found.
12350
       */
12351
      public static _Fields findByThriftId(int fieldId) {
12352
        return byId.get(fieldId);
12353
      }
12354
 
12355
      /**
12356
       * Find the _Fields constant that matches fieldId, throwing an exception
12357
       * if it is not found.
12358
       */
12359
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12360
        _Fields fields = findByThriftId(fieldId);
12361
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12362
        return fields;
12363
      }
12364
 
12365
      /**
12366
       * Find the _Fields constant that matches name, or null if its not found.
12367
       */
12368
      public static _Fields findByName(String name) {
12369
        return byName.get(name);
12370
      }
12371
 
12372
      private final short _thriftId;
12373
      private final String _fieldName;
12374
 
12375
      _Fields(short thriftId, String fieldName) {
12376
        _thriftId = thriftId;
12377
        _fieldName = fieldName;
12378
      }
12379
 
12380
      public short getThriftFieldId() {
12381
        return _thriftId;
12382
      }
12383
 
12384
      public String getFieldName() {
12385
        return _fieldName;
12386
      }
12387
    }
12388
 
12389
    // isset id assignments
12390
    private static final int __SUCCESS_ISSET_ID = 0;
12391
    private BitSet __isset_bit_vector = new BitSet(1);
12392
 
12393
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
12394
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
12395
          new FieldValueMetaData(TType.BOOL)));
12396
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
12397
          new FieldValueMetaData(TType.STRUCT)));
12398
    }});
12399
 
12400
    static {
12401
      FieldMetaData.addStructMetaDataMap(addBillingDetails_result.class, metaDataMap);
12402
    }
12403
 
12404
    public addBillingDetails_result() {
12405
    }
12406
 
12407
    public addBillingDetails_result(
12408
      boolean success,
12409
      TransactionServiceException ex)
12410
    {
12411
      this();
12412
      this.success = success;
12413
      setSuccessIsSet(true);
12414
      this.ex = ex;
12415
    }
12416
 
12417
    /**
12418
     * Performs a deep copy on <i>other</i>.
12419
     */
12420
    public addBillingDetails_result(addBillingDetails_result other) {
12421
      __isset_bit_vector.clear();
12422
      __isset_bit_vector.or(other.__isset_bit_vector);
12423
      this.success = other.success;
12424
      if (other.isSetEx()) {
12425
        this.ex = new TransactionServiceException(other.ex);
12426
      }
12427
    }
12428
 
12429
    public addBillingDetails_result deepCopy() {
12430
      return new addBillingDetails_result(this);
12431
    }
12432
 
12433
    @Deprecated
12434
    public addBillingDetails_result clone() {
12435
      return new addBillingDetails_result(this);
12436
    }
12437
 
12438
    public boolean isSuccess() {
12439
      return this.success;
12440
    }
12441
 
12442
    public addBillingDetails_result setSuccess(boolean success) {
12443
      this.success = success;
12444
      setSuccessIsSet(true);
12445
      return this;
12446
    }
12447
 
12448
    public void unsetSuccess() {
12449
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
12450
    }
12451
 
12452
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
12453
    public boolean isSetSuccess() {
12454
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
12455
    }
12456
 
12457
    public void setSuccessIsSet(boolean value) {
12458
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
12459
    }
12460
 
12461
    public TransactionServiceException getEx() {
12462
      return this.ex;
12463
    }
12464
 
12465
    public addBillingDetails_result setEx(TransactionServiceException ex) {
12466
      this.ex = ex;
12467
      return this;
12468
    }
12469
 
12470
    public void unsetEx() {
12471
      this.ex = null;
12472
    }
12473
 
12474
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
12475
    public boolean isSetEx() {
12476
      return this.ex != null;
12477
    }
12478
 
12479
    public void setExIsSet(boolean value) {
12480
      if (!value) {
12481
        this.ex = null;
12482
      }
12483
    }
12484
 
12485
    public void setFieldValue(_Fields field, Object value) {
12486
      switch (field) {
12487
      case SUCCESS:
12488
        if (value == null) {
12489
          unsetSuccess();
12490
        } else {
12491
          setSuccess((Boolean)value);
12492
        }
12493
        break;
12494
 
12495
      case EX:
12496
        if (value == null) {
12497
          unsetEx();
12498
        } else {
12499
          setEx((TransactionServiceException)value);
12500
        }
12501
        break;
12502
 
12503
      }
12504
    }
12505
 
12506
    public void setFieldValue(int fieldID, Object value) {
12507
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
12508
    }
12509
 
12510
    public Object getFieldValue(_Fields field) {
12511
      switch (field) {
12512
      case SUCCESS:
12513
        return new Boolean(isSuccess());
12514
 
12515
      case EX:
12516
        return getEx();
12517
 
12518
      }
12519
      throw new IllegalStateException();
12520
    }
12521
 
12522
    public Object getFieldValue(int fieldId) {
12523
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
12524
    }
12525
 
12526
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
12527
    public boolean isSet(_Fields field) {
12528
      switch (field) {
12529
      case SUCCESS:
12530
        return isSetSuccess();
12531
      case EX:
12532
        return isSetEx();
12533
      }
12534
      throw new IllegalStateException();
12535
    }
12536
 
12537
    public boolean isSet(int fieldID) {
12538
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
12539
    }
12540
 
12541
    @Override
12542
    public boolean equals(Object that) {
12543
      if (that == null)
12544
        return false;
12545
      if (that instanceof addBillingDetails_result)
12546
        return this.equals((addBillingDetails_result)that);
12547
      return false;
12548
    }
12549
 
12550
    public boolean equals(addBillingDetails_result that) {
12551
      if (that == null)
12552
        return false;
12553
 
12554
      boolean this_present_success = true;
12555
      boolean that_present_success = true;
12556
      if (this_present_success || that_present_success) {
12557
        if (!(this_present_success && that_present_success))
12558
          return false;
12559
        if (this.success != that.success)
12560
          return false;
12561
      }
12562
 
12563
      boolean this_present_ex = true && this.isSetEx();
12564
      boolean that_present_ex = true && that.isSetEx();
12565
      if (this_present_ex || that_present_ex) {
12566
        if (!(this_present_ex && that_present_ex))
12567
          return false;
12568
        if (!this.ex.equals(that.ex))
12569
          return false;
12570
      }
12571
 
12572
      return true;
12573
    }
12574
 
12575
    @Override
12576
    public int hashCode() {
12577
      return 0;
12578
    }
12579
 
12580
    public int compareTo(addBillingDetails_result other) {
12581
      if (!getClass().equals(other.getClass())) {
12582
        return getClass().getName().compareTo(other.getClass().getName());
12583
      }
12584
 
12585
      int lastComparison = 0;
12586
      addBillingDetails_result typedOther = (addBillingDetails_result)other;
12587
 
12588
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
12589
      if (lastComparison != 0) {
12590
        return lastComparison;
12591
      }
12592
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
12593
      if (lastComparison != 0) {
12594
        return lastComparison;
12595
      }
12596
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
12597
      if (lastComparison != 0) {
12598
        return lastComparison;
12599
      }
12600
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
12601
      if (lastComparison != 0) {
12602
        return lastComparison;
12603
      }
12604
      return 0;
12605
    }
12606
 
12607
    public void read(TProtocol iprot) throws TException {
12608
      TField field;
12609
      iprot.readStructBegin();
12610
      while (true)
12611
      {
12612
        field = iprot.readFieldBegin();
12613
        if (field.type == TType.STOP) { 
12614
          break;
12615
        }
12616
        _Fields fieldId = _Fields.findByThriftId(field.id);
12617
        if (fieldId == null) {
12618
          TProtocolUtil.skip(iprot, field.type);
12619
        } else {
12620
          switch (fieldId) {
12621
            case SUCCESS:
12622
              if (field.type == TType.BOOL) {
12623
                this.success = iprot.readBool();
12624
                setSuccessIsSet(true);
12625
              } else { 
12626
                TProtocolUtil.skip(iprot, field.type);
12627
              }
12628
              break;
12629
            case EX:
12630
              if (field.type == TType.STRUCT) {
12631
                this.ex = new TransactionServiceException();
12632
                this.ex.read(iprot);
12633
              } else { 
12634
                TProtocolUtil.skip(iprot, field.type);
12635
              }
12636
              break;
12637
          }
12638
          iprot.readFieldEnd();
12639
        }
12640
      }
12641
      iprot.readStructEnd();
12642
      validate();
12643
    }
12644
 
12645
    public void write(TProtocol oprot) throws TException {
12646
      oprot.writeStructBegin(STRUCT_DESC);
12647
 
12648
      if (this.isSetSuccess()) {
12649
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
12650
        oprot.writeBool(this.success);
12651
        oprot.writeFieldEnd();
12652
      } else if (this.isSetEx()) {
12653
        oprot.writeFieldBegin(EX_FIELD_DESC);
12654
        this.ex.write(oprot);
12655
        oprot.writeFieldEnd();
12656
      }
12657
      oprot.writeFieldStop();
12658
      oprot.writeStructEnd();
12659
    }
12660
 
12661
    @Override
12662
    public String toString() {
12663
      StringBuilder sb = new StringBuilder("addBillingDetails_result(");
12664
      boolean first = true;
12665
 
12666
      sb.append("success:");
12667
      sb.append(this.success);
12668
      first = false;
12669
      if (!first) sb.append(", ");
12670
      sb.append("ex:");
12671
      if (this.ex == null) {
12672
        sb.append("null");
12673
      } else {
12674
        sb.append(this.ex);
12675
      }
12676
      first = false;
12677
      sb.append(")");
12678
      return sb.toString();
12679
    }
12680
 
12681
    public void validate() throws TException {
12682
      // check for required fields
12683
    }
12684
 
12685
  }
12686
 
1148 chandransh 12687
  public static class addJacketNumber_args implements TBase<addJacketNumber_args._Fields>, java.io.Serializable, Cloneable, Comparable<addJacketNumber_args>   {
12688
    private static final TStruct STRUCT_DESC = new TStruct("addJacketNumber_args");
12689
 
12690
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
12691
    private static final TField JACKET_NUMBER_FIELD_DESC = new TField("jacketNumber", TType.I64, (short)2);
12692
 
12693
    private long orderId;
12694
    private long jacketNumber;
12695
 
12696
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12697
    public enum _Fields implements TFieldIdEnum {
12698
      ORDER_ID((short)1, "orderId"),
12699
      JACKET_NUMBER((short)2, "jacketNumber");
12700
 
12701
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
12702
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12703
 
12704
      static {
12705
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12706
          byId.put((int)field._thriftId, field);
12707
          byName.put(field.getFieldName(), field);
12708
        }
12709
      }
12710
 
12711
      /**
12712
       * Find the _Fields constant that matches fieldId, or null if its not found.
12713
       */
12714
      public static _Fields findByThriftId(int fieldId) {
12715
        return byId.get(fieldId);
12716
      }
12717
 
12718
      /**
12719
       * Find the _Fields constant that matches fieldId, throwing an exception
12720
       * if it is not found.
12721
       */
12722
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12723
        _Fields fields = findByThriftId(fieldId);
12724
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12725
        return fields;
12726
      }
12727
 
12728
      /**
12729
       * Find the _Fields constant that matches name, or null if its not found.
12730
       */
12731
      public static _Fields findByName(String name) {
12732
        return byName.get(name);
12733
      }
12734
 
12735
      private final short _thriftId;
12736
      private final String _fieldName;
12737
 
12738
      _Fields(short thriftId, String fieldName) {
12739
        _thriftId = thriftId;
12740
        _fieldName = fieldName;
12741
      }
12742
 
12743
      public short getThriftFieldId() {
12744
        return _thriftId;
12745
      }
12746
 
12747
      public String getFieldName() {
12748
        return _fieldName;
12749
      }
12750
    }
12751
 
12752
    // isset id assignments
12753
    private static final int __ORDERID_ISSET_ID = 0;
12754
    private static final int __JACKETNUMBER_ISSET_ID = 1;
12755
    private BitSet __isset_bit_vector = new BitSet(2);
12756
 
12757
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
12758
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
12759
          new FieldValueMetaData(TType.I64)));
12760
      put(_Fields.JACKET_NUMBER, new FieldMetaData("jacketNumber", TFieldRequirementType.DEFAULT, 
12761
          new FieldValueMetaData(TType.I64)));
12762
    }});
12763
 
12764
    static {
12765
      FieldMetaData.addStructMetaDataMap(addJacketNumber_args.class, metaDataMap);
12766
    }
12767
 
12768
    public addJacketNumber_args() {
12769
    }
12770
 
12771
    public addJacketNumber_args(
12772
      long orderId,
12773
      long jacketNumber)
12774
    {
12775
      this();
12776
      this.orderId = orderId;
12777
      setOrderIdIsSet(true);
12778
      this.jacketNumber = jacketNumber;
12779
      setJacketNumberIsSet(true);
12780
    }
12781
 
12782
    /**
12783
     * Performs a deep copy on <i>other</i>.
12784
     */
12785
    public addJacketNumber_args(addJacketNumber_args other) {
12786
      __isset_bit_vector.clear();
12787
      __isset_bit_vector.or(other.__isset_bit_vector);
12788
      this.orderId = other.orderId;
12789
      this.jacketNumber = other.jacketNumber;
12790
    }
12791
 
12792
    public addJacketNumber_args deepCopy() {
12793
      return new addJacketNumber_args(this);
12794
    }
12795
 
12796
    @Deprecated
12797
    public addJacketNumber_args clone() {
12798
      return new addJacketNumber_args(this);
12799
    }
12800
 
12801
    public long getOrderId() {
12802
      return this.orderId;
12803
    }
12804
 
12805
    public addJacketNumber_args setOrderId(long orderId) {
12806
      this.orderId = orderId;
12807
      setOrderIdIsSet(true);
12808
      return this;
12809
    }
12810
 
12811
    public void unsetOrderId() {
12812
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
12813
    }
12814
 
12815
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
12816
    public boolean isSetOrderId() {
12817
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
12818
    }
12819
 
12820
    public void setOrderIdIsSet(boolean value) {
12821
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
12822
    }
12823
 
12824
    public long getJacketNumber() {
12825
      return this.jacketNumber;
12826
    }
12827
 
12828
    public addJacketNumber_args setJacketNumber(long jacketNumber) {
12829
      this.jacketNumber = jacketNumber;
12830
      setJacketNumberIsSet(true);
12831
      return this;
12832
    }
12833
 
12834
    public void unsetJacketNumber() {
12835
      __isset_bit_vector.clear(__JACKETNUMBER_ISSET_ID);
12836
    }
12837
 
12838
    /** Returns true if field jacketNumber is set (has been asigned a value) and false otherwise */
12839
    public boolean isSetJacketNumber() {
12840
      return __isset_bit_vector.get(__JACKETNUMBER_ISSET_ID);
12841
    }
12842
 
12843
    public void setJacketNumberIsSet(boolean value) {
12844
      __isset_bit_vector.set(__JACKETNUMBER_ISSET_ID, value);
12845
    }
12846
 
12847
    public void setFieldValue(_Fields field, Object value) {
12848
      switch (field) {
12849
      case ORDER_ID:
12850
        if (value == null) {
12851
          unsetOrderId();
12852
        } else {
12853
          setOrderId((Long)value);
12854
        }
12855
        break;
12856
 
12857
      case JACKET_NUMBER:
12858
        if (value == null) {
12859
          unsetJacketNumber();
12860
        } else {
12861
          setJacketNumber((Long)value);
12862
        }
12863
        break;
12864
 
12865
      }
12866
    }
12867
 
12868
    public void setFieldValue(int fieldID, Object value) {
12869
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
12870
    }
12871
 
12872
    public Object getFieldValue(_Fields field) {
12873
      switch (field) {
12874
      case ORDER_ID:
12875
        return new Long(getOrderId());
12876
 
12877
      case JACKET_NUMBER:
12878
        return new Long(getJacketNumber());
12879
 
12880
      }
12881
      throw new IllegalStateException();
12882
    }
12883
 
12884
    public Object getFieldValue(int fieldId) {
12885
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
12886
    }
12887
 
12888
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
12889
    public boolean isSet(_Fields field) {
12890
      switch (field) {
12891
      case ORDER_ID:
12892
        return isSetOrderId();
12893
      case JACKET_NUMBER:
12894
        return isSetJacketNumber();
12895
      }
12896
      throw new IllegalStateException();
12897
    }
12898
 
12899
    public boolean isSet(int fieldID) {
12900
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
12901
    }
12902
 
12903
    @Override
12904
    public boolean equals(Object that) {
12905
      if (that == null)
12906
        return false;
12907
      if (that instanceof addJacketNumber_args)
12908
        return this.equals((addJacketNumber_args)that);
12909
      return false;
12910
    }
12911
 
12912
    public boolean equals(addJacketNumber_args that) {
12913
      if (that == null)
12914
        return false;
12915
 
12916
      boolean this_present_orderId = true;
12917
      boolean that_present_orderId = true;
12918
      if (this_present_orderId || that_present_orderId) {
12919
        if (!(this_present_orderId && that_present_orderId))
12920
          return false;
12921
        if (this.orderId != that.orderId)
12922
          return false;
12923
      }
12924
 
12925
      boolean this_present_jacketNumber = true;
12926
      boolean that_present_jacketNumber = true;
12927
      if (this_present_jacketNumber || that_present_jacketNumber) {
12928
        if (!(this_present_jacketNumber && that_present_jacketNumber))
12929
          return false;
12930
        if (this.jacketNumber != that.jacketNumber)
12931
          return false;
12932
      }
12933
 
12934
      return true;
12935
    }
12936
 
12937
    @Override
12938
    public int hashCode() {
12939
      return 0;
12940
    }
12941
 
12942
    public int compareTo(addJacketNumber_args other) {
12943
      if (!getClass().equals(other.getClass())) {
12944
        return getClass().getName().compareTo(other.getClass().getName());
12945
      }
12946
 
12947
      int lastComparison = 0;
12948
      addJacketNumber_args typedOther = (addJacketNumber_args)other;
12949
 
12950
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
12951
      if (lastComparison != 0) {
12952
        return lastComparison;
12953
      }
12954
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
12955
      if (lastComparison != 0) {
12956
        return lastComparison;
12957
      }
12958
      lastComparison = Boolean.valueOf(isSetJacketNumber()).compareTo(isSetJacketNumber());
12959
      if (lastComparison != 0) {
12960
        return lastComparison;
12961
      }
12962
      lastComparison = TBaseHelper.compareTo(jacketNumber, typedOther.jacketNumber);
12963
      if (lastComparison != 0) {
12964
        return lastComparison;
12965
      }
12966
      return 0;
12967
    }
12968
 
12969
    public void read(TProtocol iprot) throws TException {
12970
      TField field;
12971
      iprot.readStructBegin();
12972
      while (true)
12973
      {
12974
        field = iprot.readFieldBegin();
12975
        if (field.type == TType.STOP) { 
12976
          break;
12977
        }
12978
        _Fields fieldId = _Fields.findByThriftId(field.id);
12979
        if (fieldId == null) {
12980
          TProtocolUtil.skip(iprot, field.type);
12981
        } else {
12982
          switch (fieldId) {
12983
            case ORDER_ID:
12984
              if (field.type == TType.I64) {
12985
                this.orderId = iprot.readI64();
12986
                setOrderIdIsSet(true);
12987
              } else { 
12988
                TProtocolUtil.skip(iprot, field.type);
12989
              }
12990
              break;
12991
            case JACKET_NUMBER:
12992
              if (field.type == TType.I64) {
12993
                this.jacketNumber = iprot.readI64();
12994
                setJacketNumberIsSet(true);
12995
              } else { 
12996
                TProtocolUtil.skip(iprot, field.type);
12997
              }
12998
              break;
12999
          }
13000
          iprot.readFieldEnd();
13001
        }
13002
      }
13003
      iprot.readStructEnd();
13004
      validate();
13005
    }
13006
 
13007
    public void write(TProtocol oprot) throws TException {
13008
      validate();
13009
 
13010
      oprot.writeStructBegin(STRUCT_DESC);
13011
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
13012
      oprot.writeI64(this.orderId);
13013
      oprot.writeFieldEnd();
13014
      oprot.writeFieldBegin(JACKET_NUMBER_FIELD_DESC);
13015
      oprot.writeI64(this.jacketNumber);
13016
      oprot.writeFieldEnd();
13017
      oprot.writeFieldStop();
13018
      oprot.writeStructEnd();
13019
    }
13020
 
13021
    @Override
13022
    public String toString() {
13023
      StringBuilder sb = new StringBuilder("addJacketNumber_args(");
13024
      boolean first = true;
13025
 
13026
      sb.append("orderId:");
13027
      sb.append(this.orderId);
13028
      first = false;
13029
      if (!first) sb.append(", ");
13030
      sb.append("jacketNumber:");
13031
      sb.append(this.jacketNumber);
13032
      first = false;
13033
      sb.append(")");
13034
      return sb.toString();
13035
    }
13036
 
13037
    public void validate() throws TException {
13038
      // check for required fields
13039
    }
13040
 
13041
  }
13042
 
13043
  public static class addJacketNumber_result implements TBase<addJacketNumber_result._Fields>, java.io.Serializable, Cloneable, Comparable<addJacketNumber_result>   {
13044
    private static final TStruct STRUCT_DESC = new TStruct("addJacketNumber_result");
13045
 
13046
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
13047
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
13048
 
13049
    private boolean success;
13050
    private TransactionServiceException ex;
13051
 
13052
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13053
    public enum _Fields implements TFieldIdEnum {
13054
      SUCCESS((short)0, "success"),
13055
      EX((short)1, "ex");
13056
 
13057
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
13058
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13059
 
13060
      static {
13061
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13062
          byId.put((int)field._thriftId, field);
13063
          byName.put(field.getFieldName(), field);
13064
        }
13065
      }
13066
 
13067
      /**
13068
       * Find the _Fields constant that matches fieldId, or null if its not found.
13069
       */
13070
      public static _Fields findByThriftId(int fieldId) {
13071
        return byId.get(fieldId);
13072
      }
13073
 
13074
      /**
13075
       * Find the _Fields constant that matches fieldId, throwing an exception
13076
       * if it is not found.
13077
       */
13078
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13079
        _Fields fields = findByThriftId(fieldId);
13080
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13081
        return fields;
13082
      }
13083
 
13084
      /**
13085
       * Find the _Fields constant that matches name, or null if its not found.
13086
       */
13087
      public static _Fields findByName(String name) {
13088
        return byName.get(name);
13089
      }
13090
 
13091
      private final short _thriftId;
13092
      private final String _fieldName;
13093
 
13094
      _Fields(short thriftId, String fieldName) {
13095
        _thriftId = thriftId;
13096
        _fieldName = fieldName;
13097
      }
13098
 
13099
      public short getThriftFieldId() {
13100
        return _thriftId;
13101
      }
13102
 
13103
      public String getFieldName() {
13104
        return _fieldName;
13105
      }
13106
    }
13107
 
13108
    // isset id assignments
13109
    private static final int __SUCCESS_ISSET_ID = 0;
13110
    private BitSet __isset_bit_vector = new BitSet(1);
13111
 
13112
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
13113
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
13114
          new FieldValueMetaData(TType.BOOL)));
13115
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
13116
          new FieldValueMetaData(TType.STRUCT)));
13117
    }});
13118
 
13119
    static {
13120
      FieldMetaData.addStructMetaDataMap(addJacketNumber_result.class, metaDataMap);
13121
    }
13122
 
13123
    public addJacketNumber_result() {
13124
    }
13125
 
13126
    public addJacketNumber_result(
13127
      boolean success,
13128
      TransactionServiceException ex)
13129
    {
13130
      this();
13131
      this.success = success;
13132
      setSuccessIsSet(true);
13133
      this.ex = ex;
13134
    }
13135
 
13136
    /**
13137
     * Performs a deep copy on <i>other</i>.
13138
     */
13139
    public addJacketNumber_result(addJacketNumber_result other) {
13140
      __isset_bit_vector.clear();
13141
      __isset_bit_vector.or(other.__isset_bit_vector);
13142
      this.success = other.success;
13143
      if (other.isSetEx()) {
13144
        this.ex = new TransactionServiceException(other.ex);
13145
      }
13146
    }
13147
 
13148
    public addJacketNumber_result deepCopy() {
13149
      return new addJacketNumber_result(this);
13150
    }
13151
 
13152
    @Deprecated
13153
    public addJacketNumber_result clone() {
13154
      return new addJacketNumber_result(this);
13155
    }
13156
 
13157
    public boolean isSuccess() {
13158
      return this.success;
13159
    }
13160
 
13161
    public addJacketNumber_result setSuccess(boolean success) {
13162
      this.success = success;
13163
      setSuccessIsSet(true);
13164
      return this;
13165
    }
13166
 
13167
    public void unsetSuccess() {
13168
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
13169
    }
13170
 
13171
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
13172
    public boolean isSetSuccess() {
13173
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
13174
    }
13175
 
13176
    public void setSuccessIsSet(boolean value) {
13177
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
13178
    }
13179
 
13180
    public TransactionServiceException getEx() {
13181
      return this.ex;
13182
    }
13183
 
13184
    public addJacketNumber_result setEx(TransactionServiceException ex) {
13185
      this.ex = ex;
13186
      return this;
13187
    }
13188
 
13189
    public void unsetEx() {
13190
      this.ex = null;
13191
    }
13192
 
13193
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
13194
    public boolean isSetEx() {
13195
      return this.ex != null;
13196
    }
13197
 
13198
    public void setExIsSet(boolean value) {
13199
      if (!value) {
13200
        this.ex = null;
13201
      }
13202
    }
13203
 
13204
    public void setFieldValue(_Fields field, Object value) {
13205
      switch (field) {
13206
      case SUCCESS:
13207
        if (value == null) {
13208
          unsetSuccess();
13209
        } else {
13210
          setSuccess((Boolean)value);
13211
        }
13212
        break;
13213
 
13214
      case EX:
13215
        if (value == null) {
13216
          unsetEx();
13217
        } else {
13218
          setEx((TransactionServiceException)value);
13219
        }
13220
        break;
13221
 
13222
      }
13223
    }
13224
 
13225
    public void setFieldValue(int fieldID, Object value) {
13226
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
13227
    }
13228
 
13229
    public Object getFieldValue(_Fields field) {
13230
      switch (field) {
13231
      case SUCCESS:
13232
        return new Boolean(isSuccess());
13233
 
13234
      case EX:
13235
        return getEx();
13236
 
13237
      }
13238
      throw new IllegalStateException();
13239
    }
13240
 
13241
    public Object getFieldValue(int fieldId) {
13242
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
13243
    }
13244
 
13245
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
13246
    public boolean isSet(_Fields field) {
13247
      switch (field) {
13248
      case SUCCESS:
13249
        return isSetSuccess();
13250
      case EX:
13251
        return isSetEx();
13252
      }
13253
      throw new IllegalStateException();
13254
    }
13255
 
13256
    public boolean isSet(int fieldID) {
13257
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
13258
    }
13259
 
13260
    @Override
13261
    public boolean equals(Object that) {
13262
      if (that == null)
13263
        return false;
13264
      if (that instanceof addJacketNumber_result)
13265
        return this.equals((addJacketNumber_result)that);
13266
      return false;
13267
    }
13268
 
13269
    public boolean equals(addJacketNumber_result that) {
13270
      if (that == null)
13271
        return false;
13272
 
13273
      boolean this_present_success = true;
13274
      boolean that_present_success = true;
13275
      if (this_present_success || that_present_success) {
13276
        if (!(this_present_success && that_present_success))
13277
          return false;
13278
        if (this.success != that.success)
13279
          return false;
13280
      }
13281
 
13282
      boolean this_present_ex = true && this.isSetEx();
13283
      boolean that_present_ex = true && that.isSetEx();
13284
      if (this_present_ex || that_present_ex) {
13285
        if (!(this_present_ex && that_present_ex))
13286
          return false;
13287
        if (!this.ex.equals(that.ex))
13288
          return false;
13289
      }
13290
 
13291
      return true;
13292
    }
13293
 
13294
    @Override
13295
    public int hashCode() {
13296
      return 0;
13297
    }
13298
 
13299
    public int compareTo(addJacketNumber_result other) {
13300
      if (!getClass().equals(other.getClass())) {
13301
        return getClass().getName().compareTo(other.getClass().getName());
13302
      }
13303
 
13304
      int lastComparison = 0;
13305
      addJacketNumber_result typedOther = (addJacketNumber_result)other;
13306
 
13307
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
13308
      if (lastComparison != 0) {
13309
        return lastComparison;
13310
      }
13311
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
13312
      if (lastComparison != 0) {
13313
        return lastComparison;
13314
      }
13315
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
13316
      if (lastComparison != 0) {
13317
        return lastComparison;
13318
      }
13319
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
13320
      if (lastComparison != 0) {
13321
        return lastComparison;
13322
      }
13323
      return 0;
13324
    }
13325
 
13326
    public void read(TProtocol iprot) throws TException {
13327
      TField field;
13328
      iprot.readStructBegin();
13329
      while (true)
13330
      {
13331
        field = iprot.readFieldBegin();
13332
        if (field.type == TType.STOP) { 
13333
          break;
13334
        }
13335
        _Fields fieldId = _Fields.findByThriftId(field.id);
13336
        if (fieldId == null) {
13337
          TProtocolUtil.skip(iprot, field.type);
13338
        } else {
13339
          switch (fieldId) {
13340
            case SUCCESS:
13341
              if (field.type == TType.BOOL) {
13342
                this.success = iprot.readBool();
13343
                setSuccessIsSet(true);
13344
              } else { 
13345
                TProtocolUtil.skip(iprot, field.type);
13346
              }
13347
              break;
13348
            case EX:
13349
              if (field.type == TType.STRUCT) {
13350
                this.ex = new TransactionServiceException();
13351
                this.ex.read(iprot);
13352
              } else { 
13353
                TProtocolUtil.skip(iprot, field.type);
13354
              }
13355
              break;
13356
          }
13357
          iprot.readFieldEnd();
13358
        }
13359
      }
13360
      iprot.readStructEnd();
13361
      validate();
13362
    }
13363
 
13364
    public void write(TProtocol oprot) throws TException {
13365
      oprot.writeStructBegin(STRUCT_DESC);
13366
 
13367
      if (this.isSetSuccess()) {
13368
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
13369
        oprot.writeBool(this.success);
13370
        oprot.writeFieldEnd();
13371
      } else if (this.isSetEx()) {
13372
        oprot.writeFieldBegin(EX_FIELD_DESC);
13373
        this.ex.write(oprot);
13374
        oprot.writeFieldEnd();
13375
      }
13376
      oprot.writeFieldStop();
13377
      oprot.writeStructEnd();
13378
    }
13379
 
13380
    @Override
13381
    public String toString() {
13382
      StringBuilder sb = new StringBuilder("addJacketNumber_result(");
13383
      boolean first = true;
13384
 
13385
      sb.append("success:");
13386
      sb.append(this.success);
13387
      first = false;
13388
      if (!first) sb.append(", ");
13389
      sb.append("ex:");
13390
      if (this.ex == null) {
13391
        sb.append("null");
13392
      } else {
13393
        sb.append(this.ex);
13394
      }
13395
      first = false;
13396
      sb.append(")");
13397
      return sb.toString();
13398
    }
13399
 
13400
    public void validate() throws TException {
13401
      // check for required fields
13402
    }
13403
 
13404
  }
13405
 
923 rajveer 13406
  public static class acceptOrder_args implements TBase<acceptOrder_args._Fields>, java.io.Serializable, Cloneable, Comparable<acceptOrder_args>   {
13407
    private static final TStruct STRUCT_DESC = new TStruct("acceptOrder_args");
13408
 
13409
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
13410
 
13411
    private long orderId;
13412
 
13413
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13414
    public enum _Fields implements TFieldIdEnum {
13415
      ORDER_ID((short)1, "orderId");
13416
 
13417
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
13418
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13419
 
13420
      static {
13421
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13422
          byId.put((int)field._thriftId, field);
13423
          byName.put(field.getFieldName(), field);
13424
        }
13425
      }
13426
 
13427
      /**
13428
       * Find the _Fields constant that matches fieldId, or null if its not found.
13429
       */
13430
      public static _Fields findByThriftId(int fieldId) {
13431
        return byId.get(fieldId);
13432
      }
13433
 
13434
      /**
13435
       * Find the _Fields constant that matches fieldId, throwing an exception
13436
       * if it is not found.
13437
       */
13438
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13439
        _Fields fields = findByThriftId(fieldId);
13440
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13441
        return fields;
13442
      }
13443
 
13444
      /**
13445
       * Find the _Fields constant that matches name, or null if its not found.
13446
       */
13447
      public static _Fields findByName(String name) {
13448
        return byName.get(name);
13449
      }
13450
 
13451
      private final short _thriftId;
13452
      private final String _fieldName;
13453
 
13454
      _Fields(short thriftId, String fieldName) {
13455
        _thriftId = thriftId;
13456
        _fieldName = fieldName;
13457
      }
13458
 
13459
      public short getThriftFieldId() {
13460
        return _thriftId;
13461
      }
13462
 
13463
      public String getFieldName() {
13464
        return _fieldName;
13465
      }
13466
    }
13467
 
13468
    // isset id assignments
13469
    private static final int __ORDERID_ISSET_ID = 0;
13470
    private BitSet __isset_bit_vector = new BitSet(1);
13471
 
13472
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
13473
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
13474
          new FieldValueMetaData(TType.I64)));
13475
    }});
13476
 
13477
    static {
13478
      FieldMetaData.addStructMetaDataMap(acceptOrder_args.class, metaDataMap);
13479
    }
13480
 
13481
    public acceptOrder_args() {
13482
    }
13483
 
13484
    public acceptOrder_args(
13485
      long orderId)
13486
    {
13487
      this();
13488
      this.orderId = orderId;
13489
      setOrderIdIsSet(true);
13490
    }
13491
 
13492
    /**
13493
     * Performs a deep copy on <i>other</i>.
13494
     */
13495
    public acceptOrder_args(acceptOrder_args other) {
13496
      __isset_bit_vector.clear();
13497
      __isset_bit_vector.or(other.__isset_bit_vector);
13498
      this.orderId = other.orderId;
13499
    }
13500
 
13501
    public acceptOrder_args deepCopy() {
13502
      return new acceptOrder_args(this);
13503
    }
13504
 
13505
    @Deprecated
13506
    public acceptOrder_args clone() {
13507
      return new acceptOrder_args(this);
13508
    }
13509
 
13510
    public long getOrderId() {
13511
      return this.orderId;
13512
    }
13513
 
13514
    public acceptOrder_args setOrderId(long orderId) {
13515
      this.orderId = orderId;
13516
      setOrderIdIsSet(true);
13517
      return this;
13518
    }
13519
 
13520
    public void unsetOrderId() {
13521
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
13522
    }
13523
 
13524
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
13525
    public boolean isSetOrderId() {
13526
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
13527
    }
13528
 
13529
    public void setOrderIdIsSet(boolean value) {
13530
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
13531
    }
13532
 
13533
    public void setFieldValue(_Fields field, Object value) {
13534
      switch (field) {
13535
      case ORDER_ID:
13536
        if (value == null) {
13537
          unsetOrderId();
13538
        } else {
13539
          setOrderId((Long)value);
13540
        }
13541
        break;
13542
 
13543
      }
13544
    }
13545
 
13546
    public void setFieldValue(int fieldID, Object value) {
13547
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
13548
    }
13549
 
13550
    public Object getFieldValue(_Fields field) {
13551
      switch (field) {
13552
      case ORDER_ID:
13553
        return new Long(getOrderId());
13554
 
13555
      }
13556
      throw new IllegalStateException();
13557
    }
13558
 
13559
    public Object getFieldValue(int fieldId) {
13560
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
13561
    }
13562
 
13563
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
13564
    public boolean isSet(_Fields field) {
13565
      switch (field) {
13566
      case ORDER_ID:
13567
        return isSetOrderId();
13568
      }
13569
      throw new IllegalStateException();
13570
    }
13571
 
13572
    public boolean isSet(int fieldID) {
13573
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
13574
    }
13575
 
13576
    @Override
13577
    public boolean equals(Object that) {
13578
      if (that == null)
13579
        return false;
13580
      if (that instanceof acceptOrder_args)
13581
        return this.equals((acceptOrder_args)that);
13582
      return false;
13583
    }
13584
 
13585
    public boolean equals(acceptOrder_args that) {
13586
      if (that == null)
13587
        return false;
13588
 
13589
      boolean this_present_orderId = true;
13590
      boolean that_present_orderId = true;
13591
      if (this_present_orderId || that_present_orderId) {
13592
        if (!(this_present_orderId && that_present_orderId))
13593
          return false;
13594
        if (this.orderId != that.orderId)
13595
          return false;
13596
      }
13597
 
13598
      return true;
13599
    }
13600
 
13601
    @Override
13602
    public int hashCode() {
13603
      return 0;
13604
    }
13605
 
13606
    public int compareTo(acceptOrder_args other) {
13607
      if (!getClass().equals(other.getClass())) {
13608
        return getClass().getName().compareTo(other.getClass().getName());
13609
      }
13610
 
13611
      int lastComparison = 0;
13612
      acceptOrder_args typedOther = (acceptOrder_args)other;
13613
 
13614
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
13615
      if (lastComparison != 0) {
13616
        return lastComparison;
13617
      }
13618
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
13619
      if (lastComparison != 0) {
13620
        return lastComparison;
13621
      }
13622
      return 0;
13623
    }
13624
 
13625
    public void read(TProtocol iprot) throws TException {
13626
      TField field;
13627
      iprot.readStructBegin();
13628
      while (true)
13629
      {
13630
        field = iprot.readFieldBegin();
13631
        if (field.type == TType.STOP) { 
13632
          break;
13633
        }
13634
        _Fields fieldId = _Fields.findByThriftId(field.id);
13635
        if (fieldId == null) {
13636
          TProtocolUtil.skip(iprot, field.type);
13637
        } else {
13638
          switch (fieldId) {
13639
            case ORDER_ID:
13640
              if (field.type == TType.I64) {
13641
                this.orderId = iprot.readI64();
13642
                setOrderIdIsSet(true);
13643
              } else { 
13644
                TProtocolUtil.skip(iprot, field.type);
13645
              }
13646
              break;
13647
          }
13648
          iprot.readFieldEnd();
13649
        }
13650
      }
13651
      iprot.readStructEnd();
13652
      validate();
13653
    }
13654
 
13655
    public void write(TProtocol oprot) throws TException {
13656
      validate();
13657
 
13658
      oprot.writeStructBegin(STRUCT_DESC);
13659
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
13660
      oprot.writeI64(this.orderId);
13661
      oprot.writeFieldEnd();
13662
      oprot.writeFieldStop();
13663
      oprot.writeStructEnd();
13664
    }
13665
 
13666
    @Override
13667
    public String toString() {
13668
      StringBuilder sb = new StringBuilder("acceptOrder_args(");
13669
      boolean first = true;
13670
 
13671
      sb.append("orderId:");
13672
      sb.append(this.orderId);
13673
      first = false;
13674
      sb.append(")");
13675
      return sb.toString();
13676
    }
13677
 
13678
    public void validate() throws TException {
13679
      // check for required fields
13680
    }
13681
 
13682
  }
13683
 
13684
  public static class acceptOrder_result implements TBase<acceptOrder_result._Fields>, java.io.Serializable, Cloneable, Comparable<acceptOrder_result>   {
13685
    private static final TStruct STRUCT_DESC = new TStruct("acceptOrder_result");
13686
 
13687
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
13688
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
13689
 
13690
    private boolean success;
13691
    private TransactionServiceException ex;
13692
 
13693
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13694
    public enum _Fields implements TFieldIdEnum {
13695
      SUCCESS((short)0, "success"),
13696
      EX((short)1, "ex");
13697
 
13698
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
13699
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13700
 
13701
      static {
13702
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13703
          byId.put((int)field._thriftId, field);
13704
          byName.put(field.getFieldName(), field);
13705
        }
13706
      }
13707
 
13708
      /**
13709
       * Find the _Fields constant that matches fieldId, or null if its not found.
13710
       */
13711
      public static _Fields findByThriftId(int fieldId) {
13712
        return byId.get(fieldId);
13713
      }
13714
 
13715
      /**
13716
       * Find the _Fields constant that matches fieldId, throwing an exception
13717
       * if it is not found.
13718
       */
13719
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13720
        _Fields fields = findByThriftId(fieldId);
13721
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13722
        return fields;
13723
      }
13724
 
13725
      /**
13726
       * Find the _Fields constant that matches name, or null if its not found.
13727
       */
13728
      public static _Fields findByName(String name) {
13729
        return byName.get(name);
13730
      }
13731
 
13732
      private final short _thriftId;
13733
      private final String _fieldName;
13734
 
13735
      _Fields(short thriftId, String fieldName) {
13736
        _thriftId = thriftId;
13737
        _fieldName = fieldName;
13738
      }
13739
 
13740
      public short getThriftFieldId() {
13741
        return _thriftId;
13742
      }
13743
 
13744
      public String getFieldName() {
13745
        return _fieldName;
13746
      }
13747
    }
13748
 
13749
    // isset id assignments
13750
    private static final int __SUCCESS_ISSET_ID = 0;
13751
    private BitSet __isset_bit_vector = new BitSet(1);
13752
 
13753
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
13754
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
13755
          new FieldValueMetaData(TType.BOOL)));
13756
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
13757
          new FieldValueMetaData(TType.STRUCT)));
13758
    }});
13759
 
13760
    static {
13761
      FieldMetaData.addStructMetaDataMap(acceptOrder_result.class, metaDataMap);
13762
    }
13763
 
13764
    public acceptOrder_result() {
13765
    }
13766
 
13767
    public acceptOrder_result(
13768
      boolean success,
13769
      TransactionServiceException ex)
13770
    {
13771
      this();
13772
      this.success = success;
13773
      setSuccessIsSet(true);
13774
      this.ex = ex;
13775
    }
13776
 
13777
    /**
13778
     * Performs a deep copy on <i>other</i>.
13779
     */
13780
    public acceptOrder_result(acceptOrder_result other) {
13781
      __isset_bit_vector.clear();
13782
      __isset_bit_vector.or(other.__isset_bit_vector);
13783
      this.success = other.success;
13784
      if (other.isSetEx()) {
13785
        this.ex = new TransactionServiceException(other.ex);
13786
      }
13787
    }
13788
 
13789
    public acceptOrder_result deepCopy() {
13790
      return new acceptOrder_result(this);
13791
    }
13792
 
13793
    @Deprecated
13794
    public acceptOrder_result clone() {
13795
      return new acceptOrder_result(this);
13796
    }
13797
 
13798
    public boolean isSuccess() {
13799
      return this.success;
13800
    }
13801
 
13802
    public acceptOrder_result setSuccess(boolean success) {
13803
      this.success = success;
13804
      setSuccessIsSet(true);
13805
      return this;
13806
    }
13807
 
13808
    public void unsetSuccess() {
13809
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
13810
    }
13811
 
13812
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
13813
    public boolean isSetSuccess() {
13814
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
13815
    }
13816
 
13817
    public void setSuccessIsSet(boolean value) {
13818
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
13819
    }
13820
 
13821
    public TransactionServiceException getEx() {
13822
      return this.ex;
13823
    }
13824
 
13825
    public acceptOrder_result setEx(TransactionServiceException ex) {
13826
      this.ex = ex;
13827
      return this;
13828
    }
13829
 
13830
    public void unsetEx() {
13831
      this.ex = null;
13832
    }
13833
 
13834
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
13835
    public boolean isSetEx() {
13836
      return this.ex != null;
13837
    }
13838
 
13839
    public void setExIsSet(boolean value) {
13840
      if (!value) {
13841
        this.ex = null;
13842
      }
13843
    }
13844
 
13845
    public void setFieldValue(_Fields field, Object value) {
13846
      switch (field) {
13847
      case SUCCESS:
13848
        if (value == null) {
13849
          unsetSuccess();
13850
        } else {
13851
          setSuccess((Boolean)value);
13852
        }
13853
        break;
13854
 
13855
      case EX:
13856
        if (value == null) {
13857
          unsetEx();
13858
        } else {
13859
          setEx((TransactionServiceException)value);
13860
        }
13861
        break;
13862
 
13863
      }
13864
    }
13865
 
13866
    public void setFieldValue(int fieldID, Object value) {
13867
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
13868
    }
13869
 
13870
    public Object getFieldValue(_Fields field) {
13871
      switch (field) {
13872
      case SUCCESS:
13873
        return new Boolean(isSuccess());
13874
 
13875
      case EX:
13876
        return getEx();
13877
 
13878
      }
13879
      throw new IllegalStateException();
13880
    }
13881
 
13882
    public Object getFieldValue(int fieldId) {
13883
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
13884
    }
13885
 
13886
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
13887
    public boolean isSet(_Fields field) {
13888
      switch (field) {
13889
      case SUCCESS:
13890
        return isSetSuccess();
13891
      case EX:
13892
        return isSetEx();
13893
      }
13894
      throw new IllegalStateException();
13895
    }
13896
 
13897
    public boolean isSet(int fieldID) {
13898
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
13899
    }
13900
 
13901
    @Override
13902
    public boolean equals(Object that) {
13903
      if (that == null)
13904
        return false;
13905
      if (that instanceof acceptOrder_result)
13906
        return this.equals((acceptOrder_result)that);
13907
      return false;
13908
    }
13909
 
13910
    public boolean equals(acceptOrder_result that) {
13911
      if (that == null)
13912
        return false;
13913
 
13914
      boolean this_present_success = true;
13915
      boolean that_present_success = true;
13916
      if (this_present_success || that_present_success) {
13917
        if (!(this_present_success && that_present_success))
13918
          return false;
13919
        if (this.success != that.success)
13920
          return false;
13921
      }
13922
 
13923
      boolean this_present_ex = true && this.isSetEx();
13924
      boolean that_present_ex = true && that.isSetEx();
13925
      if (this_present_ex || that_present_ex) {
13926
        if (!(this_present_ex && that_present_ex))
13927
          return false;
13928
        if (!this.ex.equals(that.ex))
13929
          return false;
13930
      }
13931
 
13932
      return true;
13933
    }
13934
 
13935
    @Override
13936
    public int hashCode() {
13937
      return 0;
13938
    }
13939
 
13940
    public int compareTo(acceptOrder_result other) {
13941
      if (!getClass().equals(other.getClass())) {
13942
        return getClass().getName().compareTo(other.getClass().getName());
13943
      }
13944
 
13945
      int lastComparison = 0;
13946
      acceptOrder_result typedOther = (acceptOrder_result)other;
13947
 
13948
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
13949
      if (lastComparison != 0) {
13950
        return lastComparison;
13951
      }
13952
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
13953
      if (lastComparison != 0) {
13954
        return lastComparison;
13955
      }
13956
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
13957
      if (lastComparison != 0) {
13958
        return lastComparison;
13959
      }
13960
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
13961
      if (lastComparison != 0) {
13962
        return lastComparison;
13963
      }
13964
      return 0;
13965
    }
13966
 
13967
    public void read(TProtocol iprot) throws TException {
13968
      TField field;
13969
      iprot.readStructBegin();
13970
      while (true)
13971
      {
13972
        field = iprot.readFieldBegin();
13973
        if (field.type == TType.STOP) { 
13974
          break;
13975
        }
13976
        _Fields fieldId = _Fields.findByThriftId(field.id);
13977
        if (fieldId == null) {
13978
          TProtocolUtil.skip(iprot, field.type);
13979
        } else {
13980
          switch (fieldId) {
13981
            case SUCCESS:
13982
              if (field.type == TType.BOOL) {
13983
                this.success = iprot.readBool();
13984
                setSuccessIsSet(true);
13985
              } else { 
13986
                TProtocolUtil.skip(iprot, field.type);
13987
              }
13988
              break;
13989
            case EX:
13990
              if (field.type == TType.STRUCT) {
13991
                this.ex = new TransactionServiceException();
13992
                this.ex.read(iprot);
13993
              } else { 
13994
                TProtocolUtil.skip(iprot, field.type);
13995
              }
13996
              break;
13997
          }
13998
          iprot.readFieldEnd();
13999
        }
14000
      }
14001
      iprot.readStructEnd();
14002
      validate();
14003
    }
14004
 
14005
    public void write(TProtocol oprot) throws TException {
14006
      oprot.writeStructBegin(STRUCT_DESC);
14007
 
14008
      if (this.isSetSuccess()) {
14009
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
14010
        oprot.writeBool(this.success);
14011
        oprot.writeFieldEnd();
14012
      } else if (this.isSetEx()) {
14013
        oprot.writeFieldBegin(EX_FIELD_DESC);
14014
        this.ex.write(oprot);
14015
        oprot.writeFieldEnd();
14016
      }
14017
      oprot.writeFieldStop();
14018
      oprot.writeStructEnd();
14019
    }
14020
 
14021
    @Override
14022
    public String toString() {
14023
      StringBuilder sb = new StringBuilder("acceptOrder_result(");
14024
      boolean first = true;
14025
 
14026
      sb.append("success:");
14027
      sb.append(this.success);
14028
      first = false;
14029
      if (!first) sb.append(", ");
14030
      sb.append("ex:");
14031
      if (this.ex == null) {
14032
        sb.append("null");
14033
      } else {
14034
        sb.append(this.ex);
14035
      }
14036
      first = false;
14037
      sb.append(")");
14038
      return sb.toString();
14039
    }
14040
 
14041
    public void validate() throws TException {
14042
      // check for required fields
14043
    }
14044
 
14045
  }
14046
 
14047
  public static class billOrder_args implements TBase<billOrder_args._Fields>, java.io.Serializable, Cloneable, Comparable<billOrder_args>   {
14048
    private static final TStruct STRUCT_DESC = new TStruct("billOrder_args");
14049
 
14050
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
14051
 
14052
    private long orderId;
14053
 
14054
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14055
    public enum _Fields implements TFieldIdEnum {
14056
      ORDER_ID((short)1, "orderId");
14057
 
14058
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
14059
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14060
 
14061
      static {
14062
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14063
          byId.put((int)field._thriftId, field);
14064
          byName.put(field.getFieldName(), field);
14065
        }
14066
      }
14067
 
14068
      /**
14069
       * Find the _Fields constant that matches fieldId, or null if its not found.
14070
       */
14071
      public static _Fields findByThriftId(int fieldId) {
14072
        return byId.get(fieldId);
14073
      }
14074
 
14075
      /**
14076
       * Find the _Fields constant that matches fieldId, throwing an exception
14077
       * if it is not found.
14078
       */
14079
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14080
        _Fields fields = findByThriftId(fieldId);
14081
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14082
        return fields;
14083
      }
14084
 
14085
      /**
14086
       * Find the _Fields constant that matches name, or null if its not found.
14087
       */
14088
      public static _Fields findByName(String name) {
14089
        return byName.get(name);
14090
      }
14091
 
14092
      private final short _thriftId;
14093
      private final String _fieldName;
14094
 
14095
      _Fields(short thriftId, String fieldName) {
14096
        _thriftId = thriftId;
14097
        _fieldName = fieldName;
14098
      }
14099
 
14100
      public short getThriftFieldId() {
14101
        return _thriftId;
14102
      }
14103
 
14104
      public String getFieldName() {
14105
        return _fieldName;
14106
      }
14107
    }
14108
 
14109
    // isset id assignments
14110
    private static final int __ORDERID_ISSET_ID = 0;
14111
    private BitSet __isset_bit_vector = new BitSet(1);
14112
 
14113
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
14114
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
14115
          new FieldValueMetaData(TType.I64)));
14116
    }});
14117
 
14118
    static {
14119
      FieldMetaData.addStructMetaDataMap(billOrder_args.class, metaDataMap);
14120
    }
14121
 
14122
    public billOrder_args() {
14123
    }
14124
 
14125
    public billOrder_args(
14126
      long orderId)
14127
    {
14128
      this();
14129
      this.orderId = orderId;
14130
      setOrderIdIsSet(true);
14131
    }
14132
 
14133
    /**
14134
     * Performs a deep copy on <i>other</i>.
14135
     */
14136
    public billOrder_args(billOrder_args other) {
14137
      __isset_bit_vector.clear();
14138
      __isset_bit_vector.or(other.__isset_bit_vector);
14139
      this.orderId = other.orderId;
14140
    }
14141
 
14142
    public billOrder_args deepCopy() {
14143
      return new billOrder_args(this);
14144
    }
14145
 
14146
    @Deprecated
14147
    public billOrder_args clone() {
14148
      return new billOrder_args(this);
14149
    }
14150
 
14151
    public long getOrderId() {
14152
      return this.orderId;
14153
    }
14154
 
14155
    public billOrder_args setOrderId(long orderId) {
14156
      this.orderId = orderId;
14157
      setOrderIdIsSet(true);
14158
      return this;
14159
    }
14160
 
14161
    public void unsetOrderId() {
14162
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
14163
    }
14164
 
14165
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
14166
    public boolean isSetOrderId() {
14167
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
14168
    }
14169
 
14170
    public void setOrderIdIsSet(boolean value) {
14171
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
14172
    }
14173
 
14174
    public void setFieldValue(_Fields field, Object value) {
14175
      switch (field) {
14176
      case ORDER_ID:
14177
        if (value == null) {
14178
          unsetOrderId();
14179
        } else {
14180
          setOrderId((Long)value);
14181
        }
14182
        break;
14183
 
14184
      }
14185
    }
14186
 
14187
    public void setFieldValue(int fieldID, Object value) {
14188
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
14189
    }
14190
 
14191
    public Object getFieldValue(_Fields field) {
14192
      switch (field) {
14193
      case ORDER_ID:
14194
        return new Long(getOrderId());
14195
 
14196
      }
14197
      throw new IllegalStateException();
14198
    }
14199
 
14200
    public Object getFieldValue(int fieldId) {
14201
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
14202
    }
14203
 
14204
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
14205
    public boolean isSet(_Fields field) {
14206
      switch (field) {
14207
      case ORDER_ID:
14208
        return isSetOrderId();
14209
      }
14210
      throw new IllegalStateException();
14211
    }
14212
 
14213
    public boolean isSet(int fieldID) {
14214
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
14215
    }
14216
 
14217
    @Override
14218
    public boolean equals(Object that) {
14219
      if (that == null)
14220
        return false;
14221
      if (that instanceof billOrder_args)
14222
        return this.equals((billOrder_args)that);
14223
      return false;
14224
    }
14225
 
14226
    public boolean equals(billOrder_args that) {
14227
      if (that == null)
14228
        return false;
14229
 
14230
      boolean this_present_orderId = true;
14231
      boolean that_present_orderId = true;
14232
      if (this_present_orderId || that_present_orderId) {
14233
        if (!(this_present_orderId && that_present_orderId))
14234
          return false;
14235
        if (this.orderId != that.orderId)
14236
          return false;
14237
      }
14238
 
14239
      return true;
14240
    }
14241
 
14242
    @Override
14243
    public int hashCode() {
14244
      return 0;
14245
    }
14246
 
14247
    public int compareTo(billOrder_args other) {
14248
      if (!getClass().equals(other.getClass())) {
14249
        return getClass().getName().compareTo(other.getClass().getName());
14250
      }
14251
 
14252
      int lastComparison = 0;
14253
      billOrder_args typedOther = (billOrder_args)other;
14254
 
14255
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
14256
      if (lastComparison != 0) {
14257
        return lastComparison;
14258
      }
14259
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
14260
      if (lastComparison != 0) {
14261
        return lastComparison;
14262
      }
14263
      return 0;
14264
    }
14265
 
14266
    public void read(TProtocol iprot) throws TException {
14267
      TField field;
14268
      iprot.readStructBegin();
14269
      while (true)
14270
      {
14271
        field = iprot.readFieldBegin();
14272
        if (field.type == TType.STOP) { 
14273
          break;
14274
        }
14275
        _Fields fieldId = _Fields.findByThriftId(field.id);
14276
        if (fieldId == null) {
14277
          TProtocolUtil.skip(iprot, field.type);
14278
        } else {
14279
          switch (fieldId) {
14280
            case ORDER_ID:
14281
              if (field.type == TType.I64) {
14282
                this.orderId = iprot.readI64();
14283
                setOrderIdIsSet(true);
14284
              } else { 
14285
                TProtocolUtil.skip(iprot, field.type);
14286
              }
14287
              break;
14288
          }
14289
          iprot.readFieldEnd();
14290
        }
14291
      }
14292
      iprot.readStructEnd();
14293
      validate();
14294
    }
14295
 
14296
    public void write(TProtocol oprot) throws TException {
14297
      validate();
14298
 
14299
      oprot.writeStructBegin(STRUCT_DESC);
14300
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
14301
      oprot.writeI64(this.orderId);
14302
      oprot.writeFieldEnd();
14303
      oprot.writeFieldStop();
14304
      oprot.writeStructEnd();
14305
    }
14306
 
14307
    @Override
14308
    public String toString() {
14309
      StringBuilder sb = new StringBuilder("billOrder_args(");
14310
      boolean first = true;
14311
 
14312
      sb.append("orderId:");
14313
      sb.append(this.orderId);
14314
      first = false;
14315
      sb.append(")");
14316
      return sb.toString();
14317
    }
14318
 
14319
    public void validate() throws TException {
14320
      // check for required fields
14321
    }
14322
 
14323
  }
14324
 
14325
  public static class billOrder_result implements TBase<billOrder_result._Fields>, java.io.Serializable, Cloneable, Comparable<billOrder_result>   {
14326
    private static final TStruct STRUCT_DESC = new TStruct("billOrder_result");
14327
 
14328
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
14329
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
14330
 
14331
    private boolean success;
14332
    private TransactionServiceException ex;
14333
 
14334
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14335
    public enum _Fields implements TFieldIdEnum {
14336
      SUCCESS((short)0, "success"),
14337
      EX((short)1, "ex");
14338
 
14339
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
14340
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14341
 
14342
      static {
14343
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14344
          byId.put((int)field._thriftId, field);
14345
          byName.put(field.getFieldName(), field);
14346
        }
14347
      }
14348
 
14349
      /**
14350
       * Find the _Fields constant that matches fieldId, or null if its not found.
14351
       */
14352
      public static _Fields findByThriftId(int fieldId) {
14353
        return byId.get(fieldId);
14354
      }
14355
 
14356
      /**
14357
       * Find the _Fields constant that matches fieldId, throwing an exception
14358
       * if it is not found.
14359
       */
14360
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14361
        _Fields fields = findByThriftId(fieldId);
14362
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14363
        return fields;
14364
      }
14365
 
14366
      /**
14367
       * Find the _Fields constant that matches name, or null if its not found.
14368
       */
14369
      public static _Fields findByName(String name) {
14370
        return byName.get(name);
14371
      }
14372
 
14373
      private final short _thriftId;
14374
      private final String _fieldName;
14375
 
14376
      _Fields(short thriftId, String fieldName) {
14377
        _thriftId = thriftId;
14378
        _fieldName = fieldName;
14379
      }
14380
 
14381
      public short getThriftFieldId() {
14382
        return _thriftId;
14383
      }
14384
 
14385
      public String getFieldName() {
14386
        return _fieldName;
14387
      }
14388
    }
14389
 
14390
    // isset id assignments
14391
    private static final int __SUCCESS_ISSET_ID = 0;
14392
    private BitSet __isset_bit_vector = new BitSet(1);
14393
 
14394
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
14395
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
14396
          new FieldValueMetaData(TType.BOOL)));
14397
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
14398
          new FieldValueMetaData(TType.STRUCT)));
14399
    }});
14400
 
14401
    static {
14402
      FieldMetaData.addStructMetaDataMap(billOrder_result.class, metaDataMap);
14403
    }
14404
 
14405
    public billOrder_result() {
14406
    }
14407
 
14408
    public billOrder_result(
14409
      boolean success,
14410
      TransactionServiceException ex)
14411
    {
14412
      this();
14413
      this.success = success;
14414
      setSuccessIsSet(true);
14415
      this.ex = ex;
14416
    }
14417
 
14418
    /**
14419
     * Performs a deep copy on <i>other</i>.
14420
     */
14421
    public billOrder_result(billOrder_result other) {
14422
      __isset_bit_vector.clear();
14423
      __isset_bit_vector.or(other.__isset_bit_vector);
14424
      this.success = other.success;
14425
      if (other.isSetEx()) {
14426
        this.ex = new TransactionServiceException(other.ex);
14427
      }
14428
    }
14429
 
14430
    public billOrder_result deepCopy() {
14431
      return new billOrder_result(this);
14432
    }
14433
 
14434
    @Deprecated
14435
    public billOrder_result clone() {
14436
      return new billOrder_result(this);
14437
    }
14438
 
14439
    public boolean isSuccess() {
14440
      return this.success;
14441
    }
14442
 
14443
    public billOrder_result setSuccess(boolean success) {
14444
      this.success = success;
14445
      setSuccessIsSet(true);
14446
      return this;
14447
    }
14448
 
14449
    public void unsetSuccess() {
14450
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
14451
    }
14452
 
14453
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
14454
    public boolean isSetSuccess() {
14455
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
14456
    }
14457
 
14458
    public void setSuccessIsSet(boolean value) {
14459
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
14460
    }
14461
 
14462
    public TransactionServiceException getEx() {
14463
      return this.ex;
14464
    }
14465
 
14466
    public billOrder_result setEx(TransactionServiceException ex) {
14467
      this.ex = ex;
14468
      return this;
14469
    }
14470
 
14471
    public void unsetEx() {
14472
      this.ex = null;
14473
    }
14474
 
14475
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
14476
    public boolean isSetEx() {
14477
      return this.ex != null;
14478
    }
14479
 
14480
    public void setExIsSet(boolean value) {
14481
      if (!value) {
14482
        this.ex = null;
14483
      }
14484
    }
14485
 
14486
    public void setFieldValue(_Fields field, Object value) {
14487
      switch (field) {
14488
      case SUCCESS:
14489
        if (value == null) {
14490
          unsetSuccess();
14491
        } else {
14492
          setSuccess((Boolean)value);
14493
        }
14494
        break;
14495
 
14496
      case EX:
14497
        if (value == null) {
14498
          unsetEx();
14499
        } else {
14500
          setEx((TransactionServiceException)value);
14501
        }
14502
        break;
14503
 
14504
      }
14505
    }
14506
 
14507
    public void setFieldValue(int fieldID, Object value) {
14508
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
14509
    }
14510
 
14511
    public Object getFieldValue(_Fields field) {
14512
      switch (field) {
14513
      case SUCCESS:
14514
        return new Boolean(isSuccess());
14515
 
14516
      case EX:
14517
        return getEx();
14518
 
14519
      }
14520
      throw new IllegalStateException();
14521
    }
14522
 
14523
    public Object getFieldValue(int fieldId) {
14524
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
14525
    }
14526
 
14527
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
14528
    public boolean isSet(_Fields field) {
14529
      switch (field) {
14530
      case SUCCESS:
14531
        return isSetSuccess();
14532
      case EX:
14533
        return isSetEx();
14534
      }
14535
      throw new IllegalStateException();
14536
    }
14537
 
14538
    public boolean isSet(int fieldID) {
14539
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
14540
    }
14541
 
14542
    @Override
14543
    public boolean equals(Object that) {
14544
      if (that == null)
14545
        return false;
14546
      if (that instanceof billOrder_result)
14547
        return this.equals((billOrder_result)that);
14548
      return false;
14549
    }
14550
 
14551
    public boolean equals(billOrder_result that) {
14552
      if (that == null)
14553
        return false;
14554
 
14555
      boolean this_present_success = true;
14556
      boolean that_present_success = true;
14557
      if (this_present_success || that_present_success) {
14558
        if (!(this_present_success && that_present_success))
14559
          return false;
14560
        if (this.success != that.success)
14561
          return false;
14562
      }
14563
 
14564
      boolean this_present_ex = true && this.isSetEx();
14565
      boolean that_present_ex = true && that.isSetEx();
14566
      if (this_present_ex || that_present_ex) {
14567
        if (!(this_present_ex && that_present_ex))
14568
          return false;
14569
        if (!this.ex.equals(that.ex))
14570
          return false;
14571
      }
14572
 
14573
      return true;
14574
    }
14575
 
14576
    @Override
14577
    public int hashCode() {
14578
      return 0;
14579
    }
14580
 
14581
    public int compareTo(billOrder_result other) {
14582
      if (!getClass().equals(other.getClass())) {
14583
        return getClass().getName().compareTo(other.getClass().getName());
14584
      }
14585
 
14586
      int lastComparison = 0;
14587
      billOrder_result typedOther = (billOrder_result)other;
14588
 
14589
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
14590
      if (lastComparison != 0) {
14591
        return lastComparison;
14592
      }
14593
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
14594
      if (lastComparison != 0) {
14595
        return lastComparison;
14596
      }
14597
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
14598
      if (lastComparison != 0) {
14599
        return lastComparison;
14600
      }
14601
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
14602
      if (lastComparison != 0) {
14603
        return lastComparison;
14604
      }
14605
      return 0;
14606
    }
14607
 
14608
    public void read(TProtocol iprot) throws TException {
14609
      TField field;
14610
      iprot.readStructBegin();
14611
      while (true)
14612
      {
14613
        field = iprot.readFieldBegin();
14614
        if (field.type == TType.STOP) { 
14615
          break;
14616
        }
14617
        _Fields fieldId = _Fields.findByThriftId(field.id);
14618
        if (fieldId == null) {
14619
          TProtocolUtil.skip(iprot, field.type);
14620
        } else {
14621
          switch (fieldId) {
14622
            case SUCCESS:
14623
              if (field.type == TType.BOOL) {
14624
                this.success = iprot.readBool();
14625
                setSuccessIsSet(true);
14626
              } else { 
14627
                TProtocolUtil.skip(iprot, field.type);
14628
              }
14629
              break;
14630
            case EX:
14631
              if (field.type == TType.STRUCT) {
14632
                this.ex = new TransactionServiceException();
14633
                this.ex.read(iprot);
14634
              } else { 
14635
                TProtocolUtil.skip(iprot, field.type);
14636
              }
14637
              break;
14638
          }
14639
          iprot.readFieldEnd();
14640
        }
14641
      }
14642
      iprot.readStructEnd();
14643
      validate();
14644
    }
14645
 
14646
    public void write(TProtocol oprot) throws TException {
14647
      oprot.writeStructBegin(STRUCT_DESC);
14648
 
14649
      if (this.isSetSuccess()) {
14650
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
14651
        oprot.writeBool(this.success);
14652
        oprot.writeFieldEnd();
14653
      } else if (this.isSetEx()) {
14654
        oprot.writeFieldBegin(EX_FIELD_DESC);
14655
        this.ex.write(oprot);
14656
        oprot.writeFieldEnd();
14657
      }
14658
      oprot.writeFieldStop();
14659
      oprot.writeStructEnd();
14660
    }
14661
 
14662
    @Override
14663
    public String toString() {
14664
      StringBuilder sb = new StringBuilder("billOrder_result(");
14665
      boolean first = true;
14666
 
14667
      sb.append("success:");
14668
      sb.append(this.success);
14669
      first = false;
14670
      if (!first) sb.append(", ");
14671
      sb.append("ex:");
14672
      if (this.ex == null) {
14673
        sb.append("null");
14674
      } else {
14675
        sb.append(this.ex);
14676
      }
14677
      first = false;
14678
      sb.append(")");
14679
      return sb.toString();
14680
    }
14681
 
14682
    public void validate() throws TException {
14683
      // check for required fields
14684
    }
14685
 
14686
  }
14687
 
483 rajveer 14688
  public static class getOrdersForTransaction_args implements TBase<getOrdersForTransaction_args._Fields>, java.io.Serializable, Cloneable, Comparable<getOrdersForTransaction_args>   {
14689
    private static final TStruct STRUCT_DESC = new TStruct("getOrdersForTransaction_args");
68 ashish 14690
 
14691
    private static final TField TRANSACTION_ID_FIELD_DESC = new TField("transactionId", TType.I64, (short)1);
14692
 
14693
    private long transactionId;
14694
 
14695
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14696
    public enum _Fields implements TFieldIdEnum {
483 rajveer 14697
      TRANSACTION_ID((short)1, "transactionId");
68 ashish 14698
 
14699
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
14700
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14701
 
14702
      static {
14703
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14704
          byId.put((int)field._thriftId, field);
14705
          byName.put(field.getFieldName(), field);
14706
        }
14707
      }
14708
 
14709
      /**
14710
       * Find the _Fields constant that matches fieldId, or null if its not found.
14711
       */
14712
      public static _Fields findByThriftId(int fieldId) {
14713
        return byId.get(fieldId);
14714
      }
14715
 
14716
      /**
14717
       * Find the _Fields constant that matches fieldId, throwing an exception
14718
       * if it is not found.
14719
       */
14720
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14721
        _Fields fields = findByThriftId(fieldId);
14722
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14723
        return fields;
14724
      }
14725
 
14726
      /**
14727
       * Find the _Fields constant that matches name, or null if its not found.
14728
       */
14729
      public static _Fields findByName(String name) {
14730
        return byName.get(name);
14731
      }
14732
 
14733
      private final short _thriftId;
14734
      private final String _fieldName;
14735
 
14736
      _Fields(short thriftId, String fieldName) {
14737
        _thriftId = thriftId;
14738
        _fieldName = fieldName;
14739
      }
14740
 
14741
      public short getThriftFieldId() {
14742
        return _thriftId;
14743
      }
14744
 
14745
      public String getFieldName() {
14746
        return _fieldName;
14747
      }
14748
    }
14749
 
14750
    // isset id assignments
14751
    private static final int __TRANSACTIONID_ISSET_ID = 0;
483 rajveer 14752
    private BitSet __isset_bit_vector = new BitSet(1);
68 ashish 14753
 
14754
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
14755
      put(_Fields.TRANSACTION_ID, new FieldMetaData("transactionId", TFieldRequirementType.DEFAULT, 
14756
          new FieldValueMetaData(TType.I64)));
14757
    }});
14758
 
14759
    static {
483 rajveer 14760
      FieldMetaData.addStructMetaDataMap(getOrdersForTransaction_args.class, metaDataMap);
68 ashish 14761
    }
14762
 
483 rajveer 14763
    public getOrdersForTransaction_args() {
68 ashish 14764
    }
14765
 
483 rajveer 14766
    public getOrdersForTransaction_args(
14767
      long transactionId)
68 ashish 14768
    {
14769
      this();
14770
      this.transactionId = transactionId;
14771
      setTransactionIdIsSet(true);
14772
    }
14773
 
14774
    /**
14775
     * Performs a deep copy on <i>other</i>.
14776
     */
483 rajveer 14777
    public getOrdersForTransaction_args(getOrdersForTransaction_args other) {
68 ashish 14778
      __isset_bit_vector.clear();
14779
      __isset_bit_vector.or(other.__isset_bit_vector);
14780
      this.transactionId = other.transactionId;
14781
    }
14782
 
483 rajveer 14783
    public getOrdersForTransaction_args deepCopy() {
14784
      return new getOrdersForTransaction_args(this);
68 ashish 14785
    }
14786
 
14787
    @Deprecated
483 rajveer 14788
    public getOrdersForTransaction_args clone() {
14789
      return new getOrdersForTransaction_args(this);
68 ashish 14790
    }
14791
 
14792
    public long getTransactionId() {
14793
      return this.transactionId;
14794
    }
14795
 
483 rajveer 14796
    public getOrdersForTransaction_args setTransactionId(long transactionId) {
68 ashish 14797
      this.transactionId = transactionId;
14798
      setTransactionIdIsSet(true);
14799
      return this;
14800
    }
14801
 
14802
    public void unsetTransactionId() {
14803
      __isset_bit_vector.clear(__TRANSACTIONID_ISSET_ID);
14804
    }
14805
 
14806
    /** Returns true if field transactionId is set (has been asigned a value) and false otherwise */
14807
    public boolean isSetTransactionId() {
14808
      return __isset_bit_vector.get(__TRANSACTIONID_ISSET_ID);
14809
    }
14810
 
14811
    public void setTransactionIdIsSet(boolean value) {
14812
      __isset_bit_vector.set(__TRANSACTIONID_ISSET_ID, value);
14813
    }
14814
 
14815
    public void setFieldValue(_Fields field, Object value) {
14816
      switch (field) {
14817
      case TRANSACTION_ID:
14818
        if (value == null) {
14819
          unsetTransactionId();
14820
        } else {
14821
          setTransactionId((Long)value);
14822
        }
14823
        break;
14824
 
14825
      }
14826
    }
14827
 
14828
    public void setFieldValue(int fieldID, Object value) {
14829
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
14830
    }
14831
 
14832
    public Object getFieldValue(_Fields field) {
14833
      switch (field) {
14834
      case TRANSACTION_ID:
14835
        return new Long(getTransactionId());
14836
 
14837
      }
14838
      throw new IllegalStateException();
14839
    }
14840
 
14841
    public Object getFieldValue(int fieldId) {
14842
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
14843
    }
14844
 
14845
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
14846
    public boolean isSet(_Fields field) {
14847
      switch (field) {
14848
      case TRANSACTION_ID:
14849
        return isSetTransactionId();
14850
      }
14851
      throw new IllegalStateException();
14852
    }
14853
 
14854
    public boolean isSet(int fieldID) {
14855
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
14856
    }
14857
 
14858
    @Override
14859
    public boolean equals(Object that) {
14860
      if (that == null)
14861
        return false;
483 rajveer 14862
      if (that instanceof getOrdersForTransaction_args)
14863
        return this.equals((getOrdersForTransaction_args)that);
68 ashish 14864
      return false;
14865
    }
14866
 
483 rajveer 14867
    public boolean equals(getOrdersForTransaction_args that) {
68 ashish 14868
      if (that == null)
14869
        return false;
14870
 
14871
      boolean this_present_transactionId = true;
14872
      boolean that_present_transactionId = true;
14873
      if (this_present_transactionId || that_present_transactionId) {
14874
        if (!(this_present_transactionId && that_present_transactionId))
14875
          return false;
14876
        if (this.transactionId != that.transactionId)
14877
          return false;
14878
      }
14879
 
14880
      return true;
14881
    }
14882
 
14883
    @Override
14884
    public int hashCode() {
14885
      return 0;
14886
    }
14887
 
483 rajveer 14888
    public int compareTo(getOrdersForTransaction_args other) {
68 ashish 14889
      if (!getClass().equals(other.getClass())) {
14890
        return getClass().getName().compareTo(other.getClass().getName());
14891
      }
14892
 
14893
      int lastComparison = 0;
483 rajveer 14894
      getOrdersForTransaction_args typedOther = (getOrdersForTransaction_args)other;
68 ashish 14895
 
14896
      lastComparison = Boolean.valueOf(isSetTransactionId()).compareTo(isSetTransactionId());
14897
      if (lastComparison != 0) {
14898
        return lastComparison;
14899
      }
14900
      lastComparison = TBaseHelper.compareTo(transactionId, typedOther.transactionId);
14901
      if (lastComparison != 0) {
14902
        return lastComparison;
14903
      }
14904
      return 0;
14905
    }
14906
 
14907
    public void read(TProtocol iprot) throws TException {
14908
      TField field;
14909
      iprot.readStructBegin();
14910
      while (true)
14911
      {
14912
        field = iprot.readFieldBegin();
14913
        if (field.type == TType.STOP) { 
14914
          break;
14915
        }
14916
        _Fields fieldId = _Fields.findByThriftId(field.id);
14917
        if (fieldId == null) {
14918
          TProtocolUtil.skip(iprot, field.type);
14919
        } else {
14920
          switch (fieldId) {
14921
            case TRANSACTION_ID:
14922
              if (field.type == TType.I64) {
14923
                this.transactionId = iprot.readI64();
14924
                setTransactionIdIsSet(true);
14925
              } else { 
14926
                TProtocolUtil.skip(iprot, field.type);
14927
              }
14928
              break;
14929
          }
14930
          iprot.readFieldEnd();
14931
        }
14932
      }
14933
      iprot.readStructEnd();
14934
      validate();
14935
    }
14936
 
14937
    public void write(TProtocol oprot) throws TException {
14938
      validate();
14939
 
14940
      oprot.writeStructBegin(STRUCT_DESC);
14941
      oprot.writeFieldBegin(TRANSACTION_ID_FIELD_DESC);
14942
      oprot.writeI64(this.transactionId);
14943
      oprot.writeFieldEnd();
14944
      oprot.writeFieldStop();
14945
      oprot.writeStructEnd();
14946
    }
14947
 
14948
    @Override
14949
    public String toString() {
483 rajveer 14950
      StringBuilder sb = new StringBuilder("getOrdersForTransaction_args(");
68 ashish 14951
      boolean first = true;
14952
 
14953
      sb.append("transactionId:");
14954
      sb.append(this.transactionId);
14955
      first = false;
14956
      sb.append(")");
14957
      return sb.toString();
14958
    }
14959
 
14960
    public void validate() throws TException {
14961
      // check for required fields
14962
    }
14963
 
14964
  }
14965
 
483 rajveer 14966
  public static class getOrdersForTransaction_result implements TBase<getOrdersForTransaction_result._Fields>, java.io.Serializable, Cloneable, Comparable<getOrdersForTransaction_result>   {
14967
    private static final TStruct STRUCT_DESC = new TStruct("getOrdersForTransaction_result");
68 ashish 14968
 
483 rajveer 14969
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
68 ashish 14970
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
14971
 
483 rajveer 14972
    private List<Order> success;
68 ashish 14973
    private TransactionServiceException ex;
14974
 
14975
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14976
    public enum _Fields implements TFieldIdEnum {
14977
      SUCCESS((short)0, "success"),
14978
      EX((short)1, "ex");
14979
 
14980
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
14981
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14982
 
14983
      static {
14984
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14985
          byId.put((int)field._thriftId, field);
14986
          byName.put(field.getFieldName(), field);
14987
        }
14988
      }
14989
 
14990
      /**
14991
       * Find the _Fields constant that matches fieldId, or null if its not found.
14992
       */
14993
      public static _Fields findByThriftId(int fieldId) {
14994
        return byId.get(fieldId);
14995
      }
14996
 
14997
      /**
14998
       * Find the _Fields constant that matches fieldId, throwing an exception
14999
       * if it is not found.
15000
       */
15001
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15002
        _Fields fields = findByThriftId(fieldId);
15003
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15004
        return fields;
15005
      }
15006
 
15007
      /**
15008
       * Find the _Fields constant that matches name, or null if its not found.
15009
       */
15010
      public static _Fields findByName(String name) {
15011
        return byName.get(name);
15012
      }
15013
 
15014
      private final short _thriftId;
15015
      private final String _fieldName;
15016
 
15017
      _Fields(short thriftId, String fieldName) {
15018
        _thriftId = thriftId;
15019
        _fieldName = fieldName;
15020
      }
15021
 
15022
      public short getThriftFieldId() {
15023
        return _thriftId;
15024
      }
15025
 
15026
      public String getFieldName() {
15027
        return _fieldName;
15028
      }
15029
    }
15030
 
15031
    // isset id assignments
15032
 
15033
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
15034
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
483 rajveer 15035
          new ListMetaData(TType.LIST, 
15036
              new StructMetaData(TType.STRUCT, Order.class))));
68 ashish 15037
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
15038
          new FieldValueMetaData(TType.STRUCT)));
15039
    }});
15040
 
15041
    static {
483 rajveer 15042
      FieldMetaData.addStructMetaDataMap(getOrdersForTransaction_result.class, metaDataMap);
68 ashish 15043
    }
15044
 
483 rajveer 15045
    public getOrdersForTransaction_result() {
68 ashish 15046
    }
15047
 
483 rajveer 15048
    public getOrdersForTransaction_result(
15049
      List<Order> success,
68 ashish 15050
      TransactionServiceException ex)
15051
    {
15052
      this();
15053
      this.success = success;
15054
      this.ex = ex;
15055
    }
15056
 
15057
    /**
15058
     * Performs a deep copy on <i>other</i>.
15059
     */
483 rajveer 15060
    public getOrdersForTransaction_result(getOrdersForTransaction_result other) {
15061
      if (other.isSetSuccess()) {
15062
        List<Order> __this__success = new ArrayList<Order>();
15063
        for (Order other_element : other.success) {
15064
          __this__success.add(new Order(other_element));
15065
        }
15066
        this.success = __this__success;
15067
      }
68 ashish 15068
      if (other.isSetEx()) {
15069
        this.ex = new TransactionServiceException(other.ex);
15070
      }
15071
    }
15072
 
483 rajveer 15073
    public getOrdersForTransaction_result deepCopy() {
15074
      return new getOrdersForTransaction_result(this);
68 ashish 15075
    }
15076
 
15077
    @Deprecated
483 rajveer 15078
    public getOrdersForTransaction_result clone() {
15079
      return new getOrdersForTransaction_result(this);
68 ashish 15080
    }
15081
 
483 rajveer 15082
    public int getSuccessSize() {
15083
      return (this.success == null) ? 0 : this.success.size();
15084
    }
15085
 
15086
    public java.util.Iterator<Order> getSuccessIterator() {
15087
      return (this.success == null) ? null : this.success.iterator();
15088
    }
15089
 
15090
    public void addToSuccess(Order elem) {
15091
      if (this.success == null) {
15092
        this.success = new ArrayList<Order>();
15093
      }
15094
      this.success.add(elem);
15095
    }
15096
 
15097
    public List<Order> getSuccess() {
68 ashish 15098
      return this.success;
15099
    }
15100
 
483 rajveer 15101
    public getOrdersForTransaction_result setSuccess(List<Order> success) {
68 ashish 15102
      this.success = success;
15103
      return this;
15104
    }
15105
 
15106
    public void unsetSuccess() {
483 rajveer 15107
      this.success = null;
68 ashish 15108
    }
15109
 
15110
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
15111
    public boolean isSetSuccess() {
483 rajveer 15112
      return this.success != null;
68 ashish 15113
    }
15114
 
15115
    public void setSuccessIsSet(boolean value) {
483 rajveer 15116
      if (!value) {
15117
        this.success = null;
15118
      }
68 ashish 15119
    }
15120
 
15121
    public TransactionServiceException getEx() {
15122
      return this.ex;
15123
    }
15124
 
483 rajveer 15125
    public getOrdersForTransaction_result setEx(TransactionServiceException ex) {
68 ashish 15126
      this.ex = ex;
15127
      return this;
15128
    }
15129
 
15130
    public void unsetEx() {
15131
      this.ex = null;
15132
    }
15133
 
15134
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
15135
    public boolean isSetEx() {
15136
      return this.ex != null;
15137
    }
15138
 
15139
    public void setExIsSet(boolean value) {
15140
      if (!value) {
15141
        this.ex = null;
15142
      }
15143
    }
15144
 
15145
    public void setFieldValue(_Fields field, Object value) {
15146
      switch (field) {
15147
      case SUCCESS:
15148
        if (value == null) {
15149
          unsetSuccess();
15150
        } else {
483 rajveer 15151
          setSuccess((List<Order>)value);
68 ashish 15152
        }
15153
        break;
15154
 
15155
      case EX:
15156
        if (value == null) {
15157
          unsetEx();
15158
        } else {
15159
          setEx((TransactionServiceException)value);
15160
        }
15161
        break;
15162
 
15163
      }
15164
    }
15165
 
15166
    public void setFieldValue(int fieldID, Object value) {
15167
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
15168
    }
15169
 
15170
    public Object getFieldValue(_Fields field) {
15171
      switch (field) {
15172
      case SUCCESS:
483 rajveer 15173
        return getSuccess();
68 ashish 15174
 
15175
      case EX:
15176
        return getEx();
15177
 
15178
      }
15179
      throw new IllegalStateException();
15180
    }
15181
 
15182
    public Object getFieldValue(int fieldId) {
15183
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
15184
    }
15185
 
15186
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
15187
    public boolean isSet(_Fields field) {
15188
      switch (field) {
15189
      case SUCCESS:
15190
        return isSetSuccess();
15191
      case EX:
15192
        return isSetEx();
15193
      }
15194
      throw new IllegalStateException();
15195
    }
15196
 
15197
    public boolean isSet(int fieldID) {
15198
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
15199
    }
15200
 
15201
    @Override
15202
    public boolean equals(Object that) {
15203
      if (that == null)
15204
        return false;
483 rajveer 15205
      if (that instanceof getOrdersForTransaction_result)
15206
        return this.equals((getOrdersForTransaction_result)that);
68 ashish 15207
      return false;
15208
    }
15209
 
483 rajveer 15210
    public boolean equals(getOrdersForTransaction_result that) {
68 ashish 15211
      if (that == null)
15212
        return false;
15213
 
483 rajveer 15214
      boolean this_present_success = true && this.isSetSuccess();
15215
      boolean that_present_success = true && that.isSetSuccess();
68 ashish 15216
      if (this_present_success || that_present_success) {
15217
        if (!(this_present_success && that_present_success))
15218
          return false;
483 rajveer 15219
        if (!this.success.equals(that.success))
68 ashish 15220
          return false;
15221
      }
15222
 
15223
      boolean this_present_ex = true && this.isSetEx();
15224
      boolean that_present_ex = true && that.isSetEx();
15225
      if (this_present_ex || that_present_ex) {
15226
        if (!(this_present_ex && that_present_ex))
15227
          return false;
15228
        if (!this.ex.equals(that.ex))
15229
          return false;
15230
      }
15231
 
15232
      return true;
15233
    }
15234
 
15235
    @Override
15236
    public int hashCode() {
15237
      return 0;
15238
    }
15239
 
483 rajveer 15240
    public int compareTo(getOrdersForTransaction_result other) {
68 ashish 15241
      if (!getClass().equals(other.getClass())) {
15242
        return getClass().getName().compareTo(other.getClass().getName());
15243
      }
15244
 
15245
      int lastComparison = 0;
483 rajveer 15246
      getOrdersForTransaction_result typedOther = (getOrdersForTransaction_result)other;
68 ashish 15247
 
15248
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
15249
      if (lastComparison != 0) {
15250
        return lastComparison;
15251
      }
15252
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
15253
      if (lastComparison != 0) {
15254
        return lastComparison;
15255
      }
15256
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
15257
      if (lastComparison != 0) {
15258
        return lastComparison;
15259
      }
15260
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
15261
      if (lastComparison != 0) {
15262
        return lastComparison;
15263
      }
15264
      return 0;
15265
    }
15266
 
15267
    public void read(TProtocol iprot) throws TException {
15268
      TField field;
15269
      iprot.readStructBegin();
15270
      while (true)
15271
      {
15272
        field = iprot.readFieldBegin();
15273
        if (field.type == TType.STOP) { 
15274
          break;
15275
        }
15276
        _Fields fieldId = _Fields.findByThriftId(field.id);
15277
        if (fieldId == null) {
15278
          TProtocolUtil.skip(iprot, field.type);
15279
        } else {
15280
          switch (fieldId) {
15281
            case SUCCESS:
483 rajveer 15282
              if (field.type == TType.LIST) {
15283
                {
1382 varun.gupt 15284
                  TList _list32 = iprot.readListBegin();
15285
                  this.success = new ArrayList<Order>(_list32.size);
15286
                  for (int _i33 = 0; _i33 < _list32.size; ++_i33)
483 rajveer 15287
                  {
1382 varun.gupt 15288
                    Order _elem34;
15289
                    _elem34 = new Order();
15290
                    _elem34.read(iprot);
15291
                    this.success.add(_elem34);
483 rajveer 15292
                  }
15293
                  iprot.readListEnd();
15294
                }
68 ashish 15295
              } else { 
15296
                TProtocolUtil.skip(iprot, field.type);
15297
              }
15298
              break;
15299
            case EX:
15300
              if (field.type == TType.STRUCT) {
15301
                this.ex = new TransactionServiceException();
15302
                this.ex.read(iprot);
15303
              } else { 
15304
                TProtocolUtil.skip(iprot, field.type);
15305
              }
15306
              break;
15307
          }
15308
          iprot.readFieldEnd();
15309
        }
15310
      }
15311
      iprot.readStructEnd();
15312
      validate();
15313
    }
15314
 
15315
    public void write(TProtocol oprot) throws TException {
15316
      oprot.writeStructBegin(STRUCT_DESC);
15317
 
15318
      if (this.isSetSuccess()) {
15319
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
483 rajveer 15320
        {
15321
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
1382 varun.gupt 15322
          for (Order _iter35 : this.success)
483 rajveer 15323
          {
1382 varun.gupt 15324
            _iter35.write(oprot);
483 rajveer 15325
          }
15326
          oprot.writeListEnd();
15327
        }
68 ashish 15328
        oprot.writeFieldEnd();
15329
      } else if (this.isSetEx()) {
15330
        oprot.writeFieldBegin(EX_FIELD_DESC);
15331
        this.ex.write(oprot);
15332
        oprot.writeFieldEnd();
15333
      }
15334
      oprot.writeFieldStop();
15335
      oprot.writeStructEnd();
15336
    }
15337
 
15338
    @Override
15339
    public String toString() {
483 rajveer 15340
      StringBuilder sb = new StringBuilder("getOrdersForTransaction_result(");
68 ashish 15341
      boolean first = true;
15342
 
15343
      sb.append("success:");
483 rajveer 15344
      if (this.success == null) {
15345
        sb.append("null");
15346
      } else {
15347
        sb.append(this.success);
15348
      }
68 ashish 15349
      first = false;
15350
      if (!first) sb.append(", ");
15351
      sb.append("ex:");
15352
      if (this.ex == null) {
15353
        sb.append("null");
15354
      } else {
15355
        sb.append(this.ex);
15356
      }
15357
      first = false;
15358
      sb.append(")");
15359
      return sb.toString();
15360
    }
15361
 
15362
    public void validate() throws TException {
15363
      // check for required fields
15364
    }
15365
 
15366
  }
15367
 
483 rajveer 15368
  public static class getOrdersForCustomer_args implements TBase<getOrdersForCustomer_args._Fields>, java.io.Serializable, Cloneable, Comparable<getOrdersForCustomer_args>   {
15369
    private static final TStruct STRUCT_DESC = new TStruct("getOrdersForCustomer_args");
68 ashish 15370
 
483 rajveer 15371
    private static final TField CUSTOMER_ID_FIELD_DESC = new TField("customerId", TType.I64, (short)1);
15372
    private static final TField FROM_DATE_FIELD_DESC = new TField("from_date", TType.I64, (short)2);
15373
    private static final TField TO_DATE_FIELD_DESC = new TField("to_date", TType.I64, (short)3);
15374
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)4);
68 ashish 15375
 
483 rajveer 15376
    private long customerId;
15377
    private long from_date;
15378
    private long to_date;
15379
    private OrderStatus status;
68 ashish 15380
 
15381
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15382
    public enum _Fields implements TFieldIdEnum {
483 rajveer 15383
      CUSTOMER_ID((short)1, "customerId"),
15384
      FROM_DATE((short)2, "from_date"),
15385
      TO_DATE((short)3, "to_date"),
15386
      /**
15387
       * 
15388
       * @see OrderStatus
15389
       */
15390
      STATUS((short)4, "status");
68 ashish 15391
 
15392
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
15393
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15394
 
15395
      static {
15396
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15397
          byId.put((int)field._thriftId, field);
15398
          byName.put(field.getFieldName(), field);
15399
        }
15400
      }
15401
 
15402
      /**
15403
       * Find the _Fields constant that matches fieldId, or null if its not found.
15404
       */
15405
      public static _Fields findByThriftId(int fieldId) {
15406
        return byId.get(fieldId);
15407
      }
15408
 
15409
      /**
15410
       * Find the _Fields constant that matches fieldId, throwing an exception
15411
       * if it is not found.
15412
       */
15413
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15414
        _Fields fields = findByThriftId(fieldId);
15415
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15416
        return fields;
15417
      }
15418
 
15419
      /**
15420
       * Find the _Fields constant that matches name, or null if its not found.
15421
       */
15422
      public static _Fields findByName(String name) {
15423
        return byName.get(name);
15424
      }
15425
 
15426
      private final short _thriftId;
15427
      private final String _fieldName;
15428
 
15429
      _Fields(short thriftId, String fieldName) {
15430
        _thriftId = thriftId;
15431
        _fieldName = fieldName;
15432
      }
15433
 
15434
      public short getThriftFieldId() {
15435
        return _thriftId;
15436
      }
15437
 
15438
      public String getFieldName() {
15439
        return _fieldName;
15440
      }
15441
    }
15442
 
15443
    // isset id assignments
483 rajveer 15444
    private static final int __CUSTOMERID_ISSET_ID = 0;
15445
    private static final int __FROM_DATE_ISSET_ID = 1;
15446
    private static final int __TO_DATE_ISSET_ID = 2;
68 ashish 15447
    private BitSet __isset_bit_vector = new BitSet(3);
15448
 
15449
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 15450
      put(_Fields.CUSTOMER_ID, new FieldMetaData("customerId", TFieldRequirementType.DEFAULT, 
68 ashish 15451
          new FieldValueMetaData(TType.I64)));
483 rajveer 15452
      put(_Fields.FROM_DATE, new FieldMetaData("from_date", TFieldRequirementType.DEFAULT, 
68 ashish 15453
          new FieldValueMetaData(TType.I64)));
483 rajveer 15454
      put(_Fields.TO_DATE, new FieldMetaData("to_date", TFieldRequirementType.DEFAULT, 
68 ashish 15455
          new FieldValueMetaData(TType.I64)));
483 rajveer 15456
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
15457
          new EnumMetaData(TType.ENUM, OrderStatus.class)));
68 ashish 15458
    }});
15459
 
15460
    static {
483 rajveer 15461
      FieldMetaData.addStructMetaDataMap(getOrdersForCustomer_args.class, metaDataMap);
68 ashish 15462
    }
15463
 
483 rajveer 15464
    public getOrdersForCustomer_args() {
68 ashish 15465
    }
15466
 
483 rajveer 15467
    public getOrdersForCustomer_args(
15468
      long customerId,
15469
      long from_date,
15470
      long to_date,
15471
      OrderStatus status)
68 ashish 15472
    {
15473
      this();
483 rajveer 15474
      this.customerId = customerId;
15475
      setCustomerIdIsSet(true);
15476
      this.from_date = from_date;
15477
      setFrom_dateIsSet(true);
15478
      this.to_date = to_date;
15479
      setTo_dateIsSet(true);
15480
      this.status = status;
68 ashish 15481
    }
15482
 
15483
    /**
15484
     * Performs a deep copy on <i>other</i>.
15485
     */
483 rajveer 15486
    public getOrdersForCustomer_args(getOrdersForCustomer_args other) {
68 ashish 15487
      __isset_bit_vector.clear();
15488
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 15489
      this.customerId = other.customerId;
15490
      this.from_date = other.from_date;
15491
      this.to_date = other.to_date;
15492
      if (other.isSetStatus()) {
15493
        this.status = other.status;
15494
      }
68 ashish 15495
    }
15496
 
483 rajveer 15497
    public getOrdersForCustomer_args deepCopy() {
15498
      return new getOrdersForCustomer_args(this);
68 ashish 15499
    }
15500
 
15501
    @Deprecated
483 rajveer 15502
    public getOrdersForCustomer_args clone() {
15503
      return new getOrdersForCustomer_args(this);
68 ashish 15504
    }
15505
 
483 rajveer 15506
    public long getCustomerId() {
15507
      return this.customerId;
68 ashish 15508
    }
15509
 
483 rajveer 15510
    public getOrdersForCustomer_args setCustomerId(long customerId) {
15511
      this.customerId = customerId;
15512
      setCustomerIdIsSet(true);
68 ashish 15513
      return this;
15514
    }
15515
 
483 rajveer 15516
    public void unsetCustomerId() {
15517
      __isset_bit_vector.clear(__CUSTOMERID_ISSET_ID);
68 ashish 15518
    }
15519
 
483 rajveer 15520
    /** Returns true if field customerId is set (has been asigned a value) and false otherwise */
15521
    public boolean isSetCustomerId() {
15522
      return __isset_bit_vector.get(__CUSTOMERID_ISSET_ID);
68 ashish 15523
    }
15524
 
483 rajveer 15525
    public void setCustomerIdIsSet(boolean value) {
15526
      __isset_bit_vector.set(__CUSTOMERID_ISSET_ID, value);
68 ashish 15527
    }
15528
 
483 rajveer 15529
    public long getFrom_date() {
15530
      return this.from_date;
68 ashish 15531
    }
15532
 
483 rajveer 15533
    public getOrdersForCustomer_args setFrom_date(long from_date) {
15534
      this.from_date = from_date;
15535
      setFrom_dateIsSet(true);
68 ashish 15536
      return this;
15537
    }
15538
 
483 rajveer 15539
    public void unsetFrom_date() {
15540
      __isset_bit_vector.clear(__FROM_DATE_ISSET_ID);
68 ashish 15541
    }
15542
 
483 rajveer 15543
    /** Returns true if field from_date is set (has been asigned a value) and false otherwise */
15544
    public boolean isSetFrom_date() {
15545
      return __isset_bit_vector.get(__FROM_DATE_ISSET_ID);
68 ashish 15546
    }
15547
 
483 rajveer 15548
    public void setFrom_dateIsSet(boolean value) {
15549
      __isset_bit_vector.set(__FROM_DATE_ISSET_ID, value);
68 ashish 15550
    }
15551
 
483 rajveer 15552
    public long getTo_date() {
15553
      return this.to_date;
68 ashish 15554
    }
15555
 
483 rajveer 15556
    public getOrdersForCustomer_args setTo_date(long to_date) {
15557
      this.to_date = to_date;
15558
      setTo_dateIsSet(true);
68 ashish 15559
      return this;
15560
    }
15561
 
483 rajveer 15562
    public void unsetTo_date() {
15563
      __isset_bit_vector.clear(__TO_DATE_ISSET_ID);
68 ashish 15564
    }
15565
 
483 rajveer 15566
    /** Returns true if field to_date is set (has been asigned a value) and false otherwise */
15567
    public boolean isSetTo_date() {
15568
      return __isset_bit_vector.get(__TO_DATE_ISSET_ID);
68 ashish 15569
    }
15570
 
483 rajveer 15571
    public void setTo_dateIsSet(boolean value) {
15572
      __isset_bit_vector.set(__TO_DATE_ISSET_ID, value);
68 ashish 15573
    }
15574
 
483 rajveer 15575
    /**
15576
     * 
15577
     * @see OrderStatus
15578
     */
15579
    public OrderStatus getStatus() {
15580
      return this.status;
15581
    }
15582
 
15583
    /**
15584
     * 
15585
     * @see OrderStatus
15586
     */
15587
    public getOrdersForCustomer_args setStatus(OrderStatus status) {
15588
      this.status = status;
15589
      return this;
15590
    }
15591
 
15592
    public void unsetStatus() {
15593
      this.status = null;
15594
    }
15595
 
15596
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
15597
    public boolean isSetStatus() {
15598
      return this.status != null;
15599
    }
15600
 
15601
    public void setStatusIsSet(boolean value) {
15602
      if (!value) {
15603
        this.status = null;
15604
      }
15605
    }
15606
 
68 ashish 15607
    public void setFieldValue(_Fields field, Object value) {
15608
      switch (field) {
483 rajveer 15609
      case CUSTOMER_ID:
68 ashish 15610
        if (value == null) {
483 rajveer 15611
          unsetCustomerId();
68 ashish 15612
        } else {
483 rajveer 15613
          setCustomerId((Long)value);
68 ashish 15614
        }
15615
        break;
15616
 
483 rajveer 15617
      case FROM_DATE:
68 ashish 15618
        if (value == null) {
483 rajveer 15619
          unsetFrom_date();
68 ashish 15620
        } else {
483 rajveer 15621
          setFrom_date((Long)value);
68 ashish 15622
        }
15623
        break;
15624
 
483 rajveer 15625
      case TO_DATE:
68 ashish 15626
        if (value == null) {
483 rajveer 15627
          unsetTo_date();
68 ashish 15628
        } else {
483 rajveer 15629
          setTo_date((Long)value);
68 ashish 15630
        }
15631
        break;
15632
 
483 rajveer 15633
      case STATUS:
15634
        if (value == null) {
15635
          unsetStatus();
15636
        } else {
15637
          setStatus((OrderStatus)value);
15638
        }
15639
        break;
15640
 
68 ashish 15641
      }
15642
    }
15643
 
15644
    public void setFieldValue(int fieldID, Object value) {
15645
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
15646
    }
15647
 
15648
    public Object getFieldValue(_Fields field) {
15649
      switch (field) {
483 rajveer 15650
      case CUSTOMER_ID:
15651
        return new Long(getCustomerId());
68 ashish 15652
 
483 rajveer 15653
      case FROM_DATE:
15654
        return new Long(getFrom_date());
68 ashish 15655
 
483 rajveer 15656
      case TO_DATE:
15657
        return new Long(getTo_date());
68 ashish 15658
 
483 rajveer 15659
      case STATUS:
15660
        return getStatus();
15661
 
68 ashish 15662
      }
15663
      throw new IllegalStateException();
15664
    }
15665
 
15666
    public Object getFieldValue(int fieldId) {
15667
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
15668
    }
15669
 
15670
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
15671
    public boolean isSet(_Fields field) {
15672
      switch (field) {
483 rajveer 15673
      case CUSTOMER_ID:
15674
        return isSetCustomerId();
15675
      case FROM_DATE:
15676
        return isSetFrom_date();
15677
      case TO_DATE:
15678
        return isSetTo_date();
15679
      case STATUS:
15680
        return isSetStatus();
68 ashish 15681
      }
15682
      throw new IllegalStateException();
15683
    }
15684
 
15685
    public boolean isSet(int fieldID) {
15686
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
15687
    }
15688
 
15689
    @Override
15690
    public boolean equals(Object that) {
15691
      if (that == null)
15692
        return false;
483 rajveer 15693
      if (that instanceof getOrdersForCustomer_args)
15694
        return this.equals((getOrdersForCustomer_args)that);
68 ashish 15695
      return false;
15696
    }
15697
 
483 rajveer 15698
    public boolean equals(getOrdersForCustomer_args that) {
68 ashish 15699
      if (that == null)
15700
        return false;
15701
 
483 rajveer 15702
      boolean this_present_customerId = true;
15703
      boolean that_present_customerId = true;
15704
      if (this_present_customerId || that_present_customerId) {
15705
        if (!(this_present_customerId && that_present_customerId))
68 ashish 15706
          return false;
483 rajveer 15707
        if (this.customerId != that.customerId)
68 ashish 15708
          return false;
15709
      }
15710
 
483 rajveer 15711
      boolean this_present_from_date = true;
15712
      boolean that_present_from_date = true;
15713
      if (this_present_from_date || that_present_from_date) {
15714
        if (!(this_present_from_date && that_present_from_date))
68 ashish 15715
          return false;
483 rajveer 15716
        if (this.from_date != that.from_date)
68 ashish 15717
          return false;
15718
      }
15719
 
483 rajveer 15720
      boolean this_present_to_date = true;
15721
      boolean that_present_to_date = true;
15722
      if (this_present_to_date || that_present_to_date) {
15723
        if (!(this_present_to_date && that_present_to_date))
68 ashish 15724
          return false;
483 rajveer 15725
        if (this.to_date != that.to_date)
68 ashish 15726
          return false;
15727
      }
15728
 
483 rajveer 15729
      boolean this_present_status = true && this.isSetStatus();
15730
      boolean that_present_status = true && that.isSetStatus();
15731
      if (this_present_status || that_present_status) {
15732
        if (!(this_present_status && that_present_status))
15733
          return false;
15734
        if (!this.status.equals(that.status))
15735
          return false;
15736
      }
15737
 
68 ashish 15738
      return true;
15739
    }
15740
 
15741
    @Override
15742
    public int hashCode() {
15743
      return 0;
15744
    }
15745
 
483 rajveer 15746
    public int compareTo(getOrdersForCustomer_args other) {
68 ashish 15747
      if (!getClass().equals(other.getClass())) {
15748
        return getClass().getName().compareTo(other.getClass().getName());
15749
      }
15750
 
15751
      int lastComparison = 0;
483 rajveer 15752
      getOrdersForCustomer_args typedOther = (getOrdersForCustomer_args)other;
68 ashish 15753
 
483 rajveer 15754
      lastComparison = Boolean.valueOf(isSetCustomerId()).compareTo(isSetCustomerId());
68 ashish 15755
      if (lastComparison != 0) {
15756
        return lastComparison;
15757
      }
483 rajveer 15758
      lastComparison = TBaseHelper.compareTo(customerId, typedOther.customerId);
68 ashish 15759
      if (lastComparison != 0) {
15760
        return lastComparison;
15761
      }
483 rajveer 15762
      lastComparison = Boolean.valueOf(isSetFrom_date()).compareTo(isSetFrom_date());
68 ashish 15763
      if (lastComparison != 0) {
15764
        return lastComparison;
15765
      }
483 rajveer 15766
      lastComparison = TBaseHelper.compareTo(from_date, typedOther.from_date);
68 ashish 15767
      if (lastComparison != 0) {
15768
        return lastComparison;
15769
      }
483 rajveer 15770
      lastComparison = Boolean.valueOf(isSetTo_date()).compareTo(isSetTo_date());
68 ashish 15771
      if (lastComparison != 0) {
15772
        return lastComparison;
15773
      }
483 rajveer 15774
      lastComparison = TBaseHelper.compareTo(to_date, typedOther.to_date);
68 ashish 15775
      if (lastComparison != 0) {
15776
        return lastComparison;
15777
      }
483 rajveer 15778
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
15779
      if (lastComparison != 0) {
15780
        return lastComparison;
15781
      }
15782
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
15783
      if (lastComparison != 0) {
15784
        return lastComparison;
15785
      }
68 ashish 15786
      return 0;
15787
    }
15788
 
15789
    public void read(TProtocol iprot) throws TException {
15790
      TField field;
15791
      iprot.readStructBegin();
15792
      while (true)
15793
      {
15794
        field = iprot.readFieldBegin();
15795
        if (field.type == TType.STOP) { 
15796
          break;
15797
        }
15798
        _Fields fieldId = _Fields.findByThriftId(field.id);
15799
        if (fieldId == null) {
15800
          TProtocolUtil.skip(iprot, field.type);
15801
        } else {
15802
          switch (fieldId) {
483 rajveer 15803
            case CUSTOMER_ID:
68 ashish 15804
              if (field.type == TType.I64) {
483 rajveer 15805
                this.customerId = iprot.readI64();
15806
                setCustomerIdIsSet(true);
68 ashish 15807
              } else { 
15808
                TProtocolUtil.skip(iprot, field.type);
15809
              }
15810
              break;
483 rajveer 15811
            case FROM_DATE:
68 ashish 15812
              if (field.type == TType.I64) {
483 rajveer 15813
                this.from_date = iprot.readI64();
15814
                setFrom_dateIsSet(true);
68 ashish 15815
              } else { 
15816
                TProtocolUtil.skip(iprot, field.type);
15817
              }
15818
              break;
483 rajveer 15819
            case TO_DATE:
68 ashish 15820
              if (field.type == TType.I64) {
483 rajveer 15821
                this.to_date = iprot.readI64();
15822
                setTo_dateIsSet(true);
68 ashish 15823
              } else { 
15824
                TProtocolUtil.skip(iprot, field.type);
15825
              }
15826
              break;
483 rajveer 15827
            case STATUS:
15828
              if (field.type == TType.I32) {
15829
                this.status = OrderStatus.findByValue(iprot.readI32());
15830
              } else { 
15831
                TProtocolUtil.skip(iprot, field.type);
15832
              }
15833
              break;
68 ashish 15834
          }
15835
          iprot.readFieldEnd();
15836
        }
15837
      }
15838
      iprot.readStructEnd();
15839
      validate();
15840
    }
15841
 
15842
    public void write(TProtocol oprot) throws TException {
15843
      validate();
15844
 
15845
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 15846
      oprot.writeFieldBegin(CUSTOMER_ID_FIELD_DESC);
15847
      oprot.writeI64(this.customerId);
68 ashish 15848
      oprot.writeFieldEnd();
483 rajveer 15849
      oprot.writeFieldBegin(FROM_DATE_FIELD_DESC);
15850
      oprot.writeI64(this.from_date);
68 ashish 15851
      oprot.writeFieldEnd();
483 rajveer 15852
      oprot.writeFieldBegin(TO_DATE_FIELD_DESC);
15853
      oprot.writeI64(this.to_date);
68 ashish 15854
      oprot.writeFieldEnd();
483 rajveer 15855
      if (this.status != null) {
15856
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
15857
        oprot.writeI32(this.status.getValue());
15858
        oprot.writeFieldEnd();
15859
      }
68 ashish 15860
      oprot.writeFieldStop();
15861
      oprot.writeStructEnd();
15862
    }
15863
 
15864
    @Override
15865
    public String toString() {
483 rajveer 15866
      StringBuilder sb = new StringBuilder("getOrdersForCustomer_args(");
68 ashish 15867
      boolean first = true;
15868
 
483 rajveer 15869
      sb.append("customerId:");
15870
      sb.append(this.customerId);
68 ashish 15871
      first = false;
15872
      if (!first) sb.append(", ");
483 rajveer 15873
      sb.append("from_date:");
15874
      sb.append(this.from_date);
68 ashish 15875
      first = false;
15876
      if (!first) sb.append(", ");
483 rajveer 15877
      sb.append("to_date:");
15878
      sb.append(this.to_date);
68 ashish 15879
      first = false;
483 rajveer 15880
      if (!first) sb.append(", ");
15881
      sb.append("status:");
15882
      if (this.status == null) {
15883
        sb.append("null");
15884
      } else {
15885
        String status_name = status.name();
15886
        if (status_name != null) {
15887
          sb.append(status_name);
15888
          sb.append(" (");
15889
        }
15890
        sb.append(this.status);
15891
        if (status_name != null) {
15892
          sb.append(")");
15893
        }
15894
      }
15895
      first = false;
68 ashish 15896
      sb.append(")");
15897
      return sb.toString();
15898
    }
15899
 
15900
    public void validate() throws TException {
15901
      // check for required fields
15902
    }
15903
 
15904
  }
15905
 
483 rajveer 15906
  public static class getOrdersForCustomer_result implements TBase<getOrdersForCustomer_result._Fields>, java.io.Serializable, Cloneable, Comparable<getOrdersForCustomer_result>   {
15907
    private static final TStruct STRUCT_DESC = new TStruct("getOrdersForCustomer_result");
68 ashish 15908
 
483 rajveer 15909
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
68 ashish 15910
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
15911
 
483 rajveer 15912
    private List<Order> success;
68 ashish 15913
    private TransactionServiceException ex;
15914
 
15915
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15916
    public enum _Fields implements TFieldIdEnum {
15917
      SUCCESS((short)0, "success"),
15918
      EX((short)1, "ex");
15919
 
15920
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
15921
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15922
 
15923
      static {
15924
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15925
          byId.put((int)field._thriftId, field);
15926
          byName.put(field.getFieldName(), field);
15927
        }
15928
      }
15929
 
15930
      /**
15931
       * Find the _Fields constant that matches fieldId, or null if its not found.
15932
       */
15933
      public static _Fields findByThriftId(int fieldId) {
15934
        return byId.get(fieldId);
15935
      }
15936
 
15937
      /**
15938
       * Find the _Fields constant that matches fieldId, throwing an exception
15939
       * if it is not found.
15940
       */
15941
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15942
        _Fields fields = findByThriftId(fieldId);
15943
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15944
        return fields;
15945
      }
15946
 
15947
      /**
15948
       * Find the _Fields constant that matches name, or null if its not found.
15949
       */
15950
      public static _Fields findByName(String name) {
15951
        return byName.get(name);
15952
      }
15953
 
15954
      private final short _thriftId;
15955
      private final String _fieldName;
15956
 
15957
      _Fields(short thriftId, String fieldName) {
15958
        _thriftId = thriftId;
15959
        _fieldName = fieldName;
15960
      }
15961
 
15962
      public short getThriftFieldId() {
15963
        return _thriftId;
15964
      }
15965
 
15966
      public String getFieldName() {
15967
        return _fieldName;
15968
      }
15969
    }
15970
 
15971
    // isset id assignments
15972
 
15973
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
15974
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
483 rajveer 15975
          new ListMetaData(TType.LIST, 
15976
              new StructMetaData(TType.STRUCT, Order.class))));
68 ashish 15977
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
15978
          new FieldValueMetaData(TType.STRUCT)));
15979
    }});
15980
 
15981
    static {
483 rajveer 15982
      FieldMetaData.addStructMetaDataMap(getOrdersForCustomer_result.class, metaDataMap);
68 ashish 15983
    }
15984
 
483 rajveer 15985
    public getOrdersForCustomer_result() {
68 ashish 15986
    }
15987
 
483 rajveer 15988
    public getOrdersForCustomer_result(
15989
      List<Order> success,
68 ashish 15990
      TransactionServiceException ex)
15991
    {
15992
      this();
15993
      this.success = success;
15994
      this.ex = ex;
15995
    }
15996
 
15997
    /**
15998
     * Performs a deep copy on <i>other</i>.
15999
     */
483 rajveer 16000
    public getOrdersForCustomer_result(getOrdersForCustomer_result other) {
16001
      if (other.isSetSuccess()) {
16002
        List<Order> __this__success = new ArrayList<Order>();
16003
        for (Order other_element : other.success) {
16004
          __this__success.add(new Order(other_element));
16005
        }
16006
        this.success = __this__success;
16007
      }
68 ashish 16008
      if (other.isSetEx()) {
16009
        this.ex = new TransactionServiceException(other.ex);
16010
      }
16011
    }
16012
 
483 rajveer 16013
    public getOrdersForCustomer_result deepCopy() {
16014
      return new getOrdersForCustomer_result(this);
68 ashish 16015
    }
16016
 
16017
    @Deprecated
483 rajveer 16018
    public getOrdersForCustomer_result clone() {
16019
      return new getOrdersForCustomer_result(this);
68 ashish 16020
    }
16021
 
483 rajveer 16022
    public int getSuccessSize() {
16023
      return (this.success == null) ? 0 : this.success.size();
16024
    }
16025
 
16026
    public java.util.Iterator<Order> getSuccessIterator() {
16027
      return (this.success == null) ? null : this.success.iterator();
16028
    }
16029
 
16030
    public void addToSuccess(Order elem) {
16031
      if (this.success == null) {
16032
        this.success = new ArrayList<Order>();
16033
      }
16034
      this.success.add(elem);
16035
    }
16036
 
16037
    public List<Order> getSuccess() {
68 ashish 16038
      return this.success;
16039
    }
16040
 
483 rajveer 16041
    public getOrdersForCustomer_result setSuccess(List<Order> success) {
68 ashish 16042
      this.success = success;
16043
      return this;
16044
    }
16045
 
16046
    public void unsetSuccess() {
483 rajveer 16047
      this.success = null;
68 ashish 16048
    }
16049
 
16050
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
16051
    public boolean isSetSuccess() {
483 rajveer 16052
      return this.success != null;
68 ashish 16053
    }
16054
 
16055
    public void setSuccessIsSet(boolean value) {
483 rajveer 16056
      if (!value) {
16057
        this.success = null;
16058
      }
68 ashish 16059
    }
16060
 
16061
    public TransactionServiceException getEx() {
16062
      return this.ex;
16063
    }
16064
 
483 rajveer 16065
    public getOrdersForCustomer_result setEx(TransactionServiceException ex) {
68 ashish 16066
      this.ex = ex;
16067
      return this;
16068
    }
16069
 
16070
    public void unsetEx() {
16071
      this.ex = null;
16072
    }
16073
 
16074
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
16075
    public boolean isSetEx() {
16076
      return this.ex != null;
16077
    }
16078
 
16079
    public void setExIsSet(boolean value) {
16080
      if (!value) {
16081
        this.ex = null;
16082
      }
16083
    }
16084
 
16085
    public void setFieldValue(_Fields field, Object value) {
16086
      switch (field) {
16087
      case SUCCESS:
16088
        if (value == null) {
16089
          unsetSuccess();
16090
        } else {
483 rajveer 16091
          setSuccess((List<Order>)value);
68 ashish 16092
        }
16093
        break;
16094
 
16095
      case EX:
16096
        if (value == null) {
16097
          unsetEx();
16098
        } else {
16099
          setEx((TransactionServiceException)value);
16100
        }
16101
        break;
16102
 
16103
      }
16104
    }
16105
 
16106
    public void setFieldValue(int fieldID, Object value) {
16107
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
16108
    }
16109
 
16110
    public Object getFieldValue(_Fields field) {
16111
      switch (field) {
16112
      case SUCCESS:
483 rajveer 16113
        return getSuccess();
68 ashish 16114
 
16115
      case EX:
16116
        return getEx();
16117
 
16118
      }
16119
      throw new IllegalStateException();
16120
    }
16121
 
16122
    public Object getFieldValue(int fieldId) {
16123
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
16124
    }
16125
 
16126
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
16127
    public boolean isSet(_Fields field) {
16128
      switch (field) {
16129
      case SUCCESS:
16130
        return isSetSuccess();
16131
      case EX:
16132
        return isSetEx();
16133
      }
16134
      throw new IllegalStateException();
16135
    }
16136
 
16137
    public boolean isSet(int fieldID) {
16138
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
16139
    }
16140
 
16141
    @Override
16142
    public boolean equals(Object that) {
16143
      if (that == null)
16144
        return false;
483 rajveer 16145
      if (that instanceof getOrdersForCustomer_result)
16146
        return this.equals((getOrdersForCustomer_result)that);
68 ashish 16147
      return false;
16148
    }
16149
 
483 rajveer 16150
    public boolean equals(getOrdersForCustomer_result that) {
68 ashish 16151
      if (that == null)
16152
        return false;
16153
 
483 rajveer 16154
      boolean this_present_success = true && this.isSetSuccess();
16155
      boolean that_present_success = true && that.isSetSuccess();
68 ashish 16156
      if (this_present_success || that_present_success) {
16157
        if (!(this_present_success && that_present_success))
16158
          return false;
483 rajveer 16159
        if (!this.success.equals(that.success))
68 ashish 16160
          return false;
16161
      }
16162
 
16163
      boolean this_present_ex = true && this.isSetEx();
16164
      boolean that_present_ex = true && that.isSetEx();
16165
      if (this_present_ex || that_present_ex) {
16166
        if (!(this_present_ex && that_present_ex))
16167
          return false;
16168
        if (!this.ex.equals(that.ex))
16169
          return false;
16170
      }
16171
 
16172
      return true;
16173
    }
16174
 
16175
    @Override
16176
    public int hashCode() {
16177
      return 0;
16178
    }
16179
 
483 rajveer 16180
    public int compareTo(getOrdersForCustomer_result other) {
68 ashish 16181
      if (!getClass().equals(other.getClass())) {
16182
        return getClass().getName().compareTo(other.getClass().getName());
16183
      }
16184
 
16185
      int lastComparison = 0;
483 rajveer 16186
      getOrdersForCustomer_result typedOther = (getOrdersForCustomer_result)other;
68 ashish 16187
 
16188
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
16189
      if (lastComparison != 0) {
16190
        return lastComparison;
16191
      }
16192
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
16193
      if (lastComparison != 0) {
16194
        return lastComparison;
16195
      }
16196
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
16197
      if (lastComparison != 0) {
16198
        return lastComparison;
16199
      }
16200
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
16201
      if (lastComparison != 0) {
16202
        return lastComparison;
16203
      }
16204
      return 0;
16205
    }
16206
 
16207
    public void read(TProtocol iprot) throws TException {
16208
      TField field;
16209
      iprot.readStructBegin();
16210
      while (true)
16211
      {
16212
        field = iprot.readFieldBegin();
16213
        if (field.type == TType.STOP) { 
16214
          break;
16215
        }
16216
        _Fields fieldId = _Fields.findByThriftId(field.id);
16217
        if (fieldId == null) {
16218
          TProtocolUtil.skip(iprot, field.type);
16219
        } else {
16220
          switch (fieldId) {
16221
            case SUCCESS:
483 rajveer 16222
              if (field.type == TType.LIST) {
16223
                {
1382 varun.gupt 16224
                  TList _list36 = iprot.readListBegin();
16225
                  this.success = new ArrayList<Order>(_list36.size);
16226
                  for (int _i37 = 0; _i37 < _list36.size; ++_i37)
483 rajveer 16227
                  {
1382 varun.gupt 16228
                    Order _elem38;
16229
                    _elem38 = new Order();
16230
                    _elem38.read(iprot);
16231
                    this.success.add(_elem38);
483 rajveer 16232
                  }
16233
                  iprot.readListEnd();
16234
                }
68 ashish 16235
              } else { 
16236
                TProtocolUtil.skip(iprot, field.type);
16237
              }
16238
              break;
16239
            case EX:
16240
              if (field.type == TType.STRUCT) {
16241
                this.ex = new TransactionServiceException();
16242
                this.ex.read(iprot);
16243
              } else { 
16244
                TProtocolUtil.skip(iprot, field.type);
16245
              }
16246
              break;
16247
          }
16248
          iprot.readFieldEnd();
16249
        }
16250
      }
16251
      iprot.readStructEnd();
16252
      validate();
16253
    }
16254
 
16255
    public void write(TProtocol oprot) throws TException {
16256
      oprot.writeStructBegin(STRUCT_DESC);
16257
 
16258
      if (this.isSetSuccess()) {
16259
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
483 rajveer 16260
        {
16261
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
1382 varun.gupt 16262
          for (Order _iter39 : this.success)
483 rajveer 16263
          {
1382 varun.gupt 16264
            _iter39.write(oprot);
483 rajveer 16265
          }
16266
          oprot.writeListEnd();
16267
        }
68 ashish 16268
        oprot.writeFieldEnd();
16269
      } else if (this.isSetEx()) {
16270
        oprot.writeFieldBegin(EX_FIELD_DESC);
16271
        this.ex.write(oprot);
16272
        oprot.writeFieldEnd();
16273
      }
16274
      oprot.writeFieldStop();
16275
      oprot.writeStructEnd();
16276
    }
16277
 
16278
    @Override
16279
    public String toString() {
483 rajveer 16280
      StringBuilder sb = new StringBuilder("getOrdersForCustomer_result(");
68 ashish 16281
      boolean first = true;
16282
 
16283
      sb.append("success:");
483 rajveer 16284
      if (this.success == null) {
16285
        sb.append("null");
16286
      } else {
16287
        sb.append(this.success);
16288
      }
68 ashish 16289
      first = false;
16290
      if (!first) sb.append(", ");
16291
      sb.append("ex:");
16292
      if (this.ex == null) {
16293
        sb.append("null");
16294
      } else {
16295
        sb.append(this.ex);
16296
      }
16297
      first = false;
16298
      sb.append(")");
16299
      return sb.toString();
16300
    }
16301
 
16302
    public void validate() throws TException {
16303
      // check for required fields
16304
    }
16305
 
16306
  }
16307
 
483 rajveer 16308
  public static class createOrder_args implements TBase<createOrder_args._Fields>, java.io.Serializable, Cloneable, Comparable<createOrder_args>   {
16309
    private static final TStruct STRUCT_DESC = new TStruct("createOrder_args");
68 ashish 16310
 
483 rajveer 16311
    private static final TField ORDER_FIELD_DESC = new TField("order", TType.STRUCT, (short)1);
68 ashish 16312
 
483 rajveer 16313
    private Order order;
68 ashish 16314
 
16315
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16316
    public enum _Fields implements TFieldIdEnum {
483 rajveer 16317
      ORDER((short)1, "order");
68 ashish 16318
 
16319
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
16320
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16321
 
16322
      static {
16323
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16324
          byId.put((int)field._thriftId, field);
16325
          byName.put(field.getFieldName(), field);
16326
        }
16327
      }
16328
 
16329
      /**
16330
       * Find the _Fields constant that matches fieldId, or null if its not found.
16331
       */
16332
      public static _Fields findByThriftId(int fieldId) {
16333
        return byId.get(fieldId);
16334
      }
16335
 
16336
      /**
16337
       * Find the _Fields constant that matches fieldId, throwing an exception
16338
       * if it is not found.
16339
       */
16340
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16341
        _Fields fields = findByThriftId(fieldId);
16342
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16343
        return fields;
16344
      }
16345
 
16346
      /**
16347
       * Find the _Fields constant that matches name, or null if its not found.
16348
       */
16349
      public static _Fields findByName(String name) {
16350
        return byName.get(name);
16351
      }
16352
 
16353
      private final short _thriftId;
16354
      private final String _fieldName;
16355
 
16356
      _Fields(short thriftId, String fieldName) {
16357
        _thriftId = thriftId;
16358
        _fieldName = fieldName;
16359
      }
16360
 
16361
      public short getThriftFieldId() {
16362
        return _thriftId;
16363
      }
16364
 
16365
      public String getFieldName() {
16366
        return _fieldName;
16367
      }
16368
    }
16369
 
16370
    // isset id assignments
16371
 
16372
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 16373
      put(_Fields.ORDER, new FieldMetaData("order", TFieldRequirementType.DEFAULT, 
16374
          new StructMetaData(TType.STRUCT, Order.class)));
68 ashish 16375
    }});
16376
 
16377
    static {
483 rajveer 16378
      FieldMetaData.addStructMetaDataMap(createOrder_args.class, metaDataMap);
68 ashish 16379
    }
16380
 
483 rajveer 16381
    public createOrder_args() {
68 ashish 16382
    }
16383
 
483 rajveer 16384
    public createOrder_args(
16385
      Order order)
68 ashish 16386
    {
16387
      this();
483 rajveer 16388
      this.order = order;
68 ashish 16389
    }
16390
 
16391
    /**
16392
     * Performs a deep copy on <i>other</i>.
16393
     */
483 rajveer 16394
    public createOrder_args(createOrder_args other) {
16395
      if (other.isSetOrder()) {
16396
        this.order = new Order(other.order);
16397
      }
68 ashish 16398
    }
16399
 
483 rajveer 16400
    public createOrder_args deepCopy() {
16401
      return new createOrder_args(this);
68 ashish 16402
    }
16403
 
16404
    @Deprecated
483 rajveer 16405
    public createOrder_args clone() {
16406
      return new createOrder_args(this);
68 ashish 16407
    }
16408
 
483 rajveer 16409
    public Order getOrder() {
16410
      return this.order;
68 ashish 16411
    }
16412
 
483 rajveer 16413
    public createOrder_args setOrder(Order order) {
16414
      this.order = order;
68 ashish 16415
      return this;
16416
    }
16417
 
483 rajveer 16418
    public void unsetOrder() {
16419
      this.order = null;
68 ashish 16420
    }
16421
 
483 rajveer 16422
    /** Returns true if field order is set (has been asigned a value) and false otherwise */
16423
    public boolean isSetOrder() {
16424
      return this.order != null;
68 ashish 16425
    }
16426
 
483 rajveer 16427
    public void setOrderIsSet(boolean value) {
16428
      if (!value) {
16429
        this.order = null;
16430
      }
68 ashish 16431
    }
16432
 
16433
    public void setFieldValue(_Fields field, Object value) {
16434
      switch (field) {
483 rajveer 16435
      case ORDER:
68 ashish 16436
        if (value == null) {
483 rajveer 16437
          unsetOrder();
68 ashish 16438
        } else {
483 rajveer 16439
          setOrder((Order)value);
68 ashish 16440
        }
16441
        break;
16442
 
16443
      }
16444
    }
16445
 
16446
    public void setFieldValue(int fieldID, Object value) {
16447
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
16448
    }
16449
 
16450
    public Object getFieldValue(_Fields field) {
16451
      switch (field) {
483 rajveer 16452
      case ORDER:
16453
        return getOrder();
68 ashish 16454
 
16455
      }
16456
      throw new IllegalStateException();
16457
    }
16458
 
16459
    public Object getFieldValue(int fieldId) {
16460
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
16461
    }
16462
 
16463
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
16464
    public boolean isSet(_Fields field) {
16465
      switch (field) {
483 rajveer 16466
      case ORDER:
16467
        return isSetOrder();
68 ashish 16468
      }
16469
      throw new IllegalStateException();
16470
    }
16471
 
16472
    public boolean isSet(int fieldID) {
16473
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
16474
    }
16475
 
16476
    @Override
16477
    public boolean equals(Object that) {
16478
      if (that == null)
16479
        return false;
483 rajveer 16480
      if (that instanceof createOrder_args)
16481
        return this.equals((createOrder_args)that);
68 ashish 16482
      return false;
16483
    }
16484
 
483 rajveer 16485
    public boolean equals(createOrder_args that) {
68 ashish 16486
      if (that == null)
16487
        return false;
16488
 
483 rajveer 16489
      boolean this_present_order = true && this.isSetOrder();
16490
      boolean that_present_order = true && that.isSetOrder();
16491
      if (this_present_order || that_present_order) {
16492
        if (!(this_present_order && that_present_order))
68 ashish 16493
          return false;
483 rajveer 16494
        if (!this.order.equals(that.order))
68 ashish 16495
          return false;
16496
      }
16497
 
16498
      return true;
16499
    }
16500
 
16501
    @Override
16502
    public int hashCode() {
16503
      return 0;
16504
    }
16505
 
483 rajveer 16506
    public int compareTo(createOrder_args other) {
68 ashish 16507
      if (!getClass().equals(other.getClass())) {
16508
        return getClass().getName().compareTo(other.getClass().getName());
16509
      }
16510
 
16511
      int lastComparison = 0;
483 rajveer 16512
      createOrder_args typedOther = (createOrder_args)other;
68 ashish 16513
 
483 rajveer 16514
      lastComparison = Boolean.valueOf(isSetOrder()).compareTo(isSetOrder());
68 ashish 16515
      if (lastComparison != 0) {
16516
        return lastComparison;
16517
      }
483 rajveer 16518
      lastComparison = TBaseHelper.compareTo(order, typedOther.order);
68 ashish 16519
      if (lastComparison != 0) {
16520
        return lastComparison;
16521
      }
16522
      return 0;
16523
    }
16524
 
16525
    public void read(TProtocol iprot) throws TException {
16526
      TField field;
16527
      iprot.readStructBegin();
16528
      while (true)
16529
      {
16530
        field = iprot.readFieldBegin();
16531
        if (field.type == TType.STOP) { 
16532
          break;
16533
        }
16534
        _Fields fieldId = _Fields.findByThriftId(field.id);
16535
        if (fieldId == null) {
16536
          TProtocolUtil.skip(iprot, field.type);
16537
        } else {
16538
          switch (fieldId) {
483 rajveer 16539
            case ORDER:
16540
              if (field.type == TType.STRUCT) {
16541
                this.order = new Order();
16542
                this.order.read(iprot);
68 ashish 16543
              } else { 
16544
                TProtocolUtil.skip(iprot, field.type);
16545
              }
16546
              break;
16547
          }
16548
          iprot.readFieldEnd();
16549
        }
16550
      }
16551
      iprot.readStructEnd();
16552
      validate();
16553
    }
16554
 
16555
    public void write(TProtocol oprot) throws TException {
16556
      validate();
16557
 
16558
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 16559
      if (this.order != null) {
16560
        oprot.writeFieldBegin(ORDER_FIELD_DESC);
16561
        this.order.write(oprot);
16562
        oprot.writeFieldEnd();
16563
      }
68 ashish 16564
      oprot.writeFieldStop();
16565
      oprot.writeStructEnd();
16566
    }
16567
 
16568
    @Override
16569
    public String toString() {
483 rajveer 16570
      StringBuilder sb = new StringBuilder("createOrder_args(");
68 ashish 16571
      boolean first = true;
16572
 
483 rajveer 16573
      sb.append("order:");
16574
      if (this.order == null) {
16575
        sb.append("null");
16576
      } else {
16577
        sb.append(this.order);
16578
      }
68 ashish 16579
      first = false;
16580
      sb.append(")");
16581
      return sb.toString();
16582
    }
16583
 
16584
    public void validate() throws TException {
16585
      // check for required fields
16586
    }
16587
 
16588
  }
16589
 
483 rajveer 16590
  public static class createOrder_result implements TBase<createOrder_result._Fields>, java.io.Serializable, Cloneable, Comparable<createOrder_result>   {
16591
    private static final TStruct STRUCT_DESC = new TStruct("createOrder_result");
68 ashish 16592
 
483 rajveer 16593
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
68 ashish 16594
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
16595
 
483 rajveer 16596
    private long success;
68 ashish 16597
    private TransactionServiceException ex;
16598
 
16599
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16600
    public enum _Fields implements TFieldIdEnum {
16601
      SUCCESS((short)0, "success"),
16602
      EX((short)1, "ex");
16603
 
16604
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
16605
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16606
 
16607
      static {
16608
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16609
          byId.put((int)field._thriftId, field);
16610
          byName.put(field.getFieldName(), field);
16611
        }
16612
      }
16613
 
16614
      /**
16615
       * Find the _Fields constant that matches fieldId, or null if its not found.
16616
       */
16617
      public static _Fields findByThriftId(int fieldId) {
16618
        return byId.get(fieldId);
16619
      }
16620
 
16621
      /**
16622
       * Find the _Fields constant that matches fieldId, throwing an exception
16623
       * if it is not found.
16624
       */
16625
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16626
        _Fields fields = findByThriftId(fieldId);
16627
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16628
        return fields;
16629
      }
16630
 
16631
      /**
16632
       * Find the _Fields constant that matches name, or null if its not found.
16633
       */
16634
      public static _Fields findByName(String name) {
16635
        return byName.get(name);
16636
      }
16637
 
16638
      private final short _thriftId;
16639
      private final String _fieldName;
16640
 
16641
      _Fields(short thriftId, String fieldName) {
16642
        _thriftId = thriftId;
16643
        _fieldName = fieldName;
16644
      }
16645
 
16646
      public short getThriftFieldId() {
16647
        return _thriftId;
16648
      }
16649
 
16650
      public String getFieldName() {
16651
        return _fieldName;
16652
      }
16653
    }
16654
 
16655
    // isset id assignments
16656
    private static final int __SUCCESS_ISSET_ID = 0;
16657
    private BitSet __isset_bit_vector = new BitSet(1);
16658
 
16659
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
16660
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
483 rajveer 16661
          new FieldValueMetaData(TType.I64)));
68 ashish 16662
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
16663
          new FieldValueMetaData(TType.STRUCT)));
16664
    }});
16665
 
16666
    static {
483 rajveer 16667
      FieldMetaData.addStructMetaDataMap(createOrder_result.class, metaDataMap);
68 ashish 16668
    }
16669
 
483 rajveer 16670
    public createOrder_result() {
68 ashish 16671
    }
16672
 
483 rajveer 16673
    public createOrder_result(
16674
      long success,
68 ashish 16675
      TransactionServiceException ex)
16676
    {
16677
      this();
16678
      this.success = success;
16679
      setSuccessIsSet(true);
16680
      this.ex = ex;
16681
    }
16682
 
16683
    /**
16684
     * Performs a deep copy on <i>other</i>.
16685
     */
483 rajveer 16686
    public createOrder_result(createOrder_result other) {
68 ashish 16687
      __isset_bit_vector.clear();
16688
      __isset_bit_vector.or(other.__isset_bit_vector);
16689
      this.success = other.success;
16690
      if (other.isSetEx()) {
16691
        this.ex = new TransactionServiceException(other.ex);
16692
      }
16693
    }
16694
 
483 rajveer 16695
    public createOrder_result deepCopy() {
16696
      return new createOrder_result(this);
68 ashish 16697
    }
16698
 
16699
    @Deprecated
483 rajveer 16700
    public createOrder_result clone() {
16701
      return new createOrder_result(this);
68 ashish 16702
    }
16703
 
483 rajveer 16704
    public long getSuccess() {
68 ashish 16705
      return this.success;
16706
    }
16707
 
483 rajveer 16708
    public createOrder_result setSuccess(long success) {
68 ashish 16709
      this.success = success;
16710
      setSuccessIsSet(true);
16711
      return this;
16712
    }
16713
 
16714
    public void unsetSuccess() {
16715
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
16716
    }
16717
 
16718
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
16719
    public boolean isSetSuccess() {
16720
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
16721
    }
16722
 
16723
    public void setSuccessIsSet(boolean value) {
16724
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
16725
    }
16726
 
16727
    public TransactionServiceException getEx() {
16728
      return this.ex;
16729
    }
16730
 
483 rajveer 16731
    public createOrder_result setEx(TransactionServiceException ex) {
68 ashish 16732
      this.ex = ex;
16733
      return this;
16734
    }
16735
 
16736
    public void unsetEx() {
16737
      this.ex = null;
16738
    }
16739
 
16740
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
16741
    public boolean isSetEx() {
16742
      return this.ex != null;
16743
    }
16744
 
16745
    public void setExIsSet(boolean value) {
16746
      if (!value) {
16747
        this.ex = null;
16748
      }
16749
    }
16750
 
16751
    public void setFieldValue(_Fields field, Object value) {
16752
      switch (field) {
16753
      case SUCCESS:
16754
        if (value == null) {
16755
          unsetSuccess();
16756
        } else {
483 rajveer 16757
          setSuccess((Long)value);
68 ashish 16758
        }
16759
        break;
16760
 
16761
      case EX:
16762
        if (value == null) {
16763
          unsetEx();
16764
        } else {
16765
          setEx((TransactionServiceException)value);
16766
        }
16767
        break;
16768
 
16769
      }
16770
    }
16771
 
16772
    public void setFieldValue(int fieldID, Object value) {
16773
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
16774
    }
16775
 
16776
    public Object getFieldValue(_Fields field) {
16777
      switch (field) {
16778
      case SUCCESS:
483 rajveer 16779
        return new Long(getSuccess());
68 ashish 16780
 
16781
      case EX:
16782
        return getEx();
16783
 
16784
      }
16785
      throw new IllegalStateException();
16786
    }
16787
 
16788
    public Object getFieldValue(int fieldId) {
16789
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
16790
    }
16791
 
16792
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
16793
    public boolean isSet(_Fields field) {
16794
      switch (field) {
16795
      case SUCCESS:
16796
        return isSetSuccess();
16797
      case EX:
16798
        return isSetEx();
16799
      }
16800
      throw new IllegalStateException();
16801
    }
16802
 
16803
    public boolean isSet(int fieldID) {
16804
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
16805
    }
16806
 
16807
    @Override
16808
    public boolean equals(Object that) {
16809
      if (that == null)
16810
        return false;
483 rajveer 16811
      if (that instanceof createOrder_result)
16812
        return this.equals((createOrder_result)that);
68 ashish 16813
      return false;
16814
    }
16815
 
483 rajveer 16816
    public boolean equals(createOrder_result that) {
68 ashish 16817
      if (that == null)
16818
        return false;
16819
 
16820
      boolean this_present_success = true;
16821
      boolean that_present_success = true;
16822
      if (this_present_success || that_present_success) {
16823
        if (!(this_present_success && that_present_success))
16824
          return false;
16825
        if (this.success != that.success)
16826
          return false;
16827
      }
16828
 
16829
      boolean this_present_ex = true && this.isSetEx();
16830
      boolean that_present_ex = true && that.isSetEx();
16831
      if (this_present_ex || that_present_ex) {
16832
        if (!(this_present_ex && that_present_ex))
16833
          return false;
16834
        if (!this.ex.equals(that.ex))
16835
          return false;
16836
      }
16837
 
16838
      return true;
16839
    }
16840
 
16841
    @Override
16842
    public int hashCode() {
16843
      return 0;
16844
    }
16845
 
483 rajveer 16846
    public int compareTo(createOrder_result other) {
68 ashish 16847
      if (!getClass().equals(other.getClass())) {
16848
        return getClass().getName().compareTo(other.getClass().getName());
16849
      }
16850
 
16851
      int lastComparison = 0;
483 rajveer 16852
      createOrder_result typedOther = (createOrder_result)other;
68 ashish 16853
 
16854
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
16855
      if (lastComparison != 0) {
16856
        return lastComparison;
16857
      }
16858
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
16859
      if (lastComparison != 0) {
16860
        return lastComparison;
16861
      }
16862
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
16863
      if (lastComparison != 0) {
16864
        return lastComparison;
16865
      }
16866
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
16867
      if (lastComparison != 0) {
16868
        return lastComparison;
16869
      }
16870
      return 0;
16871
    }
16872
 
16873
    public void read(TProtocol iprot) throws TException {
16874
      TField field;
16875
      iprot.readStructBegin();
16876
      while (true)
16877
      {
16878
        field = iprot.readFieldBegin();
16879
        if (field.type == TType.STOP) { 
16880
          break;
16881
        }
16882
        _Fields fieldId = _Fields.findByThriftId(field.id);
16883
        if (fieldId == null) {
16884
          TProtocolUtil.skip(iprot, field.type);
16885
        } else {
16886
          switch (fieldId) {
16887
            case SUCCESS:
483 rajveer 16888
              if (field.type == TType.I64) {
16889
                this.success = iprot.readI64();
68 ashish 16890
                setSuccessIsSet(true);
16891
              } else { 
16892
                TProtocolUtil.skip(iprot, field.type);
16893
              }
16894
              break;
16895
            case EX:
16896
              if (field.type == TType.STRUCT) {
16897
                this.ex = new TransactionServiceException();
16898
                this.ex.read(iprot);
16899
              } else { 
16900
                TProtocolUtil.skip(iprot, field.type);
16901
              }
16902
              break;
16903
          }
16904
          iprot.readFieldEnd();
16905
        }
16906
      }
16907
      iprot.readStructEnd();
16908
      validate();
16909
    }
16910
 
16911
    public void write(TProtocol oprot) throws TException {
16912
      oprot.writeStructBegin(STRUCT_DESC);
16913
 
16914
      if (this.isSetSuccess()) {
16915
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
483 rajveer 16916
        oprot.writeI64(this.success);
68 ashish 16917
        oprot.writeFieldEnd();
16918
      } else if (this.isSetEx()) {
16919
        oprot.writeFieldBegin(EX_FIELD_DESC);
16920
        this.ex.write(oprot);
16921
        oprot.writeFieldEnd();
16922
      }
16923
      oprot.writeFieldStop();
16924
      oprot.writeStructEnd();
16925
    }
16926
 
16927
    @Override
16928
    public String toString() {
483 rajveer 16929
      StringBuilder sb = new StringBuilder("createOrder_result(");
68 ashish 16930
      boolean first = true;
16931
 
16932
      sb.append("success:");
16933
      sb.append(this.success);
16934
      first = false;
16935
      if (!first) sb.append(", ");
16936
      sb.append("ex:");
16937
      if (this.ex == null) {
16938
        sb.append("null");
16939
      } else {
16940
        sb.append(this.ex);
16941
      }
16942
      first = false;
16943
      sb.append(")");
16944
      return sb.toString();
16945
    }
16946
 
16947
    public void validate() throws TException {
16948
      // check for required fields
16949
    }
16950
 
16951
  }
16952
 
483 rajveer 16953
  public static class getOrder_args implements TBase<getOrder_args._Fields>, java.io.Serializable, Cloneable, Comparable<getOrder_args>   {
16954
    private static final TStruct STRUCT_DESC = new TStruct("getOrder_args");
68 ashish 16955
 
483 rajveer 16956
    private static final TField ID_FIELD_DESC = new TField("id", TType.I64, (short)1);
68 ashish 16957
 
483 rajveer 16958
    private long id;
68 ashish 16959
 
16960
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16961
    public enum _Fields implements TFieldIdEnum {
483 rajveer 16962
      ID((short)1, "id");
68 ashish 16963
 
16964
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
16965
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16966
 
16967
      static {
16968
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16969
          byId.put((int)field._thriftId, field);
16970
          byName.put(field.getFieldName(), field);
16971
        }
16972
      }
16973
 
16974
      /**
16975
       * Find the _Fields constant that matches fieldId, or null if its not found.
16976
       */
16977
      public static _Fields findByThriftId(int fieldId) {
16978
        return byId.get(fieldId);
16979
      }
16980
 
16981
      /**
16982
       * Find the _Fields constant that matches fieldId, throwing an exception
16983
       * if it is not found.
16984
       */
16985
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16986
        _Fields fields = findByThriftId(fieldId);
16987
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16988
        return fields;
16989
      }
16990
 
16991
      /**
16992
       * Find the _Fields constant that matches name, or null if its not found.
16993
       */
16994
      public static _Fields findByName(String name) {
16995
        return byName.get(name);
16996
      }
16997
 
16998
      private final short _thriftId;
16999
      private final String _fieldName;
17000
 
17001
      _Fields(short thriftId, String fieldName) {
17002
        _thriftId = thriftId;
17003
        _fieldName = fieldName;
17004
      }
17005
 
17006
      public short getThriftFieldId() {
17007
        return _thriftId;
17008
      }
17009
 
17010
      public String getFieldName() {
17011
        return _fieldName;
17012
      }
17013
    }
17014
 
17015
    // isset id assignments
483 rajveer 17016
    private static final int __ID_ISSET_ID = 0;
17017
    private BitSet __isset_bit_vector = new BitSet(1);
68 ashish 17018
 
17019
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 17020
      put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, 
68 ashish 17021
          new FieldValueMetaData(TType.I64)));
17022
    }});
17023
 
17024
    static {
483 rajveer 17025
      FieldMetaData.addStructMetaDataMap(getOrder_args.class, metaDataMap);
68 ashish 17026
    }
17027
 
483 rajveer 17028
    public getOrder_args() {
68 ashish 17029
    }
17030
 
483 rajveer 17031
    public getOrder_args(
17032
      long id)
68 ashish 17033
    {
17034
      this();
483 rajveer 17035
      this.id = id;
17036
      setIdIsSet(true);
68 ashish 17037
    }
17038
 
17039
    /**
17040
     * Performs a deep copy on <i>other</i>.
17041
     */
483 rajveer 17042
    public getOrder_args(getOrder_args other) {
68 ashish 17043
      __isset_bit_vector.clear();
17044
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 17045
      this.id = other.id;
68 ashish 17046
    }
17047
 
483 rajveer 17048
    public getOrder_args deepCopy() {
17049
      return new getOrder_args(this);
68 ashish 17050
    }
17051
 
17052
    @Deprecated
483 rajveer 17053
    public getOrder_args clone() {
17054
      return new getOrder_args(this);
68 ashish 17055
    }
17056
 
483 rajveer 17057
    public long getId() {
17058
      return this.id;
68 ashish 17059
    }
17060
 
483 rajveer 17061
    public getOrder_args setId(long id) {
17062
      this.id = id;
17063
      setIdIsSet(true);
68 ashish 17064
      return this;
17065
    }
17066
 
483 rajveer 17067
    public void unsetId() {
17068
      __isset_bit_vector.clear(__ID_ISSET_ID);
68 ashish 17069
    }
17070
 
483 rajveer 17071
    /** Returns true if field id is set (has been asigned a value) and false otherwise */
17072
    public boolean isSetId() {
17073
      return __isset_bit_vector.get(__ID_ISSET_ID);
68 ashish 17074
    }
17075
 
483 rajveer 17076
    public void setIdIsSet(boolean value) {
17077
      __isset_bit_vector.set(__ID_ISSET_ID, value);
68 ashish 17078
    }
17079
 
17080
    public void setFieldValue(_Fields field, Object value) {
17081
      switch (field) {
483 rajveer 17082
      case ID:
68 ashish 17083
        if (value == null) {
483 rajveer 17084
          unsetId();
68 ashish 17085
        } else {
483 rajveer 17086
          setId((Long)value);
68 ashish 17087
        }
17088
        break;
17089
 
17090
      }
17091
    }
17092
 
17093
    public void setFieldValue(int fieldID, Object value) {
17094
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
17095
    }
17096
 
17097
    public Object getFieldValue(_Fields field) {
17098
      switch (field) {
483 rajveer 17099
      case ID:
17100
        return new Long(getId());
68 ashish 17101
 
17102
      }
17103
      throw new IllegalStateException();
17104
    }
17105
 
17106
    public Object getFieldValue(int fieldId) {
17107
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
17108
    }
17109
 
17110
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
17111
    public boolean isSet(_Fields field) {
17112
      switch (field) {
483 rajveer 17113
      case ID:
17114
        return isSetId();
68 ashish 17115
      }
17116
      throw new IllegalStateException();
17117
    }
17118
 
17119
    public boolean isSet(int fieldID) {
17120
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
17121
    }
17122
 
17123
    @Override
17124
    public boolean equals(Object that) {
17125
      if (that == null)
17126
        return false;
483 rajveer 17127
      if (that instanceof getOrder_args)
17128
        return this.equals((getOrder_args)that);
68 ashish 17129
      return false;
17130
    }
17131
 
483 rajveer 17132
    public boolean equals(getOrder_args that) {
68 ashish 17133
      if (that == null)
17134
        return false;
17135
 
483 rajveer 17136
      boolean this_present_id = true;
17137
      boolean that_present_id = true;
17138
      if (this_present_id || that_present_id) {
17139
        if (!(this_present_id && that_present_id))
68 ashish 17140
          return false;
483 rajveer 17141
        if (this.id != that.id)
68 ashish 17142
          return false;
17143
      }
17144
 
17145
      return true;
17146
    }
17147
 
17148
    @Override
17149
    public int hashCode() {
17150
      return 0;
17151
    }
17152
 
483 rajveer 17153
    public int compareTo(getOrder_args other) {
68 ashish 17154
      if (!getClass().equals(other.getClass())) {
17155
        return getClass().getName().compareTo(other.getClass().getName());
17156
      }
17157
 
17158
      int lastComparison = 0;
483 rajveer 17159
      getOrder_args typedOther = (getOrder_args)other;
68 ashish 17160
 
483 rajveer 17161
      lastComparison = Boolean.valueOf(isSetId()).compareTo(isSetId());
68 ashish 17162
      if (lastComparison != 0) {
17163
        return lastComparison;
17164
      }
483 rajveer 17165
      lastComparison = TBaseHelper.compareTo(id, typedOther.id);
68 ashish 17166
      if (lastComparison != 0) {
17167
        return lastComparison;
17168
      }
17169
      return 0;
17170
    }
17171
 
17172
    public void read(TProtocol iprot) throws TException {
17173
      TField field;
17174
      iprot.readStructBegin();
17175
      while (true)
17176
      {
17177
        field = iprot.readFieldBegin();
17178
        if (field.type == TType.STOP) { 
17179
          break;
17180
        }
17181
        _Fields fieldId = _Fields.findByThriftId(field.id);
17182
        if (fieldId == null) {
17183
          TProtocolUtil.skip(iprot, field.type);
17184
        } else {
17185
          switch (fieldId) {
483 rajveer 17186
            case ID:
68 ashish 17187
              if (field.type == TType.I64) {
483 rajveer 17188
                this.id = iprot.readI64();
17189
                setIdIsSet(true);
68 ashish 17190
              } else { 
17191
                TProtocolUtil.skip(iprot, field.type);
17192
              }
17193
              break;
17194
          }
17195
          iprot.readFieldEnd();
17196
        }
17197
      }
17198
      iprot.readStructEnd();
17199
      validate();
17200
    }
17201
 
17202
    public void write(TProtocol oprot) throws TException {
17203
      validate();
17204
 
17205
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 17206
      oprot.writeFieldBegin(ID_FIELD_DESC);
17207
      oprot.writeI64(this.id);
68 ashish 17208
      oprot.writeFieldEnd();
17209
      oprot.writeFieldStop();
17210
      oprot.writeStructEnd();
17211
    }
17212
 
17213
    @Override
17214
    public String toString() {
483 rajveer 17215
      StringBuilder sb = new StringBuilder("getOrder_args(");
68 ashish 17216
      boolean first = true;
17217
 
483 rajveer 17218
      sb.append("id:");
17219
      sb.append(this.id);
68 ashish 17220
      first = false;
17221
      sb.append(")");
17222
      return sb.toString();
17223
    }
17224
 
17225
    public void validate() throws TException {
17226
      // check for required fields
17227
    }
17228
 
17229
  }
17230
 
483 rajveer 17231
  public static class getOrder_result implements TBase<getOrder_result._Fields>, java.io.Serializable, Cloneable, Comparable<getOrder_result>   {
17232
    private static final TStruct STRUCT_DESC = new TStruct("getOrder_result");
68 ashish 17233
 
483 rajveer 17234
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
68 ashish 17235
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
17236
 
483 rajveer 17237
    private Order success;
68 ashish 17238
    private TransactionServiceException ex;
17239
 
17240
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17241
    public enum _Fields implements TFieldIdEnum {
17242
      SUCCESS((short)0, "success"),
17243
      EX((short)1, "ex");
17244
 
17245
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
17246
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17247
 
17248
      static {
17249
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17250
          byId.put((int)field._thriftId, field);
17251
          byName.put(field.getFieldName(), field);
17252
        }
17253
      }
17254
 
17255
      /**
17256
       * Find the _Fields constant that matches fieldId, or null if its not found.
17257
       */
17258
      public static _Fields findByThriftId(int fieldId) {
17259
        return byId.get(fieldId);
17260
      }
17261
 
17262
      /**
17263
       * Find the _Fields constant that matches fieldId, throwing an exception
17264
       * if it is not found.
17265
       */
17266
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17267
        _Fields fields = findByThriftId(fieldId);
17268
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17269
        return fields;
17270
      }
17271
 
17272
      /**
17273
       * Find the _Fields constant that matches name, or null if its not found.
17274
       */
17275
      public static _Fields findByName(String name) {
17276
        return byName.get(name);
17277
      }
17278
 
17279
      private final short _thriftId;
17280
      private final String _fieldName;
17281
 
17282
      _Fields(short thriftId, String fieldName) {
17283
        _thriftId = thriftId;
17284
        _fieldName = fieldName;
17285
      }
17286
 
17287
      public short getThriftFieldId() {
17288
        return _thriftId;
17289
      }
17290
 
17291
      public String getFieldName() {
17292
        return _fieldName;
17293
      }
17294
    }
17295
 
17296
    // isset id assignments
17297
 
17298
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
17299
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
483 rajveer 17300
          new StructMetaData(TType.STRUCT, Order.class)));
68 ashish 17301
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
17302
          new FieldValueMetaData(TType.STRUCT)));
17303
    }});
17304
 
17305
    static {
483 rajveer 17306
      FieldMetaData.addStructMetaDataMap(getOrder_result.class, metaDataMap);
68 ashish 17307
    }
17308
 
483 rajveer 17309
    public getOrder_result() {
68 ashish 17310
    }
17311
 
483 rajveer 17312
    public getOrder_result(
17313
      Order success,
68 ashish 17314
      TransactionServiceException ex)
17315
    {
17316
      this();
17317
      this.success = success;
17318
      this.ex = ex;
17319
    }
17320
 
17321
    /**
17322
     * Performs a deep copy on <i>other</i>.
17323
     */
483 rajveer 17324
    public getOrder_result(getOrder_result other) {
17325
      if (other.isSetSuccess()) {
17326
        this.success = new Order(other.success);
17327
      }
68 ashish 17328
      if (other.isSetEx()) {
17329
        this.ex = new TransactionServiceException(other.ex);
17330
      }
17331
    }
17332
 
483 rajveer 17333
    public getOrder_result deepCopy() {
17334
      return new getOrder_result(this);
68 ashish 17335
    }
17336
 
17337
    @Deprecated
483 rajveer 17338
    public getOrder_result clone() {
17339
      return new getOrder_result(this);
68 ashish 17340
    }
17341
 
483 rajveer 17342
    public Order getSuccess() {
68 ashish 17343
      return this.success;
17344
    }
17345
 
483 rajveer 17346
    public getOrder_result setSuccess(Order success) {
68 ashish 17347
      this.success = success;
17348
      return this;
17349
    }
17350
 
17351
    public void unsetSuccess() {
483 rajveer 17352
      this.success = null;
68 ashish 17353
    }
17354
 
17355
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
17356
    public boolean isSetSuccess() {
483 rajveer 17357
      return this.success != null;
68 ashish 17358
    }
17359
 
17360
    public void setSuccessIsSet(boolean value) {
483 rajveer 17361
      if (!value) {
17362
        this.success = null;
17363
      }
68 ashish 17364
    }
17365
 
17366
    public TransactionServiceException getEx() {
17367
      return this.ex;
17368
    }
17369
 
483 rajveer 17370
    public getOrder_result setEx(TransactionServiceException ex) {
68 ashish 17371
      this.ex = ex;
17372
      return this;
17373
    }
17374
 
17375
    public void unsetEx() {
17376
      this.ex = null;
17377
    }
17378
 
17379
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
17380
    public boolean isSetEx() {
17381
      return this.ex != null;
17382
    }
17383
 
17384
    public void setExIsSet(boolean value) {
17385
      if (!value) {
17386
        this.ex = null;
17387
      }
17388
    }
17389
 
17390
    public void setFieldValue(_Fields field, Object value) {
17391
      switch (field) {
17392
      case SUCCESS:
17393
        if (value == null) {
17394
          unsetSuccess();
17395
        } else {
483 rajveer 17396
          setSuccess((Order)value);
68 ashish 17397
        }
17398
        break;
17399
 
17400
      case EX:
17401
        if (value == null) {
17402
          unsetEx();
17403
        } else {
17404
          setEx((TransactionServiceException)value);
17405
        }
17406
        break;
17407
 
17408
      }
17409
    }
17410
 
17411
    public void setFieldValue(int fieldID, Object value) {
17412
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
17413
    }
17414
 
17415
    public Object getFieldValue(_Fields field) {
17416
      switch (field) {
17417
      case SUCCESS:
483 rajveer 17418
        return getSuccess();
68 ashish 17419
 
17420
      case EX:
17421
        return getEx();
17422
 
17423
      }
17424
      throw new IllegalStateException();
17425
    }
17426
 
17427
    public Object getFieldValue(int fieldId) {
17428
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
17429
    }
17430
 
17431
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
17432
    public boolean isSet(_Fields field) {
17433
      switch (field) {
17434
      case SUCCESS:
17435
        return isSetSuccess();
17436
      case EX:
17437
        return isSetEx();
17438
      }
17439
      throw new IllegalStateException();
17440
    }
17441
 
17442
    public boolean isSet(int fieldID) {
17443
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
17444
    }
17445
 
17446
    @Override
17447
    public boolean equals(Object that) {
17448
      if (that == null)
17449
        return false;
483 rajveer 17450
      if (that instanceof getOrder_result)
17451
        return this.equals((getOrder_result)that);
68 ashish 17452
      return false;
17453
    }
17454
 
483 rajveer 17455
    public boolean equals(getOrder_result that) {
68 ashish 17456
      if (that == null)
17457
        return false;
17458
 
483 rajveer 17459
      boolean this_present_success = true && this.isSetSuccess();
17460
      boolean that_present_success = true && that.isSetSuccess();
68 ashish 17461
      if (this_present_success || that_present_success) {
17462
        if (!(this_present_success && that_present_success))
17463
          return false;
483 rajveer 17464
        if (!this.success.equals(that.success))
68 ashish 17465
          return false;
17466
      }
17467
 
17468
      boolean this_present_ex = true && this.isSetEx();
17469
      boolean that_present_ex = true && that.isSetEx();
17470
      if (this_present_ex || that_present_ex) {
17471
        if (!(this_present_ex && that_present_ex))
17472
          return false;
17473
        if (!this.ex.equals(that.ex))
17474
          return false;
17475
      }
17476
 
17477
      return true;
17478
    }
17479
 
17480
    @Override
17481
    public int hashCode() {
17482
      return 0;
17483
    }
17484
 
483 rajveer 17485
    public int compareTo(getOrder_result other) {
68 ashish 17486
      if (!getClass().equals(other.getClass())) {
17487
        return getClass().getName().compareTo(other.getClass().getName());
17488
      }
17489
 
17490
      int lastComparison = 0;
483 rajveer 17491
      getOrder_result typedOther = (getOrder_result)other;
68 ashish 17492
 
17493
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
17494
      if (lastComparison != 0) {
17495
        return lastComparison;
17496
      }
17497
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
17498
      if (lastComparison != 0) {
17499
        return lastComparison;
17500
      }
17501
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
17502
      if (lastComparison != 0) {
17503
        return lastComparison;
17504
      }
17505
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
17506
      if (lastComparison != 0) {
17507
        return lastComparison;
17508
      }
17509
      return 0;
17510
    }
17511
 
17512
    public void read(TProtocol iprot) throws TException {
17513
      TField field;
17514
      iprot.readStructBegin();
17515
      while (true)
17516
      {
17517
        field = iprot.readFieldBegin();
17518
        if (field.type == TType.STOP) { 
17519
          break;
17520
        }
17521
        _Fields fieldId = _Fields.findByThriftId(field.id);
17522
        if (fieldId == null) {
17523
          TProtocolUtil.skip(iprot, field.type);
17524
        } else {
17525
          switch (fieldId) {
17526
            case SUCCESS:
483 rajveer 17527
              if (field.type == TType.STRUCT) {
17528
                this.success = new Order();
17529
                this.success.read(iprot);
68 ashish 17530
              } else { 
17531
                TProtocolUtil.skip(iprot, field.type);
17532
              }
17533
              break;
17534
            case EX:
17535
              if (field.type == TType.STRUCT) {
17536
                this.ex = new TransactionServiceException();
17537
                this.ex.read(iprot);
17538
              } else { 
17539
                TProtocolUtil.skip(iprot, field.type);
17540
              }
17541
              break;
17542
          }
17543
          iprot.readFieldEnd();
17544
        }
17545
      }
17546
      iprot.readStructEnd();
17547
      validate();
17548
    }
17549
 
17550
    public void write(TProtocol oprot) throws TException {
17551
      oprot.writeStructBegin(STRUCT_DESC);
17552
 
17553
      if (this.isSetSuccess()) {
17554
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
483 rajveer 17555
        this.success.write(oprot);
68 ashish 17556
        oprot.writeFieldEnd();
17557
      } else if (this.isSetEx()) {
17558
        oprot.writeFieldBegin(EX_FIELD_DESC);
17559
        this.ex.write(oprot);
17560
        oprot.writeFieldEnd();
17561
      }
17562
      oprot.writeFieldStop();
17563
      oprot.writeStructEnd();
17564
    }
17565
 
17566
    @Override
17567
    public String toString() {
483 rajveer 17568
      StringBuilder sb = new StringBuilder("getOrder_result(");
68 ashish 17569
      boolean first = true;
17570
 
17571
      sb.append("success:");
483 rajveer 17572
      if (this.success == null) {
17573
        sb.append("null");
17574
      } else {
17575
        sb.append(this.success);
17576
      }
68 ashish 17577
      first = false;
17578
      if (!first) sb.append(", ");
17579
      sb.append("ex:");
17580
      if (this.ex == null) {
17581
        sb.append("null");
17582
      } else {
17583
        sb.append(this.ex);
17584
      }
17585
      first = false;
17586
      sb.append(")");
17587
      return sb.toString();
17588
    }
17589
 
17590
    public void validate() throws TException {
17591
      // check for required fields
17592
    }
17593
 
17594
  }
17595
 
483 rajveer 17596
  public static class getLineItemsForOrder_args implements TBase<getLineItemsForOrder_args._Fields>, java.io.Serializable, Cloneable, Comparable<getLineItemsForOrder_args>   {
17597
    private static final TStruct STRUCT_DESC = new TStruct("getLineItemsForOrder_args");
68 ashish 17598
 
483 rajveer 17599
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
68 ashish 17600
 
483 rajveer 17601
    private long orderId;
68 ashish 17602
 
17603
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17604
    public enum _Fields implements TFieldIdEnum {
483 rajveer 17605
      ORDER_ID((short)1, "orderId");
68 ashish 17606
 
17607
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
17608
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17609
 
17610
      static {
17611
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17612
          byId.put((int)field._thriftId, field);
17613
          byName.put(field.getFieldName(), field);
17614
        }
17615
      }
17616
 
17617
      /**
17618
       * Find the _Fields constant that matches fieldId, or null if its not found.
17619
       */
17620
      public static _Fields findByThriftId(int fieldId) {
17621
        return byId.get(fieldId);
17622
      }
17623
 
17624
      /**
17625
       * Find the _Fields constant that matches fieldId, throwing an exception
17626
       * if it is not found.
17627
       */
17628
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17629
        _Fields fields = findByThriftId(fieldId);
17630
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17631
        return fields;
17632
      }
17633
 
17634
      /**
17635
       * Find the _Fields constant that matches name, or null if its not found.
17636
       */
17637
      public static _Fields findByName(String name) {
17638
        return byName.get(name);
17639
      }
17640
 
17641
      private final short _thriftId;
17642
      private final String _fieldName;
17643
 
17644
      _Fields(short thriftId, String fieldName) {
17645
        _thriftId = thriftId;
17646
        _fieldName = fieldName;
17647
      }
17648
 
17649
      public short getThriftFieldId() {
17650
        return _thriftId;
17651
      }
17652
 
17653
      public String getFieldName() {
17654
        return _fieldName;
17655
      }
17656
    }
17657
 
17658
    // isset id assignments
483 rajveer 17659
    private static final int __ORDERID_ISSET_ID = 0;
68 ashish 17660
    private BitSet __isset_bit_vector = new BitSet(1);
17661
 
17662
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 17663
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
68 ashish 17664
          new FieldValueMetaData(TType.I64)));
17665
    }});
17666
 
17667
    static {
483 rajveer 17668
      FieldMetaData.addStructMetaDataMap(getLineItemsForOrder_args.class, metaDataMap);
68 ashish 17669
    }
17670
 
483 rajveer 17671
    public getLineItemsForOrder_args() {
68 ashish 17672
    }
17673
 
483 rajveer 17674
    public getLineItemsForOrder_args(
17675
      long orderId)
68 ashish 17676
    {
17677
      this();
483 rajveer 17678
      this.orderId = orderId;
17679
      setOrderIdIsSet(true);
68 ashish 17680
    }
17681
 
17682
    /**
17683
     * Performs a deep copy on <i>other</i>.
17684
     */
483 rajveer 17685
    public getLineItemsForOrder_args(getLineItemsForOrder_args other) {
68 ashish 17686
      __isset_bit_vector.clear();
17687
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 17688
      this.orderId = other.orderId;
68 ashish 17689
    }
17690
 
483 rajveer 17691
    public getLineItemsForOrder_args deepCopy() {
17692
      return new getLineItemsForOrder_args(this);
68 ashish 17693
    }
17694
 
17695
    @Deprecated
483 rajveer 17696
    public getLineItemsForOrder_args clone() {
17697
      return new getLineItemsForOrder_args(this);
68 ashish 17698
    }
17699
 
483 rajveer 17700
    public long getOrderId() {
17701
      return this.orderId;
68 ashish 17702
    }
17703
 
483 rajveer 17704
    public getLineItemsForOrder_args setOrderId(long orderId) {
17705
      this.orderId = orderId;
17706
      setOrderIdIsSet(true);
68 ashish 17707
      return this;
17708
    }
17709
 
483 rajveer 17710
    public void unsetOrderId() {
17711
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
68 ashish 17712
    }
17713
 
483 rajveer 17714
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
17715
    public boolean isSetOrderId() {
17716
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
68 ashish 17717
    }
17718
 
483 rajveer 17719
    public void setOrderIdIsSet(boolean value) {
17720
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
68 ashish 17721
    }
17722
 
17723
    public void setFieldValue(_Fields field, Object value) {
17724
      switch (field) {
483 rajveer 17725
      case ORDER_ID:
68 ashish 17726
        if (value == null) {
483 rajveer 17727
          unsetOrderId();
68 ashish 17728
        } else {
483 rajveer 17729
          setOrderId((Long)value);
68 ashish 17730
        }
17731
        break;
17732
 
17733
      }
17734
    }
17735
 
17736
    public void setFieldValue(int fieldID, Object value) {
17737
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
17738
    }
17739
 
17740
    public Object getFieldValue(_Fields field) {
17741
      switch (field) {
483 rajveer 17742
      case ORDER_ID:
17743
        return new Long(getOrderId());
68 ashish 17744
 
17745
      }
17746
      throw new IllegalStateException();
17747
    }
17748
 
17749
    public Object getFieldValue(int fieldId) {
17750
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
17751
    }
17752
 
17753
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
17754
    public boolean isSet(_Fields field) {
17755
      switch (field) {
483 rajveer 17756
      case ORDER_ID:
17757
        return isSetOrderId();
68 ashish 17758
      }
17759
      throw new IllegalStateException();
17760
    }
17761
 
17762
    public boolean isSet(int fieldID) {
17763
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
17764
    }
17765
 
17766
    @Override
17767
    public boolean equals(Object that) {
17768
      if (that == null)
17769
        return false;
483 rajveer 17770
      if (that instanceof getLineItemsForOrder_args)
17771
        return this.equals((getLineItemsForOrder_args)that);
68 ashish 17772
      return false;
17773
    }
17774
 
483 rajveer 17775
    public boolean equals(getLineItemsForOrder_args that) {
68 ashish 17776
      if (that == null)
17777
        return false;
17778
 
483 rajveer 17779
      boolean this_present_orderId = true;
17780
      boolean that_present_orderId = true;
17781
      if (this_present_orderId || that_present_orderId) {
17782
        if (!(this_present_orderId && that_present_orderId))
68 ashish 17783
          return false;
483 rajveer 17784
        if (this.orderId != that.orderId)
68 ashish 17785
          return false;
17786
      }
17787
 
17788
      return true;
17789
    }
17790
 
17791
    @Override
17792
    public int hashCode() {
17793
      return 0;
17794
    }
17795
 
483 rajveer 17796
    public int compareTo(getLineItemsForOrder_args other) {
68 ashish 17797
      if (!getClass().equals(other.getClass())) {
17798
        return getClass().getName().compareTo(other.getClass().getName());
17799
      }
17800
 
17801
      int lastComparison = 0;
483 rajveer 17802
      getLineItemsForOrder_args typedOther = (getLineItemsForOrder_args)other;
68 ashish 17803
 
483 rajveer 17804
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
68 ashish 17805
      if (lastComparison != 0) {
17806
        return lastComparison;
17807
      }
483 rajveer 17808
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
68 ashish 17809
      if (lastComparison != 0) {
17810
        return lastComparison;
17811
      }
17812
      return 0;
17813
    }
17814
 
17815
    public void read(TProtocol iprot) throws TException {
17816
      TField field;
17817
      iprot.readStructBegin();
17818
      while (true)
17819
      {
17820
        field = iprot.readFieldBegin();
17821
        if (field.type == TType.STOP) { 
17822
          break;
17823
        }
17824
        _Fields fieldId = _Fields.findByThriftId(field.id);
17825
        if (fieldId == null) {
17826
          TProtocolUtil.skip(iprot, field.type);
17827
        } else {
17828
          switch (fieldId) {
483 rajveer 17829
            case ORDER_ID:
68 ashish 17830
              if (field.type == TType.I64) {
483 rajveer 17831
                this.orderId = iprot.readI64();
17832
                setOrderIdIsSet(true);
68 ashish 17833
              } else { 
17834
                TProtocolUtil.skip(iprot, field.type);
17835
              }
17836
              break;
17837
          }
17838
          iprot.readFieldEnd();
17839
        }
17840
      }
17841
      iprot.readStructEnd();
17842
      validate();
17843
    }
17844
 
17845
    public void write(TProtocol oprot) throws TException {
17846
      validate();
17847
 
17848
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 17849
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
17850
      oprot.writeI64(this.orderId);
68 ashish 17851
      oprot.writeFieldEnd();
17852
      oprot.writeFieldStop();
17853
      oprot.writeStructEnd();
17854
    }
17855
 
17856
    @Override
17857
    public String toString() {
483 rajveer 17858
      StringBuilder sb = new StringBuilder("getLineItemsForOrder_args(");
68 ashish 17859
      boolean first = true;
17860
 
483 rajveer 17861
      sb.append("orderId:");
17862
      sb.append(this.orderId);
68 ashish 17863
      first = false;
17864
      sb.append(")");
17865
      return sb.toString();
17866
    }
17867
 
17868
    public void validate() throws TException {
17869
      // check for required fields
17870
    }
17871
 
17872
  }
17873
 
483 rajveer 17874
  public static class getLineItemsForOrder_result implements TBase<getLineItemsForOrder_result._Fields>, java.io.Serializable, Cloneable, Comparable<getLineItemsForOrder_result>   {
17875
    private static final TStruct STRUCT_DESC = new TStruct("getLineItemsForOrder_result");
68 ashish 17876
 
483 rajveer 17877
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
68 ashish 17878
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
17879
 
483 rajveer 17880
    private List<LineItem> success;
68 ashish 17881
    private TransactionServiceException ex;
17882
 
17883
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17884
    public enum _Fields implements TFieldIdEnum {
17885
      SUCCESS((short)0, "success"),
17886
      EX((short)1, "ex");
17887
 
17888
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
17889
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17890
 
17891
      static {
17892
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17893
          byId.put((int)field._thriftId, field);
17894
          byName.put(field.getFieldName(), field);
17895
        }
17896
      }
17897
 
17898
      /**
17899
       * Find the _Fields constant that matches fieldId, or null if its not found.
17900
       */
17901
      public static _Fields findByThriftId(int fieldId) {
17902
        return byId.get(fieldId);
17903
      }
17904
 
17905
      /**
17906
       * Find the _Fields constant that matches fieldId, throwing an exception
17907
       * if it is not found.
17908
       */
17909
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17910
        _Fields fields = findByThriftId(fieldId);
17911
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17912
        return fields;
17913
      }
17914
 
17915
      /**
17916
       * Find the _Fields constant that matches name, or null if its not found.
17917
       */
17918
      public static _Fields findByName(String name) {
17919
        return byName.get(name);
17920
      }
17921
 
17922
      private final short _thriftId;
17923
      private final String _fieldName;
17924
 
17925
      _Fields(short thriftId, String fieldName) {
17926
        _thriftId = thriftId;
17927
        _fieldName = fieldName;
17928
      }
17929
 
17930
      public short getThriftFieldId() {
17931
        return _thriftId;
17932
      }
17933
 
17934
      public String getFieldName() {
17935
        return _fieldName;
17936
      }
17937
    }
17938
 
17939
    // isset id assignments
17940
 
17941
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
17942
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
483 rajveer 17943
          new ListMetaData(TType.LIST, 
17944
              new StructMetaData(TType.STRUCT, LineItem.class))));
68 ashish 17945
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
17946
          new FieldValueMetaData(TType.STRUCT)));
17947
    }});
17948
 
17949
    static {
483 rajveer 17950
      FieldMetaData.addStructMetaDataMap(getLineItemsForOrder_result.class, metaDataMap);
68 ashish 17951
    }
17952
 
483 rajveer 17953
    public getLineItemsForOrder_result() {
68 ashish 17954
    }
17955
 
483 rajveer 17956
    public getLineItemsForOrder_result(
17957
      List<LineItem> success,
68 ashish 17958
      TransactionServiceException ex)
17959
    {
17960
      this();
17961
      this.success = success;
17962
      this.ex = ex;
17963
    }
17964
 
17965
    /**
17966
     * Performs a deep copy on <i>other</i>.
17967
     */
483 rajveer 17968
    public getLineItemsForOrder_result(getLineItemsForOrder_result other) {
17969
      if (other.isSetSuccess()) {
17970
        List<LineItem> __this__success = new ArrayList<LineItem>();
17971
        for (LineItem other_element : other.success) {
17972
          __this__success.add(new LineItem(other_element));
17973
        }
17974
        this.success = __this__success;
17975
      }
68 ashish 17976
      if (other.isSetEx()) {
17977
        this.ex = new TransactionServiceException(other.ex);
17978
      }
17979
    }
17980
 
483 rajveer 17981
    public getLineItemsForOrder_result deepCopy() {
17982
      return new getLineItemsForOrder_result(this);
68 ashish 17983
    }
17984
 
17985
    @Deprecated
483 rajveer 17986
    public getLineItemsForOrder_result clone() {
17987
      return new getLineItemsForOrder_result(this);
68 ashish 17988
    }
17989
 
483 rajveer 17990
    public int getSuccessSize() {
17991
      return (this.success == null) ? 0 : this.success.size();
17992
    }
17993
 
17994
    public java.util.Iterator<LineItem> getSuccessIterator() {
17995
      return (this.success == null) ? null : this.success.iterator();
17996
    }
17997
 
17998
    public void addToSuccess(LineItem elem) {
17999
      if (this.success == null) {
18000
        this.success = new ArrayList<LineItem>();
18001
      }
18002
      this.success.add(elem);
18003
    }
18004
 
18005
    public List<LineItem> getSuccess() {
68 ashish 18006
      return this.success;
18007
    }
18008
 
483 rajveer 18009
    public getLineItemsForOrder_result setSuccess(List<LineItem> success) {
68 ashish 18010
      this.success = success;
18011
      return this;
18012
    }
18013
 
18014
    public void unsetSuccess() {
483 rajveer 18015
      this.success = null;
68 ashish 18016
    }
18017
 
18018
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
18019
    public boolean isSetSuccess() {
483 rajveer 18020
      return this.success != null;
68 ashish 18021
    }
18022
 
18023
    public void setSuccessIsSet(boolean value) {
483 rajveer 18024
      if (!value) {
18025
        this.success = null;
18026
      }
68 ashish 18027
    }
18028
 
18029
    public TransactionServiceException getEx() {
18030
      return this.ex;
18031
    }
18032
 
483 rajveer 18033
    public getLineItemsForOrder_result setEx(TransactionServiceException ex) {
68 ashish 18034
      this.ex = ex;
18035
      return this;
18036
    }
18037
 
18038
    public void unsetEx() {
18039
      this.ex = null;
18040
    }
18041
 
18042
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
18043
    public boolean isSetEx() {
18044
      return this.ex != null;
18045
    }
18046
 
18047
    public void setExIsSet(boolean value) {
18048
      if (!value) {
18049
        this.ex = null;
18050
      }
18051
    }
18052
 
18053
    public void setFieldValue(_Fields field, Object value) {
18054
      switch (field) {
18055
      case SUCCESS:
18056
        if (value == null) {
18057
          unsetSuccess();
18058
        } else {
483 rajveer 18059
          setSuccess((List<LineItem>)value);
68 ashish 18060
        }
18061
        break;
18062
 
18063
      case EX:
18064
        if (value == null) {
18065
          unsetEx();
18066
        } else {
18067
          setEx((TransactionServiceException)value);
18068
        }
18069
        break;
18070
 
18071
      }
18072
    }
18073
 
18074
    public void setFieldValue(int fieldID, Object value) {
18075
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
18076
    }
18077
 
18078
    public Object getFieldValue(_Fields field) {
18079
      switch (field) {
18080
      case SUCCESS:
483 rajveer 18081
        return getSuccess();
68 ashish 18082
 
18083
      case EX:
18084
        return getEx();
18085
 
18086
      }
18087
      throw new IllegalStateException();
18088
    }
18089
 
18090
    public Object getFieldValue(int fieldId) {
18091
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
18092
    }
18093
 
18094
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
18095
    public boolean isSet(_Fields field) {
18096
      switch (field) {
18097
      case SUCCESS:
18098
        return isSetSuccess();
18099
      case EX:
18100
        return isSetEx();
18101
      }
18102
      throw new IllegalStateException();
18103
    }
18104
 
18105
    public boolean isSet(int fieldID) {
18106
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
18107
    }
18108
 
18109
    @Override
18110
    public boolean equals(Object that) {
18111
      if (that == null)
18112
        return false;
483 rajveer 18113
      if (that instanceof getLineItemsForOrder_result)
18114
        return this.equals((getLineItemsForOrder_result)that);
68 ashish 18115
      return false;
18116
    }
18117
 
483 rajveer 18118
    public boolean equals(getLineItemsForOrder_result that) {
68 ashish 18119
      if (that == null)
18120
        return false;
18121
 
483 rajveer 18122
      boolean this_present_success = true && this.isSetSuccess();
18123
      boolean that_present_success = true && that.isSetSuccess();
68 ashish 18124
      if (this_present_success || that_present_success) {
18125
        if (!(this_present_success && that_present_success))
18126
          return false;
483 rajveer 18127
        if (!this.success.equals(that.success))
68 ashish 18128
          return false;
18129
      }
18130
 
18131
      boolean this_present_ex = true && this.isSetEx();
18132
      boolean that_present_ex = true && that.isSetEx();
18133
      if (this_present_ex || that_present_ex) {
18134
        if (!(this_present_ex && that_present_ex))
18135
          return false;
18136
        if (!this.ex.equals(that.ex))
18137
          return false;
18138
      }
18139
 
18140
      return true;
18141
    }
18142
 
18143
    @Override
18144
    public int hashCode() {
18145
      return 0;
18146
    }
18147
 
483 rajveer 18148
    public int compareTo(getLineItemsForOrder_result other) {
68 ashish 18149
      if (!getClass().equals(other.getClass())) {
18150
        return getClass().getName().compareTo(other.getClass().getName());
18151
      }
18152
 
18153
      int lastComparison = 0;
483 rajveer 18154
      getLineItemsForOrder_result typedOther = (getLineItemsForOrder_result)other;
68 ashish 18155
 
18156
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
18157
      if (lastComparison != 0) {
18158
        return lastComparison;
18159
      }
18160
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
18161
      if (lastComparison != 0) {
18162
        return lastComparison;
18163
      }
18164
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
18165
      if (lastComparison != 0) {
18166
        return lastComparison;
18167
      }
18168
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
18169
      if (lastComparison != 0) {
18170
        return lastComparison;
18171
      }
18172
      return 0;
18173
    }
18174
 
18175
    public void read(TProtocol iprot) throws TException {
18176
      TField field;
18177
      iprot.readStructBegin();
18178
      while (true)
18179
      {
18180
        field = iprot.readFieldBegin();
18181
        if (field.type == TType.STOP) { 
18182
          break;
18183
        }
18184
        _Fields fieldId = _Fields.findByThriftId(field.id);
18185
        if (fieldId == null) {
18186
          TProtocolUtil.skip(iprot, field.type);
18187
        } else {
18188
          switch (fieldId) {
18189
            case SUCCESS:
483 rajveer 18190
              if (field.type == TType.LIST) {
18191
                {
1382 varun.gupt 18192
                  TList _list40 = iprot.readListBegin();
18193
                  this.success = new ArrayList<LineItem>(_list40.size);
18194
                  for (int _i41 = 0; _i41 < _list40.size; ++_i41)
483 rajveer 18195
                  {
1382 varun.gupt 18196
                    LineItem _elem42;
18197
                    _elem42 = new LineItem();
18198
                    _elem42.read(iprot);
18199
                    this.success.add(_elem42);
483 rajveer 18200
                  }
18201
                  iprot.readListEnd();
18202
                }
68 ashish 18203
              } else { 
18204
                TProtocolUtil.skip(iprot, field.type);
18205
              }
18206
              break;
18207
            case EX:
18208
              if (field.type == TType.STRUCT) {
18209
                this.ex = new TransactionServiceException();
18210
                this.ex.read(iprot);
18211
              } else { 
18212
                TProtocolUtil.skip(iprot, field.type);
18213
              }
18214
              break;
18215
          }
18216
          iprot.readFieldEnd();
18217
        }
18218
      }
18219
      iprot.readStructEnd();
18220
      validate();
18221
    }
18222
 
18223
    public void write(TProtocol oprot) throws TException {
18224
      oprot.writeStructBegin(STRUCT_DESC);
18225
 
18226
      if (this.isSetSuccess()) {
18227
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
483 rajveer 18228
        {
18229
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
1382 varun.gupt 18230
          for (LineItem _iter43 : this.success)
483 rajveer 18231
          {
1382 varun.gupt 18232
            _iter43.write(oprot);
483 rajveer 18233
          }
18234
          oprot.writeListEnd();
18235
        }
68 ashish 18236
        oprot.writeFieldEnd();
18237
      } else if (this.isSetEx()) {
18238
        oprot.writeFieldBegin(EX_FIELD_DESC);
18239
        this.ex.write(oprot);
18240
        oprot.writeFieldEnd();
18241
      }
18242
      oprot.writeFieldStop();
18243
      oprot.writeStructEnd();
18244
    }
18245
 
18246
    @Override
18247
    public String toString() {
483 rajveer 18248
      StringBuilder sb = new StringBuilder("getLineItemsForOrder_result(");
68 ashish 18249
      boolean first = true;
18250
 
18251
      sb.append("success:");
483 rajveer 18252
      if (this.success == null) {
18253
        sb.append("null");
18254
      } else {
18255
        sb.append(this.success);
18256
      }
68 ashish 18257
      first = false;
18258
      if (!first) sb.append(", ");
18259
      sb.append("ex:");
18260
      if (this.ex == null) {
18261
        sb.append("null");
18262
      } else {
18263
        sb.append(this.ex);
18264
      }
18265
      first = false;
18266
      sb.append(")");
18267
      return sb.toString();
18268
    }
18269
 
18270
    public void validate() throws TException {
18271
      // check for required fields
18272
    }
18273
 
18274
  }
18275
 
1221 chandransh 18276
  public static class batchOrders_args implements TBase<batchOrders_args._Fields>, java.io.Serializable, Cloneable, Comparable<batchOrders_args>   {
18277
    private static final TStruct STRUCT_DESC = new TStruct("batchOrders_args");
18278
 
18279
    private static final TField WAREHOUSE_ID_FIELD_DESC = new TField("warehouseId", TType.I64, (short)1);
18280
 
18281
    private long warehouseId;
18282
 
18283
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18284
    public enum _Fields implements TFieldIdEnum {
18285
      WAREHOUSE_ID((short)1, "warehouseId");
18286
 
18287
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
18288
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18289
 
18290
      static {
18291
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18292
          byId.put((int)field._thriftId, field);
18293
          byName.put(field.getFieldName(), field);
18294
        }
18295
      }
18296
 
18297
      /**
18298
       * Find the _Fields constant that matches fieldId, or null if its not found.
18299
       */
18300
      public static _Fields findByThriftId(int fieldId) {
18301
        return byId.get(fieldId);
18302
      }
18303
 
18304
      /**
18305
       * Find the _Fields constant that matches fieldId, throwing an exception
18306
       * if it is not found.
18307
       */
18308
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18309
        _Fields fields = findByThriftId(fieldId);
18310
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18311
        return fields;
18312
      }
18313
 
18314
      /**
18315
       * Find the _Fields constant that matches name, or null if its not found.
18316
       */
18317
      public static _Fields findByName(String name) {
18318
        return byName.get(name);
18319
      }
18320
 
18321
      private final short _thriftId;
18322
      private final String _fieldName;
18323
 
18324
      _Fields(short thriftId, String fieldName) {
18325
        _thriftId = thriftId;
18326
        _fieldName = fieldName;
18327
      }
18328
 
18329
      public short getThriftFieldId() {
18330
        return _thriftId;
18331
      }
18332
 
18333
      public String getFieldName() {
18334
        return _fieldName;
18335
      }
18336
    }
18337
 
18338
    // isset id assignments
18339
    private static final int __WAREHOUSEID_ISSET_ID = 0;
18340
    private BitSet __isset_bit_vector = new BitSet(1);
18341
 
18342
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
18343
      put(_Fields.WAREHOUSE_ID, new FieldMetaData("warehouseId", TFieldRequirementType.DEFAULT, 
18344
          new FieldValueMetaData(TType.I64)));
18345
    }});
18346
 
18347
    static {
18348
      FieldMetaData.addStructMetaDataMap(batchOrders_args.class, metaDataMap);
18349
    }
18350
 
18351
    public batchOrders_args() {
18352
    }
18353
 
18354
    public batchOrders_args(
18355
      long warehouseId)
18356
    {
18357
      this();
18358
      this.warehouseId = warehouseId;
18359
      setWarehouseIdIsSet(true);
18360
    }
18361
 
18362
    /**
18363
     * Performs a deep copy on <i>other</i>.
18364
     */
18365
    public batchOrders_args(batchOrders_args other) {
18366
      __isset_bit_vector.clear();
18367
      __isset_bit_vector.or(other.__isset_bit_vector);
18368
      this.warehouseId = other.warehouseId;
18369
    }
18370
 
18371
    public batchOrders_args deepCopy() {
18372
      return new batchOrders_args(this);
18373
    }
18374
 
18375
    @Deprecated
18376
    public batchOrders_args clone() {
18377
      return new batchOrders_args(this);
18378
    }
18379
 
18380
    public long getWarehouseId() {
18381
      return this.warehouseId;
18382
    }
18383
 
18384
    public batchOrders_args setWarehouseId(long warehouseId) {
18385
      this.warehouseId = warehouseId;
18386
      setWarehouseIdIsSet(true);
18387
      return this;
18388
    }
18389
 
18390
    public void unsetWarehouseId() {
18391
      __isset_bit_vector.clear(__WAREHOUSEID_ISSET_ID);
18392
    }
18393
 
18394
    /** Returns true if field warehouseId is set (has been asigned a value) and false otherwise */
18395
    public boolean isSetWarehouseId() {
18396
      return __isset_bit_vector.get(__WAREHOUSEID_ISSET_ID);
18397
    }
18398
 
18399
    public void setWarehouseIdIsSet(boolean value) {
18400
      __isset_bit_vector.set(__WAREHOUSEID_ISSET_ID, value);
18401
    }
18402
 
18403
    public void setFieldValue(_Fields field, Object value) {
18404
      switch (field) {
18405
      case WAREHOUSE_ID:
18406
        if (value == null) {
18407
          unsetWarehouseId();
18408
        } else {
18409
          setWarehouseId((Long)value);
18410
        }
18411
        break;
18412
 
18413
      }
18414
    }
18415
 
18416
    public void setFieldValue(int fieldID, Object value) {
18417
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
18418
    }
18419
 
18420
    public Object getFieldValue(_Fields field) {
18421
      switch (field) {
18422
      case WAREHOUSE_ID:
18423
        return new Long(getWarehouseId());
18424
 
18425
      }
18426
      throw new IllegalStateException();
18427
    }
18428
 
18429
    public Object getFieldValue(int fieldId) {
18430
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
18431
    }
18432
 
18433
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
18434
    public boolean isSet(_Fields field) {
18435
      switch (field) {
18436
      case WAREHOUSE_ID:
18437
        return isSetWarehouseId();
18438
      }
18439
      throw new IllegalStateException();
18440
    }
18441
 
18442
    public boolean isSet(int fieldID) {
18443
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
18444
    }
18445
 
18446
    @Override
18447
    public boolean equals(Object that) {
18448
      if (that == null)
18449
        return false;
18450
      if (that instanceof batchOrders_args)
18451
        return this.equals((batchOrders_args)that);
18452
      return false;
18453
    }
18454
 
18455
    public boolean equals(batchOrders_args that) {
18456
      if (that == null)
18457
        return false;
18458
 
18459
      boolean this_present_warehouseId = true;
18460
      boolean that_present_warehouseId = true;
18461
      if (this_present_warehouseId || that_present_warehouseId) {
18462
        if (!(this_present_warehouseId && that_present_warehouseId))
18463
          return false;
18464
        if (this.warehouseId != that.warehouseId)
18465
          return false;
18466
      }
18467
 
18468
      return true;
18469
    }
18470
 
18471
    @Override
18472
    public int hashCode() {
18473
      return 0;
18474
    }
18475
 
18476
    public int compareTo(batchOrders_args other) {
18477
      if (!getClass().equals(other.getClass())) {
18478
        return getClass().getName().compareTo(other.getClass().getName());
18479
      }
18480
 
18481
      int lastComparison = 0;
18482
      batchOrders_args typedOther = (batchOrders_args)other;
18483
 
18484
      lastComparison = Boolean.valueOf(isSetWarehouseId()).compareTo(isSetWarehouseId());
18485
      if (lastComparison != 0) {
18486
        return lastComparison;
18487
      }
18488
      lastComparison = TBaseHelper.compareTo(warehouseId, typedOther.warehouseId);
18489
      if (lastComparison != 0) {
18490
        return lastComparison;
18491
      }
18492
      return 0;
18493
    }
18494
 
18495
    public void read(TProtocol iprot) throws TException {
18496
      TField field;
18497
      iprot.readStructBegin();
18498
      while (true)
18499
      {
18500
        field = iprot.readFieldBegin();
18501
        if (field.type == TType.STOP) { 
18502
          break;
18503
        }
18504
        _Fields fieldId = _Fields.findByThriftId(field.id);
18505
        if (fieldId == null) {
18506
          TProtocolUtil.skip(iprot, field.type);
18507
        } else {
18508
          switch (fieldId) {
18509
            case WAREHOUSE_ID:
18510
              if (field.type == TType.I64) {
18511
                this.warehouseId = iprot.readI64();
18512
                setWarehouseIdIsSet(true);
18513
              } else { 
18514
                TProtocolUtil.skip(iprot, field.type);
18515
              }
18516
              break;
18517
          }
18518
          iprot.readFieldEnd();
18519
        }
18520
      }
18521
      iprot.readStructEnd();
18522
      validate();
18523
    }
18524
 
18525
    public void write(TProtocol oprot) throws TException {
18526
      validate();
18527
 
18528
      oprot.writeStructBegin(STRUCT_DESC);
18529
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
18530
      oprot.writeI64(this.warehouseId);
18531
      oprot.writeFieldEnd();
18532
      oprot.writeFieldStop();
18533
      oprot.writeStructEnd();
18534
    }
18535
 
18536
    @Override
18537
    public String toString() {
18538
      StringBuilder sb = new StringBuilder("batchOrders_args(");
18539
      boolean first = true;
18540
 
18541
      sb.append("warehouseId:");
18542
      sb.append(this.warehouseId);
18543
      first = false;
18544
      sb.append(")");
18545
      return sb.toString();
18546
    }
18547
 
18548
    public void validate() throws TException {
18549
      // check for required fields
18550
    }
18551
 
18552
  }
18553
 
18554
  public static class batchOrders_result implements TBase<batchOrders_result._Fields>, java.io.Serializable, Cloneable, Comparable<batchOrders_result>   {
18555
    private static final TStruct STRUCT_DESC = new TStruct("batchOrders_result");
18556
 
18557
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
18558
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
18559
 
18560
    private List<Order> success;
18561
    private TransactionServiceException ex;
18562
 
18563
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18564
    public enum _Fields implements TFieldIdEnum {
18565
      SUCCESS((short)0, "success"),
18566
      EX((short)1, "ex");
18567
 
18568
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
18569
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18570
 
18571
      static {
18572
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18573
          byId.put((int)field._thriftId, field);
18574
          byName.put(field.getFieldName(), field);
18575
        }
18576
      }
18577
 
18578
      /**
18579
       * Find the _Fields constant that matches fieldId, or null if its not found.
18580
       */
18581
      public static _Fields findByThriftId(int fieldId) {
18582
        return byId.get(fieldId);
18583
      }
18584
 
18585
      /**
18586
       * Find the _Fields constant that matches fieldId, throwing an exception
18587
       * if it is not found.
18588
       */
18589
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18590
        _Fields fields = findByThriftId(fieldId);
18591
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18592
        return fields;
18593
      }
18594
 
18595
      /**
18596
       * Find the _Fields constant that matches name, or null if its not found.
18597
       */
18598
      public static _Fields findByName(String name) {
18599
        return byName.get(name);
18600
      }
18601
 
18602
      private final short _thriftId;
18603
      private final String _fieldName;
18604
 
18605
      _Fields(short thriftId, String fieldName) {
18606
        _thriftId = thriftId;
18607
        _fieldName = fieldName;
18608
      }
18609
 
18610
      public short getThriftFieldId() {
18611
        return _thriftId;
18612
      }
18613
 
18614
      public String getFieldName() {
18615
        return _fieldName;
18616
      }
18617
    }
18618
 
18619
    // isset id assignments
18620
 
18621
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
18622
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
18623
          new ListMetaData(TType.LIST, 
18624
              new StructMetaData(TType.STRUCT, Order.class))));
18625
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
18626
          new FieldValueMetaData(TType.STRUCT)));
18627
    }});
18628
 
18629
    static {
18630
      FieldMetaData.addStructMetaDataMap(batchOrders_result.class, metaDataMap);
18631
    }
18632
 
18633
    public batchOrders_result() {
18634
    }
18635
 
18636
    public batchOrders_result(
18637
      List<Order> success,
18638
      TransactionServiceException ex)
18639
    {
18640
      this();
18641
      this.success = success;
18642
      this.ex = ex;
18643
    }
18644
 
18645
    /**
18646
     * Performs a deep copy on <i>other</i>.
18647
     */
18648
    public batchOrders_result(batchOrders_result other) {
18649
      if (other.isSetSuccess()) {
18650
        List<Order> __this__success = new ArrayList<Order>();
18651
        for (Order other_element : other.success) {
18652
          __this__success.add(new Order(other_element));
18653
        }
18654
        this.success = __this__success;
18655
      }
18656
      if (other.isSetEx()) {
18657
        this.ex = new TransactionServiceException(other.ex);
18658
      }
18659
    }
18660
 
18661
    public batchOrders_result deepCopy() {
18662
      return new batchOrders_result(this);
18663
    }
18664
 
18665
    @Deprecated
18666
    public batchOrders_result clone() {
18667
      return new batchOrders_result(this);
18668
    }
18669
 
18670
    public int getSuccessSize() {
18671
      return (this.success == null) ? 0 : this.success.size();
18672
    }
18673
 
18674
    public java.util.Iterator<Order> getSuccessIterator() {
18675
      return (this.success == null) ? null : this.success.iterator();
18676
    }
18677
 
18678
    public void addToSuccess(Order elem) {
18679
      if (this.success == null) {
18680
        this.success = new ArrayList<Order>();
18681
      }
18682
      this.success.add(elem);
18683
    }
18684
 
18685
    public List<Order> getSuccess() {
18686
      return this.success;
18687
    }
18688
 
18689
    public batchOrders_result setSuccess(List<Order> success) {
18690
      this.success = success;
18691
      return this;
18692
    }
18693
 
18694
    public void unsetSuccess() {
18695
      this.success = null;
18696
    }
18697
 
18698
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
18699
    public boolean isSetSuccess() {
18700
      return this.success != null;
18701
    }
18702
 
18703
    public void setSuccessIsSet(boolean value) {
18704
      if (!value) {
18705
        this.success = null;
18706
      }
18707
    }
18708
 
18709
    public TransactionServiceException getEx() {
18710
      return this.ex;
18711
    }
18712
 
18713
    public batchOrders_result setEx(TransactionServiceException ex) {
18714
      this.ex = ex;
18715
      return this;
18716
    }
18717
 
18718
    public void unsetEx() {
18719
      this.ex = null;
18720
    }
18721
 
18722
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
18723
    public boolean isSetEx() {
18724
      return this.ex != null;
18725
    }
18726
 
18727
    public void setExIsSet(boolean value) {
18728
      if (!value) {
18729
        this.ex = null;
18730
      }
18731
    }
18732
 
18733
    public void setFieldValue(_Fields field, Object value) {
18734
      switch (field) {
18735
      case SUCCESS:
18736
        if (value == null) {
18737
          unsetSuccess();
18738
        } else {
18739
          setSuccess((List<Order>)value);
18740
        }
18741
        break;
18742
 
18743
      case EX:
18744
        if (value == null) {
18745
          unsetEx();
18746
        } else {
18747
          setEx((TransactionServiceException)value);
18748
        }
18749
        break;
18750
 
18751
      }
18752
    }
18753
 
18754
    public void setFieldValue(int fieldID, Object value) {
18755
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
18756
    }
18757
 
18758
    public Object getFieldValue(_Fields field) {
18759
      switch (field) {
18760
      case SUCCESS:
18761
        return getSuccess();
18762
 
18763
      case EX:
18764
        return getEx();
18765
 
18766
      }
18767
      throw new IllegalStateException();
18768
    }
18769
 
18770
    public Object getFieldValue(int fieldId) {
18771
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
18772
    }
18773
 
18774
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
18775
    public boolean isSet(_Fields field) {
18776
      switch (field) {
18777
      case SUCCESS:
18778
        return isSetSuccess();
18779
      case EX:
18780
        return isSetEx();
18781
      }
18782
      throw new IllegalStateException();
18783
    }
18784
 
18785
    public boolean isSet(int fieldID) {
18786
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
18787
    }
18788
 
18789
    @Override
18790
    public boolean equals(Object that) {
18791
      if (that == null)
18792
        return false;
18793
      if (that instanceof batchOrders_result)
18794
        return this.equals((batchOrders_result)that);
18795
      return false;
18796
    }
18797
 
18798
    public boolean equals(batchOrders_result that) {
18799
      if (that == null)
18800
        return false;
18801
 
18802
      boolean this_present_success = true && this.isSetSuccess();
18803
      boolean that_present_success = true && that.isSetSuccess();
18804
      if (this_present_success || that_present_success) {
18805
        if (!(this_present_success && that_present_success))
18806
          return false;
18807
        if (!this.success.equals(that.success))
18808
          return false;
18809
      }
18810
 
18811
      boolean this_present_ex = true && this.isSetEx();
18812
      boolean that_present_ex = true && that.isSetEx();
18813
      if (this_present_ex || that_present_ex) {
18814
        if (!(this_present_ex && that_present_ex))
18815
          return false;
18816
        if (!this.ex.equals(that.ex))
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(batchOrders_result other) {
18829
      if (!getClass().equals(other.getClass())) {
18830
        return getClass().getName().compareTo(other.getClass().getName());
18831
      }
18832
 
18833
      int lastComparison = 0;
18834
      batchOrders_result typedOther = (batchOrders_result)other;
18835
 
18836
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
18837
      if (lastComparison != 0) {
18838
        return lastComparison;
18839
      }
18840
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
18841
      if (lastComparison != 0) {
18842
        return lastComparison;
18843
      }
18844
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
18845
      if (lastComparison != 0) {
18846
        return lastComparison;
18847
      }
18848
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
18849
      if (lastComparison != 0) {
18850
        return lastComparison;
18851
      }
18852
      return 0;
18853
    }
18854
 
18855
    public void read(TProtocol iprot) throws TException {
18856
      TField field;
18857
      iprot.readStructBegin();
18858
      while (true)
18859
      {
18860
        field = iprot.readFieldBegin();
18861
        if (field.type == TType.STOP) { 
18862
          break;
18863
        }
18864
        _Fields fieldId = _Fields.findByThriftId(field.id);
18865
        if (fieldId == null) {
18866
          TProtocolUtil.skip(iprot, field.type);
18867
        } else {
18868
          switch (fieldId) {
18869
            case SUCCESS:
18870
              if (field.type == TType.LIST) {
18871
                {
1382 varun.gupt 18872
                  TList _list44 = iprot.readListBegin();
18873
                  this.success = new ArrayList<Order>(_list44.size);
18874
                  for (int _i45 = 0; _i45 < _list44.size; ++_i45)
1221 chandransh 18875
                  {
1382 varun.gupt 18876
                    Order _elem46;
18877
                    _elem46 = new Order();
18878
                    _elem46.read(iprot);
18879
                    this.success.add(_elem46);
1221 chandransh 18880
                  }
18881
                  iprot.readListEnd();
18882
                }
18883
              } else { 
18884
                TProtocolUtil.skip(iprot, field.type);
18885
              }
18886
              break;
18887
            case EX:
18888
              if (field.type == TType.STRUCT) {
18889
                this.ex = new TransactionServiceException();
18890
                this.ex.read(iprot);
18891
              } else { 
18892
                TProtocolUtil.skip(iprot, field.type);
18893
              }
18894
              break;
18895
          }
18896
          iprot.readFieldEnd();
18897
        }
18898
      }
18899
      iprot.readStructEnd();
18900
      validate();
18901
    }
18902
 
18903
    public void write(TProtocol oprot) throws TException {
18904
      oprot.writeStructBegin(STRUCT_DESC);
18905
 
18906
      if (this.isSetSuccess()) {
18907
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
18908
        {
18909
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
1382 varun.gupt 18910
          for (Order _iter47 : this.success)
1221 chandransh 18911
          {
1382 varun.gupt 18912
            _iter47.write(oprot);
1221 chandransh 18913
          }
18914
          oprot.writeListEnd();
18915
        }
18916
        oprot.writeFieldEnd();
18917
      } else if (this.isSetEx()) {
18918
        oprot.writeFieldBegin(EX_FIELD_DESC);
18919
        this.ex.write(oprot);
18920
        oprot.writeFieldEnd();
18921
      }
18922
      oprot.writeFieldStop();
18923
      oprot.writeStructEnd();
18924
    }
18925
 
18926
    @Override
18927
    public String toString() {
18928
      StringBuilder sb = new StringBuilder("batchOrders_result(");
18929
      boolean first = true;
18930
 
18931
      sb.append("success:");
18932
      if (this.success == null) {
18933
        sb.append("null");
18934
      } else {
18935
        sb.append(this.success);
18936
      }
18937
      first = false;
18938
      if (!first) sb.append(", ");
18939
      sb.append("ex:");
18940
      if (this.ex == null) {
18941
        sb.append("null");
18942
      } else {
18943
        sb.append(this.ex);
18944
      }
18945
      first = false;
18946
      sb.append(")");
18947
      return sb.toString();
18948
    }
18949
 
18950
    public void validate() throws TException {
18951
      // check for required fields
18952
    }
18953
 
18954
  }
18955
 
1209 chandransh 18956
  public static class markOrderAsOutOfStock_args implements TBase<markOrderAsOutOfStock_args._Fields>, java.io.Serializable, Cloneable, Comparable<markOrderAsOutOfStock_args>   {
18957
    private static final TStruct STRUCT_DESC = new TStruct("markOrderAsOutOfStock_args");
18958
 
18959
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
18960
 
18961
    private long orderId;
18962
 
18963
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18964
    public enum _Fields implements TFieldIdEnum {
18965
      ORDER_ID((short)1, "orderId");
18966
 
18967
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
18968
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18969
 
18970
      static {
18971
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18972
          byId.put((int)field._thriftId, field);
18973
          byName.put(field.getFieldName(), field);
18974
        }
18975
      }
18976
 
18977
      /**
18978
       * Find the _Fields constant that matches fieldId, or null if its not found.
18979
       */
18980
      public static _Fields findByThriftId(int fieldId) {
18981
        return byId.get(fieldId);
18982
      }
18983
 
18984
      /**
18985
       * Find the _Fields constant that matches fieldId, throwing an exception
18986
       * if it is not found.
18987
       */
18988
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18989
        _Fields fields = findByThriftId(fieldId);
18990
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18991
        return fields;
18992
      }
18993
 
18994
      /**
18995
       * Find the _Fields constant that matches name, or null if its not found.
18996
       */
18997
      public static _Fields findByName(String name) {
18998
        return byName.get(name);
18999
      }
19000
 
19001
      private final short _thriftId;
19002
      private final String _fieldName;
19003
 
19004
      _Fields(short thriftId, String fieldName) {
19005
        _thriftId = thriftId;
19006
        _fieldName = fieldName;
19007
      }
19008
 
19009
      public short getThriftFieldId() {
19010
        return _thriftId;
19011
      }
19012
 
19013
      public String getFieldName() {
19014
        return _fieldName;
19015
      }
19016
    }
19017
 
19018
    // isset id assignments
19019
    private static final int __ORDERID_ISSET_ID = 0;
19020
    private BitSet __isset_bit_vector = new BitSet(1);
19021
 
19022
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
19023
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
19024
          new FieldValueMetaData(TType.I64)));
19025
    }});
19026
 
19027
    static {
19028
      FieldMetaData.addStructMetaDataMap(markOrderAsOutOfStock_args.class, metaDataMap);
19029
    }
19030
 
19031
    public markOrderAsOutOfStock_args() {
19032
    }
19033
 
19034
    public markOrderAsOutOfStock_args(
19035
      long orderId)
19036
    {
19037
      this();
19038
      this.orderId = orderId;
19039
      setOrderIdIsSet(true);
19040
    }
19041
 
19042
    /**
19043
     * Performs a deep copy on <i>other</i>.
19044
     */
19045
    public markOrderAsOutOfStock_args(markOrderAsOutOfStock_args other) {
19046
      __isset_bit_vector.clear();
19047
      __isset_bit_vector.or(other.__isset_bit_vector);
19048
      this.orderId = other.orderId;
19049
    }
19050
 
19051
    public markOrderAsOutOfStock_args deepCopy() {
19052
      return new markOrderAsOutOfStock_args(this);
19053
    }
19054
 
19055
    @Deprecated
19056
    public markOrderAsOutOfStock_args clone() {
19057
      return new markOrderAsOutOfStock_args(this);
19058
    }
19059
 
19060
    public long getOrderId() {
19061
      return this.orderId;
19062
    }
19063
 
19064
    public markOrderAsOutOfStock_args setOrderId(long orderId) {
19065
      this.orderId = orderId;
19066
      setOrderIdIsSet(true);
19067
      return this;
19068
    }
19069
 
19070
    public void unsetOrderId() {
19071
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
19072
    }
19073
 
19074
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
19075
    public boolean isSetOrderId() {
19076
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
19077
    }
19078
 
19079
    public void setOrderIdIsSet(boolean value) {
19080
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
19081
    }
19082
 
19083
    public void setFieldValue(_Fields field, Object value) {
19084
      switch (field) {
19085
      case ORDER_ID:
19086
        if (value == null) {
19087
          unsetOrderId();
19088
        } else {
19089
          setOrderId((Long)value);
19090
        }
19091
        break;
19092
 
19093
      }
19094
    }
19095
 
19096
    public void setFieldValue(int fieldID, Object value) {
19097
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
19098
    }
19099
 
19100
    public Object getFieldValue(_Fields field) {
19101
      switch (field) {
19102
      case ORDER_ID:
19103
        return new Long(getOrderId());
19104
 
19105
      }
19106
      throw new IllegalStateException();
19107
    }
19108
 
19109
    public Object getFieldValue(int fieldId) {
19110
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
19111
    }
19112
 
19113
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
19114
    public boolean isSet(_Fields field) {
19115
      switch (field) {
19116
      case ORDER_ID:
19117
        return isSetOrderId();
19118
      }
19119
      throw new IllegalStateException();
19120
    }
19121
 
19122
    public boolean isSet(int fieldID) {
19123
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
19124
    }
19125
 
19126
    @Override
19127
    public boolean equals(Object that) {
19128
      if (that == null)
19129
        return false;
19130
      if (that instanceof markOrderAsOutOfStock_args)
19131
        return this.equals((markOrderAsOutOfStock_args)that);
19132
      return false;
19133
    }
19134
 
19135
    public boolean equals(markOrderAsOutOfStock_args that) {
19136
      if (that == null)
19137
        return false;
19138
 
19139
      boolean this_present_orderId = true;
19140
      boolean that_present_orderId = true;
19141
      if (this_present_orderId || that_present_orderId) {
19142
        if (!(this_present_orderId && that_present_orderId))
19143
          return false;
19144
        if (this.orderId != that.orderId)
19145
          return false;
19146
      }
19147
 
19148
      return true;
19149
    }
19150
 
19151
    @Override
19152
    public int hashCode() {
19153
      return 0;
19154
    }
19155
 
19156
    public int compareTo(markOrderAsOutOfStock_args other) {
19157
      if (!getClass().equals(other.getClass())) {
19158
        return getClass().getName().compareTo(other.getClass().getName());
19159
      }
19160
 
19161
      int lastComparison = 0;
19162
      markOrderAsOutOfStock_args typedOther = (markOrderAsOutOfStock_args)other;
19163
 
19164
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
19165
      if (lastComparison != 0) {
19166
        return lastComparison;
19167
      }
19168
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
19169
      if (lastComparison != 0) {
19170
        return lastComparison;
19171
      }
19172
      return 0;
19173
    }
19174
 
19175
    public void read(TProtocol iprot) throws TException {
19176
      TField field;
19177
      iprot.readStructBegin();
19178
      while (true)
19179
      {
19180
        field = iprot.readFieldBegin();
19181
        if (field.type == TType.STOP) { 
19182
          break;
19183
        }
19184
        _Fields fieldId = _Fields.findByThriftId(field.id);
19185
        if (fieldId == null) {
19186
          TProtocolUtil.skip(iprot, field.type);
19187
        } else {
19188
          switch (fieldId) {
19189
            case ORDER_ID:
19190
              if (field.type == TType.I64) {
19191
                this.orderId = iprot.readI64();
19192
                setOrderIdIsSet(true);
19193
              } else { 
19194
                TProtocolUtil.skip(iprot, field.type);
19195
              }
19196
              break;
19197
          }
19198
          iprot.readFieldEnd();
19199
        }
19200
      }
19201
      iprot.readStructEnd();
19202
      validate();
19203
    }
19204
 
19205
    public void write(TProtocol oprot) throws TException {
19206
      validate();
19207
 
19208
      oprot.writeStructBegin(STRUCT_DESC);
19209
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
19210
      oprot.writeI64(this.orderId);
19211
      oprot.writeFieldEnd();
19212
      oprot.writeFieldStop();
19213
      oprot.writeStructEnd();
19214
    }
19215
 
19216
    @Override
19217
    public String toString() {
19218
      StringBuilder sb = new StringBuilder("markOrderAsOutOfStock_args(");
19219
      boolean first = true;
19220
 
19221
      sb.append("orderId:");
19222
      sb.append(this.orderId);
19223
      first = false;
19224
      sb.append(")");
19225
      return sb.toString();
19226
    }
19227
 
19228
    public void validate() throws TException {
19229
      // check for required fields
19230
    }
19231
 
19232
  }
19233
 
19234
  public static class markOrderAsOutOfStock_result implements TBase<markOrderAsOutOfStock_result._Fields>, java.io.Serializable, Cloneable, Comparable<markOrderAsOutOfStock_result>   {
19235
    private static final TStruct STRUCT_DESC = new TStruct("markOrderAsOutOfStock_result");
19236
 
19237
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
19238
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
19239
 
19240
    private boolean success;
19241
    private TransactionServiceException ex;
19242
 
19243
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19244
    public enum _Fields implements TFieldIdEnum {
19245
      SUCCESS((short)0, "success"),
19246
      EX((short)1, "ex");
19247
 
19248
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
19249
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19250
 
19251
      static {
19252
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19253
          byId.put((int)field._thriftId, field);
19254
          byName.put(field.getFieldName(), field);
19255
        }
19256
      }
19257
 
19258
      /**
19259
       * Find the _Fields constant that matches fieldId, or null if its not found.
19260
       */
19261
      public static _Fields findByThriftId(int fieldId) {
19262
        return byId.get(fieldId);
19263
      }
19264
 
19265
      /**
19266
       * Find the _Fields constant that matches fieldId, throwing an exception
19267
       * if it is not found.
19268
       */
19269
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19270
        _Fields fields = findByThriftId(fieldId);
19271
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19272
        return fields;
19273
      }
19274
 
19275
      /**
19276
       * Find the _Fields constant that matches name, or null if its not found.
19277
       */
19278
      public static _Fields findByName(String name) {
19279
        return byName.get(name);
19280
      }
19281
 
19282
      private final short _thriftId;
19283
      private final String _fieldName;
19284
 
19285
      _Fields(short thriftId, String fieldName) {
19286
        _thriftId = thriftId;
19287
        _fieldName = fieldName;
19288
      }
19289
 
19290
      public short getThriftFieldId() {
19291
        return _thriftId;
19292
      }
19293
 
19294
      public String getFieldName() {
19295
        return _fieldName;
19296
      }
19297
    }
19298
 
19299
    // isset id assignments
19300
    private static final int __SUCCESS_ISSET_ID = 0;
19301
    private BitSet __isset_bit_vector = new BitSet(1);
19302
 
19303
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
19304
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
19305
          new FieldValueMetaData(TType.BOOL)));
19306
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
19307
          new FieldValueMetaData(TType.STRUCT)));
19308
    }});
19309
 
19310
    static {
19311
      FieldMetaData.addStructMetaDataMap(markOrderAsOutOfStock_result.class, metaDataMap);
19312
    }
19313
 
19314
    public markOrderAsOutOfStock_result() {
19315
    }
19316
 
19317
    public markOrderAsOutOfStock_result(
19318
      boolean success,
19319
      TransactionServiceException ex)
19320
    {
19321
      this();
19322
      this.success = success;
19323
      setSuccessIsSet(true);
19324
      this.ex = ex;
19325
    }
19326
 
19327
    /**
19328
     * Performs a deep copy on <i>other</i>.
19329
     */
19330
    public markOrderAsOutOfStock_result(markOrderAsOutOfStock_result other) {
19331
      __isset_bit_vector.clear();
19332
      __isset_bit_vector.or(other.__isset_bit_vector);
19333
      this.success = other.success;
19334
      if (other.isSetEx()) {
19335
        this.ex = new TransactionServiceException(other.ex);
19336
      }
19337
    }
19338
 
19339
    public markOrderAsOutOfStock_result deepCopy() {
19340
      return new markOrderAsOutOfStock_result(this);
19341
    }
19342
 
19343
    @Deprecated
19344
    public markOrderAsOutOfStock_result clone() {
19345
      return new markOrderAsOutOfStock_result(this);
19346
    }
19347
 
19348
    public boolean isSuccess() {
19349
      return this.success;
19350
    }
19351
 
19352
    public markOrderAsOutOfStock_result setSuccess(boolean success) {
19353
      this.success = success;
19354
      setSuccessIsSet(true);
19355
      return this;
19356
    }
19357
 
19358
    public void unsetSuccess() {
19359
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
19360
    }
19361
 
19362
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
19363
    public boolean isSetSuccess() {
19364
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
19365
    }
19366
 
19367
    public void setSuccessIsSet(boolean value) {
19368
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
19369
    }
19370
 
19371
    public TransactionServiceException getEx() {
19372
      return this.ex;
19373
    }
19374
 
19375
    public markOrderAsOutOfStock_result setEx(TransactionServiceException ex) {
19376
      this.ex = ex;
19377
      return this;
19378
    }
19379
 
19380
    public void unsetEx() {
19381
      this.ex = null;
19382
    }
19383
 
19384
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
19385
    public boolean isSetEx() {
19386
      return this.ex != null;
19387
    }
19388
 
19389
    public void setExIsSet(boolean value) {
19390
      if (!value) {
19391
        this.ex = null;
19392
      }
19393
    }
19394
 
19395
    public void setFieldValue(_Fields field, Object value) {
19396
      switch (field) {
19397
      case SUCCESS:
19398
        if (value == null) {
19399
          unsetSuccess();
19400
        } else {
19401
          setSuccess((Boolean)value);
19402
        }
19403
        break;
19404
 
19405
      case EX:
19406
        if (value == null) {
19407
          unsetEx();
19408
        } else {
19409
          setEx((TransactionServiceException)value);
19410
        }
19411
        break;
19412
 
19413
      }
19414
    }
19415
 
19416
    public void setFieldValue(int fieldID, Object value) {
19417
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
19418
    }
19419
 
19420
    public Object getFieldValue(_Fields field) {
19421
      switch (field) {
19422
      case SUCCESS:
19423
        return new Boolean(isSuccess());
19424
 
19425
      case EX:
19426
        return getEx();
19427
 
19428
      }
19429
      throw new IllegalStateException();
19430
    }
19431
 
19432
    public Object getFieldValue(int fieldId) {
19433
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
19434
    }
19435
 
19436
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
19437
    public boolean isSet(_Fields field) {
19438
      switch (field) {
19439
      case SUCCESS:
19440
        return isSetSuccess();
19441
      case EX:
19442
        return isSetEx();
19443
      }
19444
      throw new IllegalStateException();
19445
    }
19446
 
19447
    public boolean isSet(int fieldID) {
19448
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
19449
    }
19450
 
19451
    @Override
19452
    public boolean equals(Object that) {
19453
      if (that == null)
19454
        return false;
19455
      if (that instanceof markOrderAsOutOfStock_result)
19456
        return this.equals((markOrderAsOutOfStock_result)that);
19457
      return false;
19458
    }
19459
 
19460
    public boolean equals(markOrderAsOutOfStock_result that) {
19461
      if (that == null)
19462
        return false;
19463
 
19464
      boolean this_present_success = true;
19465
      boolean that_present_success = true;
19466
      if (this_present_success || that_present_success) {
19467
        if (!(this_present_success && that_present_success))
19468
          return false;
19469
        if (this.success != that.success)
19470
          return false;
19471
      }
19472
 
19473
      boolean this_present_ex = true && this.isSetEx();
19474
      boolean that_present_ex = true && that.isSetEx();
19475
      if (this_present_ex || that_present_ex) {
19476
        if (!(this_present_ex && that_present_ex))
19477
          return false;
19478
        if (!this.ex.equals(that.ex))
19479
          return false;
19480
      }
19481
 
19482
      return true;
19483
    }
19484
 
19485
    @Override
19486
    public int hashCode() {
19487
      return 0;
19488
    }
19489
 
19490
    public int compareTo(markOrderAsOutOfStock_result other) {
19491
      if (!getClass().equals(other.getClass())) {
19492
        return getClass().getName().compareTo(other.getClass().getName());
19493
      }
19494
 
19495
      int lastComparison = 0;
19496
      markOrderAsOutOfStock_result typedOther = (markOrderAsOutOfStock_result)other;
19497
 
19498
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
19499
      if (lastComparison != 0) {
19500
        return lastComparison;
19501
      }
19502
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
19503
      if (lastComparison != 0) {
19504
        return lastComparison;
19505
      }
19506
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
19507
      if (lastComparison != 0) {
19508
        return lastComparison;
19509
      }
19510
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
19511
      if (lastComparison != 0) {
19512
        return lastComparison;
19513
      }
19514
      return 0;
19515
    }
19516
 
19517
    public void read(TProtocol iprot) throws TException {
19518
      TField field;
19519
      iprot.readStructBegin();
19520
      while (true)
19521
      {
19522
        field = iprot.readFieldBegin();
19523
        if (field.type == TType.STOP) { 
19524
          break;
19525
        }
19526
        _Fields fieldId = _Fields.findByThriftId(field.id);
19527
        if (fieldId == null) {
19528
          TProtocolUtil.skip(iprot, field.type);
19529
        } else {
19530
          switch (fieldId) {
19531
            case SUCCESS:
19532
              if (field.type == TType.BOOL) {
19533
                this.success = iprot.readBool();
19534
                setSuccessIsSet(true);
19535
              } else { 
19536
                TProtocolUtil.skip(iprot, field.type);
19537
              }
19538
              break;
19539
            case EX:
19540
              if (field.type == TType.STRUCT) {
19541
                this.ex = new TransactionServiceException();
19542
                this.ex.read(iprot);
19543
              } else { 
19544
                TProtocolUtil.skip(iprot, field.type);
19545
              }
19546
              break;
19547
          }
19548
          iprot.readFieldEnd();
19549
        }
19550
      }
19551
      iprot.readStructEnd();
19552
      validate();
19553
    }
19554
 
19555
    public void write(TProtocol oprot) throws TException {
19556
      oprot.writeStructBegin(STRUCT_DESC);
19557
 
19558
      if (this.isSetSuccess()) {
19559
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
19560
        oprot.writeBool(this.success);
19561
        oprot.writeFieldEnd();
19562
      } else if (this.isSetEx()) {
19563
        oprot.writeFieldBegin(EX_FIELD_DESC);
19564
        this.ex.write(oprot);
19565
        oprot.writeFieldEnd();
19566
      }
19567
      oprot.writeFieldStop();
19568
      oprot.writeStructEnd();
19569
    }
19570
 
19571
    @Override
19572
    public String toString() {
19573
      StringBuilder sb = new StringBuilder("markOrderAsOutOfStock_result(");
19574
      boolean first = true;
19575
 
19576
      sb.append("success:");
19577
      sb.append(this.success);
19578
      first = false;
19579
      if (!first) sb.append(", ");
19580
      sb.append("ex:");
19581
      if (this.ex == null) {
19582
        sb.append("null");
19583
      } else {
19584
        sb.append(this.ex);
19585
      }
19586
      first = false;
19587
      sb.append(")");
19588
      return sb.toString();
19589
    }
19590
 
19591
    public void validate() throws TException {
19592
      // check for required fields
19593
    }
19594
 
19595
  }
19596
 
758 chandransh 19597
  public static class markOrdersAsManifested_args implements TBase<markOrdersAsManifested_args._Fields>, java.io.Serializable, Cloneable, Comparable<markOrdersAsManifested_args>   {
19598
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsManifested_args");
19599
 
19600
    private static final TField WAREHOUSE_ID_FIELD_DESC = new TField("warehouseId", TType.I64, (short)1);
19601
    private static final TField PROVIDER_ID_FIELD_DESC = new TField("providerId", TType.I64, (short)2);
19602
 
19603
    private long warehouseId;
19604
    private long providerId;
19605
 
19606
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19607
    public enum _Fields implements TFieldIdEnum {
19608
      WAREHOUSE_ID((short)1, "warehouseId"),
19609
      PROVIDER_ID((short)2, "providerId");
19610
 
19611
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
19612
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19613
 
19614
      static {
19615
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19616
          byId.put((int)field._thriftId, field);
19617
          byName.put(field.getFieldName(), field);
19618
        }
19619
      }
19620
 
19621
      /**
19622
       * Find the _Fields constant that matches fieldId, or null if its not found.
19623
       */
19624
      public static _Fields findByThriftId(int fieldId) {
19625
        return byId.get(fieldId);
19626
      }
19627
 
19628
      /**
19629
       * Find the _Fields constant that matches fieldId, throwing an exception
19630
       * if it is not found.
19631
       */
19632
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19633
        _Fields fields = findByThriftId(fieldId);
19634
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19635
        return fields;
19636
      }
19637
 
19638
      /**
19639
       * Find the _Fields constant that matches name, or null if its not found.
19640
       */
19641
      public static _Fields findByName(String name) {
19642
        return byName.get(name);
19643
      }
19644
 
19645
      private final short _thriftId;
19646
      private final String _fieldName;
19647
 
19648
      _Fields(short thriftId, String fieldName) {
19649
        _thriftId = thriftId;
19650
        _fieldName = fieldName;
19651
      }
19652
 
19653
      public short getThriftFieldId() {
19654
        return _thriftId;
19655
      }
19656
 
19657
      public String getFieldName() {
19658
        return _fieldName;
19659
      }
19660
    }
19661
 
19662
    // isset id assignments
19663
    private static final int __WAREHOUSEID_ISSET_ID = 0;
19664
    private static final int __PROVIDERID_ISSET_ID = 1;
19665
    private BitSet __isset_bit_vector = new BitSet(2);
19666
 
19667
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
19668
      put(_Fields.WAREHOUSE_ID, new FieldMetaData("warehouseId", TFieldRequirementType.DEFAULT, 
19669
          new FieldValueMetaData(TType.I64)));
19670
      put(_Fields.PROVIDER_ID, new FieldMetaData("providerId", TFieldRequirementType.DEFAULT, 
19671
          new FieldValueMetaData(TType.I64)));
19672
    }});
19673
 
19674
    static {
19675
      FieldMetaData.addStructMetaDataMap(markOrdersAsManifested_args.class, metaDataMap);
19676
    }
19677
 
19678
    public markOrdersAsManifested_args() {
19679
    }
19680
 
19681
    public markOrdersAsManifested_args(
19682
      long warehouseId,
19683
      long providerId)
19684
    {
19685
      this();
19686
      this.warehouseId = warehouseId;
19687
      setWarehouseIdIsSet(true);
19688
      this.providerId = providerId;
19689
      setProviderIdIsSet(true);
19690
    }
19691
 
19692
    /**
19693
     * Performs a deep copy on <i>other</i>.
19694
     */
19695
    public markOrdersAsManifested_args(markOrdersAsManifested_args other) {
19696
      __isset_bit_vector.clear();
19697
      __isset_bit_vector.or(other.__isset_bit_vector);
19698
      this.warehouseId = other.warehouseId;
19699
      this.providerId = other.providerId;
19700
    }
19701
 
19702
    public markOrdersAsManifested_args deepCopy() {
19703
      return new markOrdersAsManifested_args(this);
19704
    }
19705
 
19706
    @Deprecated
19707
    public markOrdersAsManifested_args clone() {
19708
      return new markOrdersAsManifested_args(this);
19709
    }
19710
 
19711
    public long getWarehouseId() {
19712
      return this.warehouseId;
19713
    }
19714
 
19715
    public markOrdersAsManifested_args setWarehouseId(long warehouseId) {
19716
      this.warehouseId = warehouseId;
19717
      setWarehouseIdIsSet(true);
19718
      return this;
19719
    }
19720
 
19721
    public void unsetWarehouseId() {
19722
      __isset_bit_vector.clear(__WAREHOUSEID_ISSET_ID);
19723
    }
19724
 
19725
    /** Returns true if field warehouseId is set (has been asigned a value) and false otherwise */
19726
    public boolean isSetWarehouseId() {
19727
      return __isset_bit_vector.get(__WAREHOUSEID_ISSET_ID);
19728
    }
19729
 
19730
    public void setWarehouseIdIsSet(boolean value) {
19731
      __isset_bit_vector.set(__WAREHOUSEID_ISSET_ID, value);
19732
    }
19733
 
19734
    public long getProviderId() {
19735
      return this.providerId;
19736
    }
19737
 
19738
    public markOrdersAsManifested_args setProviderId(long providerId) {
19739
      this.providerId = providerId;
19740
      setProviderIdIsSet(true);
19741
      return this;
19742
    }
19743
 
19744
    public void unsetProviderId() {
19745
      __isset_bit_vector.clear(__PROVIDERID_ISSET_ID);
19746
    }
19747
 
19748
    /** Returns true if field providerId is set (has been asigned a value) and false otherwise */
19749
    public boolean isSetProviderId() {
19750
      return __isset_bit_vector.get(__PROVIDERID_ISSET_ID);
19751
    }
19752
 
19753
    public void setProviderIdIsSet(boolean value) {
19754
      __isset_bit_vector.set(__PROVIDERID_ISSET_ID, value);
19755
    }
19756
 
19757
    public void setFieldValue(_Fields field, Object value) {
19758
      switch (field) {
19759
      case WAREHOUSE_ID:
19760
        if (value == null) {
19761
          unsetWarehouseId();
19762
        } else {
19763
          setWarehouseId((Long)value);
19764
        }
19765
        break;
19766
 
19767
      case PROVIDER_ID:
19768
        if (value == null) {
19769
          unsetProviderId();
19770
        } else {
19771
          setProviderId((Long)value);
19772
        }
19773
        break;
19774
 
19775
      }
19776
    }
19777
 
19778
    public void setFieldValue(int fieldID, Object value) {
19779
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
19780
    }
19781
 
19782
    public Object getFieldValue(_Fields field) {
19783
      switch (field) {
19784
      case WAREHOUSE_ID:
19785
        return new Long(getWarehouseId());
19786
 
19787
      case PROVIDER_ID:
19788
        return new Long(getProviderId());
19789
 
19790
      }
19791
      throw new IllegalStateException();
19792
    }
19793
 
19794
    public Object getFieldValue(int fieldId) {
19795
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
19796
    }
19797
 
19798
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
19799
    public boolean isSet(_Fields field) {
19800
      switch (field) {
19801
      case WAREHOUSE_ID:
19802
        return isSetWarehouseId();
19803
      case PROVIDER_ID:
19804
        return isSetProviderId();
19805
      }
19806
      throw new IllegalStateException();
19807
    }
19808
 
19809
    public boolean isSet(int fieldID) {
19810
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
19811
    }
19812
 
19813
    @Override
19814
    public boolean equals(Object that) {
19815
      if (that == null)
19816
        return false;
19817
      if (that instanceof markOrdersAsManifested_args)
19818
        return this.equals((markOrdersAsManifested_args)that);
19819
      return false;
19820
    }
19821
 
19822
    public boolean equals(markOrdersAsManifested_args that) {
19823
      if (that == null)
19824
        return false;
19825
 
19826
      boolean this_present_warehouseId = true;
19827
      boolean that_present_warehouseId = true;
19828
      if (this_present_warehouseId || that_present_warehouseId) {
19829
        if (!(this_present_warehouseId && that_present_warehouseId))
19830
          return false;
19831
        if (this.warehouseId != that.warehouseId)
19832
          return false;
19833
      }
19834
 
19835
      boolean this_present_providerId = true;
19836
      boolean that_present_providerId = true;
19837
      if (this_present_providerId || that_present_providerId) {
19838
        if (!(this_present_providerId && that_present_providerId))
19839
          return false;
19840
        if (this.providerId != that.providerId)
19841
          return false;
19842
      }
19843
 
19844
      return true;
19845
    }
19846
 
19847
    @Override
19848
    public int hashCode() {
19849
      return 0;
19850
    }
19851
 
19852
    public int compareTo(markOrdersAsManifested_args other) {
19853
      if (!getClass().equals(other.getClass())) {
19854
        return getClass().getName().compareTo(other.getClass().getName());
19855
      }
19856
 
19857
      int lastComparison = 0;
19858
      markOrdersAsManifested_args typedOther = (markOrdersAsManifested_args)other;
19859
 
19860
      lastComparison = Boolean.valueOf(isSetWarehouseId()).compareTo(isSetWarehouseId());
19861
      if (lastComparison != 0) {
19862
        return lastComparison;
19863
      }
19864
      lastComparison = TBaseHelper.compareTo(warehouseId, typedOther.warehouseId);
19865
      if (lastComparison != 0) {
19866
        return lastComparison;
19867
      }
19868
      lastComparison = Boolean.valueOf(isSetProviderId()).compareTo(isSetProviderId());
19869
      if (lastComparison != 0) {
19870
        return lastComparison;
19871
      }
19872
      lastComparison = TBaseHelper.compareTo(providerId, typedOther.providerId);
19873
      if (lastComparison != 0) {
19874
        return lastComparison;
19875
      }
19876
      return 0;
19877
    }
19878
 
19879
    public void read(TProtocol iprot) throws TException {
19880
      TField field;
19881
      iprot.readStructBegin();
19882
      while (true)
19883
      {
19884
        field = iprot.readFieldBegin();
19885
        if (field.type == TType.STOP) { 
19886
          break;
19887
        }
19888
        _Fields fieldId = _Fields.findByThriftId(field.id);
19889
        if (fieldId == null) {
19890
          TProtocolUtil.skip(iprot, field.type);
19891
        } else {
19892
          switch (fieldId) {
19893
            case WAREHOUSE_ID:
19894
              if (field.type == TType.I64) {
19895
                this.warehouseId = iprot.readI64();
19896
                setWarehouseIdIsSet(true);
19897
              } else { 
19898
                TProtocolUtil.skip(iprot, field.type);
19899
              }
19900
              break;
19901
            case PROVIDER_ID:
19902
              if (field.type == TType.I64) {
19903
                this.providerId = iprot.readI64();
19904
                setProviderIdIsSet(true);
19905
              } else { 
19906
                TProtocolUtil.skip(iprot, field.type);
19907
              }
19908
              break;
19909
          }
19910
          iprot.readFieldEnd();
19911
        }
19912
      }
19913
      iprot.readStructEnd();
19914
      validate();
19915
    }
19916
 
19917
    public void write(TProtocol oprot) throws TException {
19918
      validate();
19919
 
19920
      oprot.writeStructBegin(STRUCT_DESC);
19921
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
19922
      oprot.writeI64(this.warehouseId);
19923
      oprot.writeFieldEnd();
19924
      oprot.writeFieldBegin(PROVIDER_ID_FIELD_DESC);
19925
      oprot.writeI64(this.providerId);
19926
      oprot.writeFieldEnd();
19927
      oprot.writeFieldStop();
19928
      oprot.writeStructEnd();
19929
    }
19930
 
19931
    @Override
19932
    public String toString() {
19933
      StringBuilder sb = new StringBuilder("markOrdersAsManifested_args(");
19934
      boolean first = true;
19935
 
19936
      sb.append("warehouseId:");
19937
      sb.append(this.warehouseId);
19938
      first = false;
19939
      if (!first) sb.append(", ");
19940
      sb.append("providerId:");
19941
      sb.append(this.providerId);
19942
      first = false;
19943
      sb.append(")");
19944
      return sb.toString();
19945
    }
19946
 
19947
    public void validate() throws TException {
19948
      // check for required fields
19949
    }
19950
 
19951
  }
19952
 
19953
  public static class markOrdersAsManifested_result implements TBase<markOrdersAsManifested_result._Fields>, java.io.Serializable, Cloneable, Comparable<markOrdersAsManifested_result>   {
19954
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsManifested_result");
19955
 
19956
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
19957
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
19958
 
19959
    private boolean success;
19960
    private TransactionServiceException ex;
19961
 
19962
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19963
    public enum _Fields implements TFieldIdEnum {
19964
      SUCCESS((short)0, "success"),
19965
      EX((short)1, "ex");
19966
 
19967
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
19968
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19969
 
19970
      static {
19971
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19972
          byId.put((int)field._thriftId, field);
19973
          byName.put(field.getFieldName(), field);
19974
        }
19975
      }
19976
 
19977
      /**
19978
       * Find the _Fields constant that matches fieldId, or null if its not found.
19979
       */
19980
      public static _Fields findByThriftId(int fieldId) {
19981
        return byId.get(fieldId);
19982
      }
19983
 
19984
      /**
19985
       * Find the _Fields constant that matches fieldId, throwing an exception
19986
       * if it is not found.
19987
       */
19988
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19989
        _Fields fields = findByThriftId(fieldId);
19990
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19991
        return fields;
19992
      }
19993
 
19994
      /**
19995
       * Find the _Fields constant that matches name, or null if its not found.
19996
       */
19997
      public static _Fields findByName(String name) {
19998
        return byName.get(name);
19999
      }
20000
 
20001
      private final short _thriftId;
20002
      private final String _fieldName;
20003
 
20004
      _Fields(short thriftId, String fieldName) {
20005
        _thriftId = thriftId;
20006
        _fieldName = fieldName;
20007
      }
20008
 
20009
      public short getThriftFieldId() {
20010
        return _thriftId;
20011
      }
20012
 
20013
      public String getFieldName() {
20014
        return _fieldName;
20015
      }
20016
    }
20017
 
20018
    // isset id assignments
20019
    private static final int __SUCCESS_ISSET_ID = 0;
20020
    private BitSet __isset_bit_vector = new BitSet(1);
20021
 
20022
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
20023
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
20024
          new FieldValueMetaData(TType.BOOL)));
20025
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
20026
          new FieldValueMetaData(TType.STRUCT)));
20027
    }});
20028
 
20029
    static {
20030
      FieldMetaData.addStructMetaDataMap(markOrdersAsManifested_result.class, metaDataMap);
20031
    }
20032
 
20033
    public markOrdersAsManifested_result() {
20034
    }
20035
 
20036
    public markOrdersAsManifested_result(
20037
      boolean success,
20038
      TransactionServiceException ex)
20039
    {
20040
      this();
20041
      this.success = success;
20042
      setSuccessIsSet(true);
20043
      this.ex = ex;
20044
    }
20045
 
20046
    /**
20047
     * Performs a deep copy on <i>other</i>.
20048
     */
20049
    public markOrdersAsManifested_result(markOrdersAsManifested_result other) {
20050
      __isset_bit_vector.clear();
20051
      __isset_bit_vector.or(other.__isset_bit_vector);
20052
      this.success = other.success;
20053
      if (other.isSetEx()) {
20054
        this.ex = new TransactionServiceException(other.ex);
20055
      }
20056
    }
20057
 
20058
    public markOrdersAsManifested_result deepCopy() {
20059
      return new markOrdersAsManifested_result(this);
20060
    }
20061
 
20062
    @Deprecated
20063
    public markOrdersAsManifested_result clone() {
20064
      return new markOrdersAsManifested_result(this);
20065
    }
20066
 
20067
    public boolean isSuccess() {
20068
      return this.success;
20069
    }
20070
 
20071
    public markOrdersAsManifested_result setSuccess(boolean success) {
20072
      this.success = success;
20073
      setSuccessIsSet(true);
20074
      return this;
20075
    }
20076
 
20077
    public void unsetSuccess() {
20078
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
20079
    }
20080
 
20081
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
20082
    public boolean isSetSuccess() {
20083
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
20084
    }
20085
 
20086
    public void setSuccessIsSet(boolean value) {
20087
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
20088
    }
20089
 
20090
    public TransactionServiceException getEx() {
20091
      return this.ex;
20092
    }
20093
 
20094
    public markOrdersAsManifested_result setEx(TransactionServiceException ex) {
20095
      this.ex = ex;
20096
      return this;
20097
    }
20098
 
20099
    public void unsetEx() {
20100
      this.ex = null;
20101
    }
20102
 
20103
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
20104
    public boolean isSetEx() {
20105
      return this.ex != null;
20106
    }
20107
 
20108
    public void setExIsSet(boolean value) {
20109
      if (!value) {
20110
        this.ex = null;
20111
      }
20112
    }
20113
 
20114
    public void setFieldValue(_Fields field, Object value) {
20115
      switch (field) {
20116
      case SUCCESS:
20117
        if (value == null) {
20118
          unsetSuccess();
20119
        } else {
20120
          setSuccess((Boolean)value);
20121
        }
20122
        break;
20123
 
20124
      case EX:
20125
        if (value == null) {
20126
          unsetEx();
20127
        } else {
20128
          setEx((TransactionServiceException)value);
20129
        }
20130
        break;
20131
 
20132
      }
20133
    }
20134
 
20135
    public void setFieldValue(int fieldID, Object value) {
20136
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
20137
    }
20138
 
20139
    public Object getFieldValue(_Fields field) {
20140
      switch (field) {
20141
      case SUCCESS:
20142
        return new Boolean(isSuccess());
20143
 
20144
      case EX:
20145
        return getEx();
20146
 
20147
      }
20148
      throw new IllegalStateException();
20149
    }
20150
 
20151
    public Object getFieldValue(int fieldId) {
20152
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
20153
    }
20154
 
20155
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
20156
    public boolean isSet(_Fields field) {
20157
      switch (field) {
20158
      case SUCCESS:
20159
        return isSetSuccess();
20160
      case EX:
20161
        return isSetEx();
20162
      }
20163
      throw new IllegalStateException();
20164
    }
20165
 
20166
    public boolean isSet(int fieldID) {
20167
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
20168
    }
20169
 
20170
    @Override
20171
    public boolean equals(Object that) {
20172
      if (that == null)
20173
        return false;
20174
      if (that instanceof markOrdersAsManifested_result)
20175
        return this.equals((markOrdersAsManifested_result)that);
20176
      return false;
20177
    }
20178
 
20179
    public boolean equals(markOrdersAsManifested_result that) {
20180
      if (that == null)
20181
        return false;
20182
 
20183
      boolean this_present_success = true;
20184
      boolean that_present_success = true;
20185
      if (this_present_success || that_present_success) {
20186
        if (!(this_present_success && that_present_success))
20187
          return false;
20188
        if (this.success != that.success)
20189
          return false;
20190
      }
20191
 
20192
      boolean this_present_ex = true && this.isSetEx();
20193
      boolean that_present_ex = true && that.isSetEx();
20194
      if (this_present_ex || that_present_ex) {
20195
        if (!(this_present_ex && that_present_ex))
20196
          return false;
20197
        if (!this.ex.equals(that.ex))
20198
          return false;
20199
      }
20200
 
20201
      return true;
20202
    }
20203
 
20204
    @Override
20205
    public int hashCode() {
20206
      return 0;
20207
    }
20208
 
20209
    public int compareTo(markOrdersAsManifested_result other) {
20210
      if (!getClass().equals(other.getClass())) {
20211
        return getClass().getName().compareTo(other.getClass().getName());
20212
      }
20213
 
20214
      int lastComparison = 0;
20215
      markOrdersAsManifested_result typedOther = (markOrdersAsManifested_result)other;
20216
 
20217
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
20218
      if (lastComparison != 0) {
20219
        return lastComparison;
20220
      }
20221
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
20222
      if (lastComparison != 0) {
20223
        return lastComparison;
20224
      }
20225
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
20226
      if (lastComparison != 0) {
20227
        return lastComparison;
20228
      }
20229
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
20230
      if (lastComparison != 0) {
20231
        return lastComparison;
20232
      }
20233
      return 0;
20234
    }
20235
 
20236
    public void read(TProtocol iprot) throws TException {
20237
      TField field;
20238
      iprot.readStructBegin();
20239
      while (true)
20240
      {
20241
        field = iprot.readFieldBegin();
20242
        if (field.type == TType.STOP) { 
20243
          break;
20244
        }
20245
        _Fields fieldId = _Fields.findByThriftId(field.id);
20246
        if (fieldId == null) {
20247
          TProtocolUtil.skip(iprot, field.type);
20248
        } else {
20249
          switch (fieldId) {
20250
            case SUCCESS:
20251
              if (field.type == TType.BOOL) {
20252
                this.success = iprot.readBool();
20253
                setSuccessIsSet(true);
20254
              } else { 
20255
                TProtocolUtil.skip(iprot, field.type);
20256
              }
20257
              break;
20258
            case EX:
20259
              if (field.type == TType.STRUCT) {
20260
                this.ex = new TransactionServiceException();
20261
                this.ex.read(iprot);
20262
              } else { 
20263
                TProtocolUtil.skip(iprot, field.type);
20264
              }
20265
              break;
20266
          }
20267
          iprot.readFieldEnd();
20268
        }
20269
      }
20270
      iprot.readStructEnd();
20271
      validate();
20272
    }
20273
 
20274
    public void write(TProtocol oprot) throws TException {
20275
      oprot.writeStructBegin(STRUCT_DESC);
20276
 
20277
      if (this.isSetSuccess()) {
20278
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
20279
        oprot.writeBool(this.success);
20280
        oprot.writeFieldEnd();
20281
      } else if (this.isSetEx()) {
20282
        oprot.writeFieldBegin(EX_FIELD_DESC);
20283
        this.ex.write(oprot);
20284
        oprot.writeFieldEnd();
20285
      }
20286
      oprot.writeFieldStop();
20287
      oprot.writeStructEnd();
20288
    }
20289
 
20290
    @Override
20291
    public String toString() {
20292
      StringBuilder sb = new StringBuilder("markOrdersAsManifested_result(");
20293
      boolean first = true;
20294
 
20295
      sb.append("success:");
20296
      sb.append(this.success);
20297
      first = false;
20298
      if (!first) sb.append(", ");
20299
      sb.append("ex:");
20300
      if (this.ex == null) {
20301
        sb.append("null");
20302
      } else {
20303
        sb.append(this.ex);
20304
      }
20305
      first = false;
20306
      sb.append(")");
20307
      return sb.toString();
20308
    }
20309
 
20310
    public void validate() throws TException {
20311
      // check for required fields
20312
    }
20313
 
20314
  }
20315
 
1114 chandransh 20316
  public static class markOrdersAsPickedUp_args implements TBase<markOrdersAsPickedUp_args._Fields>, java.io.Serializable, Cloneable   {
20317
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsPickedUp_args");
20318
 
20319
    private static final TField PROVIDER_ID_FIELD_DESC = new TField("providerId", TType.I64, (short)1);
20320
    private static final TField PICKUP_DETAILS_FIELD_DESC = new TField("pickupDetails", TType.MAP, (short)2);
20321
 
20322
    private long providerId;
1245 chandransh 20323
    private Map<String,String> pickupDetails;
1114 chandransh 20324
 
20325
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
20326
    public enum _Fields implements TFieldIdEnum {
20327
      PROVIDER_ID((short)1, "providerId"),
20328
      PICKUP_DETAILS((short)2, "pickupDetails");
20329
 
20330
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
20331
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
20332
 
20333
      static {
20334
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
20335
          byId.put((int)field._thriftId, field);
20336
          byName.put(field.getFieldName(), field);
20337
        }
20338
      }
20339
 
20340
      /**
20341
       * Find the _Fields constant that matches fieldId, or null if its not found.
20342
       */
20343
      public static _Fields findByThriftId(int fieldId) {
20344
        return byId.get(fieldId);
20345
      }
20346
 
20347
      /**
20348
       * Find the _Fields constant that matches fieldId, throwing an exception
20349
       * if it is not found.
20350
       */
20351
      public static _Fields findByThriftIdOrThrow(int fieldId) {
20352
        _Fields fields = findByThriftId(fieldId);
20353
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
20354
        return fields;
20355
      }
20356
 
20357
      /**
20358
       * Find the _Fields constant that matches name, or null if its not found.
20359
       */
20360
      public static _Fields findByName(String name) {
20361
        return byName.get(name);
20362
      }
20363
 
20364
      private final short _thriftId;
20365
      private final String _fieldName;
20366
 
20367
      _Fields(short thriftId, String fieldName) {
20368
        _thriftId = thriftId;
20369
        _fieldName = fieldName;
20370
      }
20371
 
20372
      public short getThriftFieldId() {
20373
        return _thriftId;
20374
      }
20375
 
20376
      public String getFieldName() {
20377
        return _fieldName;
20378
      }
20379
    }
20380
 
20381
    // isset id assignments
20382
    private static final int __PROVIDERID_ISSET_ID = 0;
20383
    private BitSet __isset_bit_vector = new BitSet(1);
20384
 
20385
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
20386
      put(_Fields.PROVIDER_ID, new FieldMetaData("providerId", TFieldRequirementType.DEFAULT, 
20387
          new FieldValueMetaData(TType.I64)));
20388
      put(_Fields.PICKUP_DETAILS, new FieldMetaData("pickupDetails", TFieldRequirementType.DEFAULT, 
20389
          new MapMetaData(TType.MAP, 
20390
              new FieldValueMetaData(TType.STRING), 
1245 chandransh 20391
              new FieldValueMetaData(TType.STRING))));
1114 chandransh 20392
    }});
20393
 
20394
    static {
20395
      FieldMetaData.addStructMetaDataMap(markOrdersAsPickedUp_args.class, metaDataMap);
20396
    }
20397
 
20398
    public markOrdersAsPickedUp_args() {
20399
    }
20400
 
20401
    public markOrdersAsPickedUp_args(
20402
      long providerId,
1245 chandransh 20403
      Map<String,String> pickupDetails)
1114 chandransh 20404
    {
20405
      this();
20406
      this.providerId = providerId;
20407
      setProviderIdIsSet(true);
20408
      this.pickupDetails = pickupDetails;
20409
    }
20410
 
20411
    /**
20412
     * Performs a deep copy on <i>other</i>.
20413
     */
20414
    public markOrdersAsPickedUp_args(markOrdersAsPickedUp_args other) {
20415
      __isset_bit_vector.clear();
20416
      __isset_bit_vector.or(other.__isset_bit_vector);
20417
      this.providerId = other.providerId;
20418
      if (other.isSetPickupDetails()) {
1245 chandransh 20419
        Map<String,String> __this__pickupDetails = new HashMap<String,String>();
20420
        for (Map.Entry<String, String> other_element : other.pickupDetails.entrySet()) {
1114 chandransh 20421
 
20422
          String other_element_key = other_element.getKey();
1245 chandransh 20423
          String other_element_value = other_element.getValue();
1114 chandransh 20424
 
20425
          String __this__pickupDetails_copy_key = other_element_key;
20426
 
1245 chandransh 20427
          String __this__pickupDetails_copy_value = other_element_value;
1114 chandransh 20428
 
20429
          __this__pickupDetails.put(__this__pickupDetails_copy_key, __this__pickupDetails_copy_value);
20430
        }
20431
        this.pickupDetails = __this__pickupDetails;
20432
      }
20433
    }
20434
 
20435
    public markOrdersAsPickedUp_args deepCopy() {
20436
      return new markOrdersAsPickedUp_args(this);
20437
    }
20438
 
20439
    @Deprecated
20440
    public markOrdersAsPickedUp_args clone() {
20441
      return new markOrdersAsPickedUp_args(this);
20442
    }
20443
 
20444
    public long getProviderId() {
20445
      return this.providerId;
20446
    }
20447
 
20448
    public markOrdersAsPickedUp_args setProviderId(long providerId) {
20449
      this.providerId = providerId;
20450
      setProviderIdIsSet(true);
20451
      return this;
20452
    }
20453
 
20454
    public void unsetProviderId() {
20455
      __isset_bit_vector.clear(__PROVIDERID_ISSET_ID);
20456
    }
20457
 
20458
    /** Returns true if field providerId is set (has been asigned a value) and false otherwise */
20459
    public boolean isSetProviderId() {
20460
      return __isset_bit_vector.get(__PROVIDERID_ISSET_ID);
20461
    }
20462
 
20463
    public void setProviderIdIsSet(boolean value) {
20464
      __isset_bit_vector.set(__PROVIDERID_ISSET_ID, value);
20465
    }
20466
 
20467
    public int getPickupDetailsSize() {
20468
      return (this.pickupDetails == null) ? 0 : this.pickupDetails.size();
20469
    }
20470
 
1245 chandransh 20471
    public void putToPickupDetails(String key, String val) {
1114 chandransh 20472
      if (this.pickupDetails == null) {
1245 chandransh 20473
        this.pickupDetails = new HashMap<String,String>();
1114 chandransh 20474
      }
20475
      this.pickupDetails.put(key, val);
20476
    }
20477
 
1245 chandransh 20478
    public Map<String,String> getPickupDetails() {
1114 chandransh 20479
      return this.pickupDetails;
20480
    }
20481
 
1245 chandransh 20482
    public markOrdersAsPickedUp_args setPickupDetails(Map<String,String> pickupDetails) {
1114 chandransh 20483
      this.pickupDetails = pickupDetails;
20484
      return this;
20485
    }
20486
 
20487
    public void unsetPickupDetails() {
20488
      this.pickupDetails = null;
20489
    }
20490
 
20491
    /** Returns true if field pickupDetails is set (has been asigned a value) and false otherwise */
20492
    public boolean isSetPickupDetails() {
20493
      return this.pickupDetails != null;
20494
    }
20495
 
20496
    public void setPickupDetailsIsSet(boolean value) {
20497
      if (!value) {
20498
        this.pickupDetails = null;
20499
      }
20500
    }
20501
 
20502
    public void setFieldValue(_Fields field, Object value) {
20503
      switch (field) {
20504
      case PROVIDER_ID:
20505
        if (value == null) {
20506
          unsetProviderId();
20507
        } else {
20508
          setProviderId((Long)value);
20509
        }
20510
        break;
20511
 
20512
      case PICKUP_DETAILS:
20513
        if (value == null) {
20514
          unsetPickupDetails();
20515
        } else {
1245 chandransh 20516
          setPickupDetails((Map<String,String>)value);
1114 chandransh 20517
        }
20518
        break;
20519
 
20520
      }
20521
    }
20522
 
20523
    public void setFieldValue(int fieldID, Object value) {
20524
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
20525
    }
20526
 
20527
    public Object getFieldValue(_Fields field) {
20528
      switch (field) {
20529
      case PROVIDER_ID:
20530
        return new Long(getProviderId());
20531
 
20532
      case PICKUP_DETAILS:
20533
        return getPickupDetails();
20534
 
20535
      }
20536
      throw new IllegalStateException();
20537
    }
20538
 
20539
    public Object getFieldValue(int fieldId) {
20540
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
20541
    }
20542
 
20543
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
20544
    public boolean isSet(_Fields field) {
20545
      switch (field) {
20546
      case PROVIDER_ID:
20547
        return isSetProviderId();
20548
      case PICKUP_DETAILS:
20549
        return isSetPickupDetails();
20550
      }
20551
      throw new IllegalStateException();
20552
    }
20553
 
20554
    public boolean isSet(int fieldID) {
20555
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
20556
    }
20557
 
20558
    @Override
20559
    public boolean equals(Object that) {
20560
      if (that == null)
20561
        return false;
20562
      if (that instanceof markOrdersAsPickedUp_args)
20563
        return this.equals((markOrdersAsPickedUp_args)that);
20564
      return false;
20565
    }
20566
 
20567
    public boolean equals(markOrdersAsPickedUp_args that) {
20568
      if (that == null)
20569
        return false;
20570
 
20571
      boolean this_present_providerId = true;
20572
      boolean that_present_providerId = true;
20573
      if (this_present_providerId || that_present_providerId) {
20574
        if (!(this_present_providerId && that_present_providerId))
20575
          return false;
20576
        if (this.providerId != that.providerId)
20577
          return false;
20578
      }
20579
 
20580
      boolean this_present_pickupDetails = true && this.isSetPickupDetails();
20581
      boolean that_present_pickupDetails = true && that.isSetPickupDetails();
20582
      if (this_present_pickupDetails || that_present_pickupDetails) {
20583
        if (!(this_present_pickupDetails && that_present_pickupDetails))
20584
          return false;
20585
        if (!this.pickupDetails.equals(that.pickupDetails))
20586
          return false;
20587
      }
20588
 
20589
      return true;
20590
    }
20591
 
20592
    @Override
20593
    public int hashCode() {
20594
      return 0;
20595
    }
20596
 
20597
    public void read(TProtocol iprot) throws TException {
20598
      TField field;
20599
      iprot.readStructBegin();
20600
      while (true)
20601
      {
20602
        field = iprot.readFieldBegin();
20603
        if (field.type == TType.STOP) { 
20604
          break;
20605
        }
20606
        _Fields fieldId = _Fields.findByThriftId(field.id);
20607
        if (fieldId == null) {
20608
          TProtocolUtil.skip(iprot, field.type);
20609
        } else {
20610
          switch (fieldId) {
20611
            case PROVIDER_ID:
20612
              if (field.type == TType.I64) {
20613
                this.providerId = iprot.readI64();
20614
                setProviderIdIsSet(true);
20615
              } else { 
20616
                TProtocolUtil.skip(iprot, field.type);
20617
              }
20618
              break;
20619
            case PICKUP_DETAILS:
20620
              if (field.type == TType.MAP) {
20621
                {
1382 varun.gupt 20622
                  TMap _map48 = iprot.readMapBegin();
20623
                  this.pickupDetails = new HashMap<String,String>(2*_map48.size);
20624
                  for (int _i49 = 0; _i49 < _map48.size; ++_i49)
1114 chandransh 20625
                  {
1382 varun.gupt 20626
                    String _key50;
20627
                    String _val51;
20628
                    _key50 = iprot.readString();
20629
                    _val51 = iprot.readString();
20630
                    this.pickupDetails.put(_key50, _val51);
1114 chandransh 20631
                  }
20632
                  iprot.readMapEnd();
20633
                }
20634
              } else { 
20635
                TProtocolUtil.skip(iprot, field.type);
20636
              }
20637
              break;
20638
          }
20639
          iprot.readFieldEnd();
20640
        }
20641
      }
20642
      iprot.readStructEnd();
20643
      validate();
20644
    }
20645
 
20646
    public void write(TProtocol oprot) throws TException {
20647
      validate();
20648
 
20649
      oprot.writeStructBegin(STRUCT_DESC);
20650
      oprot.writeFieldBegin(PROVIDER_ID_FIELD_DESC);
20651
      oprot.writeI64(this.providerId);
20652
      oprot.writeFieldEnd();
20653
      if (this.pickupDetails != null) {
20654
        oprot.writeFieldBegin(PICKUP_DETAILS_FIELD_DESC);
20655
        {
1245 chandransh 20656
          oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.pickupDetails.size()));
1382 varun.gupt 20657
          for (Map.Entry<String, String> _iter52 : this.pickupDetails.entrySet())
1114 chandransh 20658
          {
1382 varun.gupt 20659
            oprot.writeString(_iter52.getKey());
20660
            oprot.writeString(_iter52.getValue());
1114 chandransh 20661
          }
20662
          oprot.writeMapEnd();
20663
        }
20664
        oprot.writeFieldEnd();
20665
      }
20666
      oprot.writeFieldStop();
20667
      oprot.writeStructEnd();
20668
    }
20669
 
20670
    @Override
20671
    public String toString() {
20672
      StringBuilder sb = new StringBuilder("markOrdersAsPickedUp_args(");
20673
      boolean first = true;
20674
 
20675
      sb.append("providerId:");
20676
      sb.append(this.providerId);
20677
      first = false;
20678
      if (!first) sb.append(", ");
20679
      sb.append("pickupDetails:");
20680
      if (this.pickupDetails == null) {
20681
        sb.append("null");
20682
      } else {
20683
        sb.append(this.pickupDetails);
20684
      }
20685
      first = false;
20686
      sb.append(")");
20687
      return sb.toString();
20688
    }
20689
 
20690
    public void validate() throws TException {
20691
      // check for required fields
20692
    }
20693
 
20694
  }
20695
 
20696
  public static class markOrdersAsPickedUp_result implements TBase<markOrdersAsPickedUp_result._Fields>, java.io.Serializable, Cloneable, Comparable<markOrdersAsPickedUp_result>   {
20697
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsPickedUp_result");
20698
 
20699
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
20700
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
20701
 
20702
    private List<Order> success;
20703
    private TransactionServiceException ex;
20704
 
20705
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
20706
    public enum _Fields implements TFieldIdEnum {
20707
      SUCCESS((short)0, "success"),
20708
      EX((short)1, "ex");
20709
 
20710
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
20711
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
20712
 
20713
      static {
20714
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
20715
          byId.put((int)field._thriftId, field);
20716
          byName.put(field.getFieldName(), field);
20717
        }
20718
      }
20719
 
20720
      /**
20721
       * Find the _Fields constant that matches fieldId, or null if its not found.
20722
       */
20723
      public static _Fields findByThriftId(int fieldId) {
20724
        return byId.get(fieldId);
20725
      }
20726
 
20727
      /**
20728
       * Find the _Fields constant that matches fieldId, throwing an exception
20729
       * if it is not found.
20730
       */
20731
      public static _Fields findByThriftIdOrThrow(int fieldId) {
20732
        _Fields fields = findByThriftId(fieldId);
20733
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
20734
        return fields;
20735
      }
20736
 
20737
      /**
20738
       * Find the _Fields constant that matches name, or null if its not found.
20739
       */
20740
      public static _Fields findByName(String name) {
20741
        return byName.get(name);
20742
      }
20743
 
20744
      private final short _thriftId;
20745
      private final String _fieldName;
20746
 
20747
      _Fields(short thriftId, String fieldName) {
20748
        _thriftId = thriftId;
20749
        _fieldName = fieldName;
20750
      }
20751
 
20752
      public short getThriftFieldId() {
20753
        return _thriftId;
20754
      }
20755
 
20756
      public String getFieldName() {
20757
        return _fieldName;
20758
      }
20759
    }
20760
 
20761
    // isset id assignments
20762
 
20763
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
20764
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
20765
          new ListMetaData(TType.LIST, 
20766
              new StructMetaData(TType.STRUCT, Order.class))));
20767
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
20768
          new FieldValueMetaData(TType.STRUCT)));
20769
    }});
20770
 
20771
    static {
20772
      FieldMetaData.addStructMetaDataMap(markOrdersAsPickedUp_result.class, metaDataMap);
20773
    }
20774
 
20775
    public markOrdersAsPickedUp_result() {
20776
    }
20777
 
20778
    public markOrdersAsPickedUp_result(
20779
      List<Order> success,
20780
      TransactionServiceException ex)
20781
    {
20782
      this();
20783
      this.success = success;
20784
      this.ex = ex;
20785
    }
20786
 
20787
    /**
20788
     * Performs a deep copy on <i>other</i>.
20789
     */
20790
    public markOrdersAsPickedUp_result(markOrdersAsPickedUp_result other) {
20791
      if (other.isSetSuccess()) {
20792
        List<Order> __this__success = new ArrayList<Order>();
20793
        for (Order other_element : other.success) {
20794
          __this__success.add(new Order(other_element));
20795
        }
20796
        this.success = __this__success;
20797
      }
20798
      if (other.isSetEx()) {
20799
        this.ex = new TransactionServiceException(other.ex);
20800
      }
20801
    }
20802
 
20803
    public markOrdersAsPickedUp_result deepCopy() {
20804
      return new markOrdersAsPickedUp_result(this);
20805
    }
20806
 
20807
    @Deprecated
20808
    public markOrdersAsPickedUp_result clone() {
20809
      return new markOrdersAsPickedUp_result(this);
20810
    }
20811
 
20812
    public int getSuccessSize() {
20813
      return (this.success == null) ? 0 : this.success.size();
20814
    }
20815
 
20816
    public java.util.Iterator<Order> getSuccessIterator() {
20817
      return (this.success == null) ? null : this.success.iterator();
20818
    }
20819
 
20820
    public void addToSuccess(Order elem) {
20821
      if (this.success == null) {
20822
        this.success = new ArrayList<Order>();
20823
      }
20824
      this.success.add(elem);
20825
    }
20826
 
20827
    public List<Order> getSuccess() {
20828
      return this.success;
20829
    }
20830
 
20831
    public markOrdersAsPickedUp_result setSuccess(List<Order> success) {
20832
      this.success = success;
20833
      return this;
20834
    }
20835
 
20836
    public void unsetSuccess() {
20837
      this.success = null;
20838
    }
20839
 
20840
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
20841
    public boolean isSetSuccess() {
20842
      return this.success != null;
20843
    }
20844
 
20845
    public void setSuccessIsSet(boolean value) {
20846
      if (!value) {
20847
        this.success = null;
20848
      }
20849
    }
20850
 
20851
    public TransactionServiceException getEx() {
20852
      return this.ex;
20853
    }
20854
 
20855
    public markOrdersAsPickedUp_result setEx(TransactionServiceException ex) {
20856
      this.ex = ex;
20857
      return this;
20858
    }
20859
 
20860
    public void unsetEx() {
20861
      this.ex = null;
20862
    }
20863
 
20864
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
20865
    public boolean isSetEx() {
20866
      return this.ex != null;
20867
    }
20868
 
20869
    public void setExIsSet(boolean value) {
20870
      if (!value) {
20871
        this.ex = null;
20872
      }
20873
    }
20874
 
20875
    public void setFieldValue(_Fields field, Object value) {
20876
      switch (field) {
20877
      case SUCCESS:
20878
        if (value == null) {
20879
          unsetSuccess();
20880
        } else {
20881
          setSuccess((List<Order>)value);
20882
        }
20883
        break;
20884
 
20885
      case EX:
20886
        if (value == null) {
20887
          unsetEx();
20888
        } else {
20889
          setEx((TransactionServiceException)value);
20890
        }
20891
        break;
20892
 
20893
      }
20894
    }
20895
 
20896
    public void setFieldValue(int fieldID, Object value) {
20897
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
20898
    }
20899
 
20900
    public Object getFieldValue(_Fields field) {
20901
      switch (field) {
20902
      case SUCCESS:
20903
        return getSuccess();
20904
 
20905
      case EX:
20906
        return getEx();
20907
 
20908
      }
20909
      throw new IllegalStateException();
20910
    }
20911
 
20912
    public Object getFieldValue(int fieldId) {
20913
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
20914
    }
20915
 
20916
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
20917
    public boolean isSet(_Fields field) {
20918
      switch (field) {
20919
      case SUCCESS:
20920
        return isSetSuccess();
20921
      case EX:
20922
        return isSetEx();
20923
      }
20924
      throw new IllegalStateException();
20925
    }
20926
 
20927
    public boolean isSet(int fieldID) {
20928
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
20929
    }
20930
 
20931
    @Override
20932
    public boolean equals(Object that) {
20933
      if (that == null)
20934
        return false;
20935
      if (that instanceof markOrdersAsPickedUp_result)
20936
        return this.equals((markOrdersAsPickedUp_result)that);
20937
      return false;
20938
    }
20939
 
20940
    public boolean equals(markOrdersAsPickedUp_result that) {
20941
      if (that == null)
20942
        return false;
20943
 
20944
      boolean this_present_success = true && this.isSetSuccess();
20945
      boolean that_present_success = true && that.isSetSuccess();
20946
      if (this_present_success || that_present_success) {
20947
        if (!(this_present_success && that_present_success))
20948
          return false;
20949
        if (!this.success.equals(that.success))
20950
          return false;
20951
      }
20952
 
20953
      boolean this_present_ex = true && this.isSetEx();
20954
      boolean that_present_ex = true && that.isSetEx();
20955
      if (this_present_ex || that_present_ex) {
20956
        if (!(this_present_ex && that_present_ex))
20957
          return false;
20958
        if (!this.ex.equals(that.ex))
20959
          return false;
20960
      }
20961
 
20962
      return true;
20963
    }
20964
 
20965
    @Override
20966
    public int hashCode() {
20967
      return 0;
20968
    }
20969
 
20970
    public int compareTo(markOrdersAsPickedUp_result other) {
20971
      if (!getClass().equals(other.getClass())) {
20972
        return getClass().getName().compareTo(other.getClass().getName());
20973
      }
20974
 
20975
      int lastComparison = 0;
20976
      markOrdersAsPickedUp_result typedOther = (markOrdersAsPickedUp_result)other;
20977
 
20978
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
20979
      if (lastComparison != 0) {
20980
        return lastComparison;
20981
      }
20982
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
20983
      if (lastComparison != 0) {
20984
        return lastComparison;
20985
      }
20986
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
20987
      if (lastComparison != 0) {
20988
        return lastComparison;
20989
      }
20990
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
20991
      if (lastComparison != 0) {
20992
        return lastComparison;
20993
      }
20994
      return 0;
20995
    }
20996
 
20997
    public void read(TProtocol iprot) throws TException {
20998
      TField field;
20999
      iprot.readStructBegin();
21000
      while (true)
21001
      {
21002
        field = iprot.readFieldBegin();
21003
        if (field.type == TType.STOP) { 
21004
          break;
21005
        }
21006
        _Fields fieldId = _Fields.findByThriftId(field.id);
21007
        if (fieldId == null) {
21008
          TProtocolUtil.skip(iprot, field.type);
21009
        } else {
21010
          switch (fieldId) {
21011
            case SUCCESS:
21012
              if (field.type == TType.LIST) {
21013
                {
1382 varun.gupt 21014
                  TList _list53 = iprot.readListBegin();
21015
                  this.success = new ArrayList<Order>(_list53.size);
21016
                  for (int _i54 = 0; _i54 < _list53.size; ++_i54)
1114 chandransh 21017
                  {
1382 varun.gupt 21018
                    Order _elem55;
21019
                    _elem55 = new Order();
21020
                    _elem55.read(iprot);
21021
                    this.success.add(_elem55);
1114 chandransh 21022
                  }
21023
                  iprot.readListEnd();
21024
                }
21025
              } else { 
21026
                TProtocolUtil.skip(iprot, field.type);
21027
              }
21028
              break;
21029
            case EX:
21030
              if (field.type == TType.STRUCT) {
21031
                this.ex = new TransactionServiceException();
21032
                this.ex.read(iprot);
21033
              } else { 
21034
                TProtocolUtil.skip(iprot, field.type);
21035
              }
21036
              break;
21037
          }
21038
          iprot.readFieldEnd();
21039
        }
21040
      }
21041
      iprot.readStructEnd();
21042
      validate();
21043
    }
21044
 
21045
    public void write(TProtocol oprot) throws TException {
21046
      oprot.writeStructBegin(STRUCT_DESC);
21047
 
21048
      if (this.isSetSuccess()) {
21049
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
21050
        {
21051
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
1382 varun.gupt 21052
          for (Order _iter56 : this.success)
1114 chandransh 21053
          {
1382 varun.gupt 21054
            _iter56.write(oprot);
1114 chandransh 21055
          }
21056
          oprot.writeListEnd();
21057
        }
21058
        oprot.writeFieldEnd();
21059
      } else if (this.isSetEx()) {
21060
        oprot.writeFieldBegin(EX_FIELD_DESC);
21061
        this.ex.write(oprot);
21062
        oprot.writeFieldEnd();
21063
      }
21064
      oprot.writeFieldStop();
21065
      oprot.writeStructEnd();
21066
    }
21067
 
21068
    @Override
21069
    public String toString() {
21070
      StringBuilder sb = new StringBuilder("markOrdersAsPickedUp_result(");
21071
      boolean first = true;
21072
 
21073
      sb.append("success:");
21074
      if (this.success == null) {
21075
        sb.append("null");
21076
      } else {
21077
        sb.append(this.success);
21078
      }
21079
      first = false;
21080
      if (!first) sb.append(", ");
21081
      sb.append("ex:");
21082
      if (this.ex == null) {
21083
        sb.append("null");
21084
      } else {
21085
        sb.append(this.ex);
21086
      }
21087
      first = false;
21088
      sb.append(")");
21089
      return sb.toString();
21090
    }
21091
 
21092
    public void validate() throws TException {
21093
      // check for required fields
21094
    }
21095
 
21096
  }
21097
 
1133 chandransh 21098
  public static class markOrdersAsDelivered_args implements TBase<markOrdersAsDelivered_args._Fields>, java.io.Serializable, Cloneable   {
21099
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsDelivered_args");
21100
 
21101
    private static final TField PROVIDER_ID_FIELD_DESC = new TField("providerId", TType.I64, (short)1);
21102
    private static final TField DELIVERED_ORDERS_FIELD_DESC = new TField("deliveredOrders", TType.MAP, (short)2);
21103
 
21104
    private long providerId;
21105
    private Map<String,String> deliveredOrders;
21106
 
21107
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
21108
    public enum _Fields implements TFieldIdEnum {
21109
      PROVIDER_ID((short)1, "providerId"),
21110
      DELIVERED_ORDERS((short)2, "deliveredOrders");
21111
 
21112
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
21113
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
21114
 
21115
      static {
21116
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
21117
          byId.put((int)field._thriftId, field);
21118
          byName.put(field.getFieldName(), field);
21119
        }
21120
      }
21121
 
21122
      /**
21123
       * Find the _Fields constant that matches fieldId, or null if its not found.
21124
       */
21125
      public static _Fields findByThriftId(int fieldId) {
21126
        return byId.get(fieldId);
21127
      }
21128
 
21129
      /**
21130
       * Find the _Fields constant that matches fieldId, throwing an exception
21131
       * if it is not found.
21132
       */
21133
      public static _Fields findByThriftIdOrThrow(int fieldId) {
21134
        _Fields fields = findByThriftId(fieldId);
21135
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
21136
        return fields;
21137
      }
21138
 
21139
      /**
21140
       * Find the _Fields constant that matches name, or null if its not found.
21141
       */
21142
      public static _Fields findByName(String name) {
21143
        return byName.get(name);
21144
      }
21145
 
21146
      private final short _thriftId;
21147
      private final String _fieldName;
21148
 
21149
      _Fields(short thriftId, String fieldName) {
21150
        _thriftId = thriftId;
21151
        _fieldName = fieldName;
21152
      }
21153
 
21154
      public short getThriftFieldId() {
21155
        return _thriftId;
21156
      }
21157
 
21158
      public String getFieldName() {
21159
        return _fieldName;
21160
      }
21161
    }
21162
 
21163
    // isset id assignments
21164
    private static final int __PROVIDERID_ISSET_ID = 0;
21165
    private BitSet __isset_bit_vector = new BitSet(1);
21166
 
21167
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
21168
      put(_Fields.PROVIDER_ID, new FieldMetaData("providerId", TFieldRequirementType.DEFAULT, 
21169
          new FieldValueMetaData(TType.I64)));
21170
      put(_Fields.DELIVERED_ORDERS, new FieldMetaData("deliveredOrders", TFieldRequirementType.DEFAULT, 
21171
          new MapMetaData(TType.MAP, 
21172
              new FieldValueMetaData(TType.STRING), 
21173
              new FieldValueMetaData(TType.STRING))));
21174
    }});
21175
 
21176
    static {
21177
      FieldMetaData.addStructMetaDataMap(markOrdersAsDelivered_args.class, metaDataMap);
21178
    }
21179
 
21180
    public markOrdersAsDelivered_args() {
21181
    }
21182
 
21183
    public markOrdersAsDelivered_args(
21184
      long providerId,
21185
      Map<String,String> deliveredOrders)
21186
    {
21187
      this();
21188
      this.providerId = providerId;
21189
      setProviderIdIsSet(true);
21190
      this.deliveredOrders = deliveredOrders;
21191
    }
21192
 
21193
    /**
21194
     * Performs a deep copy on <i>other</i>.
21195
     */
21196
    public markOrdersAsDelivered_args(markOrdersAsDelivered_args other) {
21197
      __isset_bit_vector.clear();
21198
      __isset_bit_vector.or(other.__isset_bit_vector);
21199
      this.providerId = other.providerId;
21200
      if (other.isSetDeliveredOrders()) {
21201
        Map<String,String> __this__deliveredOrders = new HashMap<String,String>();
21202
        for (Map.Entry<String, String> other_element : other.deliveredOrders.entrySet()) {
21203
 
21204
          String other_element_key = other_element.getKey();
21205
          String other_element_value = other_element.getValue();
21206
 
21207
          String __this__deliveredOrders_copy_key = other_element_key;
21208
 
21209
          String __this__deliveredOrders_copy_value = other_element_value;
21210
 
21211
          __this__deliveredOrders.put(__this__deliveredOrders_copy_key, __this__deliveredOrders_copy_value);
21212
        }
21213
        this.deliveredOrders = __this__deliveredOrders;
21214
      }
21215
    }
21216
 
21217
    public markOrdersAsDelivered_args deepCopy() {
21218
      return new markOrdersAsDelivered_args(this);
21219
    }
21220
 
21221
    @Deprecated
21222
    public markOrdersAsDelivered_args clone() {
21223
      return new markOrdersAsDelivered_args(this);
21224
    }
21225
 
21226
    public long getProviderId() {
21227
      return this.providerId;
21228
    }
21229
 
21230
    public markOrdersAsDelivered_args setProviderId(long providerId) {
21231
      this.providerId = providerId;
21232
      setProviderIdIsSet(true);
21233
      return this;
21234
    }
21235
 
21236
    public void unsetProviderId() {
21237
      __isset_bit_vector.clear(__PROVIDERID_ISSET_ID);
21238
    }
21239
 
21240
    /** Returns true if field providerId is set (has been asigned a value) and false otherwise */
21241
    public boolean isSetProviderId() {
21242
      return __isset_bit_vector.get(__PROVIDERID_ISSET_ID);
21243
    }
21244
 
21245
    public void setProviderIdIsSet(boolean value) {
21246
      __isset_bit_vector.set(__PROVIDERID_ISSET_ID, value);
21247
    }
21248
 
21249
    public int getDeliveredOrdersSize() {
21250
      return (this.deliveredOrders == null) ? 0 : this.deliveredOrders.size();
21251
    }
21252
 
21253
    public void putToDeliveredOrders(String key, String val) {
21254
      if (this.deliveredOrders == null) {
21255
        this.deliveredOrders = new HashMap<String,String>();
21256
      }
21257
      this.deliveredOrders.put(key, val);
21258
    }
21259
 
21260
    public Map<String,String> getDeliveredOrders() {
21261
      return this.deliveredOrders;
21262
    }
21263
 
21264
    public markOrdersAsDelivered_args setDeliveredOrders(Map<String,String> deliveredOrders) {
21265
      this.deliveredOrders = deliveredOrders;
21266
      return this;
21267
    }
21268
 
21269
    public void unsetDeliveredOrders() {
21270
      this.deliveredOrders = null;
21271
    }
21272
 
21273
    /** Returns true if field deliveredOrders is set (has been asigned a value) and false otherwise */
21274
    public boolean isSetDeliveredOrders() {
21275
      return this.deliveredOrders != null;
21276
    }
21277
 
21278
    public void setDeliveredOrdersIsSet(boolean value) {
21279
      if (!value) {
21280
        this.deliveredOrders = null;
21281
      }
21282
    }
21283
 
21284
    public void setFieldValue(_Fields field, Object value) {
21285
      switch (field) {
21286
      case PROVIDER_ID:
21287
        if (value == null) {
21288
          unsetProviderId();
21289
        } else {
21290
          setProviderId((Long)value);
21291
        }
21292
        break;
21293
 
21294
      case DELIVERED_ORDERS:
21295
        if (value == null) {
21296
          unsetDeliveredOrders();
21297
        } else {
21298
          setDeliveredOrders((Map<String,String>)value);
21299
        }
21300
        break;
21301
 
21302
      }
21303
    }
21304
 
21305
    public void setFieldValue(int fieldID, Object value) {
21306
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
21307
    }
21308
 
21309
    public Object getFieldValue(_Fields field) {
21310
      switch (field) {
21311
      case PROVIDER_ID:
21312
        return new Long(getProviderId());
21313
 
21314
      case DELIVERED_ORDERS:
21315
        return getDeliveredOrders();
21316
 
21317
      }
21318
      throw new IllegalStateException();
21319
    }
21320
 
21321
    public Object getFieldValue(int fieldId) {
21322
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
21323
    }
21324
 
21325
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
21326
    public boolean isSet(_Fields field) {
21327
      switch (field) {
21328
      case PROVIDER_ID:
21329
        return isSetProviderId();
21330
      case DELIVERED_ORDERS:
21331
        return isSetDeliveredOrders();
21332
      }
21333
      throw new IllegalStateException();
21334
    }
21335
 
21336
    public boolean isSet(int fieldID) {
21337
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
21338
    }
21339
 
21340
    @Override
21341
    public boolean equals(Object that) {
21342
      if (that == null)
21343
        return false;
21344
      if (that instanceof markOrdersAsDelivered_args)
21345
        return this.equals((markOrdersAsDelivered_args)that);
21346
      return false;
21347
    }
21348
 
21349
    public boolean equals(markOrdersAsDelivered_args that) {
21350
      if (that == null)
21351
        return false;
21352
 
21353
      boolean this_present_providerId = true;
21354
      boolean that_present_providerId = true;
21355
      if (this_present_providerId || that_present_providerId) {
21356
        if (!(this_present_providerId && that_present_providerId))
21357
          return false;
21358
        if (this.providerId != that.providerId)
21359
          return false;
21360
      }
21361
 
21362
      boolean this_present_deliveredOrders = true && this.isSetDeliveredOrders();
21363
      boolean that_present_deliveredOrders = true && that.isSetDeliveredOrders();
21364
      if (this_present_deliveredOrders || that_present_deliveredOrders) {
21365
        if (!(this_present_deliveredOrders && that_present_deliveredOrders))
21366
          return false;
21367
        if (!this.deliveredOrders.equals(that.deliveredOrders))
21368
          return false;
21369
      }
21370
 
21371
      return true;
21372
    }
21373
 
21374
    @Override
21375
    public int hashCode() {
21376
      return 0;
21377
    }
21378
 
21379
    public void read(TProtocol iprot) throws TException {
21380
      TField field;
21381
      iprot.readStructBegin();
21382
      while (true)
21383
      {
21384
        field = iprot.readFieldBegin();
21385
        if (field.type == TType.STOP) { 
21386
          break;
21387
        }
21388
        _Fields fieldId = _Fields.findByThriftId(field.id);
21389
        if (fieldId == null) {
21390
          TProtocolUtil.skip(iprot, field.type);
21391
        } else {
21392
          switch (fieldId) {
21393
            case PROVIDER_ID:
21394
              if (field.type == TType.I64) {
21395
                this.providerId = iprot.readI64();
21396
                setProviderIdIsSet(true);
21397
              } else { 
21398
                TProtocolUtil.skip(iprot, field.type);
21399
              }
21400
              break;
21401
            case DELIVERED_ORDERS:
21402
              if (field.type == TType.MAP) {
21403
                {
1382 varun.gupt 21404
                  TMap _map57 = iprot.readMapBegin();
21405
                  this.deliveredOrders = new HashMap<String,String>(2*_map57.size);
21406
                  for (int _i58 = 0; _i58 < _map57.size; ++_i58)
1133 chandransh 21407
                  {
1382 varun.gupt 21408
                    String _key59;
21409
                    String _val60;
21410
                    _key59 = iprot.readString();
21411
                    _val60 = iprot.readString();
21412
                    this.deliveredOrders.put(_key59, _val60);
1133 chandransh 21413
                  }
21414
                  iprot.readMapEnd();
21415
                }
21416
              } else { 
21417
                TProtocolUtil.skip(iprot, field.type);
21418
              }
21419
              break;
21420
          }
21421
          iprot.readFieldEnd();
21422
        }
21423
      }
21424
      iprot.readStructEnd();
21425
      validate();
21426
    }
21427
 
21428
    public void write(TProtocol oprot) throws TException {
21429
      validate();
21430
 
21431
      oprot.writeStructBegin(STRUCT_DESC);
21432
      oprot.writeFieldBegin(PROVIDER_ID_FIELD_DESC);
21433
      oprot.writeI64(this.providerId);
21434
      oprot.writeFieldEnd();
21435
      if (this.deliveredOrders != null) {
21436
        oprot.writeFieldBegin(DELIVERED_ORDERS_FIELD_DESC);
21437
        {
21438
          oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.deliveredOrders.size()));
1382 varun.gupt 21439
          for (Map.Entry<String, String> _iter61 : this.deliveredOrders.entrySet())
1133 chandransh 21440
          {
1382 varun.gupt 21441
            oprot.writeString(_iter61.getKey());
21442
            oprot.writeString(_iter61.getValue());
1133 chandransh 21443
          }
21444
          oprot.writeMapEnd();
21445
        }
21446
        oprot.writeFieldEnd();
21447
      }
21448
      oprot.writeFieldStop();
21449
      oprot.writeStructEnd();
21450
    }
21451
 
21452
    @Override
21453
    public String toString() {
21454
      StringBuilder sb = new StringBuilder("markOrdersAsDelivered_args(");
21455
      boolean first = true;
21456
 
21457
      sb.append("providerId:");
21458
      sb.append(this.providerId);
21459
      first = false;
21460
      if (!first) sb.append(", ");
21461
      sb.append("deliveredOrders:");
21462
      if (this.deliveredOrders == null) {
21463
        sb.append("null");
21464
      } else {
21465
        sb.append(this.deliveredOrders);
21466
      }
21467
      first = false;
21468
      sb.append(")");
21469
      return sb.toString();
21470
    }
21471
 
21472
    public void validate() throws TException {
21473
      // check for required fields
21474
    }
21475
 
21476
  }
21477
 
21478
  public static class markOrdersAsDelivered_result implements TBase<markOrdersAsDelivered_result._Fields>, java.io.Serializable, Cloneable, Comparable<markOrdersAsDelivered_result>   {
21479
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsDelivered_result");
21480
 
21481
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
21482
 
21483
    private TransactionServiceException ex;
21484
 
21485
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
21486
    public enum _Fields implements TFieldIdEnum {
21487
      EX((short)1, "ex");
21488
 
21489
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
21490
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
21491
 
21492
      static {
21493
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
21494
          byId.put((int)field._thriftId, field);
21495
          byName.put(field.getFieldName(), field);
21496
        }
21497
      }
21498
 
21499
      /**
21500
       * Find the _Fields constant that matches fieldId, or null if its not found.
21501
       */
21502
      public static _Fields findByThriftId(int fieldId) {
21503
        return byId.get(fieldId);
21504
      }
21505
 
21506
      /**
21507
       * Find the _Fields constant that matches fieldId, throwing an exception
21508
       * if it is not found.
21509
       */
21510
      public static _Fields findByThriftIdOrThrow(int fieldId) {
21511
        _Fields fields = findByThriftId(fieldId);
21512
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
21513
        return fields;
21514
      }
21515
 
21516
      /**
21517
       * Find the _Fields constant that matches name, or null if its not found.
21518
       */
21519
      public static _Fields findByName(String name) {
21520
        return byName.get(name);
21521
      }
21522
 
21523
      private final short _thriftId;
21524
      private final String _fieldName;
21525
 
21526
      _Fields(short thriftId, String fieldName) {
21527
        _thriftId = thriftId;
21528
        _fieldName = fieldName;
21529
      }
21530
 
21531
      public short getThriftFieldId() {
21532
        return _thriftId;
21533
      }
21534
 
21535
      public String getFieldName() {
21536
        return _fieldName;
21537
      }
21538
    }
21539
 
21540
    // isset id assignments
21541
 
21542
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
21543
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
21544
          new FieldValueMetaData(TType.STRUCT)));
21545
    }});
21546
 
21547
    static {
21548
      FieldMetaData.addStructMetaDataMap(markOrdersAsDelivered_result.class, metaDataMap);
21549
    }
21550
 
21551
    public markOrdersAsDelivered_result() {
21552
    }
21553
 
21554
    public markOrdersAsDelivered_result(
21555
      TransactionServiceException ex)
21556
    {
21557
      this();
21558
      this.ex = ex;
21559
    }
21560
 
21561
    /**
21562
     * Performs a deep copy on <i>other</i>.
21563
     */
21564
    public markOrdersAsDelivered_result(markOrdersAsDelivered_result other) {
21565
      if (other.isSetEx()) {
21566
        this.ex = new TransactionServiceException(other.ex);
21567
      }
21568
    }
21569
 
21570
    public markOrdersAsDelivered_result deepCopy() {
21571
      return new markOrdersAsDelivered_result(this);
21572
    }
21573
 
21574
    @Deprecated
21575
    public markOrdersAsDelivered_result clone() {
21576
      return new markOrdersAsDelivered_result(this);
21577
    }
21578
 
21579
    public TransactionServiceException getEx() {
21580
      return this.ex;
21581
    }
21582
 
21583
    public markOrdersAsDelivered_result setEx(TransactionServiceException ex) {
21584
      this.ex = ex;
21585
      return this;
21586
    }
21587
 
21588
    public void unsetEx() {
21589
      this.ex = null;
21590
    }
21591
 
21592
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
21593
    public boolean isSetEx() {
21594
      return this.ex != null;
21595
    }
21596
 
21597
    public void setExIsSet(boolean value) {
21598
      if (!value) {
21599
        this.ex = null;
21600
      }
21601
    }
21602
 
21603
    public void setFieldValue(_Fields field, Object value) {
21604
      switch (field) {
21605
      case EX:
21606
        if (value == null) {
21607
          unsetEx();
21608
        } else {
21609
          setEx((TransactionServiceException)value);
21610
        }
21611
        break;
21612
 
21613
      }
21614
    }
21615
 
21616
    public void setFieldValue(int fieldID, Object value) {
21617
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
21618
    }
21619
 
21620
    public Object getFieldValue(_Fields field) {
21621
      switch (field) {
21622
      case EX:
21623
        return getEx();
21624
 
21625
      }
21626
      throw new IllegalStateException();
21627
    }
21628
 
21629
    public Object getFieldValue(int fieldId) {
21630
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
21631
    }
21632
 
21633
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
21634
    public boolean isSet(_Fields field) {
21635
      switch (field) {
21636
      case EX:
21637
        return isSetEx();
21638
      }
21639
      throw new IllegalStateException();
21640
    }
21641
 
21642
    public boolean isSet(int fieldID) {
21643
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
21644
    }
21645
 
21646
    @Override
21647
    public boolean equals(Object that) {
21648
      if (that == null)
21649
        return false;
21650
      if (that instanceof markOrdersAsDelivered_result)
21651
        return this.equals((markOrdersAsDelivered_result)that);
21652
      return false;
21653
    }
21654
 
21655
    public boolean equals(markOrdersAsDelivered_result that) {
21656
      if (that == null)
21657
        return false;
21658
 
21659
      boolean this_present_ex = true && this.isSetEx();
21660
      boolean that_present_ex = true && that.isSetEx();
21661
      if (this_present_ex || that_present_ex) {
21662
        if (!(this_present_ex && that_present_ex))
21663
          return false;
21664
        if (!this.ex.equals(that.ex))
21665
          return false;
21666
      }
21667
 
21668
      return true;
21669
    }
21670
 
21671
    @Override
21672
    public int hashCode() {
21673
      return 0;
21674
    }
21675
 
21676
    public int compareTo(markOrdersAsDelivered_result other) {
21677
      if (!getClass().equals(other.getClass())) {
21678
        return getClass().getName().compareTo(other.getClass().getName());
21679
      }
21680
 
21681
      int lastComparison = 0;
21682
      markOrdersAsDelivered_result typedOther = (markOrdersAsDelivered_result)other;
21683
 
21684
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
21685
      if (lastComparison != 0) {
21686
        return lastComparison;
21687
      }
21688
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
21689
      if (lastComparison != 0) {
21690
        return lastComparison;
21691
      }
21692
      return 0;
21693
    }
21694
 
21695
    public void read(TProtocol iprot) throws TException {
21696
      TField field;
21697
      iprot.readStructBegin();
21698
      while (true)
21699
      {
21700
        field = iprot.readFieldBegin();
21701
        if (field.type == TType.STOP) { 
21702
          break;
21703
        }
21704
        _Fields fieldId = _Fields.findByThriftId(field.id);
21705
        if (fieldId == null) {
21706
          TProtocolUtil.skip(iprot, field.type);
21707
        } else {
21708
          switch (fieldId) {
21709
            case EX:
21710
              if (field.type == TType.STRUCT) {
21711
                this.ex = new TransactionServiceException();
21712
                this.ex.read(iprot);
21713
              } else { 
21714
                TProtocolUtil.skip(iprot, field.type);
21715
              }
21716
              break;
21717
          }
21718
          iprot.readFieldEnd();
21719
        }
21720
      }
21721
      iprot.readStructEnd();
21722
      validate();
21723
    }
21724
 
21725
    public void write(TProtocol oprot) throws TException {
21726
      oprot.writeStructBegin(STRUCT_DESC);
21727
 
21728
      if (this.isSetEx()) {
21729
        oprot.writeFieldBegin(EX_FIELD_DESC);
21730
        this.ex.write(oprot);
21731
        oprot.writeFieldEnd();
21732
      }
21733
      oprot.writeFieldStop();
21734
      oprot.writeStructEnd();
21735
    }
21736
 
21737
    @Override
21738
    public String toString() {
21739
      StringBuilder sb = new StringBuilder("markOrdersAsDelivered_result(");
21740
      boolean first = true;
21741
 
21742
      sb.append("ex:");
21743
      if (this.ex == null) {
21744
        sb.append("null");
21745
      } else {
21746
        sb.append(this.ex);
21747
      }
21748
      first = false;
21749
      sb.append(")");
21750
      return sb.toString();
21751
    }
21752
 
21753
    public void validate() throws TException {
21754
      // check for required fields
21755
    }
21756
 
21757
  }
21758
 
21759
  public static class markOrdersAsFailed_args implements TBase<markOrdersAsFailed_args._Fields>, java.io.Serializable, Cloneable   {
21760
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsFailed_args");
21761
 
21762
    private static final TField PROVIDER_ID_FIELD_DESC = new TField("providerId", TType.I64, (short)1);
21763
    private static final TField RETURNED_ORDERS_FIELD_DESC = new TField("returnedOrders", TType.MAP, (short)2);
21764
 
21765
    private long providerId;
21766
    private Map<String,String> returnedOrders;
21767
 
21768
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
21769
    public enum _Fields implements TFieldIdEnum {
21770
      PROVIDER_ID((short)1, "providerId"),
21771
      RETURNED_ORDERS((short)2, "returnedOrders");
21772
 
21773
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
21774
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
21775
 
21776
      static {
21777
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
21778
          byId.put((int)field._thriftId, field);
21779
          byName.put(field.getFieldName(), field);
21780
        }
21781
      }
21782
 
21783
      /**
21784
       * Find the _Fields constant that matches fieldId, or null if its not found.
21785
       */
21786
      public static _Fields findByThriftId(int fieldId) {
21787
        return byId.get(fieldId);
21788
      }
21789
 
21790
      /**
21791
       * Find the _Fields constant that matches fieldId, throwing an exception
21792
       * if it is not found.
21793
       */
21794
      public static _Fields findByThriftIdOrThrow(int fieldId) {
21795
        _Fields fields = findByThriftId(fieldId);
21796
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
21797
        return fields;
21798
      }
21799
 
21800
      /**
21801
       * Find the _Fields constant that matches name, or null if its not found.
21802
       */
21803
      public static _Fields findByName(String name) {
21804
        return byName.get(name);
21805
      }
21806
 
21807
      private final short _thriftId;
21808
      private final String _fieldName;
21809
 
21810
      _Fields(short thriftId, String fieldName) {
21811
        _thriftId = thriftId;
21812
        _fieldName = fieldName;
21813
      }
21814
 
21815
      public short getThriftFieldId() {
21816
        return _thriftId;
21817
      }
21818
 
21819
      public String getFieldName() {
21820
        return _fieldName;
21821
      }
21822
    }
21823
 
21824
    // isset id assignments
21825
    private static final int __PROVIDERID_ISSET_ID = 0;
21826
    private BitSet __isset_bit_vector = new BitSet(1);
21827
 
21828
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
21829
      put(_Fields.PROVIDER_ID, new FieldMetaData("providerId", TFieldRequirementType.DEFAULT, 
21830
          new FieldValueMetaData(TType.I64)));
21831
      put(_Fields.RETURNED_ORDERS, new FieldMetaData("returnedOrders", TFieldRequirementType.DEFAULT, 
21832
          new MapMetaData(TType.MAP, 
21833
              new FieldValueMetaData(TType.STRING), 
21834
              new FieldValueMetaData(TType.STRING))));
21835
    }});
21836
 
21837
    static {
21838
      FieldMetaData.addStructMetaDataMap(markOrdersAsFailed_args.class, metaDataMap);
21839
    }
21840
 
21841
    public markOrdersAsFailed_args() {
21842
    }
21843
 
21844
    public markOrdersAsFailed_args(
21845
      long providerId,
21846
      Map<String,String> returnedOrders)
21847
    {
21848
      this();
21849
      this.providerId = providerId;
21850
      setProviderIdIsSet(true);
21851
      this.returnedOrders = returnedOrders;
21852
    }
21853
 
21854
    /**
21855
     * Performs a deep copy on <i>other</i>.
21856
     */
21857
    public markOrdersAsFailed_args(markOrdersAsFailed_args other) {
21858
      __isset_bit_vector.clear();
21859
      __isset_bit_vector.or(other.__isset_bit_vector);
21860
      this.providerId = other.providerId;
21861
      if (other.isSetReturnedOrders()) {
21862
        Map<String,String> __this__returnedOrders = new HashMap<String,String>();
21863
        for (Map.Entry<String, String> other_element : other.returnedOrders.entrySet()) {
21864
 
21865
          String other_element_key = other_element.getKey();
21866
          String other_element_value = other_element.getValue();
21867
 
21868
          String __this__returnedOrders_copy_key = other_element_key;
21869
 
21870
          String __this__returnedOrders_copy_value = other_element_value;
21871
 
21872
          __this__returnedOrders.put(__this__returnedOrders_copy_key, __this__returnedOrders_copy_value);
21873
        }
21874
        this.returnedOrders = __this__returnedOrders;
21875
      }
21876
    }
21877
 
21878
    public markOrdersAsFailed_args deepCopy() {
21879
      return new markOrdersAsFailed_args(this);
21880
    }
21881
 
21882
    @Deprecated
21883
    public markOrdersAsFailed_args clone() {
21884
      return new markOrdersAsFailed_args(this);
21885
    }
21886
 
21887
    public long getProviderId() {
21888
      return this.providerId;
21889
    }
21890
 
21891
    public markOrdersAsFailed_args setProviderId(long providerId) {
21892
      this.providerId = providerId;
21893
      setProviderIdIsSet(true);
21894
      return this;
21895
    }
21896
 
21897
    public void unsetProviderId() {
21898
      __isset_bit_vector.clear(__PROVIDERID_ISSET_ID);
21899
    }
21900
 
21901
    /** Returns true if field providerId is set (has been asigned a value) and false otherwise */
21902
    public boolean isSetProviderId() {
21903
      return __isset_bit_vector.get(__PROVIDERID_ISSET_ID);
21904
    }
21905
 
21906
    public void setProviderIdIsSet(boolean value) {
21907
      __isset_bit_vector.set(__PROVIDERID_ISSET_ID, value);
21908
    }
21909
 
21910
    public int getReturnedOrdersSize() {
21911
      return (this.returnedOrders == null) ? 0 : this.returnedOrders.size();
21912
    }
21913
 
21914
    public void putToReturnedOrders(String key, String val) {
21915
      if (this.returnedOrders == null) {
21916
        this.returnedOrders = new HashMap<String,String>();
21917
      }
21918
      this.returnedOrders.put(key, val);
21919
    }
21920
 
21921
    public Map<String,String> getReturnedOrders() {
21922
      return this.returnedOrders;
21923
    }
21924
 
21925
    public markOrdersAsFailed_args setReturnedOrders(Map<String,String> returnedOrders) {
21926
      this.returnedOrders = returnedOrders;
21927
      return this;
21928
    }
21929
 
21930
    public void unsetReturnedOrders() {
21931
      this.returnedOrders = null;
21932
    }
21933
 
21934
    /** Returns true if field returnedOrders is set (has been asigned a value) and false otherwise */
21935
    public boolean isSetReturnedOrders() {
21936
      return this.returnedOrders != null;
21937
    }
21938
 
21939
    public void setReturnedOrdersIsSet(boolean value) {
21940
      if (!value) {
21941
        this.returnedOrders = null;
21942
      }
21943
    }
21944
 
21945
    public void setFieldValue(_Fields field, Object value) {
21946
      switch (field) {
21947
      case PROVIDER_ID:
21948
        if (value == null) {
21949
          unsetProviderId();
21950
        } else {
21951
          setProviderId((Long)value);
21952
        }
21953
        break;
21954
 
21955
      case RETURNED_ORDERS:
21956
        if (value == null) {
21957
          unsetReturnedOrders();
21958
        } else {
21959
          setReturnedOrders((Map<String,String>)value);
21960
        }
21961
        break;
21962
 
21963
      }
21964
    }
21965
 
21966
    public void setFieldValue(int fieldID, Object value) {
21967
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
21968
    }
21969
 
21970
    public Object getFieldValue(_Fields field) {
21971
      switch (field) {
21972
      case PROVIDER_ID:
21973
        return new Long(getProviderId());
21974
 
21975
      case RETURNED_ORDERS:
21976
        return getReturnedOrders();
21977
 
21978
      }
21979
      throw new IllegalStateException();
21980
    }
21981
 
21982
    public Object getFieldValue(int fieldId) {
21983
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
21984
    }
21985
 
21986
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
21987
    public boolean isSet(_Fields field) {
21988
      switch (field) {
21989
      case PROVIDER_ID:
21990
        return isSetProviderId();
21991
      case RETURNED_ORDERS:
21992
        return isSetReturnedOrders();
21993
      }
21994
      throw new IllegalStateException();
21995
    }
21996
 
21997
    public boolean isSet(int fieldID) {
21998
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
21999
    }
22000
 
22001
    @Override
22002
    public boolean equals(Object that) {
22003
      if (that == null)
22004
        return false;
22005
      if (that instanceof markOrdersAsFailed_args)
22006
        return this.equals((markOrdersAsFailed_args)that);
22007
      return false;
22008
    }
22009
 
22010
    public boolean equals(markOrdersAsFailed_args that) {
22011
      if (that == null)
22012
        return false;
22013
 
22014
      boolean this_present_providerId = true;
22015
      boolean that_present_providerId = true;
22016
      if (this_present_providerId || that_present_providerId) {
22017
        if (!(this_present_providerId && that_present_providerId))
22018
          return false;
22019
        if (this.providerId != that.providerId)
22020
          return false;
22021
      }
22022
 
22023
      boolean this_present_returnedOrders = true && this.isSetReturnedOrders();
22024
      boolean that_present_returnedOrders = true && that.isSetReturnedOrders();
22025
      if (this_present_returnedOrders || that_present_returnedOrders) {
22026
        if (!(this_present_returnedOrders && that_present_returnedOrders))
22027
          return false;
22028
        if (!this.returnedOrders.equals(that.returnedOrders))
22029
          return false;
22030
      }
22031
 
22032
      return true;
22033
    }
22034
 
22035
    @Override
22036
    public int hashCode() {
22037
      return 0;
22038
    }
22039
 
22040
    public void read(TProtocol iprot) throws TException {
22041
      TField field;
22042
      iprot.readStructBegin();
22043
      while (true)
22044
      {
22045
        field = iprot.readFieldBegin();
22046
        if (field.type == TType.STOP) { 
22047
          break;
22048
        }
22049
        _Fields fieldId = _Fields.findByThriftId(field.id);
22050
        if (fieldId == null) {
22051
          TProtocolUtil.skip(iprot, field.type);
22052
        } else {
22053
          switch (fieldId) {
22054
            case PROVIDER_ID:
22055
              if (field.type == TType.I64) {
22056
                this.providerId = iprot.readI64();
22057
                setProviderIdIsSet(true);
22058
              } else { 
22059
                TProtocolUtil.skip(iprot, field.type);
22060
              }
22061
              break;
22062
            case RETURNED_ORDERS:
22063
              if (field.type == TType.MAP) {
22064
                {
1382 varun.gupt 22065
                  TMap _map62 = iprot.readMapBegin();
22066
                  this.returnedOrders = new HashMap<String,String>(2*_map62.size);
22067
                  for (int _i63 = 0; _i63 < _map62.size; ++_i63)
1133 chandransh 22068
                  {
1382 varun.gupt 22069
                    String _key64;
22070
                    String _val65;
22071
                    _key64 = iprot.readString();
22072
                    _val65 = iprot.readString();
22073
                    this.returnedOrders.put(_key64, _val65);
1133 chandransh 22074
                  }
22075
                  iprot.readMapEnd();
22076
                }
22077
              } else { 
22078
                TProtocolUtil.skip(iprot, field.type);
22079
              }
22080
              break;
22081
          }
22082
          iprot.readFieldEnd();
22083
        }
22084
      }
22085
      iprot.readStructEnd();
22086
      validate();
22087
    }
22088
 
22089
    public void write(TProtocol oprot) throws TException {
22090
      validate();
22091
 
22092
      oprot.writeStructBegin(STRUCT_DESC);
22093
      oprot.writeFieldBegin(PROVIDER_ID_FIELD_DESC);
22094
      oprot.writeI64(this.providerId);
22095
      oprot.writeFieldEnd();
22096
      if (this.returnedOrders != null) {
22097
        oprot.writeFieldBegin(RETURNED_ORDERS_FIELD_DESC);
22098
        {
22099
          oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.returnedOrders.size()));
1382 varun.gupt 22100
          for (Map.Entry<String, String> _iter66 : this.returnedOrders.entrySet())
1133 chandransh 22101
          {
1382 varun.gupt 22102
            oprot.writeString(_iter66.getKey());
22103
            oprot.writeString(_iter66.getValue());
1133 chandransh 22104
          }
22105
          oprot.writeMapEnd();
22106
        }
22107
        oprot.writeFieldEnd();
22108
      }
22109
      oprot.writeFieldStop();
22110
      oprot.writeStructEnd();
22111
    }
22112
 
22113
    @Override
22114
    public String toString() {
22115
      StringBuilder sb = new StringBuilder("markOrdersAsFailed_args(");
22116
      boolean first = true;
22117
 
22118
      sb.append("providerId:");
22119
      sb.append(this.providerId);
22120
      first = false;
22121
      if (!first) sb.append(", ");
22122
      sb.append("returnedOrders:");
22123
      if (this.returnedOrders == null) {
22124
        sb.append("null");
22125
      } else {
22126
        sb.append(this.returnedOrders);
22127
      }
22128
      first = false;
22129
      sb.append(")");
22130
      return sb.toString();
22131
    }
22132
 
22133
    public void validate() throws TException {
22134
      // check for required fields
22135
    }
22136
 
22137
  }
22138
 
22139
  public static class markOrdersAsFailed_result implements TBase<markOrdersAsFailed_result._Fields>, java.io.Serializable, Cloneable, Comparable<markOrdersAsFailed_result>   {
22140
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsFailed_result");
22141
 
22142
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
22143
 
22144
    private TransactionServiceException ex;
22145
 
22146
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
22147
    public enum _Fields implements TFieldIdEnum {
22148
      EX((short)1, "ex");
22149
 
22150
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
22151
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
22152
 
22153
      static {
22154
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
22155
          byId.put((int)field._thriftId, field);
22156
          byName.put(field.getFieldName(), field);
22157
        }
22158
      }
22159
 
22160
      /**
22161
       * Find the _Fields constant that matches fieldId, or null if its not found.
22162
       */
22163
      public static _Fields findByThriftId(int fieldId) {
22164
        return byId.get(fieldId);
22165
      }
22166
 
22167
      /**
22168
       * Find the _Fields constant that matches fieldId, throwing an exception
22169
       * if it is not found.
22170
       */
22171
      public static _Fields findByThriftIdOrThrow(int fieldId) {
22172
        _Fields fields = findByThriftId(fieldId);
22173
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
22174
        return fields;
22175
      }
22176
 
22177
      /**
22178
       * Find the _Fields constant that matches name, or null if its not found.
22179
       */
22180
      public static _Fields findByName(String name) {
22181
        return byName.get(name);
22182
      }
22183
 
22184
      private final short _thriftId;
22185
      private final String _fieldName;
22186
 
22187
      _Fields(short thriftId, String fieldName) {
22188
        _thriftId = thriftId;
22189
        _fieldName = fieldName;
22190
      }
22191
 
22192
      public short getThriftFieldId() {
22193
        return _thriftId;
22194
      }
22195
 
22196
      public String getFieldName() {
22197
        return _fieldName;
22198
      }
22199
    }
22200
 
22201
    // isset id assignments
22202
 
22203
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
22204
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
22205
          new FieldValueMetaData(TType.STRUCT)));
22206
    }});
22207
 
22208
    static {
22209
      FieldMetaData.addStructMetaDataMap(markOrdersAsFailed_result.class, metaDataMap);
22210
    }
22211
 
22212
    public markOrdersAsFailed_result() {
22213
    }
22214
 
22215
    public markOrdersAsFailed_result(
22216
      TransactionServiceException ex)
22217
    {
22218
      this();
22219
      this.ex = ex;
22220
    }
22221
 
22222
    /**
22223
     * Performs a deep copy on <i>other</i>.
22224
     */
22225
    public markOrdersAsFailed_result(markOrdersAsFailed_result other) {
22226
      if (other.isSetEx()) {
22227
        this.ex = new TransactionServiceException(other.ex);
22228
      }
22229
    }
22230
 
22231
    public markOrdersAsFailed_result deepCopy() {
22232
      return new markOrdersAsFailed_result(this);
22233
    }
22234
 
22235
    @Deprecated
22236
    public markOrdersAsFailed_result clone() {
22237
      return new markOrdersAsFailed_result(this);
22238
    }
22239
 
22240
    public TransactionServiceException getEx() {
22241
      return this.ex;
22242
    }
22243
 
22244
    public markOrdersAsFailed_result setEx(TransactionServiceException ex) {
22245
      this.ex = ex;
22246
      return this;
22247
    }
22248
 
22249
    public void unsetEx() {
22250
      this.ex = null;
22251
    }
22252
 
22253
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
22254
    public boolean isSetEx() {
22255
      return this.ex != null;
22256
    }
22257
 
22258
    public void setExIsSet(boolean value) {
22259
      if (!value) {
22260
        this.ex = null;
22261
      }
22262
    }
22263
 
22264
    public void setFieldValue(_Fields field, Object value) {
22265
      switch (field) {
22266
      case EX:
22267
        if (value == null) {
22268
          unsetEx();
22269
        } else {
22270
          setEx((TransactionServiceException)value);
22271
        }
22272
        break;
22273
 
22274
      }
22275
    }
22276
 
22277
    public void setFieldValue(int fieldID, Object value) {
22278
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
22279
    }
22280
 
22281
    public Object getFieldValue(_Fields field) {
22282
      switch (field) {
22283
      case EX:
22284
        return getEx();
22285
 
22286
      }
22287
      throw new IllegalStateException();
22288
    }
22289
 
22290
    public Object getFieldValue(int fieldId) {
22291
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
22292
    }
22293
 
22294
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
22295
    public boolean isSet(_Fields field) {
22296
      switch (field) {
22297
      case EX:
22298
        return isSetEx();
22299
      }
22300
      throw new IllegalStateException();
22301
    }
22302
 
22303
    public boolean isSet(int fieldID) {
22304
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
22305
    }
22306
 
22307
    @Override
22308
    public boolean equals(Object that) {
22309
      if (that == null)
22310
        return false;
22311
      if (that instanceof markOrdersAsFailed_result)
22312
        return this.equals((markOrdersAsFailed_result)that);
22313
      return false;
22314
    }
22315
 
22316
    public boolean equals(markOrdersAsFailed_result that) {
22317
      if (that == null)
22318
        return false;
22319
 
22320
      boolean this_present_ex = true && this.isSetEx();
22321
      boolean that_present_ex = true && that.isSetEx();
22322
      if (this_present_ex || that_present_ex) {
22323
        if (!(this_present_ex && that_present_ex))
22324
          return false;
22325
        if (!this.ex.equals(that.ex))
22326
          return false;
22327
      }
22328
 
22329
      return true;
22330
    }
22331
 
22332
    @Override
22333
    public int hashCode() {
22334
      return 0;
22335
    }
22336
 
22337
    public int compareTo(markOrdersAsFailed_result other) {
22338
      if (!getClass().equals(other.getClass())) {
22339
        return getClass().getName().compareTo(other.getClass().getName());
22340
      }
22341
 
22342
      int lastComparison = 0;
22343
      markOrdersAsFailed_result typedOther = (markOrdersAsFailed_result)other;
22344
 
22345
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
22346
      if (lastComparison != 0) {
22347
        return lastComparison;
22348
      }
22349
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
22350
      if (lastComparison != 0) {
22351
        return lastComparison;
22352
      }
22353
      return 0;
22354
    }
22355
 
22356
    public void read(TProtocol iprot) throws TException {
22357
      TField field;
22358
      iprot.readStructBegin();
22359
      while (true)
22360
      {
22361
        field = iprot.readFieldBegin();
22362
        if (field.type == TType.STOP) { 
22363
          break;
22364
        }
22365
        _Fields fieldId = _Fields.findByThriftId(field.id);
22366
        if (fieldId == null) {
22367
          TProtocolUtil.skip(iprot, field.type);
22368
        } else {
22369
          switch (fieldId) {
22370
            case EX:
22371
              if (field.type == TType.STRUCT) {
22372
                this.ex = new TransactionServiceException();
22373
                this.ex.read(iprot);
22374
              } else { 
22375
                TProtocolUtil.skip(iprot, field.type);
22376
              }
22377
              break;
22378
          }
22379
          iprot.readFieldEnd();
22380
        }
22381
      }
22382
      iprot.readStructEnd();
22383
      validate();
22384
    }
22385
 
22386
    public void write(TProtocol oprot) throws TException {
22387
      oprot.writeStructBegin(STRUCT_DESC);
22388
 
22389
      if (this.isSetEx()) {
22390
        oprot.writeFieldBegin(EX_FIELD_DESC);
22391
        this.ex.write(oprot);
22392
        oprot.writeFieldEnd();
22393
      }
22394
      oprot.writeFieldStop();
22395
      oprot.writeStructEnd();
22396
    }
22397
 
22398
    @Override
22399
    public String toString() {
22400
      StringBuilder sb = new StringBuilder("markOrdersAsFailed_result(");
22401
      boolean first = true;
22402
 
22403
      sb.append("ex:");
22404
      if (this.ex == null) {
22405
        sb.append("null");
22406
      } else {
22407
        sb.append(this.ex);
22408
      }
22409
      first = false;
22410
      sb.append(")");
22411
      return sb.toString();
22412
    }
22413
 
22414
    public void validate() throws TException {
22415
      // check for required fields
22416
    }
22417
 
22418
  }
22419
 
1245 chandransh 22420
  public static class updateNonDeliveryReason_args implements TBase<updateNonDeliveryReason_args._Fields>, java.io.Serializable, Cloneable   {
22421
    private static final TStruct STRUCT_DESC = new TStruct("updateNonDeliveryReason_args");
22422
 
22423
    private static final TField PROVIDER_ID_FIELD_DESC = new TField("providerId", TType.I64, (short)1);
22424
    private static final TField UNDELIVERED_ORDERS_FIELD_DESC = new TField("undeliveredOrders", TType.MAP, (short)2);
22425
 
22426
    private long providerId;
22427
    private Map<String,String> undeliveredOrders;
22428
 
22429
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
22430
    public enum _Fields implements TFieldIdEnum {
22431
      PROVIDER_ID((short)1, "providerId"),
22432
      UNDELIVERED_ORDERS((short)2, "undeliveredOrders");
22433
 
22434
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
22435
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
22436
 
22437
      static {
22438
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
22439
          byId.put((int)field._thriftId, field);
22440
          byName.put(field.getFieldName(), field);
22441
        }
22442
      }
22443
 
22444
      /**
22445
       * Find the _Fields constant that matches fieldId, or null if its not found.
22446
       */
22447
      public static _Fields findByThriftId(int fieldId) {
22448
        return byId.get(fieldId);
22449
      }
22450
 
22451
      /**
22452
       * Find the _Fields constant that matches fieldId, throwing an exception
22453
       * if it is not found.
22454
       */
22455
      public static _Fields findByThriftIdOrThrow(int fieldId) {
22456
        _Fields fields = findByThriftId(fieldId);
22457
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
22458
        return fields;
22459
      }
22460
 
22461
      /**
22462
       * Find the _Fields constant that matches name, or null if its not found.
22463
       */
22464
      public static _Fields findByName(String name) {
22465
        return byName.get(name);
22466
      }
22467
 
22468
      private final short _thriftId;
22469
      private final String _fieldName;
22470
 
22471
      _Fields(short thriftId, String fieldName) {
22472
        _thriftId = thriftId;
22473
        _fieldName = fieldName;
22474
      }
22475
 
22476
      public short getThriftFieldId() {
22477
        return _thriftId;
22478
      }
22479
 
22480
      public String getFieldName() {
22481
        return _fieldName;
22482
      }
22483
    }
22484
 
22485
    // isset id assignments
22486
    private static final int __PROVIDERID_ISSET_ID = 0;
22487
    private BitSet __isset_bit_vector = new BitSet(1);
22488
 
22489
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
22490
      put(_Fields.PROVIDER_ID, new FieldMetaData("providerId", TFieldRequirementType.DEFAULT, 
22491
          new FieldValueMetaData(TType.I64)));
22492
      put(_Fields.UNDELIVERED_ORDERS, new FieldMetaData("undeliveredOrders", TFieldRequirementType.DEFAULT, 
22493
          new MapMetaData(TType.MAP, 
22494
              new FieldValueMetaData(TType.STRING), 
22495
              new FieldValueMetaData(TType.STRING))));
22496
    }});
22497
 
22498
    static {
22499
      FieldMetaData.addStructMetaDataMap(updateNonDeliveryReason_args.class, metaDataMap);
22500
    }
22501
 
22502
    public updateNonDeliveryReason_args() {
22503
    }
22504
 
22505
    public updateNonDeliveryReason_args(
22506
      long providerId,
22507
      Map<String,String> undeliveredOrders)
22508
    {
22509
      this();
22510
      this.providerId = providerId;
22511
      setProviderIdIsSet(true);
22512
      this.undeliveredOrders = undeliveredOrders;
22513
    }
22514
 
22515
    /**
22516
     * Performs a deep copy on <i>other</i>.
22517
     */
22518
    public updateNonDeliveryReason_args(updateNonDeliveryReason_args other) {
22519
      __isset_bit_vector.clear();
22520
      __isset_bit_vector.or(other.__isset_bit_vector);
22521
      this.providerId = other.providerId;
22522
      if (other.isSetUndeliveredOrders()) {
22523
        Map<String,String> __this__undeliveredOrders = new HashMap<String,String>();
22524
        for (Map.Entry<String, String> other_element : other.undeliveredOrders.entrySet()) {
22525
 
22526
          String other_element_key = other_element.getKey();
22527
          String other_element_value = other_element.getValue();
22528
 
22529
          String __this__undeliveredOrders_copy_key = other_element_key;
22530
 
22531
          String __this__undeliveredOrders_copy_value = other_element_value;
22532
 
22533
          __this__undeliveredOrders.put(__this__undeliveredOrders_copy_key, __this__undeliveredOrders_copy_value);
22534
        }
22535
        this.undeliveredOrders = __this__undeliveredOrders;
22536
      }
22537
    }
22538
 
22539
    public updateNonDeliveryReason_args deepCopy() {
22540
      return new updateNonDeliveryReason_args(this);
22541
    }
22542
 
22543
    @Deprecated
22544
    public updateNonDeliveryReason_args clone() {
22545
      return new updateNonDeliveryReason_args(this);
22546
    }
22547
 
22548
    public long getProviderId() {
22549
      return this.providerId;
22550
    }
22551
 
22552
    public updateNonDeliveryReason_args setProviderId(long providerId) {
22553
      this.providerId = providerId;
22554
      setProviderIdIsSet(true);
22555
      return this;
22556
    }
22557
 
22558
    public void unsetProviderId() {
22559
      __isset_bit_vector.clear(__PROVIDERID_ISSET_ID);
22560
    }
22561
 
22562
    /** Returns true if field providerId is set (has been asigned a value) and false otherwise */
22563
    public boolean isSetProviderId() {
22564
      return __isset_bit_vector.get(__PROVIDERID_ISSET_ID);
22565
    }
22566
 
22567
    public void setProviderIdIsSet(boolean value) {
22568
      __isset_bit_vector.set(__PROVIDERID_ISSET_ID, value);
22569
    }
22570
 
22571
    public int getUndeliveredOrdersSize() {
22572
      return (this.undeliveredOrders == null) ? 0 : this.undeliveredOrders.size();
22573
    }
22574
 
22575
    public void putToUndeliveredOrders(String key, String val) {
22576
      if (this.undeliveredOrders == null) {
22577
        this.undeliveredOrders = new HashMap<String,String>();
22578
      }
22579
      this.undeliveredOrders.put(key, val);
22580
    }
22581
 
22582
    public Map<String,String> getUndeliveredOrders() {
22583
      return this.undeliveredOrders;
22584
    }
22585
 
22586
    public updateNonDeliveryReason_args setUndeliveredOrders(Map<String,String> undeliveredOrders) {
22587
      this.undeliveredOrders = undeliveredOrders;
22588
      return this;
22589
    }
22590
 
22591
    public void unsetUndeliveredOrders() {
22592
      this.undeliveredOrders = null;
22593
    }
22594
 
22595
    /** Returns true if field undeliveredOrders is set (has been asigned a value) and false otherwise */
22596
    public boolean isSetUndeliveredOrders() {
22597
      return this.undeliveredOrders != null;
22598
    }
22599
 
22600
    public void setUndeliveredOrdersIsSet(boolean value) {
22601
      if (!value) {
22602
        this.undeliveredOrders = null;
22603
      }
22604
    }
22605
 
22606
    public void setFieldValue(_Fields field, Object value) {
22607
      switch (field) {
22608
      case PROVIDER_ID:
22609
        if (value == null) {
22610
          unsetProviderId();
22611
        } else {
22612
          setProviderId((Long)value);
22613
        }
22614
        break;
22615
 
22616
      case UNDELIVERED_ORDERS:
22617
        if (value == null) {
22618
          unsetUndeliveredOrders();
22619
        } else {
22620
          setUndeliveredOrders((Map<String,String>)value);
22621
        }
22622
        break;
22623
 
22624
      }
22625
    }
22626
 
22627
    public void setFieldValue(int fieldID, Object value) {
22628
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
22629
    }
22630
 
22631
    public Object getFieldValue(_Fields field) {
22632
      switch (field) {
22633
      case PROVIDER_ID:
22634
        return new Long(getProviderId());
22635
 
22636
      case UNDELIVERED_ORDERS:
22637
        return getUndeliveredOrders();
22638
 
22639
      }
22640
      throw new IllegalStateException();
22641
    }
22642
 
22643
    public Object getFieldValue(int fieldId) {
22644
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
22645
    }
22646
 
22647
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
22648
    public boolean isSet(_Fields field) {
22649
      switch (field) {
22650
      case PROVIDER_ID:
22651
        return isSetProviderId();
22652
      case UNDELIVERED_ORDERS:
22653
        return isSetUndeliveredOrders();
22654
      }
22655
      throw new IllegalStateException();
22656
    }
22657
 
22658
    public boolean isSet(int fieldID) {
22659
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
22660
    }
22661
 
22662
    @Override
22663
    public boolean equals(Object that) {
22664
      if (that == null)
22665
        return false;
22666
      if (that instanceof updateNonDeliveryReason_args)
22667
        return this.equals((updateNonDeliveryReason_args)that);
22668
      return false;
22669
    }
22670
 
22671
    public boolean equals(updateNonDeliveryReason_args that) {
22672
      if (that == null)
22673
        return false;
22674
 
22675
      boolean this_present_providerId = true;
22676
      boolean that_present_providerId = true;
22677
      if (this_present_providerId || that_present_providerId) {
22678
        if (!(this_present_providerId && that_present_providerId))
22679
          return false;
22680
        if (this.providerId != that.providerId)
22681
          return false;
22682
      }
22683
 
22684
      boolean this_present_undeliveredOrders = true && this.isSetUndeliveredOrders();
22685
      boolean that_present_undeliveredOrders = true && that.isSetUndeliveredOrders();
22686
      if (this_present_undeliveredOrders || that_present_undeliveredOrders) {
22687
        if (!(this_present_undeliveredOrders && that_present_undeliveredOrders))
22688
          return false;
22689
        if (!this.undeliveredOrders.equals(that.undeliveredOrders))
22690
          return false;
22691
      }
22692
 
22693
      return true;
22694
    }
22695
 
22696
    @Override
22697
    public int hashCode() {
22698
      return 0;
22699
    }
22700
 
22701
    public void read(TProtocol iprot) throws TException {
22702
      TField field;
22703
      iprot.readStructBegin();
22704
      while (true)
22705
      {
22706
        field = iprot.readFieldBegin();
22707
        if (field.type == TType.STOP) { 
22708
          break;
22709
        }
22710
        _Fields fieldId = _Fields.findByThriftId(field.id);
22711
        if (fieldId == null) {
22712
          TProtocolUtil.skip(iprot, field.type);
22713
        } else {
22714
          switch (fieldId) {
22715
            case PROVIDER_ID:
22716
              if (field.type == TType.I64) {
22717
                this.providerId = iprot.readI64();
22718
                setProviderIdIsSet(true);
22719
              } else { 
22720
                TProtocolUtil.skip(iprot, field.type);
22721
              }
22722
              break;
22723
            case UNDELIVERED_ORDERS:
22724
              if (field.type == TType.MAP) {
22725
                {
1382 varun.gupt 22726
                  TMap _map67 = iprot.readMapBegin();
22727
                  this.undeliveredOrders = new HashMap<String,String>(2*_map67.size);
22728
                  for (int _i68 = 0; _i68 < _map67.size; ++_i68)
1245 chandransh 22729
                  {
1382 varun.gupt 22730
                    String _key69;
22731
                    String _val70;
22732
                    _key69 = iprot.readString();
22733
                    _val70 = iprot.readString();
22734
                    this.undeliveredOrders.put(_key69, _val70);
1245 chandransh 22735
                  }
22736
                  iprot.readMapEnd();
22737
                }
22738
              } else { 
22739
                TProtocolUtil.skip(iprot, field.type);
22740
              }
22741
              break;
22742
          }
22743
          iprot.readFieldEnd();
22744
        }
22745
      }
22746
      iprot.readStructEnd();
22747
      validate();
22748
    }
22749
 
22750
    public void write(TProtocol oprot) throws TException {
22751
      validate();
22752
 
22753
      oprot.writeStructBegin(STRUCT_DESC);
22754
      oprot.writeFieldBegin(PROVIDER_ID_FIELD_DESC);
22755
      oprot.writeI64(this.providerId);
22756
      oprot.writeFieldEnd();
22757
      if (this.undeliveredOrders != null) {
22758
        oprot.writeFieldBegin(UNDELIVERED_ORDERS_FIELD_DESC);
22759
        {
22760
          oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.undeliveredOrders.size()));
1382 varun.gupt 22761
          for (Map.Entry<String, String> _iter71 : this.undeliveredOrders.entrySet())
1245 chandransh 22762
          {
1382 varun.gupt 22763
            oprot.writeString(_iter71.getKey());
22764
            oprot.writeString(_iter71.getValue());
1245 chandransh 22765
          }
22766
          oprot.writeMapEnd();
22767
        }
22768
        oprot.writeFieldEnd();
22769
      }
22770
      oprot.writeFieldStop();
22771
      oprot.writeStructEnd();
22772
    }
22773
 
22774
    @Override
22775
    public String toString() {
22776
      StringBuilder sb = new StringBuilder("updateNonDeliveryReason_args(");
22777
      boolean first = true;
22778
 
22779
      sb.append("providerId:");
22780
      sb.append(this.providerId);
22781
      first = false;
22782
      if (!first) sb.append(", ");
22783
      sb.append("undeliveredOrders:");
22784
      if (this.undeliveredOrders == null) {
22785
        sb.append("null");
22786
      } else {
22787
        sb.append(this.undeliveredOrders);
22788
      }
22789
      first = false;
22790
      sb.append(")");
22791
      return sb.toString();
22792
    }
22793
 
22794
    public void validate() throws TException {
22795
      // check for required fields
22796
    }
22797
 
22798
  }
22799
 
22800
  public static class updateNonDeliveryReason_result implements TBase<updateNonDeliveryReason_result._Fields>, java.io.Serializable, Cloneable, Comparable<updateNonDeliveryReason_result>   {
22801
    private static final TStruct STRUCT_DESC = new TStruct("updateNonDeliveryReason_result");
22802
 
22803
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
22804
 
22805
    private TransactionServiceException ex;
22806
 
22807
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
22808
    public enum _Fields implements TFieldIdEnum {
22809
      EX((short)1, "ex");
22810
 
22811
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
22812
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
22813
 
22814
      static {
22815
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
22816
          byId.put((int)field._thriftId, field);
22817
          byName.put(field.getFieldName(), field);
22818
        }
22819
      }
22820
 
22821
      /**
22822
       * Find the _Fields constant that matches fieldId, or null if its not found.
22823
       */
22824
      public static _Fields findByThriftId(int fieldId) {
22825
        return byId.get(fieldId);
22826
      }
22827
 
22828
      /**
22829
       * Find the _Fields constant that matches fieldId, throwing an exception
22830
       * if it is not found.
22831
       */
22832
      public static _Fields findByThriftIdOrThrow(int fieldId) {
22833
        _Fields fields = findByThriftId(fieldId);
22834
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
22835
        return fields;
22836
      }
22837
 
22838
      /**
22839
       * Find the _Fields constant that matches name, or null if its not found.
22840
       */
22841
      public static _Fields findByName(String name) {
22842
        return byName.get(name);
22843
      }
22844
 
22845
      private final short _thriftId;
22846
      private final String _fieldName;
22847
 
22848
      _Fields(short thriftId, String fieldName) {
22849
        _thriftId = thriftId;
22850
        _fieldName = fieldName;
22851
      }
22852
 
22853
      public short getThriftFieldId() {
22854
        return _thriftId;
22855
      }
22856
 
22857
      public String getFieldName() {
22858
        return _fieldName;
22859
      }
22860
    }
22861
 
22862
    // isset id assignments
22863
 
22864
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
22865
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
22866
          new FieldValueMetaData(TType.STRUCT)));
22867
    }});
22868
 
22869
    static {
22870
      FieldMetaData.addStructMetaDataMap(updateNonDeliveryReason_result.class, metaDataMap);
22871
    }
22872
 
22873
    public updateNonDeliveryReason_result() {
22874
    }
22875
 
22876
    public updateNonDeliveryReason_result(
22877
      TransactionServiceException ex)
22878
    {
22879
      this();
22880
      this.ex = ex;
22881
    }
22882
 
22883
    /**
22884
     * Performs a deep copy on <i>other</i>.
22885
     */
22886
    public updateNonDeliveryReason_result(updateNonDeliveryReason_result other) {
22887
      if (other.isSetEx()) {
22888
        this.ex = new TransactionServiceException(other.ex);
22889
      }
22890
    }
22891
 
22892
    public updateNonDeliveryReason_result deepCopy() {
22893
      return new updateNonDeliveryReason_result(this);
22894
    }
22895
 
22896
    @Deprecated
22897
    public updateNonDeliveryReason_result clone() {
22898
      return new updateNonDeliveryReason_result(this);
22899
    }
22900
 
22901
    public TransactionServiceException getEx() {
22902
      return this.ex;
22903
    }
22904
 
22905
    public updateNonDeliveryReason_result setEx(TransactionServiceException ex) {
22906
      this.ex = ex;
22907
      return this;
22908
    }
22909
 
22910
    public void unsetEx() {
22911
      this.ex = null;
22912
    }
22913
 
22914
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
22915
    public boolean isSetEx() {
22916
      return this.ex != null;
22917
    }
22918
 
22919
    public void setExIsSet(boolean value) {
22920
      if (!value) {
22921
        this.ex = null;
22922
      }
22923
    }
22924
 
22925
    public void setFieldValue(_Fields field, Object value) {
22926
      switch (field) {
22927
      case EX:
22928
        if (value == null) {
22929
          unsetEx();
22930
        } else {
22931
          setEx((TransactionServiceException)value);
22932
        }
22933
        break;
22934
 
22935
      }
22936
    }
22937
 
22938
    public void setFieldValue(int fieldID, Object value) {
22939
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
22940
    }
22941
 
22942
    public Object getFieldValue(_Fields field) {
22943
      switch (field) {
22944
      case EX:
22945
        return getEx();
22946
 
22947
      }
22948
      throw new IllegalStateException();
22949
    }
22950
 
22951
    public Object getFieldValue(int fieldId) {
22952
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
22953
    }
22954
 
22955
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
22956
    public boolean isSet(_Fields field) {
22957
      switch (field) {
22958
      case EX:
22959
        return isSetEx();
22960
      }
22961
      throw new IllegalStateException();
22962
    }
22963
 
22964
    public boolean isSet(int fieldID) {
22965
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
22966
    }
22967
 
22968
    @Override
22969
    public boolean equals(Object that) {
22970
      if (that == null)
22971
        return false;
22972
      if (that instanceof updateNonDeliveryReason_result)
22973
        return this.equals((updateNonDeliveryReason_result)that);
22974
      return false;
22975
    }
22976
 
22977
    public boolean equals(updateNonDeliveryReason_result that) {
22978
      if (that == null)
22979
        return false;
22980
 
22981
      boolean this_present_ex = true && this.isSetEx();
22982
      boolean that_present_ex = true && that.isSetEx();
22983
      if (this_present_ex || that_present_ex) {
22984
        if (!(this_present_ex && that_present_ex))
22985
          return false;
22986
        if (!this.ex.equals(that.ex))
22987
          return false;
22988
      }
22989
 
22990
      return true;
22991
    }
22992
 
22993
    @Override
22994
    public int hashCode() {
22995
      return 0;
22996
    }
22997
 
22998
    public int compareTo(updateNonDeliveryReason_result other) {
22999
      if (!getClass().equals(other.getClass())) {
23000
        return getClass().getName().compareTo(other.getClass().getName());
23001
      }
23002
 
23003
      int lastComparison = 0;
23004
      updateNonDeliveryReason_result typedOther = (updateNonDeliveryReason_result)other;
23005
 
23006
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
23007
      if (lastComparison != 0) {
23008
        return lastComparison;
23009
      }
23010
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
23011
      if (lastComparison != 0) {
23012
        return lastComparison;
23013
      }
23014
      return 0;
23015
    }
23016
 
23017
    public void read(TProtocol iprot) throws TException {
23018
      TField field;
23019
      iprot.readStructBegin();
23020
      while (true)
23021
      {
23022
        field = iprot.readFieldBegin();
23023
        if (field.type == TType.STOP) { 
23024
          break;
23025
        }
23026
        _Fields fieldId = _Fields.findByThriftId(field.id);
23027
        if (fieldId == null) {
23028
          TProtocolUtil.skip(iprot, field.type);
23029
        } else {
23030
          switch (fieldId) {
23031
            case EX:
23032
              if (field.type == TType.STRUCT) {
23033
                this.ex = new TransactionServiceException();
23034
                this.ex.read(iprot);
23035
              } else { 
23036
                TProtocolUtil.skip(iprot, field.type);
23037
              }
23038
              break;
23039
          }
23040
          iprot.readFieldEnd();
23041
        }
23042
      }
23043
      iprot.readStructEnd();
23044
      validate();
23045
    }
23046
 
23047
    public void write(TProtocol oprot) throws TException {
23048
      oprot.writeStructBegin(STRUCT_DESC);
23049
 
23050
      if (this.isSetEx()) {
23051
        oprot.writeFieldBegin(EX_FIELD_DESC);
23052
        this.ex.write(oprot);
23053
        oprot.writeFieldEnd();
23054
      }
23055
      oprot.writeFieldStop();
23056
      oprot.writeStructEnd();
23057
    }
23058
 
23059
    @Override
23060
    public String toString() {
23061
      StringBuilder sb = new StringBuilder("updateNonDeliveryReason_result(");
23062
      boolean first = true;
23063
 
23064
      sb.append("ex:");
23065
      if (this.ex == null) {
23066
        sb.append("null");
23067
      } else {
23068
        sb.append(this.ex);
23069
      }
23070
      first = false;
23071
      sb.append(")");
23072
      return sb.toString();
23073
    }
23074
 
23075
    public void validate() throws TException {
23076
      // check for required fields
23077
    }
23078
 
23079
  }
23080
 
305 ashish 23081
  public static class getAlerts_args implements TBase<getAlerts_args._Fields>, java.io.Serializable, Cloneable, Comparable<getAlerts_args>   {
23082
    private static final TStruct STRUCT_DESC = new TStruct("getAlerts_args");
23083
 
483 rajveer 23084
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
305 ashish 23085
    private static final TField VALID_FIELD_DESC = new TField("valid", TType.BOOL, (short)2);
23086
 
483 rajveer 23087
    private long orderId;
305 ashish 23088
    private boolean valid;
23089
 
23090
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
23091
    public enum _Fields implements TFieldIdEnum {
483 rajveer 23092
      ORDER_ID((short)1, "orderId"),
305 ashish 23093
      VALID((short)2, "valid");
23094
 
23095
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
23096
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
23097
 
23098
      static {
23099
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
23100
          byId.put((int)field._thriftId, field);
23101
          byName.put(field.getFieldName(), field);
23102
        }
23103
      }
23104
 
23105
      /**
23106
       * Find the _Fields constant that matches fieldId, or null if its not found.
23107
       */
23108
      public static _Fields findByThriftId(int fieldId) {
23109
        return byId.get(fieldId);
23110
      }
23111
 
23112
      /**
23113
       * Find the _Fields constant that matches fieldId, throwing an exception
23114
       * if it is not found.
23115
       */
23116
      public static _Fields findByThriftIdOrThrow(int fieldId) {
23117
        _Fields fields = findByThriftId(fieldId);
23118
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
23119
        return fields;
23120
      }
23121
 
23122
      /**
23123
       * Find the _Fields constant that matches name, or null if its not found.
23124
       */
23125
      public static _Fields findByName(String name) {
23126
        return byName.get(name);
23127
      }
23128
 
23129
      private final short _thriftId;
23130
      private final String _fieldName;
23131
 
23132
      _Fields(short thriftId, String fieldName) {
23133
        _thriftId = thriftId;
23134
        _fieldName = fieldName;
23135
      }
23136
 
23137
      public short getThriftFieldId() {
23138
        return _thriftId;
23139
      }
23140
 
23141
      public String getFieldName() {
23142
        return _fieldName;
23143
      }
23144
    }
23145
 
23146
    // isset id assignments
483 rajveer 23147
    private static final int __ORDERID_ISSET_ID = 0;
305 ashish 23148
    private static final int __VALID_ISSET_ID = 1;
23149
    private BitSet __isset_bit_vector = new BitSet(2);
23150
 
23151
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 23152
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
305 ashish 23153
          new FieldValueMetaData(TType.I64)));
23154
      put(_Fields.VALID, new FieldMetaData("valid", TFieldRequirementType.DEFAULT, 
23155
          new FieldValueMetaData(TType.BOOL)));
23156
    }});
23157
 
23158
    static {
23159
      FieldMetaData.addStructMetaDataMap(getAlerts_args.class, metaDataMap);
23160
    }
23161
 
23162
    public getAlerts_args() {
23163
    }
23164
 
23165
    public getAlerts_args(
483 rajveer 23166
      long orderId,
305 ashish 23167
      boolean valid)
23168
    {
23169
      this();
483 rajveer 23170
      this.orderId = orderId;
23171
      setOrderIdIsSet(true);
305 ashish 23172
      this.valid = valid;
23173
      setValidIsSet(true);
23174
    }
23175
 
23176
    /**
23177
     * Performs a deep copy on <i>other</i>.
23178
     */
23179
    public getAlerts_args(getAlerts_args other) {
23180
      __isset_bit_vector.clear();
23181
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 23182
      this.orderId = other.orderId;
305 ashish 23183
      this.valid = other.valid;
23184
    }
23185
 
23186
    public getAlerts_args deepCopy() {
23187
      return new getAlerts_args(this);
23188
    }
23189
 
23190
    @Deprecated
23191
    public getAlerts_args clone() {
23192
      return new getAlerts_args(this);
23193
    }
23194
 
483 rajveer 23195
    public long getOrderId() {
23196
      return this.orderId;
305 ashish 23197
    }
23198
 
483 rajveer 23199
    public getAlerts_args setOrderId(long orderId) {
23200
      this.orderId = orderId;
23201
      setOrderIdIsSet(true);
305 ashish 23202
      return this;
23203
    }
23204
 
483 rajveer 23205
    public void unsetOrderId() {
23206
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
305 ashish 23207
    }
23208
 
483 rajveer 23209
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
23210
    public boolean isSetOrderId() {
23211
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
305 ashish 23212
    }
23213
 
483 rajveer 23214
    public void setOrderIdIsSet(boolean value) {
23215
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
305 ashish 23216
    }
23217
 
23218
    public boolean isValid() {
23219
      return this.valid;
23220
    }
23221
 
23222
    public getAlerts_args setValid(boolean valid) {
23223
      this.valid = valid;
23224
      setValidIsSet(true);
23225
      return this;
23226
    }
23227
 
23228
    public void unsetValid() {
23229
      __isset_bit_vector.clear(__VALID_ISSET_ID);
23230
    }
23231
 
23232
    /** Returns true if field valid is set (has been asigned a value) and false otherwise */
23233
    public boolean isSetValid() {
23234
      return __isset_bit_vector.get(__VALID_ISSET_ID);
23235
    }
23236
 
23237
    public void setValidIsSet(boolean value) {
23238
      __isset_bit_vector.set(__VALID_ISSET_ID, value);
23239
    }
23240
 
23241
    public void setFieldValue(_Fields field, Object value) {
23242
      switch (field) {
483 rajveer 23243
      case ORDER_ID:
305 ashish 23244
        if (value == null) {
483 rajveer 23245
          unsetOrderId();
305 ashish 23246
        } else {
483 rajveer 23247
          setOrderId((Long)value);
305 ashish 23248
        }
23249
        break;
23250
 
23251
      case VALID:
23252
        if (value == null) {
23253
          unsetValid();
23254
        } else {
23255
          setValid((Boolean)value);
23256
        }
23257
        break;
23258
 
23259
      }
23260
    }
23261
 
23262
    public void setFieldValue(int fieldID, Object value) {
23263
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
23264
    }
23265
 
23266
    public Object getFieldValue(_Fields field) {
23267
      switch (field) {
483 rajveer 23268
      case ORDER_ID:
23269
        return new Long(getOrderId());
305 ashish 23270
 
23271
      case VALID:
23272
        return new Boolean(isValid());
23273
 
23274
      }
23275
      throw new IllegalStateException();
23276
    }
23277
 
23278
    public Object getFieldValue(int fieldId) {
23279
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
23280
    }
23281
 
23282
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
23283
    public boolean isSet(_Fields field) {
23284
      switch (field) {
483 rajveer 23285
      case ORDER_ID:
23286
        return isSetOrderId();
305 ashish 23287
      case VALID:
23288
        return isSetValid();
23289
      }
23290
      throw new IllegalStateException();
23291
    }
23292
 
23293
    public boolean isSet(int fieldID) {
23294
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
23295
    }
23296
 
23297
    @Override
23298
    public boolean equals(Object that) {
23299
      if (that == null)
23300
        return false;
23301
      if (that instanceof getAlerts_args)
23302
        return this.equals((getAlerts_args)that);
23303
      return false;
23304
    }
23305
 
23306
    public boolean equals(getAlerts_args that) {
23307
      if (that == null)
23308
        return false;
23309
 
483 rajveer 23310
      boolean this_present_orderId = true;
23311
      boolean that_present_orderId = true;
23312
      if (this_present_orderId || that_present_orderId) {
23313
        if (!(this_present_orderId && that_present_orderId))
305 ashish 23314
          return false;
483 rajveer 23315
        if (this.orderId != that.orderId)
305 ashish 23316
          return false;
23317
      }
23318
 
23319
      boolean this_present_valid = true;
23320
      boolean that_present_valid = true;
23321
      if (this_present_valid || that_present_valid) {
23322
        if (!(this_present_valid && that_present_valid))
23323
          return false;
23324
        if (this.valid != that.valid)
23325
          return false;
23326
      }
23327
 
23328
      return true;
23329
    }
23330
 
23331
    @Override
23332
    public int hashCode() {
23333
      return 0;
23334
    }
23335
 
23336
    public int compareTo(getAlerts_args other) {
23337
      if (!getClass().equals(other.getClass())) {
23338
        return getClass().getName().compareTo(other.getClass().getName());
23339
      }
23340
 
23341
      int lastComparison = 0;
23342
      getAlerts_args typedOther = (getAlerts_args)other;
23343
 
483 rajveer 23344
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
305 ashish 23345
      if (lastComparison != 0) {
23346
        return lastComparison;
23347
      }
483 rajveer 23348
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
305 ashish 23349
      if (lastComparison != 0) {
23350
        return lastComparison;
23351
      }
23352
      lastComparison = Boolean.valueOf(isSetValid()).compareTo(isSetValid());
23353
      if (lastComparison != 0) {
23354
        return lastComparison;
23355
      }
23356
      lastComparison = TBaseHelper.compareTo(valid, typedOther.valid);
23357
      if (lastComparison != 0) {
23358
        return lastComparison;
23359
      }
23360
      return 0;
23361
    }
23362
 
23363
    public void read(TProtocol iprot) throws TException {
23364
      TField field;
23365
      iprot.readStructBegin();
23366
      while (true)
23367
      {
23368
        field = iprot.readFieldBegin();
23369
        if (field.type == TType.STOP) { 
23370
          break;
23371
        }
23372
        _Fields fieldId = _Fields.findByThriftId(field.id);
23373
        if (fieldId == null) {
23374
          TProtocolUtil.skip(iprot, field.type);
23375
        } else {
23376
          switch (fieldId) {
483 rajveer 23377
            case ORDER_ID:
305 ashish 23378
              if (field.type == TType.I64) {
483 rajveer 23379
                this.orderId = iprot.readI64();
23380
                setOrderIdIsSet(true);
305 ashish 23381
              } else { 
23382
                TProtocolUtil.skip(iprot, field.type);
23383
              }
23384
              break;
23385
            case VALID:
23386
              if (field.type == TType.BOOL) {
23387
                this.valid = iprot.readBool();
23388
                setValidIsSet(true);
23389
              } else { 
23390
                TProtocolUtil.skip(iprot, field.type);
23391
              }
23392
              break;
23393
          }
23394
          iprot.readFieldEnd();
23395
        }
23396
      }
23397
      iprot.readStructEnd();
23398
      validate();
23399
    }
23400
 
23401
    public void write(TProtocol oprot) throws TException {
23402
      validate();
23403
 
23404
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 23405
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
23406
      oprot.writeI64(this.orderId);
305 ashish 23407
      oprot.writeFieldEnd();
23408
      oprot.writeFieldBegin(VALID_FIELD_DESC);
23409
      oprot.writeBool(this.valid);
23410
      oprot.writeFieldEnd();
23411
      oprot.writeFieldStop();
23412
      oprot.writeStructEnd();
23413
    }
23414
 
23415
    @Override
23416
    public String toString() {
23417
      StringBuilder sb = new StringBuilder("getAlerts_args(");
23418
      boolean first = true;
23419
 
483 rajveer 23420
      sb.append("orderId:");
23421
      sb.append(this.orderId);
305 ashish 23422
      first = false;
23423
      if (!first) sb.append(", ");
23424
      sb.append("valid:");
23425
      sb.append(this.valid);
23426
      first = false;
23427
      sb.append(")");
23428
      return sb.toString();
23429
    }
23430
 
23431
    public void validate() throws TException {
23432
      // check for required fields
23433
    }
23434
 
23435
  }
23436
 
23437
  public static class getAlerts_result implements TBase<getAlerts_result._Fields>, java.io.Serializable, Cloneable, Comparable<getAlerts_result>   {
23438
    private static final TStruct STRUCT_DESC = new TStruct("getAlerts_result");
23439
 
23440
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
23441
 
23442
    private List<Alert> success;
23443
 
23444
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
23445
    public enum _Fields implements TFieldIdEnum {
23446
      SUCCESS((short)0, "success");
23447
 
23448
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
23449
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
23450
 
23451
      static {
23452
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
23453
          byId.put((int)field._thriftId, field);
23454
          byName.put(field.getFieldName(), field);
23455
        }
23456
      }
23457
 
23458
      /**
23459
       * Find the _Fields constant that matches fieldId, or null if its not found.
23460
       */
23461
      public static _Fields findByThriftId(int fieldId) {
23462
        return byId.get(fieldId);
23463
      }
23464
 
23465
      /**
23466
       * Find the _Fields constant that matches fieldId, throwing an exception
23467
       * if it is not found.
23468
       */
23469
      public static _Fields findByThriftIdOrThrow(int fieldId) {
23470
        _Fields fields = findByThriftId(fieldId);
23471
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
23472
        return fields;
23473
      }
23474
 
23475
      /**
23476
       * Find the _Fields constant that matches name, or null if its not found.
23477
       */
23478
      public static _Fields findByName(String name) {
23479
        return byName.get(name);
23480
      }
23481
 
23482
      private final short _thriftId;
23483
      private final String _fieldName;
23484
 
23485
      _Fields(short thriftId, String fieldName) {
23486
        _thriftId = thriftId;
23487
        _fieldName = fieldName;
23488
      }
23489
 
23490
      public short getThriftFieldId() {
23491
        return _thriftId;
23492
      }
23493
 
23494
      public String getFieldName() {
23495
        return _fieldName;
23496
      }
23497
    }
23498
 
23499
    // isset id assignments
23500
 
23501
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
23502
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
23503
          new ListMetaData(TType.LIST, 
23504
              new StructMetaData(TType.STRUCT, Alert.class))));
23505
    }});
23506
 
23507
    static {
23508
      FieldMetaData.addStructMetaDataMap(getAlerts_result.class, metaDataMap);
23509
    }
23510
 
23511
    public getAlerts_result() {
23512
    }
23513
 
23514
    public getAlerts_result(
23515
      List<Alert> success)
23516
    {
23517
      this();
23518
      this.success = success;
23519
    }
23520
 
23521
    /**
23522
     * Performs a deep copy on <i>other</i>.
23523
     */
23524
    public getAlerts_result(getAlerts_result other) {
23525
      if (other.isSetSuccess()) {
23526
        List<Alert> __this__success = new ArrayList<Alert>();
23527
        for (Alert other_element : other.success) {
23528
          __this__success.add(new Alert(other_element));
23529
        }
23530
        this.success = __this__success;
23531
      }
23532
    }
23533
 
23534
    public getAlerts_result deepCopy() {
23535
      return new getAlerts_result(this);
23536
    }
23537
 
23538
    @Deprecated
23539
    public getAlerts_result clone() {
23540
      return new getAlerts_result(this);
23541
    }
23542
 
23543
    public int getSuccessSize() {
23544
      return (this.success == null) ? 0 : this.success.size();
23545
    }
23546
 
23547
    public java.util.Iterator<Alert> getSuccessIterator() {
23548
      return (this.success == null) ? null : this.success.iterator();
23549
    }
23550
 
23551
    public void addToSuccess(Alert elem) {
23552
      if (this.success == null) {
23553
        this.success = new ArrayList<Alert>();
23554
      }
23555
      this.success.add(elem);
23556
    }
23557
 
23558
    public List<Alert> getSuccess() {
23559
      return this.success;
23560
    }
23561
 
23562
    public getAlerts_result setSuccess(List<Alert> success) {
23563
      this.success = success;
23564
      return this;
23565
    }
23566
 
23567
    public void unsetSuccess() {
23568
      this.success = null;
23569
    }
23570
 
23571
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
23572
    public boolean isSetSuccess() {
23573
      return this.success != null;
23574
    }
23575
 
23576
    public void setSuccessIsSet(boolean value) {
23577
      if (!value) {
23578
        this.success = null;
23579
      }
23580
    }
23581
 
23582
    public void setFieldValue(_Fields field, Object value) {
23583
      switch (field) {
23584
      case SUCCESS:
23585
        if (value == null) {
23586
          unsetSuccess();
23587
        } else {
23588
          setSuccess((List<Alert>)value);
23589
        }
23590
        break;
23591
 
23592
      }
23593
    }
23594
 
23595
    public void setFieldValue(int fieldID, Object value) {
23596
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
23597
    }
23598
 
23599
    public Object getFieldValue(_Fields field) {
23600
      switch (field) {
23601
      case SUCCESS:
23602
        return getSuccess();
23603
 
23604
      }
23605
      throw new IllegalStateException();
23606
    }
23607
 
23608
    public Object getFieldValue(int fieldId) {
23609
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
23610
    }
23611
 
23612
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
23613
    public boolean isSet(_Fields field) {
23614
      switch (field) {
23615
      case SUCCESS:
23616
        return isSetSuccess();
23617
      }
23618
      throw new IllegalStateException();
23619
    }
23620
 
23621
    public boolean isSet(int fieldID) {
23622
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
23623
    }
23624
 
23625
    @Override
23626
    public boolean equals(Object that) {
23627
      if (that == null)
23628
        return false;
23629
      if (that instanceof getAlerts_result)
23630
        return this.equals((getAlerts_result)that);
23631
      return false;
23632
    }
23633
 
23634
    public boolean equals(getAlerts_result that) {
23635
      if (that == null)
23636
        return false;
23637
 
23638
      boolean this_present_success = true && this.isSetSuccess();
23639
      boolean that_present_success = true && that.isSetSuccess();
23640
      if (this_present_success || that_present_success) {
23641
        if (!(this_present_success && that_present_success))
23642
          return false;
23643
        if (!this.success.equals(that.success))
23644
          return false;
23645
      }
23646
 
23647
      return true;
23648
    }
23649
 
23650
    @Override
23651
    public int hashCode() {
23652
      return 0;
23653
    }
23654
 
23655
    public int compareTo(getAlerts_result other) {
23656
      if (!getClass().equals(other.getClass())) {
23657
        return getClass().getName().compareTo(other.getClass().getName());
23658
      }
23659
 
23660
      int lastComparison = 0;
23661
      getAlerts_result typedOther = (getAlerts_result)other;
23662
 
23663
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
23664
      if (lastComparison != 0) {
23665
        return lastComparison;
23666
      }
23667
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
23668
      if (lastComparison != 0) {
23669
        return lastComparison;
23670
      }
23671
      return 0;
23672
    }
23673
 
23674
    public void read(TProtocol iprot) throws TException {
23675
      TField field;
23676
      iprot.readStructBegin();
23677
      while (true)
23678
      {
23679
        field = iprot.readFieldBegin();
23680
        if (field.type == TType.STOP) { 
23681
          break;
23682
        }
23683
        _Fields fieldId = _Fields.findByThriftId(field.id);
23684
        if (fieldId == null) {
23685
          TProtocolUtil.skip(iprot, field.type);
23686
        } else {
23687
          switch (fieldId) {
23688
            case SUCCESS:
23689
              if (field.type == TType.LIST) {
23690
                {
1382 varun.gupt 23691
                  TList _list72 = iprot.readListBegin();
23692
                  this.success = new ArrayList<Alert>(_list72.size);
23693
                  for (int _i73 = 0; _i73 < _list72.size; ++_i73)
305 ashish 23694
                  {
1382 varun.gupt 23695
                    Alert _elem74;
23696
                    _elem74 = new Alert();
23697
                    _elem74.read(iprot);
23698
                    this.success.add(_elem74);
305 ashish 23699
                  }
23700
                  iprot.readListEnd();
23701
                }
23702
              } else { 
23703
                TProtocolUtil.skip(iprot, field.type);
23704
              }
23705
              break;
23706
          }
23707
          iprot.readFieldEnd();
23708
        }
23709
      }
23710
      iprot.readStructEnd();
23711
      validate();
23712
    }
23713
 
23714
    public void write(TProtocol oprot) throws TException {
23715
      oprot.writeStructBegin(STRUCT_DESC);
23716
 
23717
      if (this.isSetSuccess()) {
23718
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
23719
        {
23720
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
1382 varun.gupt 23721
          for (Alert _iter75 : this.success)
305 ashish 23722
          {
1382 varun.gupt 23723
            _iter75.write(oprot);
305 ashish 23724
          }
23725
          oprot.writeListEnd();
23726
        }
23727
        oprot.writeFieldEnd();
23728
      }
23729
      oprot.writeFieldStop();
23730
      oprot.writeStructEnd();
23731
    }
23732
 
23733
    @Override
23734
    public String toString() {
23735
      StringBuilder sb = new StringBuilder("getAlerts_result(");
23736
      boolean first = true;
23737
 
23738
      sb.append("success:");
23739
      if (this.success == null) {
23740
        sb.append("null");
23741
      } else {
23742
        sb.append(this.success);
23743
      }
23744
      first = false;
23745
      sb.append(")");
23746
      return sb.toString();
23747
    }
23748
 
23749
    public void validate() throws TException {
23750
      // check for required fields
23751
    }
23752
 
23753
  }
23754
 
23755
  public static class setAlert_args implements TBase<setAlert_args._Fields>, java.io.Serializable, Cloneable, Comparable<setAlert_args>   {
23756
    private static final TStruct STRUCT_DESC = new TStruct("setAlert_args");
23757
 
483 rajveer 23758
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
305 ashish 23759
    private static final TField UNSET_FIELD_DESC = new TField("unset", TType.BOOL, (short)2);
23760
    private static final TField TYPE_FIELD_DESC = new TField("type", TType.I64, (short)3);
23761
    private static final TField COMMENT_FIELD_DESC = new TField("comment", TType.STRING, (short)4);
23762
 
483 rajveer 23763
    private long orderId;
305 ashish 23764
    private boolean unset;
23765
    private long type;
23766
    private String comment;
23767
 
23768
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
23769
    public enum _Fields implements TFieldIdEnum {
483 rajveer 23770
      ORDER_ID((short)1, "orderId"),
305 ashish 23771
      UNSET((short)2, "unset"),
23772
      TYPE((short)3, "type"),
23773
      COMMENT((short)4, "comment");
23774
 
23775
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
23776
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
23777
 
23778
      static {
23779
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
23780
          byId.put((int)field._thriftId, field);
23781
          byName.put(field.getFieldName(), field);
23782
        }
23783
      }
23784
 
23785
      /**
23786
       * Find the _Fields constant that matches fieldId, or null if its not found.
23787
       */
23788
      public static _Fields findByThriftId(int fieldId) {
23789
        return byId.get(fieldId);
23790
      }
23791
 
23792
      /**
23793
       * Find the _Fields constant that matches fieldId, throwing an exception
23794
       * if it is not found.
23795
       */
23796
      public static _Fields findByThriftIdOrThrow(int fieldId) {
23797
        _Fields fields = findByThriftId(fieldId);
23798
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
23799
        return fields;
23800
      }
23801
 
23802
      /**
23803
       * Find the _Fields constant that matches name, or null if its not found.
23804
       */
23805
      public static _Fields findByName(String name) {
23806
        return byName.get(name);
23807
      }
23808
 
23809
      private final short _thriftId;
23810
      private final String _fieldName;
23811
 
23812
      _Fields(short thriftId, String fieldName) {
23813
        _thriftId = thriftId;
23814
        _fieldName = fieldName;
23815
      }
23816
 
23817
      public short getThriftFieldId() {
23818
        return _thriftId;
23819
      }
23820
 
23821
      public String getFieldName() {
23822
        return _fieldName;
23823
      }
23824
    }
23825
 
23826
    // isset id assignments
483 rajveer 23827
    private static final int __ORDERID_ISSET_ID = 0;
305 ashish 23828
    private static final int __UNSET_ISSET_ID = 1;
23829
    private static final int __TYPE_ISSET_ID = 2;
23830
    private BitSet __isset_bit_vector = new BitSet(3);
23831
 
23832
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 23833
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
305 ashish 23834
          new FieldValueMetaData(TType.I64)));
23835
      put(_Fields.UNSET, new FieldMetaData("unset", TFieldRequirementType.DEFAULT, 
23836
          new FieldValueMetaData(TType.BOOL)));
23837
      put(_Fields.TYPE, new FieldMetaData("type", TFieldRequirementType.DEFAULT, 
23838
          new FieldValueMetaData(TType.I64)));
23839
      put(_Fields.COMMENT, new FieldMetaData("comment", TFieldRequirementType.DEFAULT, 
23840
          new FieldValueMetaData(TType.STRING)));
23841
    }});
23842
 
23843
    static {
23844
      FieldMetaData.addStructMetaDataMap(setAlert_args.class, metaDataMap);
23845
    }
23846
 
23847
    public setAlert_args() {
23848
    }
23849
 
23850
    public setAlert_args(
483 rajveer 23851
      long orderId,
305 ashish 23852
      boolean unset,
23853
      long type,
23854
      String comment)
23855
    {
23856
      this();
483 rajveer 23857
      this.orderId = orderId;
23858
      setOrderIdIsSet(true);
305 ashish 23859
      this.unset = unset;
23860
      setUnsetIsSet(true);
23861
      this.type = type;
23862
      setTypeIsSet(true);
23863
      this.comment = comment;
23864
    }
23865
 
23866
    /**
23867
     * Performs a deep copy on <i>other</i>.
23868
     */
23869
    public setAlert_args(setAlert_args other) {
23870
      __isset_bit_vector.clear();
23871
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 23872
      this.orderId = other.orderId;
305 ashish 23873
      this.unset = other.unset;
23874
      this.type = other.type;
23875
      if (other.isSetComment()) {
23876
        this.comment = other.comment;
23877
      }
23878
    }
23879
 
23880
    public setAlert_args deepCopy() {
23881
      return new setAlert_args(this);
23882
    }
23883
 
23884
    @Deprecated
23885
    public setAlert_args clone() {
23886
      return new setAlert_args(this);
23887
    }
23888
 
483 rajveer 23889
    public long getOrderId() {
23890
      return this.orderId;
305 ashish 23891
    }
23892
 
483 rajveer 23893
    public setAlert_args setOrderId(long orderId) {
23894
      this.orderId = orderId;
23895
      setOrderIdIsSet(true);
305 ashish 23896
      return this;
23897
    }
23898
 
483 rajveer 23899
    public void unsetOrderId() {
23900
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
305 ashish 23901
    }
23902
 
483 rajveer 23903
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
23904
    public boolean isSetOrderId() {
23905
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
305 ashish 23906
    }
23907
 
483 rajveer 23908
    public void setOrderIdIsSet(boolean value) {
23909
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
305 ashish 23910
    }
23911
 
23912
    public boolean isUnset() {
23913
      return this.unset;
23914
    }
23915
 
23916
    public setAlert_args setUnset(boolean unset) {
23917
      this.unset = unset;
23918
      setUnsetIsSet(true);
23919
      return this;
23920
    }
23921
 
23922
    public void unsetUnset() {
23923
      __isset_bit_vector.clear(__UNSET_ISSET_ID);
23924
    }
23925
 
23926
    /** Returns true if field unset is set (has been asigned a value) and false otherwise */
23927
    public boolean isSetUnset() {
23928
      return __isset_bit_vector.get(__UNSET_ISSET_ID);
23929
    }
23930
 
23931
    public void setUnsetIsSet(boolean value) {
23932
      __isset_bit_vector.set(__UNSET_ISSET_ID, value);
23933
    }
23934
 
23935
    public long getType() {
23936
      return this.type;
23937
    }
23938
 
23939
    public setAlert_args setType(long type) {
23940
      this.type = type;
23941
      setTypeIsSet(true);
23942
      return this;
23943
    }
23944
 
23945
    public void unsetType() {
23946
      __isset_bit_vector.clear(__TYPE_ISSET_ID);
23947
    }
23948
 
23949
    /** Returns true if field type is set (has been asigned a value) and false otherwise */
23950
    public boolean isSetType() {
23951
      return __isset_bit_vector.get(__TYPE_ISSET_ID);
23952
    }
23953
 
23954
    public void setTypeIsSet(boolean value) {
23955
      __isset_bit_vector.set(__TYPE_ISSET_ID, value);
23956
    }
23957
 
23958
    public String getComment() {
23959
      return this.comment;
23960
    }
23961
 
23962
    public setAlert_args setComment(String comment) {
23963
      this.comment = comment;
23964
      return this;
23965
    }
23966
 
23967
    public void unsetComment() {
23968
      this.comment = null;
23969
    }
23970
 
23971
    /** Returns true if field comment is set (has been asigned a value) and false otherwise */
23972
    public boolean isSetComment() {
23973
      return this.comment != null;
23974
    }
23975
 
23976
    public void setCommentIsSet(boolean value) {
23977
      if (!value) {
23978
        this.comment = null;
23979
      }
23980
    }
23981
 
23982
    public void setFieldValue(_Fields field, Object value) {
23983
      switch (field) {
483 rajveer 23984
      case ORDER_ID:
305 ashish 23985
        if (value == null) {
483 rajveer 23986
          unsetOrderId();
305 ashish 23987
        } else {
483 rajveer 23988
          setOrderId((Long)value);
305 ashish 23989
        }
23990
        break;
23991
 
23992
      case UNSET:
23993
        if (value == null) {
23994
          unsetUnset();
23995
        } else {
23996
          setUnset((Boolean)value);
23997
        }
23998
        break;
23999
 
24000
      case TYPE:
24001
        if (value == null) {
24002
          unsetType();
24003
        } else {
24004
          setType((Long)value);
24005
        }
24006
        break;
24007
 
24008
      case COMMENT:
24009
        if (value == null) {
24010
          unsetComment();
24011
        } else {
24012
          setComment((String)value);
24013
        }
24014
        break;
24015
 
24016
      }
24017
    }
24018
 
24019
    public void setFieldValue(int fieldID, Object value) {
24020
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
24021
    }
24022
 
24023
    public Object getFieldValue(_Fields field) {
24024
      switch (field) {
483 rajveer 24025
      case ORDER_ID:
24026
        return new Long(getOrderId());
305 ashish 24027
 
24028
      case UNSET:
24029
        return new Boolean(isUnset());
24030
 
24031
      case TYPE:
24032
        return new Long(getType());
24033
 
24034
      case COMMENT:
24035
        return getComment();
24036
 
24037
      }
24038
      throw new IllegalStateException();
24039
    }
24040
 
24041
    public Object getFieldValue(int fieldId) {
24042
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
24043
    }
24044
 
24045
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
24046
    public boolean isSet(_Fields field) {
24047
      switch (field) {
483 rajveer 24048
      case ORDER_ID:
24049
        return isSetOrderId();
305 ashish 24050
      case UNSET:
24051
        return isSetUnset();
24052
      case TYPE:
24053
        return isSetType();
24054
      case COMMENT:
24055
        return isSetComment();
24056
      }
24057
      throw new IllegalStateException();
24058
    }
24059
 
24060
    public boolean isSet(int fieldID) {
24061
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
24062
    }
24063
 
24064
    @Override
24065
    public boolean equals(Object that) {
24066
      if (that == null)
24067
        return false;
24068
      if (that instanceof setAlert_args)
24069
        return this.equals((setAlert_args)that);
24070
      return false;
24071
    }
24072
 
24073
    public boolean equals(setAlert_args that) {
24074
      if (that == null)
24075
        return false;
24076
 
483 rajveer 24077
      boolean this_present_orderId = true;
24078
      boolean that_present_orderId = true;
24079
      if (this_present_orderId || that_present_orderId) {
24080
        if (!(this_present_orderId && that_present_orderId))
305 ashish 24081
          return false;
483 rajveer 24082
        if (this.orderId != that.orderId)
305 ashish 24083
          return false;
24084
      }
24085
 
24086
      boolean this_present_unset = true;
24087
      boolean that_present_unset = true;
24088
      if (this_present_unset || that_present_unset) {
24089
        if (!(this_present_unset && that_present_unset))
24090
          return false;
24091
        if (this.unset != that.unset)
24092
          return false;
24093
      }
24094
 
24095
      boolean this_present_type = true;
24096
      boolean that_present_type = true;
24097
      if (this_present_type || that_present_type) {
24098
        if (!(this_present_type && that_present_type))
24099
          return false;
24100
        if (this.type != that.type)
24101
          return false;
24102
      }
24103
 
24104
      boolean this_present_comment = true && this.isSetComment();
24105
      boolean that_present_comment = true && that.isSetComment();
24106
      if (this_present_comment || that_present_comment) {
24107
        if (!(this_present_comment && that_present_comment))
24108
          return false;
24109
        if (!this.comment.equals(that.comment))
24110
          return false;
24111
      }
24112
 
24113
      return true;
24114
    }
24115
 
24116
    @Override
24117
    public int hashCode() {
24118
      return 0;
24119
    }
24120
 
24121
    public int compareTo(setAlert_args other) {
24122
      if (!getClass().equals(other.getClass())) {
24123
        return getClass().getName().compareTo(other.getClass().getName());
24124
      }
24125
 
24126
      int lastComparison = 0;
24127
      setAlert_args typedOther = (setAlert_args)other;
24128
 
483 rajveer 24129
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
305 ashish 24130
      if (lastComparison != 0) {
24131
        return lastComparison;
24132
      }
483 rajveer 24133
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
305 ashish 24134
      if (lastComparison != 0) {
24135
        return lastComparison;
24136
      }
24137
      lastComparison = Boolean.valueOf(isSetUnset()).compareTo(isSetUnset());
24138
      if (lastComparison != 0) {
24139
        return lastComparison;
24140
      }
24141
      lastComparison = TBaseHelper.compareTo(unset, typedOther.unset);
24142
      if (lastComparison != 0) {
24143
        return lastComparison;
24144
      }
24145
      lastComparison = Boolean.valueOf(isSetType()).compareTo(isSetType());
24146
      if (lastComparison != 0) {
24147
        return lastComparison;
24148
      }
24149
      lastComparison = TBaseHelper.compareTo(type, typedOther.type);
24150
      if (lastComparison != 0) {
24151
        return lastComparison;
24152
      }
24153
      lastComparison = Boolean.valueOf(isSetComment()).compareTo(isSetComment());
24154
      if (lastComparison != 0) {
24155
        return lastComparison;
24156
      }
24157
      lastComparison = TBaseHelper.compareTo(comment, typedOther.comment);
24158
      if (lastComparison != 0) {
24159
        return lastComparison;
24160
      }
24161
      return 0;
24162
    }
24163
 
24164
    public void read(TProtocol iprot) throws TException {
24165
      TField field;
24166
      iprot.readStructBegin();
24167
      while (true)
24168
      {
24169
        field = iprot.readFieldBegin();
24170
        if (field.type == TType.STOP) { 
24171
          break;
24172
        }
24173
        _Fields fieldId = _Fields.findByThriftId(field.id);
24174
        if (fieldId == null) {
24175
          TProtocolUtil.skip(iprot, field.type);
24176
        } else {
24177
          switch (fieldId) {
483 rajveer 24178
            case ORDER_ID:
305 ashish 24179
              if (field.type == TType.I64) {
483 rajveer 24180
                this.orderId = iprot.readI64();
24181
                setOrderIdIsSet(true);
305 ashish 24182
              } else { 
24183
                TProtocolUtil.skip(iprot, field.type);
24184
              }
24185
              break;
24186
            case UNSET:
24187
              if (field.type == TType.BOOL) {
24188
                this.unset = iprot.readBool();
24189
                setUnsetIsSet(true);
24190
              } else { 
24191
                TProtocolUtil.skip(iprot, field.type);
24192
              }
24193
              break;
24194
            case TYPE:
24195
              if (field.type == TType.I64) {
24196
                this.type = iprot.readI64();
24197
                setTypeIsSet(true);
24198
              } else { 
24199
                TProtocolUtil.skip(iprot, field.type);
24200
              }
24201
              break;
24202
            case COMMENT:
24203
              if (field.type == TType.STRING) {
24204
                this.comment = iprot.readString();
24205
              } else { 
24206
                TProtocolUtil.skip(iprot, field.type);
24207
              }
24208
              break;
24209
          }
24210
          iprot.readFieldEnd();
24211
        }
24212
      }
24213
      iprot.readStructEnd();
24214
      validate();
24215
    }
24216
 
24217
    public void write(TProtocol oprot) throws TException {
24218
      validate();
24219
 
24220
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 24221
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
24222
      oprot.writeI64(this.orderId);
305 ashish 24223
      oprot.writeFieldEnd();
24224
      oprot.writeFieldBegin(UNSET_FIELD_DESC);
24225
      oprot.writeBool(this.unset);
24226
      oprot.writeFieldEnd();
24227
      oprot.writeFieldBegin(TYPE_FIELD_DESC);
24228
      oprot.writeI64(this.type);
24229
      oprot.writeFieldEnd();
24230
      if (this.comment != null) {
24231
        oprot.writeFieldBegin(COMMENT_FIELD_DESC);
24232
        oprot.writeString(this.comment);
24233
        oprot.writeFieldEnd();
24234
      }
24235
      oprot.writeFieldStop();
24236
      oprot.writeStructEnd();
24237
    }
24238
 
24239
    @Override
24240
    public String toString() {
24241
      StringBuilder sb = new StringBuilder("setAlert_args(");
24242
      boolean first = true;
24243
 
483 rajveer 24244
      sb.append("orderId:");
24245
      sb.append(this.orderId);
305 ashish 24246
      first = false;
24247
      if (!first) sb.append(", ");
24248
      sb.append("unset:");
24249
      sb.append(this.unset);
24250
      first = false;
24251
      if (!first) sb.append(", ");
24252
      sb.append("type:");
24253
      sb.append(this.type);
24254
      first = false;
24255
      if (!first) sb.append(", ");
24256
      sb.append("comment:");
24257
      if (this.comment == null) {
24258
        sb.append("null");
24259
      } else {
24260
        sb.append(this.comment);
24261
      }
24262
      first = false;
24263
      sb.append(")");
24264
      return sb.toString();
24265
    }
24266
 
24267
    public void validate() throws TException {
24268
      // check for required fields
24269
    }
24270
 
24271
  }
24272
 
24273
  public static class setAlert_result implements TBase<setAlert_result._Fields>, java.io.Serializable, Cloneable, Comparable<setAlert_result>   {
24274
    private static final TStruct STRUCT_DESC = new TStruct("setAlert_result");
24275
 
24276
 
24277
 
24278
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
24279
    public enum _Fields implements TFieldIdEnum {
24280
;
24281
 
24282
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
24283
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
24284
 
24285
      static {
24286
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
24287
          byId.put((int)field._thriftId, field);
24288
          byName.put(field.getFieldName(), field);
24289
        }
24290
      }
24291
 
24292
      /**
24293
       * Find the _Fields constant that matches fieldId, or null if its not found.
24294
       */
24295
      public static _Fields findByThriftId(int fieldId) {
24296
        return byId.get(fieldId);
24297
      }
24298
 
24299
      /**
24300
       * Find the _Fields constant that matches fieldId, throwing an exception
24301
       * if it is not found.
24302
       */
24303
      public static _Fields findByThriftIdOrThrow(int fieldId) {
24304
        _Fields fields = findByThriftId(fieldId);
24305
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
24306
        return fields;
24307
      }
24308
 
24309
      /**
24310
       * Find the _Fields constant that matches name, or null if its not found.
24311
       */
24312
      public static _Fields findByName(String name) {
24313
        return byName.get(name);
24314
      }
24315
 
24316
      private final short _thriftId;
24317
      private final String _fieldName;
24318
 
24319
      _Fields(short thriftId, String fieldName) {
24320
        _thriftId = thriftId;
24321
        _fieldName = fieldName;
24322
      }
24323
 
24324
      public short getThriftFieldId() {
24325
        return _thriftId;
24326
      }
24327
 
24328
      public String getFieldName() {
24329
        return _fieldName;
24330
      }
24331
    }
24332
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
24333
    }});
24334
 
24335
    static {
24336
      FieldMetaData.addStructMetaDataMap(setAlert_result.class, metaDataMap);
24337
    }
24338
 
24339
    public setAlert_result() {
24340
    }
24341
 
24342
    /**
24343
     * Performs a deep copy on <i>other</i>.
24344
     */
24345
    public setAlert_result(setAlert_result other) {
24346
    }
24347
 
24348
    public setAlert_result deepCopy() {
24349
      return new setAlert_result(this);
24350
    }
24351
 
24352
    @Deprecated
24353
    public setAlert_result clone() {
24354
      return new setAlert_result(this);
24355
    }
24356
 
24357
    public void setFieldValue(_Fields field, Object value) {
24358
      switch (field) {
24359
      }
24360
    }
24361
 
24362
    public void setFieldValue(int fieldID, Object value) {
24363
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
24364
    }
24365
 
24366
    public Object getFieldValue(_Fields field) {
24367
      switch (field) {
24368
      }
24369
      throw new IllegalStateException();
24370
    }
24371
 
24372
    public Object getFieldValue(int fieldId) {
24373
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
24374
    }
24375
 
24376
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
24377
    public boolean isSet(_Fields field) {
24378
      switch (field) {
24379
      }
24380
      throw new IllegalStateException();
24381
    }
24382
 
24383
    public boolean isSet(int fieldID) {
24384
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
24385
    }
24386
 
24387
    @Override
24388
    public boolean equals(Object that) {
24389
      if (that == null)
24390
        return false;
24391
      if (that instanceof setAlert_result)
24392
        return this.equals((setAlert_result)that);
24393
      return false;
24394
    }
24395
 
24396
    public boolean equals(setAlert_result that) {
24397
      if (that == null)
24398
        return false;
24399
 
24400
      return true;
24401
    }
24402
 
24403
    @Override
24404
    public int hashCode() {
24405
      return 0;
24406
    }
24407
 
24408
    public int compareTo(setAlert_result other) {
24409
      if (!getClass().equals(other.getClass())) {
24410
        return getClass().getName().compareTo(other.getClass().getName());
24411
      }
24412
 
24413
      int lastComparison = 0;
24414
      setAlert_result typedOther = (setAlert_result)other;
24415
 
24416
      return 0;
24417
    }
24418
 
24419
    public void read(TProtocol iprot) throws TException {
24420
      TField field;
24421
      iprot.readStructBegin();
24422
      while (true)
24423
      {
24424
        field = iprot.readFieldBegin();
24425
        if (field.type == TType.STOP) { 
24426
          break;
24427
        }
24428
        _Fields fieldId = _Fields.findByThriftId(field.id);
24429
        if (fieldId == null) {
24430
          TProtocolUtil.skip(iprot, field.type);
24431
        } else {
24432
          switch (fieldId) {
24433
          }
24434
          iprot.readFieldEnd();
24435
        }
24436
      }
24437
      iprot.readStructEnd();
24438
      validate();
24439
    }
24440
 
24441
    public void write(TProtocol oprot) throws TException {
24442
      oprot.writeStructBegin(STRUCT_DESC);
24443
 
24444
      oprot.writeFieldStop();
24445
      oprot.writeStructEnd();
24446
    }
24447
 
24448
    @Override
24449
    public String toString() {
24450
      StringBuilder sb = new StringBuilder("setAlert_result(");
24451
      boolean first = true;
24452
 
24453
      sb.append(")");
24454
      return sb.toString();
24455
    }
24456
 
24457
    public void validate() throws TException {
24458
      // check for required fields
24459
    }
24460
 
24461
  }
24462
 
68 ashish 24463
}