Subversion Repositories SmartDukaan

Rev

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

Rev Author Line No. Line
68 ashish 1
/**
2
 * Autogenerated by Thrift
3
 *
4
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
 */
6
package in.shop2020.model.v1.order;
7
 
8
import java.util.List;
9
import java.util.ArrayList;
10
import java.util.Map;
11
import java.util.HashMap;
12
import java.util.EnumMap;
13
import java.util.Set;
14
import java.util.HashSet;
15
import java.util.EnumSet;
16
import java.util.Collections;
17
import java.util.BitSet;
18
import java.util.Arrays;
19
import org.slf4j.Logger;
20
import org.slf4j.LoggerFactory;
21
 
22
import org.apache.thrift.*;
23
import org.apache.thrift.meta_data.*;
24
import org.apache.thrift.protocol.*;
25
 
26
public class TransactionService {
27
 
28
  public interface Iface {
29
 
764 rajveer 30
    /**
31
     * For closing the open session in sqlalchemy
32
     */
33
    public void closeSession() throws TException;
34
 
132 ashish 35
    public long createTransaction(Transaction transaction) throws TransactionServiceException, TException;
68 ashish 36
 
37
    public Transaction getTransaction(long id) throws TransactionServiceException, TException;
38
 
132 ashish 39
    public List<Transaction> getTransactionsForCustomer(long customerId, long from_date, long to_date, TransactionStatus status) throws TransactionServiceException, TException;
68 ashish 40
 
132 ashish 41
    public List<Transaction> getTransactionsForShoppingCartId(long shoppingCartId) throws TransactionServiceException, TException;
42
 
68 ashish 43
    public TransactionStatus getTransactionStatus(long transactionId) throws TransactionServiceException, TException;
44
 
45
    public boolean changeTransactionStatus(long transactionId, TransactionStatus status, String description) throws TransactionServiceException, TException;
46
 
483 rajveer 47
    public List<Order> getAllOrders(OrderStatus status, long from_date, long to_date, long warehouse_id) throws TransactionServiceException, TException;
68 ashish 48
 
1133 chandransh 49
    /**
50
     * Returns orders within a range of their billing dates
51
     * 
52
     * @param status
53
     * @param start_billing_date
54
     * @param end_billing_date
55
     * @param warehouse_id
56
     */
1022 varun.gupt 57
    public List<Order> getOrdersByBillingDate(OrderStatus status, long start_billing_date, long end_billing_date, long warehouse_id) throws TransactionServiceException, TException;
58
 
483 rajveer 59
    public boolean changeOrderStatus(long orderId, OrderStatus status, String description) throws TransactionServiceException, TException;
68 ashish 60
 
1148 chandransh 61
    /**
62
     * Add billing details such as the bill number and the biller to the Order.
63
     * 
64
     * @param orderId
65
     * @param invoice_number
66
     * @param billed_by
67
     */
68
    public boolean addBillingDetails(long orderId, String invoice_number, String billed_by) throws TransactionServiceException, TException;
495 rajveer 69
 
1148 chandransh 70
    /**
71
     * Adds jacket number to the order. Return false if it doesn't find the order with the given ID.
72
     * 
73
     * @param orderId
74
     * @param jacketNumber
75
     */
76
    public boolean addJacketNumber(long orderId, long jacketNumber) throws TransactionServiceException, TException;
77
 
923 rajveer 78
    public boolean acceptOrder(long orderId) throws TransactionServiceException, TException;
79
 
80
    public boolean billOrder(long orderId) throws TransactionServiceException, TException;
81
 
483 rajveer 82
    public List<Order> getOrdersForTransaction(long transactionId) throws TransactionServiceException, TException;
68 ashish 83
 
483 rajveer 84
    public List<Order> getOrdersForCustomer(long customerId, long from_date, long to_date, OrderStatus status) throws TransactionServiceException, TException;
68 ashish 85
 
483 rajveer 86
    public long createOrder(Order order) throws TransactionServiceException, TException;
68 ashish 87
 
483 rajveer 88
    public Order getOrder(long id) throws TransactionServiceException, TException;
68 ashish 89
 
483 rajveer 90
    public List<LineItem> getLineItemsForOrder(long orderId) throws TransactionServiceException, TException;
68 ashish 91
 
758 chandransh 92
    /**
1221 chandransh 93
     * Create a batch of all the pending orders for the given warehouse.
94
     * The returned list is orderd by created_timestamp.
95
     * If there are no pending orders, an empty list is returned.
96
     * 
97
     * @param warehouseId
98
     */
99
    public List<Order> batchOrders(long warehouseId) throws TransactionServiceException, TException;
100
 
101
    /**
1209 chandransh 102
     * Mark the given order as out of stock. Throws an exception if the order with the given Id couldn't be found.
103
     * 
104
     * @param orderId
105
     */
106
    public boolean markOrderAsOutOfStock(long orderId) throws TransactionServiceException, TException;
107
 
108
    /**
758 chandransh 109
     * Marks all BILLED orders for a warehouse and a provider as SHIPPED_FROM_WH
110
     * 
111
     * @param warehouseId
112
     * @param providerId
113
     */
114
    public boolean markOrdersAsManifested(long warehouseId, long providerId) throws TransactionServiceException, TException;
115
 
1114 chandransh 116
    /**
117
     * Marks all SHIPPED_FROM_WH orders of the previous day for a provider as SHIPPED_TO_LOGISTICS.
118
     * Returns a list of orders that were shipped from warehouse but did not appear in the pick-up report.
119
     * Raises an exception if we encounter report for an AWB number that we did not ship.
120
     * 
121
     * @param providerId
122
     * @param pickupDetails
123
     */
1245 chandransh 124
    public List<Order> markOrdersAsPickedUp(long providerId, Map<String,String> pickupDetails) throws TransactionServiceException, TException;
1114 chandransh 125
 
1133 chandransh 126
    /**
127
     * Marks all orders with AWBs in the given map as delivered. Also sets the delivery timestamp and
128
     * the name of the receiver.
129
     * Raises an exception if we encounter report for an AWB number that we did not ship.
130
     * 
131
     * @param providerId
132
     * @param deliveredOrders
133
     */
134
    public void markOrdersAsDelivered(long providerId, Map<String,String> deliveredOrders) throws TransactionServiceException, TException;
135
 
136
    /**
137
     * Mark all orders with AWBs in the given map as failed. Also sets the delivery timestamp.
138
     * Raises an exception if we encounter report for an AWB number that we did not ship.
139
     * 
140
     * @param providerId
141
     * @param returnedOrders
142
     */
143
    public void markOrdersAsFailed(long providerId, Map<String,String> returnedOrders) throws TransactionServiceException, TException;
144
 
1245 chandransh 145
    /**
146
     * Update the status description of orders whose AWB numbers are keys of the Map.
147
     * 
148
     * @param providerId
149
     * @param undeliveredOrders
150
     */
151
    public void updateNonDeliveryReason(long providerId, Map<String,String> undeliveredOrders) throws TransactionServiceException, TException;
152
 
483 rajveer 153
    public List<Alert> getAlerts(long orderId, boolean valid) throws TException;
68 ashish 154
 
483 rajveer 155
    public void setAlert(long orderId, boolean unset, long type, String comment) throws TException;
68 ashish 156
 
157
  }
158
 
159
  public static class Client implements Iface {
160
    public Client(TProtocol prot)
161
    {
162
      this(prot, prot);
163
    }
164
 
165
    public Client(TProtocol iprot, TProtocol oprot)
166
    {
167
      iprot_ = iprot;
168
      oprot_ = oprot;
169
    }
170
 
171
    protected TProtocol iprot_;
172
    protected TProtocol oprot_;
173
 
174
    protected int seqid_;
175
 
176
    public TProtocol getInputProtocol()
177
    {
178
      return this.iprot_;
179
    }
180
 
181
    public TProtocol getOutputProtocol()
182
    {
183
      return this.oprot_;
184
    }
185
 
764 rajveer 186
    public void closeSession() throws TException
187
    {
188
      send_closeSession();
189
      recv_closeSession();
190
    }
191
 
192
    public void send_closeSession() throws TException
193
    {
194
      oprot_.writeMessageBegin(new TMessage("closeSession", TMessageType.CALL, seqid_));
195
      closeSession_args args = new closeSession_args();
196
      args.write(oprot_);
197
      oprot_.writeMessageEnd();
198
      oprot_.getTransport().flush();
199
    }
200
 
201
    public void recv_closeSession() throws TException
202
    {
203
      TMessage msg = iprot_.readMessageBegin();
204
      if (msg.type == TMessageType.EXCEPTION) {
205
        TApplicationException x = TApplicationException.read(iprot_);
206
        iprot_.readMessageEnd();
207
        throw x;
208
      }
209
      closeSession_result result = new closeSession_result();
210
      result.read(iprot_);
211
      iprot_.readMessageEnd();
212
      return;
213
    }
214
 
132 ashish 215
    public long createTransaction(Transaction transaction) throws TransactionServiceException, TException
68 ashish 216
    {
217
      send_createTransaction(transaction);
132 ashish 218
      return recv_createTransaction();
68 ashish 219
    }
220
 
221
    public void send_createTransaction(Transaction transaction) throws TException
222
    {
223
      oprot_.writeMessageBegin(new TMessage("createTransaction", TMessageType.CALL, seqid_));
224
      createTransaction_args args = new createTransaction_args();
225
      args.transaction = transaction;
226
      args.write(oprot_);
227
      oprot_.writeMessageEnd();
228
      oprot_.getTransport().flush();
229
    }
230
 
132 ashish 231
    public long recv_createTransaction() throws TransactionServiceException, TException
68 ashish 232
    {
233
      TMessage msg = iprot_.readMessageBegin();
234
      if (msg.type == TMessageType.EXCEPTION) {
235
        TApplicationException x = TApplicationException.read(iprot_);
236
        iprot_.readMessageEnd();
237
        throw x;
238
      }
239
      createTransaction_result result = new createTransaction_result();
240
      result.read(iprot_);
241
      iprot_.readMessageEnd();
132 ashish 242
      if (result.isSetSuccess()) {
243
        return result.success;
244
      }
68 ashish 245
      if (result.ex != null) {
246
        throw result.ex;
247
      }
132 ashish 248
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "createTransaction failed: unknown result");
68 ashish 249
    }
250
 
251
    public Transaction getTransaction(long id) throws TransactionServiceException, TException
252
    {
253
      send_getTransaction(id);
254
      return recv_getTransaction();
255
    }
256
 
257
    public void send_getTransaction(long id) throws TException
258
    {
259
      oprot_.writeMessageBegin(new TMessage("getTransaction", TMessageType.CALL, seqid_));
260
      getTransaction_args args = new getTransaction_args();
261
      args.id = id;
262
      args.write(oprot_);
263
      oprot_.writeMessageEnd();
264
      oprot_.getTransport().flush();
265
    }
266
 
267
    public Transaction recv_getTransaction() throws TransactionServiceException, TException
268
    {
269
      TMessage msg = iprot_.readMessageBegin();
270
      if (msg.type == TMessageType.EXCEPTION) {
271
        TApplicationException x = TApplicationException.read(iprot_);
272
        iprot_.readMessageEnd();
273
        throw x;
274
      }
275
      getTransaction_result result = new getTransaction_result();
276
      result.read(iprot_);
277
      iprot_.readMessageEnd();
278
      if (result.isSetSuccess()) {
279
        return result.success;
280
      }
281
      if (result.ex != null) {
282
        throw result.ex;
283
      }
284
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getTransaction failed: unknown result");
285
    }
286
 
132 ashish 287
    public List<Transaction> getTransactionsForCustomer(long customerId, long from_date, long to_date, TransactionStatus status) throws TransactionServiceException, TException
68 ashish 288
    {
132 ashish 289
      send_getTransactionsForCustomer(customerId, from_date, to_date, status);
68 ashish 290
      return recv_getTransactionsForCustomer();
291
    }
292
 
132 ashish 293
    public void send_getTransactionsForCustomer(long customerId, long from_date, long to_date, TransactionStatus status) throws TException
68 ashish 294
    {
295
      oprot_.writeMessageBegin(new TMessage("getTransactionsForCustomer", TMessageType.CALL, seqid_));
296
      getTransactionsForCustomer_args args = new getTransactionsForCustomer_args();
297
      args.customerId = customerId;
132 ashish 298
      args.from_date = from_date;
299
      args.to_date = to_date;
68 ashish 300
      args.status = status;
301
      args.write(oprot_);
302
      oprot_.writeMessageEnd();
303
      oprot_.getTransport().flush();
304
    }
305
 
306
    public List<Transaction> recv_getTransactionsForCustomer() throws TransactionServiceException, TException
307
    {
308
      TMessage msg = iprot_.readMessageBegin();
309
      if (msg.type == TMessageType.EXCEPTION) {
310
        TApplicationException x = TApplicationException.read(iprot_);
311
        iprot_.readMessageEnd();
312
        throw x;
313
      }
314
      getTransactionsForCustomer_result result = new getTransactionsForCustomer_result();
315
      result.read(iprot_);
316
      iprot_.readMessageEnd();
317
      if (result.isSetSuccess()) {
318
        return result.success;
319
      }
320
      if (result.ex != null) {
321
        throw result.ex;
322
      }
323
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getTransactionsForCustomer failed: unknown result");
324
    }
325
 
132 ashish 326
    public List<Transaction> getTransactionsForShoppingCartId(long shoppingCartId) throws TransactionServiceException, TException
327
    {
328
      send_getTransactionsForShoppingCartId(shoppingCartId);
329
      return recv_getTransactionsForShoppingCartId();
330
    }
331
 
332
    public void send_getTransactionsForShoppingCartId(long shoppingCartId) throws TException
333
    {
334
      oprot_.writeMessageBegin(new TMessage("getTransactionsForShoppingCartId", TMessageType.CALL, seqid_));
335
      getTransactionsForShoppingCartId_args args = new getTransactionsForShoppingCartId_args();
336
      args.shoppingCartId = shoppingCartId;
337
      args.write(oprot_);
338
      oprot_.writeMessageEnd();
339
      oprot_.getTransport().flush();
340
    }
341
 
342
    public List<Transaction> recv_getTransactionsForShoppingCartId() throws TransactionServiceException, TException
343
    {
344
      TMessage msg = iprot_.readMessageBegin();
345
      if (msg.type == TMessageType.EXCEPTION) {
346
        TApplicationException x = TApplicationException.read(iprot_);
347
        iprot_.readMessageEnd();
348
        throw x;
349
      }
350
      getTransactionsForShoppingCartId_result result = new getTransactionsForShoppingCartId_result();
351
      result.read(iprot_);
352
      iprot_.readMessageEnd();
353
      if (result.isSetSuccess()) {
354
        return result.success;
355
      }
356
      if (result.ex != null) {
357
        throw result.ex;
358
      }
359
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getTransactionsForShoppingCartId failed: unknown result");
360
    }
361
 
68 ashish 362
    public TransactionStatus getTransactionStatus(long transactionId) throws TransactionServiceException, TException
363
    {
364
      send_getTransactionStatus(transactionId);
365
      return recv_getTransactionStatus();
366
    }
367
 
368
    public void send_getTransactionStatus(long transactionId) throws TException
369
    {
370
      oprot_.writeMessageBegin(new TMessage("getTransactionStatus", TMessageType.CALL, seqid_));
371
      getTransactionStatus_args args = new getTransactionStatus_args();
372
      args.transactionId = transactionId;
373
      args.write(oprot_);
374
      oprot_.writeMessageEnd();
375
      oprot_.getTransport().flush();
376
    }
377
 
378
    public TransactionStatus recv_getTransactionStatus() throws TransactionServiceException, TException
379
    {
380
      TMessage msg = iprot_.readMessageBegin();
381
      if (msg.type == TMessageType.EXCEPTION) {
382
        TApplicationException x = TApplicationException.read(iprot_);
383
        iprot_.readMessageEnd();
384
        throw x;
385
      }
386
      getTransactionStatus_result result = new getTransactionStatus_result();
387
      result.read(iprot_);
388
      iprot_.readMessageEnd();
389
      if (result.isSetSuccess()) {
390
        return result.success;
391
      }
392
      if (result.ex != null) {
393
        throw result.ex;
394
      }
395
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getTransactionStatus failed: unknown result");
396
    }
397
 
398
    public boolean changeTransactionStatus(long transactionId, TransactionStatus status, String description) throws TransactionServiceException, TException
399
    {
400
      send_changeTransactionStatus(transactionId, status, description);
401
      return recv_changeTransactionStatus();
402
    }
403
 
404
    public void send_changeTransactionStatus(long transactionId, TransactionStatus status, String description) throws TException
405
    {
406
      oprot_.writeMessageBegin(new TMessage("changeTransactionStatus", TMessageType.CALL, seqid_));
407
      changeTransactionStatus_args args = new changeTransactionStatus_args();
408
      args.transactionId = transactionId;
409
      args.status = status;
410
      args.description = description;
411
      args.write(oprot_);
412
      oprot_.writeMessageEnd();
413
      oprot_.getTransport().flush();
414
    }
415
 
416
    public boolean recv_changeTransactionStatus() throws TransactionServiceException, TException
417
    {
418
      TMessage msg = iprot_.readMessageBegin();
419
      if (msg.type == TMessageType.EXCEPTION) {
420
        TApplicationException x = TApplicationException.read(iprot_);
421
        iprot_.readMessageEnd();
422
        throw x;
423
      }
424
      changeTransactionStatus_result result = new changeTransactionStatus_result();
425
      result.read(iprot_);
426
      iprot_.readMessageEnd();
427
      if (result.isSetSuccess()) {
428
        return result.success;
429
      }
430
      if (result.ex != null) {
431
        throw result.ex;
432
      }
433
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "changeTransactionStatus failed: unknown result");
434
    }
435
 
483 rajveer 436
    public List<Order> getAllOrders(OrderStatus status, long from_date, long to_date, long warehouse_id) throws TransactionServiceException, TException
68 ashish 437
    {
483 rajveer 438
      send_getAllOrders(status, from_date, to_date, warehouse_id);
439
      return recv_getAllOrders();
68 ashish 440
    }
441
 
483 rajveer 442
    public void send_getAllOrders(OrderStatus status, long from_date, long to_date, long warehouse_id) throws TException
68 ashish 443
    {
483 rajveer 444
      oprot_.writeMessageBegin(new TMessage("getAllOrders", TMessageType.CALL, seqid_));
445
      getAllOrders_args args = new getAllOrders_args();
446
      args.status = status;
447
      args.from_date = from_date;
448
      args.to_date = to_date;
449
      args.warehouse_id = warehouse_id;
68 ashish 450
      args.write(oprot_);
451
      oprot_.writeMessageEnd();
452
      oprot_.getTransport().flush();
453
    }
454
 
483 rajveer 455
    public List<Order> recv_getAllOrders() throws TransactionServiceException, TException
68 ashish 456
    {
457
      TMessage msg = iprot_.readMessageBegin();
458
      if (msg.type == TMessageType.EXCEPTION) {
459
        TApplicationException x = TApplicationException.read(iprot_);
460
        iprot_.readMessageEnd();
461
        throw x;
462
      }
483 rajveer 463
      getAllOrders_result result = new getAllOrders_result();
68 ashish 464
      result.read(iprot_);
465
      iprot_.readMessageEnd();
466
      if (result.isSetSuccess()) {
467
        return result.success;
468
      }
469
      if (result.ex != null) {
470
        throw result.ex;
471
      }
483 rajveer 472
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getAllOrders failed: unknown result");
68 ashish 473
    }
474
 
1022 varun.gupt 475
    public List<Order> getOrdersByBillingDate(OrderStatus status, long start_billing_date, long end_billing_date, long warehouse_id) throws TransactionServiceException, TException
476
    {
477
      send_getOrdersByBillingDate(status, start_billing_date, end_billing_date, warehouse_id);
478
      return recv_getOrdersByBillingDate();
479
    }
480
 
481
    public void send_getOrdersByBillingDate(OrderStatus status, long start_billing_date, long end_billing_date, long warehouse_id) throws TException
482
    {
483
      oprot_.writeMessageBegin(new TMessage("getOrdersByBillingDate", TMessageType.CALL, seqid_));
484
      getOrdersByBillingDate_args args = new getOrdersByBillingDate_args();
485
      args.status = status;
486
      args.start_billing_date = start_billing_date;
487
      args.end_billing_date = end_billing_date;
488
      args.warehouse_id = warehouse_id;
489
      args.write(oprot_);
490
      oprot_.writeMessageEnd();
491
      oprot_.getTransport().flush();
492
    }
493
 
494
    public List<Order> recv_getOrdersByBillingDate() throws TransactionServiceException, TException
495
    {
496
      TMessage msg = iprot_.readMessageBegin();
497
      if (msg.type == TMessageType.EXCEPTION) {
498
        TApplicationException x = TApplicationException.read(iprot_);
499
        iprot_.readMessageEnd();
500
        throw x;
501
      }
502
      getOrdersByBillingDate_result result = new getOrdersByBillingDate_result();
503
      result.read(iprot_);
504
      iprot_.readMessageEnd();
505
      if (result.isSetSuccess()) {
506
        return result.success;
507
      }
508
      if (result.ex != null) {
509
        throw result.ex;
510
      }
511
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getOrdersByBillingDate failed: unknown result");
512
    }
513
 
483 rajveer 514
    public boolean changeOrderStatus(long orderId, OrderStatus status, String description) throws TransactionServiceException, TException
68 ashish 515
    {
483 rajveer 516
      send_changeOrderStatus(orderId, status, description);
517
      return recv_changeOrderStatus();
68 ashish 518
    }
519
 
483 rajveer 520
    public void send_changeOrderStatus(long orderId, OrderStatus status, String description) throws TException
68 ashish 521
    {
483 rajveer 522
      oprot_.writeMessageBegin(new TMessage("changeOrderStatus", TMessageType.CALL, seqid_));
523
      changeOrderStatus_args args = new changeOrderStatus_args();
524
      args.orderId = orderId;
525
      args.status = status;
526
      args.description = description;
68 ashish 527
      args.write(oprot_);
528
      oprot_.writeMessageEnd();
529
      oprot_.getTransport().flush();
530
    }
531
 
483 rajveer 532
    public boolean recv_changeOrderStatus() throws TransactionServiceException, TException
68 ashish 533
    {
534
      TMessage msg = iprot_.readMessageBegin();
535
      if (msg.type == TMessageType.EXCEPTION) {
536
        TApplicationException x = TApplicationException.read(iprot_);
537
        iprot_.readMessageEnd();
538
        throw x;
539
      }
483 rajveer 540
      changeOrderStatus_result result = new changeOrderStatus_result();
68 ashish 541
      result.read(iprot_);
542
      iprot_.readMessageEnd();
543
      if (result.isSetSuccess()) {
544
        return result.success;
545
      }
546
      if (result.ex != null) {
547
        throw result.ex;
548
      }
483 rajveer 549
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "changeOrderStatus failed: unknown result");
68 ashish 550
    }
551
 
1148 chandransh 552
    public boolean addBillingDetails(long orderId, String invoice_number, String billed_by) throws TransactionServiceException, TException
495 rajveer 553
    {
1148 chandransh 554
      send_addBillingDetails(orderId, invoice_number, billed_by);
495 rajveer 555
      return recv_addBillingDetails();
556
    }
557
 
1148 chandransh 558
    public void send_addBillingDetails(long orderId, String invoice_number, String billed_by) throws TException
495 rajveer 559
    {
560
      oprot_.writeMessageBegin(new TMessage("addBillingDetails", TMessageType.CALL, seqid_));
561
      addBillingDetails_args args = new addBillingDetails_args();
562
      args.orderId = orderId;
563
      args.invoice_number = invoice_number;
564
      args.billed_by = billed_by;
565
      args.write(oprot_);
566
      oprot_.writeMessageEnd();
567
      oprot_.getTransport().flush();
568
    }
569
 
570
    public boolean recv_addBillingDetails() throws TransactionServiceException, TException
571
    {
572
      TMessage msg = iprot_.readMessageBegin();
573
      if (msg.type == TMessageType.EXCEPTION) {
574
        TApplicationException x = TApplicationException.read(iprot_);
575
        iprot_.readMessageEnd();
576
        throw x;
577
      }
578
      addBillingDetails_result result = new addBillingDetails_result();
579
      result.read(iprot_);
580
      iprot_.readMessageEnd();
581
      if (result.isSetSuccess()) {
582
        return result.success;
583
      }
584
      if (result.ex != null) {
585
        throw result.ex;
586
      }
587
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "addBillingDetails failed: unknown result");
588
    }
589
 
1148 chandransh 590
    public boolean addJacketNumber(long orderId, long jacketNumber) throws TransactionServiceException, TException
591
    {
592
      send_addJacketNumber(orderId, jacketNumber);
593
      return recv_addJacketNumber();
594
    }
595
 
596
    public void send_addJacketNumber(long orderId, long jacketNumber) throws TException
597
    {
598
      oprot_.writeMessageBegin(new TMessage("addJacketNumber", TMessageType.CALL, seqid_));
599
      addJacketNumber_args args = new addJacketNumber_args();
600
      args.orderId = orderId;
601
      args.jacketNumber = jacketNumber;
602
      args.write(oprot_);
603
      oprot_.writeMessageEnd();
604
      oprot_.getTransport().flush();
605
    }
606
 
607
    public boolean recv_addJacketNumber() throws TransactionServiceException, TException
608
    {
609
      TMessage msg = iprot_.readMessageBegin();
610
      if (msg.type == TMessageType.EXCEPTION) {
611
        TApplicationException x = TApplicationException.read(iprot_);
612
        iprot_.readMessageEnd();
613
        throw x;
614
      }
615
      addJacketNumber_result result = new addJacketNumber_result();
616
      result.read(iprot_);
617
      iprot_.readMessageEnd();
618
      if (result.isSetSuccess()) {
619
        return result.success;
620
      }
621
      if (result.ex != null) {
622
        throw result.ex;
623
      }
624
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "addJacketNumber failed: unknown result");
625
    }
626
 
923 rajveer 627
    public boolean acceptOrder(long orderId) throws TransactionServiceException, TException
628
    {
629
      send_acceptOrder(orderId);
630
      return recv_acceptOrder();
631
    }
632
 
633
    public void send_acceptOrder(long orderId) throws TException
634
    {
635
      oprot_.writeMessageBegin(new TMessage("acceptOrder", TMessageType.CALL, seqid_));
636
      acceptOrder_args args = new acceptOrder_args();
637
      args.orderId = orderId;
638
      args.write(oprot_);
639
      oprot_.writeMessageEnd();
640
      oprot_.getTransport().flush();
641
    }
642
 
643
    public boolean recv_acceptOrder() throws TransactionServiceException, TException
644
    {
645
      TMessage msg = iprot_.readMessageBegin();
646
      if (msg.type == TMessageType.EXCEPTION) {
647
        TApplicationException x = TApplicationException.read(iprot_);
648
        iprot_.readMessageEnd();
649
        throw x;
650
      }
651
      acceptOrder_result result = new acceptOrder_result();
652
      result.read(iprot_);
653
      iprot_.readMessageEnd();
654
      if (result.isSetSuccess()) {
655
        return result.success;
656
      }
657
      if (result.ex != null) {
658
        throw result.ex;
659
      }
660
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "acceptOrder failed: unknown result");
661
    }
662
 
663
    public boolean billOrder(long orderId) throws TransactionServiceException, TException
664
    {
665
      send_billOrder(orderId);
666
      return recv_billOrder();
667
    }
668
 
669
    public void send_billOrder(long orderId) throws TException
670
    {
671
      oprot_.writeMessageBegin(new TMessage("billOrder", TMessageType.CALL, seqid_));
672
      billOrder_args args = new billOrder_args();
673
      args.orderId = orderId;
674
      args.write(oprot_);
675
      oprot_.writeMessageEnd();
676
      oprot_.getTransport().flush();
677
    }
678
 
679
    public boolean recv_billOrder() throws TransactionServiceException, TException
680
    {
681
      TMessage msg = iprot_.readMessageBegin();
682
      if (msg.type == TMessageType.EXCEPTION) {
683
        TApplicationException x = TApplicationException.read(iprot_);
684
        iprot_.readMessageEnd();
685
        throw x;
686
      }
687
      billOrder_result result = new billOrder_result();
688
      result.read(iprot_);
689
      iprot_.readMessageEnd();
690
      if (result.isSetSuccess()) {
691
        return result.success;
692
      }
693
      if (result.ex != null) {
694
        throw result.ex;
695
      }
696
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "billOrder failed: unknown result");
697
    }
698
 
483 rajveer 699
    public List<Order> getOrdersForTransaction(long transactionId) throws TransactionServiceException, TException
68 ashish 700
    {
483 rajveer 701
      send_getOrdersForTransaction(transactionId);
702
      return recv_getOrdersForTransaction();
68 ashish 703
    }
704
 
483 rajveer 705
    public void send_getOrdersForTransaction(long transactionId) throws TException
68 ashish 706
    {
483 rajveer 707
      oprot_.writeMessageBegin(new TMessage("getOrdersForTransaction", TMessageType.CALL, seqid_));
708
      getOrdersForTransaction_args args = new getOrdersForTransaction_args();
68 ashish 709
      args.transactionId = transactionId;
710
      args.write(oprot_);
711
      oprot_.writeMessageEnd();
712
      oprot_.getTransport().flush();
713
    }
714
 
483 rajveer 715
    public List<Order> recv_getOrdersForTransaction() throws TransactionServiceException, TException
68 ashish 716
    {
717
      TMessage msg = iprot_.readMessageBegin();
718
      if (msg.type == TMessageType.EXCEPTION) {
719
        TApplicationException x = TApplicationException.read(iprot_);
720
        iprot_.readMessageEnd();
721
        throw x;
722
      }
483 rajveer 723
      getOrdersForTransaction_result result = new getOrdersForTransaction_result();
68 ashish 724
      result.read(iprot_);
725
      iprot_.readMessageEnd();
726
      if (result.isSetSuccess()) {
727
        return result.success;
728
      }
729
      if (result.ex != null) {
730
        throw result.ex;
731
      }
483 rajveer 732
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getOrdersForTransaction failed: unknown result");
68 ashish 733
    }
734
 
483 rajveer 735
    public List<Order> getOrdersForCustomer(long customerId, long from_date, long to_date, OrderStatus status) throws TransactionServiceException, TException
68 ashish 736
    {
483 rajveer 737
      send_getOrdersForCustomer(customerId, from_date, to_date, status);
738
      return recv_getOrdersForCustomer();
68 ashish 739
    }
740
 
483 rajveer 741
    public void send_getOrdersForCustomer(long customerId, long from_date, long to_date, OrderStatus status) throws TException
68 ashish 742
    {
483 rajveer 743
      oprot_.writeMessageBegin(new TMessage("getOrdersForCustomer", TMessageType.CALL, seqid_));
744
      getOrdersForCustomer_args args = new getOrdersForCustomer_args();
745
      args.customerId = customerId;
746
      args.from_date = from_date;
747
      args.to_date = to_date;
748
      args.status = status;
68 ashish 749
      args.write(oprot_);
750
      oprot_.writeMessageEnd();
751
      oprot_.getTransport().flush();
752
    }
753
 
483 rajveer 754
    public List<Order> recv_getOrdersForCustomer() throws TransactionServiceException, TException
68 ashish 755
    {
756
      TMessage msg = iprot_.readMessageBegin();
757
      if (msg.type == TMessageType.EXCEPTION) {
758
        TApplicationException x = TApplicationException.read(iprot_);
759
        iprot_.readMessageEnd();
760
        throw x;
761
      }
483 rajveer 762
      getOrdersForCustomer_result result = new getOrdersForCustomer_result();
68 ashish 763
      result.read(iprot_);
764
      iprot_.readMessageEnd();
765
      if (result.isSetSuccess()) {
766
        return result.success;
767
      }
768
      if (result.ex != null) {
769
        throw result.ex;
770
      }
483 rajveer 771
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getOrdersForCustomer failed: unknown result");
68 ashish 772
    }
773
 
483 rajveer 774
    public long createOrder(Order order) throws TransactionServiceException, TException
68 ashish 775
    {
483 rajveer 776
      send_createOrder(order);
777
      return recv_createOrder();
68 ashish 778
    }
779
 
483 rajveer 780
    public void send_createOrder(Order order) throws TException
68 ashish 781
    {
483 rajveer 782
      oprot_.writeMessageBegin(new TMessage("createOrder", TMessageType.CALL, seqid_));
783
      createOrder_args args = new createOrder_args();
784
      args.order = order;
68 ashish 785
      args.write(oprot_);
786
      oprot_.writeMessageEnd();
787
      oprot_.getTransport().flush();
788
    }
789
 
483 rajveer 790
    public long recv_createOrder() throws TransactionServiceException, TException
68 ashish 791
    {
792
      TMessage msg = iprot_.readMessageBegin();
793
      if (msg.type == TMessageType.EXCEPTION) {
794
        TApplicationException x = TApplicationException.read(iprot_);
795
        iprot_.readMessageEnd();
796
        throw x;
797
      }
483 rajveer 798
      createOrder_result result = new createOrder_result();
68 ashish 799
      result.read(iprot_);
800
      iprot_.readMessageEnd();
801
      if (result.isSetSuccess()) {
802
        return result.success;
803
      }
804
      if (result.ex != null) {
805
        throw result.ex;
806
      }
483 rajveer 807
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "createOrder failed: unknown result");
68 ashish 808
    }
809
 
483 rajveer 810
    public Order getOrder(long id) throws TransactionServiceException, TException
68 ashish 811
    {
483 rajveer 812
      send_getOrder(id);
813
      return recv_getOrder();
68 ashish 814
    }
815
 
483 rajveer 816
    public void send_getOrder(long id) throws TException
68 ashish 817
    {
483 rajveer 818
      oprot_.writeMessageBegin(new TMessage("getOrder", TMessageType.CALL, seqid_));
819
      getOrder_args args = new getOrder_args();
820
      args.id = id;
68 ashish 821
      args.write(oprot_);
822
      oprot_.writeMessageEnd();
823
      oprot_.getTransport().flush();
824
    }
825
 
483 rajveer 826
    public Order recv_getOrder() throws TransactionServiceException, TException
68 ashish 827
    {
828
      TMessage msg = iprot_.readMessageBegin();
829
      if (msg.type == TMessageType.EXCEPTION) {
830
        TApplicationException x = TApplicationException.read(iprot_);
831
        iprot_.readMessageEnd();
832
        throw x;
833
      }
483 rajveer 834
      getOrder_result result = new getOrder_result();
68 ashish 835
      result.read(iprot_);
836
      iprot_.readMessageEnd();
837
      if (result.isSetSuccess()) {
838
        return result.success;
839
      }
840
      if (result.ex != null) {
841
        throw result.ex;
842
      }
483 rajveer 843
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getOrder failed: unknown result");
68 ashish 844
    }
845
 
483 rajveer 846
    public List<LineItem> getLineItemsForOrder(long orderId) throws TransactionServiceException, TException
68 ashish 847
    {
483 rajveer 848
      send_getLineItemsForOrder(orderId);
849
      return recv_getLineItemsForOrder();
68 ashish 850
    }
851
 
483 rajveer 852
    public void send_getLineItemsForOrder(long orderId) throws TException
68 ashish 853
    {
483 rajveer 854
      oprot_.writeMessageBegin(new TMessage("getLineItemsForOrder", TMessageType.CALL, seqid_));
855
      getLineItemsForOrder_args args = new getLineItemsForOrder_args();
856
      args.orderId = orderId;
68 ashish 857
      args.write(oprot_);
858
      oprot_.writeMessageEnd();
859
      oprot_.getTransport().flush();
860
    }
861
 
483 rajveer 862
    public List<LineItem> recv_getLineItemsForOrder() throws TransactionServiceException, TException
68 ashish 863
    {
864
      TMessage msg = iprot_.readMessageBegin();
865
      if (msg.type == TMessageType.EXCEPTION) {
866
        TApplicationException x = TApplicationException.read(iprot_);
867
        iprot_.readMessageEnd();
868
        throw x;
869
      }
483 rajveer 870
      getLineItemsForOrder_result result = new getLineItemsForOrder_result();
68 ashish 871
      result.read(iprot_);
872
      iprot_.readMessageEnd();
873
      if (result.isSetSuccess()) {
874
        return result.success;
875
      }
876
      if (result.ex != null) {
877
        throw result.ex;
878
      }
483 rajveer 879
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getLineItemsForOrder failed: unknown result");
68 ashish 880
    }
881
 
1221 chandransh 882
    public List<Order> batchOrders(long warehouseId) throws TransactionServiceException, TException
883
    {
884
      send_batchOrders(warehouseId);
885
      return recv_batchOrders();
886
    }
887
 
888
    public void send_batchOrders(long warehouseId) throws TException
889
    {
890
      oprot_.writeMessageBegin(new TMessage("batchOrders", TMessageType.CALL, seqid_));
891
      batchOrders_args args = new batchOrders_args();
892
      args.warehouseId = warehouseId;
893
      args.write(oprot_);
894
      oprot_.writeMessageEnd();
895
      oprot_.getTransport().flush();
896
    }
897
 
898
    public List<Order> recv_batchOrders() throws TransactionServiceException, TException
899
    {
900
      TMessage msg = iprot_.readMessageBegin();
901
      if (msg.type == TMessageType.EXCEPTION) {
902
        TApplicationException x = TApplicationException.read(iprot_);
903
        iprot_.readMessageEnd();
904
        throw x;
905
      }
906
      batchOrders_result result = new batchOrders_result();
907
      result.read(iprot_);
908
      iprot_.readMessageEnd();
909
      if (result.isSetSuccess()) {
910
        return result.success;
911
      }
912
      if (result.ex != null) {
913
        throw result.ex;
914
      }
915
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "batchOrders failed: unknown result");
916
    }
917
 
1209 chandransh 918
    public boolean markOrderAsOutOfStock(long orderId) throws TransactionServiceException, TException
919
    {
920
      send_markOrderAsOutOfStock(orderId);
921
      return recv_markOrderAsOutOfStock();
922
    }
923
 
924
    public void send_markOrderAsOutOfStock(long orderId) throws TException
925
    {
926
      oprot_.writeMessageBegin(new TMessage("markOrderAsOutOfStock", TMessageType.CALL, seqid_));
927
      markOrderAsOutOfStock_args args = new markOrderAsOutOfStock_args();
928
      args.orderId = orderId;
929
      args.write(oprot_);
930
      oprot_.writeMessageEnd();
931
      oprot_.getTransport().flush();
932
    }
933
 
934
    public boolean recv_markOrderAsOutOfStock() throws TransactionServiceException, TException
935
    {
936
      TMessage msg = iprot_.readMessageBegin();
937
      if (msg.type == TMessageType.EXCEPTION) {
938
        TApplicationException x = TApplicationException.read(iprot_);
939
        iprot_.readMessageEnd();
940
        throw x;
941
      }
942
      markOrderAsOutOfStock_result result = new markOrderAsOutOfStock_result();
943
      result.read(iprot_);
944
      iprot_.readMessageEnd();
945
      if (result.isSetSuccess()) {
946
        return result.success;
947
      }
948
      if (result.ex != null) {
949
        throw result.ex;
950
      }
951
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "markOrderAsOutOfStock failed: unknown result");
952
    }
953
 
758 chandransh 954
    public boolean markOrdersAsManifested(long warehouseId, long providerId) throws TransactionServiceException, TException
955
    {
956
      send_markOrdersAsManifested(warehouseId, providerId);
957
      return recv_markOrdersAsManifested();
958
    }
959
 
960
    public void send_markOrdersAsManifested(long warehouseId, long providerId) throws TException
961
    {
962
      oprot_.writeMessageBegin(new TMessage("markOrdersAsManifested", TMessageType.CALL, seqid_));
963
      markOrdersAsManifested_args args = new markOrdersAsManifested_args();
964
      args.warehouseId = warehouseId;
965
      args.providerId = providerId;
966
      args.write(oprot_);
967
      oprot_.writeMessageEnd();
968
      oprot_.getTransport().flush();
969
    }
970
 
971
    public boolean recv_markOrdersAsManifested() throws TransactionServiceException, TException
972
    {
973
      TMessage msg = iprot_.readMessageBegin();
974
      if (msg.type == TMessageType.EXCEPTION) {
975
        TApplicationException x = TApplicationException.read(iprot_);
976
        iprot_.readMessageEnd();
977
        throw x;
978
      }
979
      markOrdersAsManifested_result result = new markOrdersAsManifested_result();
980
      result.read(iprot_);
981
      iprot_.readMessageEnd();
982
      if (result.isSetSuccess()) {
983
        return result.success;
984
      }
985
      if (result.ex != null) {
986
        throw result.ex;
987
      }
988
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "markOrdersAsManifested failed: unknown result");
989
    }
990
 
1245 chandransh 991
    public List<Order> markOrdersAsPickedUp(long providerId, Map<String,String> pickupDetails) throws TransactionServiceException, TException
1114 chandransh 992
    {
993
      send_markOrdersAsPickedUp(providerId, pickupDetails);
994
      return recv_markOrdersAsPickedUp();
995
    }
996
 
1245 chandransh 997
    public void send_markOrdersAsPickedUp(long providerId, Map<String,String> pickupDetails) throws TException
1114 chandransh 998
    {
999
      oprot_.writeMessageBegin(new TMessage("markOrdersAsPickedUp", TMessageType.CALL, seqid_));
1000
      markOrdersAsPickedUp_args args = new markOrdersAsPickedUp_args();
1001
      args.providerId = providerId;
1002
      args.pickupDetails = pickupDetails;
1003
      args.write(oprot_);
1004
      oprot_.writeMessageEnd();
1005
      oprot_.getTransport().flush();
1006
    }
1007
 
1008
    public List<Order> recv_markOrdersAsPickedUp() throws TransactionServiceException, TException
1009
    {
1010
      TMessage msg = iprot_.readMessageBegin();
1011
      if (msg.type == TMessageType.EXCEPTION) {
1012
        TApplicationException x = TApplicationException.read(iprot_);
1013
        iprot_.readMessageEnd();
1014
        throw x;
1015
      }
1016
      markOrdersAsPickedUp_result result = new markOrdersAsPickedUp_result();
1017
      result.read(iprot_);
1018
      iprot_.readMessageEnd();
1019
      if (result.isSetSuccess()) {
1020
        return result.success;
1021
      }
1022
      if (result.ex != null) {
1023
        throw result.ex;
1024
      }
1025
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "markOrdersAsPickedUp failed: unknown result");
1026
    }
1027
 
1133 chandransh 1028
    public void markOrdersAsDelivered(long providerId, Map<String,String> deliveredOrders) throws TransactionServiceException, TException
1029
    {
1030
      send_markOrdersAsDelivered(providerId, deliveredOrders);
1031
      recv_markOrdersAsDelivered();
1032
    }
1033
 
1034
    public void send_markOrdersAsDelivered(long providerId, Map<String,String> deliveredOrders) throws TException
1035
    {
1036
      oprot_.writeMessageBegin(new TMessage("markOrdersAsDelivered", TMessageType.CALL, seqid_));
1037
      markOrdersAsDelivered_args args = new markOrdersAsDelivered_args();
1038
      args.providerId = providerId;
1039
      args.deliveredOrders = deliveredOrders;
1040
      args.write(oprot_);
1041
      oprot_.writeMessageEnd();
1042
      oprot_.getTransport().flush();
1043
    }
1044
 
1045
    public void recv_markOrdersAsDelivered() throws TransactionServiceException, TException
1046
    {
1047
      TMessage msg = iprot_.readMessageBegin();
1048
      if (msg.type == TMessageType.EXCEPTION) {
1049
        TApplicationException x = TApplicationException.read(iprot_);
1050
        iprot_.readMessageEnd();
1051
        throw x;
1052
      }
1053
      markOrdersAsDelivered_result result = new markOrdersAsDelivered_result();
1054
      result.read(iprot_);
1055
      iprot_.readMessageEnd();
1056
      if (result.ex != null) {
1057
        throw result.ex;
1058
      }
1059
      return;
1060
    }
1061
 
1062
    public void markOrdersAsFailed(long providerId, Map<String,String> returnedOrders) throws TransactionServiceException, TException
1063
    {
1064
      send_markOrdersAsFailed(providerId, returnedOrders);
1065
      recv_markOrdersAsFailed();
1066
    }
1067
 
1068
    public void send_markOrdersAsFailed(long providerId, Map<String,String> returnedOrders) throws TException
1069
    {
1070
      oprot_.writeMessageBegin(new TMessage("markOrdersAsFailed", TMessageType.CALL, seqid_));
1071
      markOrdersAsFailed_args args = new markOrdersAsFailed_args();
1072
      args.providerId = providerId;
1073
      args.returnedOrders = returnedOrders;
1074
      args.write(oprot_);
1075
      oprot_.writeMessageEnd();
1076
      oprot_.getTransport().flush();
1077
    }
1078
 
1079
    public void recv_markOrdersAsFailed() throws TransactionServiceException, TException
1080
    {
1081
      TMessage msg = iprot_.readMessageBegin();
1082
      if (msg.type == TMessageType.EXCEPTION) {
1083
        TApplicationException x = TApplicationException.read(iprot_);
1084
        iprot_.readMessageEnd();
1085
        throw x;
1086
      }
1087
      markOrdersAsFailed_result result = new markOrdersAsFailed_result();
1088
      result.read(iprot_);
1089
      iprot_.readMessageEnd();
1090
      if (result.ex != null) {
1091
        throw result.ex;
1092
      }
1093
      return;
1094
    }
1095
 
1245 chandransh 1096
    public void updateNonDeliveryReason(long providerId, Map<String,String> undeliveredOrders) throws TransactionServiceException, TException
1097
    {
1098
      send_updateNonDeliveryReason(providerId, undeliveredOrders);
1099
      recv_updateNonDeliveryReason();
1100
    }
1101
 
1102
    public void send_updateNonDeliveryReason(long providerId, Map<String,String> undeliveredOrders) throws TException
1103
    {
1104
      oprot_.writeMessageBegin(new TMessage("updateNonDeliveryReason", TMessageType.CALL, seqid_));
1105
      updateNonDeliveryReason_args args = new updateNonDeliveryReason_args();
1106
      args.providerId = providerId;
1107
      args.undeliveredOrders = undeliveredOrders;
1108
      args.write(oprot_);
1109
      oprot_.writeMessageEnd();
1110
      oprot_.getTransport().flush();
1111
    }
1112
 
1113
    public void recv_updateNonDeliveryReason() throws TransactionServiceException, TException
1114
    {
1115
      TMessage msg = iprot_.readMessageBegin();
1116
      if (msg.type == TMessageType.EXCEPTION) {
1117
        TApplicationException x = TApplicationException.read(iprot_);
1118
        iprot_.readMessageEnd();
1119
        throw x;
1120
      }
1121
      updateNonDeliveryReason_result result = new updateNonDeliveryReason_result();
1122
      result.read(iprot_);
1123
      iprot_.readMessageEnd();
1124
      if (result.ex != null) {
1125
        throw result.ex;
1126
      }
1127
      return;
1128
    }
1129
 
483 rajveer 1130
    public List<Alert> getAlerts(long orderId, boolean valid) throws TException
68 ashish 1131
    {
483 rajveer 1132
      send_getAlerts(orderId, valid);
305 ashish 1133
      return recv_getAlerts();
1134
    }
1135
 
483 rajveer 1136
    public void send_getAlerts(long orderId, boolean valid) throws TException
305 ashish 1137
    {
1138
      oprot_.writeMessageBegin(new TMessage("getAlerts", TMessageType.CALL, seqid_));
1139
      getAlerts_args args = new getAlerts_args();
483 rajveer 1140
      args.orderId = orderId;
305 ashish 1141
      args.valid = valid;
1142
      args.write(oprot_);
1143
      oprot_.writeMessageEnd();
1144
      oprot_.getTransport().flush();
1145
    }
1146
 
1147
    public List<Alert> recv_getAlerts() throws TException
1148
    {
1149
      TMessage msg = iprot_.readMessageBegin();
1150
      if (msg.type == TMessageType.EXCEPTION) {
1151
        TApplicationException x = TApplicationException.read(iprot_);
1152
        iprot_.readMessageEnd();
1153
        throw x;
1154
      }
1155
      getAlerts_result result = new getAlerts_result();
1156
      result.read(iprot_);
1157
      iprot_.readMessageEnd();
1158
      if (result.isSetSuccess()) {
1159
        return result.success;
1160
      }
1161
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getAlerts failed: unknown result");
1162
    }
1163
 
483 rajveer 1164
    public void setAlert(long orderId, boolean unset, long type, String comment) throws TException
305 ashish 1165
    {
483 rajveer 1166
      send_setAlert(orderId, unset, type, comment);
305 ashish 1167
      recv_setAlert();
1168
    }
1169
 
483 rajveer 1170
    public void send_setAlert(long orderId, boolean unset, long type, String comment) throws TException
305 ashish 1171
    {
1172
      oprot_.writeMessageBegin(new TMessage("setAlert", TMessageType.CALL, seqid_));
1173
      setAlert_args args = new setAlert_args();
483 rajveer 1174
      args.orderId = orderId;
305 ashish 1175
      args.unset = unset;
1176
      args.type = type;
1177
      args.comment = comment;
1178
      args.write(oprot_);
1179
      oprot_.writeMessageEnd();
1180
      oprot_.getTransport().flush();
1181
    }
1182
 
1183
    public void recv_setAlert() throws TException
1184
    {
1185
      TMessage msg = iprot_.readMessageBegin();
1186
      if (msg.type == TMessageType.EXCEPTION) {
1187
        TApplicationException x = TApplicationException.read(iprot_);
1188
        iprot_.readMessageEnd();
1189
        throw x;
1190
      }
1191
      setAlert_result result = new setAlert_result();
1192
      result.read(iprot_);
1193
      iprot_.readMessageEnd();
1194
      return;
1195
    }
1196
 
68 ashish 1197
  }
1198
  public static class Processor implements TProcessor {
1199
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
1200
    public Processor(Iface iface)
1201
    {
1202
      iface_ = iface;
764 rajveer 1203
      processMap_.put("closeSession", new closeSession());
68 ashish 1204
      processMap_.put("createTransaction", new createTransaction());
1205
      processMap_.put("getTransaction", new getTransaction());
1206
      processMap_.put("getTransactionsForCustomer", new getTransactionsForCustomer());
132 ashish 1207
      processMap_.put("getTransactionsForShoppingCartId", new getTransactionsForShoppingCartId());
68 ashish 1208
      processMap_.put("getTransactionStatus", new getTransactionStatus());
1209
      processMap_.put("changeTransactionStatus", new changeTransactionStatus());
483 rajveer 1210
      processMap_.put("getAllOrders", new getAllOrders());
1022 varun.gupt 1211
      processMap_.put("getOrdersByBillingDate", new getOrdersByBillingDate());
483 rajveer 1212
      processMap_.put("changeOrderStatus", new changeOrderStatus());
495 rajveer 1213
      processMap_.put("addBillingDetails", new addBillingDetails());
1148 chandransh 1214
      processMap_.put("addJacketNumber", new addJacketNumber());
923 rajveer 1215
      processMap_.put("acceptOrder", new acceptOrder());
1216
      processMap_.put("billOrder", new billOrder());
483 rajveer 1217
      processMap_.put("getOrdersForTransaction", new getOrdersForTransaction());
1218
      processMap_.put("getOrdersForCustomer", new getOrdersForCustomer());
1219
      processMap_.put("createOrder", new createOrder());
1220
      processMap_.put("getOrder", new getOrder());
1221
      processMap_.put("getLineItemsForOrder", new getLineItemsForOrder());
1221 chandransh 1222
      processMap_.put("batchOrders", new batchOrders());
1209 chandransh 1223
      processMap_.put("markOrderAsOutOfStock", new markOrderAsOutOfStock());
758 chandransh 1224
      processMap_.put("markOrdersAsManifested", new markOrdersAsManifested());
1114 chandransh 1225
      processMap_.put("markOrdersAsPickedUp", new markOrdersAsPickedUp());
1133 chandransh 1226
      processMap_.put("markOrdersAsDelivered", new markOrdersAsDelivered());
1227
      processMap_.put("markOrdersAsFailed", new markOrdersAsFailed());
1245 chandransh 1228
      processMap_.put("updateNonDeliveryReason", new updateNonDeliveryReason());
305 ashish 1229
      processMap_.put("getAlerts", new getAlerts());
1230
      processMap_.put("setAlert", new setAlert());
68 ashish 1231
    }
1232
 
1233
    protected static interface ProcessFunction {
1234
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException;
1235
    }
1236
 
1237
    private Iface iface_;
1238
    protected final HashMap<String,ProcessFunction> processMap_ = new HashMap<String,ProcessFunction>();
1239
 
1240
    public boolean process(TProtocol iprot, TProtocol oprot) throws TException
1241
    {
1242
      TMessage msg = iprot.readMessageBegin();
1243
      ProcessFunction fn = processMap_.get(msg.name);
1244
      if (fn == null) {
1245
        TProtocolUtil.skip(iprot, TType.STRUCT);
1246
        iprot.readMessageEnd();
1247
        TApplicationException x = new TApplicationException(TApplicationException.UNKNOWN_METHOD, "Invalid method name: '"+msg.name+"'");
1248
        oprot.writeMessageBegin(new TMessage(msg.name, TMessageType.EXCEPTION, msg.seqid));
1249
        x.write(oprot);
1250
        oprot.writeMessageEnd();
1251
        oprot.getTransport().flush();
1252
        return true;
1253
      }
1254
      fn.process(msg.seqid, iprot, oprot);
1255
      return true;
1256
    }
1257
 
764 rajveer 1258
    private class closeSession implements ProcessFunction {
1259
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1260
      {
1261
        closeSession_args args = new closeSession_args();
1262
        args.read(iprot);
1263
        iprot.readMessageEnd();
1264
        closeSession_result result = new closeSession_result();
1265
        iface_.closeSession();
1266
        oprot.writeMessageBegin(new TMessage("closeSession", TMessageType.REPLY, seqid));
1267
        result.write(oprot);
1268
        oprot.writeMessageEnd();
1269
        oprot.getTransport().flush();
1270
      }
1271
 
1272
    }
1273
 
68 ashish 1274
    private class createTransaction implements ProcessFunction {
1275
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1276
      {
1277
        createTransaction_args args = new createTransaction_args();
1278
        args.read(iprot);
1279
        iprot.readMessageEnd();
1280
        createTransaction_result result = new createTransaction_result();
1281
        try {
132 ashish 1282
          result.success = iface_.createTransaction(args.transaction);
1283
          result.setSuccessIsSet(true);
68 ashish 1284
        } catch (TransactionServiceException ex) {
1285
          result.ex = ex;
1286
        } catch (Throwable th) {
1287
          LOGGER.error("Internal error processing createTransaction", th);
1288
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing createTransaction");
1289
          oprot.writeMessageBegin(new TMessage("createTransaction", TMessageType.EXCEPTION, seqid));
1290
          x.write(oprot);
1291
          oprot.writeMessageEnd();
1292
          oprot.getTransport().flush();
1293
          return;
1294
        }
1295
        oprot.writeMessageBegin(new TMessage("createTransaction", TMessageType.REPLY, seqid));
1296
        result.write(oprot);
1297
        oprot.writeMessageEnd();
1298
        oprot.getTransport().flush();
1299
      }
1300
 
1301
    }
1302
 
1303
    private class getTransaction implements ProcessFunction {
1304
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1305
      {
1306
        getTransaction_args args = new getTransaction_args();
1307
        args.read(iprot);
1308
        iprot.readMessageEnd();
1309
        getTransaction_result result = new getTransaction_result();
1310
        try {
1311
          result.success = iface_.getTransaction(args.id);
1312
        } catch (TransactionServiceException ex) {
1313
          result.ex = ex;
1314
        } catch (Throwable th) {
1315
          LOGGER.error("Internal error processing getTransaction", th);
1316
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getTransaction");
1317
          oprot.writeMessageBegin(new TMessage("getTransaction", TMessageType.EXCEPTION, seqid));
1318
          x.write(oprot);
1319
          oprot.writeMessageEnd();
1320
          oprot.getTransport().flush();
1321
          return;
1322
        }
1323
        oprot.writeMessageBegin(new TMessage("getTransaction", TMessageType.REPLY, seqid));
1324
        result.write(oprot);
1325
        oprot.writeMessageEnd();
1326
        oprot.getTransport().flush();
1327
      }
1328
 
1329
    }
1330
 
1331
    private class getTransactionsForCustomer implements ProcessFunction {
1332
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1333
      {
1334
        getTransactionsForCustomer_args args = new getTransactionsForCustomer_args();
1335
        args.read(iprot);
1336
        iprot.readMessageEnd();
1337
        getTransactionsForCustomer_result result = new getTransactionsForCustomer_result();
1338
        try {
132 ashish 1339
          result.success = iface_.getTransactionsForCustomer(args.customerId, args.from_date, args.to_date, args.status);
68 ashish 1340
        } catch (TransactionServiceException ex) {
1341
          result.ex = ex;
1342
        } catch (Throwable th) {
1343
          LOGGER.error("Internal error processing getTransactionsForCustomer", th);
1344
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getTransactionsForCustomer");
1345
          oprot.writeMessageBegin(new TMessage("getTransactionsForCustomer", TMessageType.EXCEPTION, seqid));
1346
          x.write(oprot);
1347
          oprot.writeMessageEnd();
1348
          oprot.getTransport().flush();
1349
          return;
1350
        }
1351
        oprot.writeMessageBegin(new TMessage("getTransactionsForCustomer", TMessageType.REPLY, seqid));
1352
        result.write(oprot);
1353
        oprot.writeMessageEnd();
1354
        oprot.getTransport().flush();
1355
      }
1356
 
1357
    }
1358
 
132 ashish 1359
    private class getTransactionsForShoppingCartId implements ProcessFunction {
1360
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1361
      {
1362
        getTransactionsForShoppingCartId_args args = new getTransactionsForShoppingCartId_args();
1363
        args.read(iprot);
1364
        iprot.readMessageEnd();
1365
        getTransactionsForShoppingCartId_result result = new getTransactionsForShoppingCartId_result();
1366
        try {
1367
          result.success = iface_.getTransactionsForShoppingCartId(args.shoppingCartId);
1368
        } catch (TransactionServiceException ex) {
1369
          result.ex = ex;
1370
        } catch (Throwable th) {
1371
          LOGGER.error("Internal error processing getTransactionsForShoppingCartId", th);
1372
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getTransactionsForShoppingCartId");
1373
          oprot.writeMessageBegin(new TMessage("getTransactionsForShoppingCartId", TMessageType.EXCEPTION, seqid));
1374
          x.write(oprot);
1375
          oprot.writeMessageEnd();
1376
          oprot.getTransport().flush();
1377
          return;
1378
        }
1379
        oprot.writeMessageBegin(new TMessage("getTransactionsForShoppingCartId", TMessageType.REPLY, seqid));
1380
        result.write(oprot);
1381
        oprot.writeMessageEnd();
1382
        oprot.getTransport().flush();
1383
      }
1384
 
1385
    }
1386
 
68 ashish 1387
    private class getTransactionStatus implements ProcessFunction {
1388
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1389
      {
1390
        getTransactionStatus_args args = new getTransactionStatus_args();
1391
        args.read(iprot);
1392
        iprot.readMessageEnd();
1393
        getTransactionStatus_result result = new getTransactionStatus_result();
1394
        try {
1395
          result.success = iface_.getTransactionStatus(args.transactionId);
1396
        } catch (TransactionServiceException ex) {
1397
          result.ex = ex;
1398
        } catch (Throwable th) {
1399
          LOGGER.error("Internal error processing getTransactionStatus", th);
1400
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getTransactionStatus");
1401
          oprot.writeMessageBegin(new TMessage("getTransactionStatus", TMessageType.EXCEPTION, seqid));
1402
          x.write(oprot);
1403
          oprot.writeMessageEnd();
1404
          oprot.getTransport().flush();
1405
          return;
1406
        }
1407
        oprot.writeMessageBegin(new TMessage("getTransactionStatus", TMessageType.REPLY, seqid));
1408
        result.write(oprot);
1409
        oprot.writeMessageEnd();
1410
        oprot.getTransport().flush();
1411
      }
1412
 
1413
    }
1414
 
1415
    private class changeTransactionStatus implements ProcessFunction {
1416
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1417
      {
1418
        changeTransactionStatus_args args = new changeTransactionStatus_args();
1419
        args.read(iprot);
1420
        iprot.readMessageEnd();
1421
        changeTransactionStatus_result result = new changeTransactionStatus_result();
1422
        try {
1423
          result.success = iface_.changeTransactionStatus(args.transactionId, args.status, args.description);
1424
          result.setSuccessIsSet(true);
1425
        } catch (TransactionServiceException ex) {
1426
          result.ex = ex;
1427
        } catch (Throwable th) {
1428
          LOGGER.error("Internal error processing changeTransactionStatus", th);
1429
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing changeTransactionStatus");
1430
          oprot.writeMessageBegin(new TMessage("changeTransactionStatus", TMessageType.EXCEPTION, seqid));
1431
          x.write(oprot);
1432
          oprot.writeMessageEnd();
1433
          oprot.getTransport().flush();
1434
          return;
1435
        }
1436
        oprot.writeMessageBegin(new TMessage("changeTransactionStatus", TMessageType.REPLY, seqid));
1437
        result.write(oprot);
1438
        oprot.writeMessageEnd();
1439
        oprot.getTransport().flush();
1440
      }
1441
 
1442
    }
1443
 
483 rajveer 1444
    private class getAllOrders implements ProcessFunction {
68 ashish 1445
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1446
      {
483 rajveer 1447
        getAllOrders_args args = new getAllOrders_args();
68 ashish 1448
        args.read(iprot);
1449
        iprot.readMessageEnd();
483 rajveer 1450
        getAllOrders_result result = new getAllOrders_result();
68 ashish 1451
        try {
483 rajveer 1452
          result.success = iface_.getAllOrders(args.status, args.from_date, args.to_date, args.warehouse_id);
68 ashish 1453
        } catch (TransactionServiceException ex) {
1454
          result.ex = ex;
1455
        } catch (Throwable th) {
483 rajveer 1456
          LOGGER.error("Internal error processing getAllOrders", th);
1457
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getAllOrders");
1458
          oprot.writeMessageBegin(new TMessage("getAllOrders", TMessageType.EXCEPTION, seqid));
68 ashish 1459
          x.write(oprot);
1460
          oprot.writeMessageEnd();
1461
          oprot.getTransport().flush();
1462
          return;
1463
        }
483 rajveer 1464
        oprot.writeMessageBegin(new TMessage("getAllOrders", TMessageType.REPLY, seqid));
68 ashish 1465
        result.write(oprot);
1466
        oprot.writeMessageEnd();
1467
        oprot.getTransport().flush();
1468
      }
1469
 
1470
    }
1471
 
1022 varun.gupt 1472
    private class getOrdersByBillingDate implements ProcessFunction {
1473
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1474
      {
1475
        getOrdersByBillingDate_args args = new getOrdersByBillingDate_args();
1476
        args.read(iprot);
1477
        iprot.readMessageEnd();
1478
        getOrdersByBillingDate_result result = new getOrdersByBillingDate_result();
1479
        try {
1480
          result.success = iface_.getOrdersByBillingDate(args.status, args.start_billing_date, args.end_billing_date, args.warehouse_id);
1481
        } catch (TransactionServiceException ex) {
1482
          result.ex = ex;
1483
        } catch (Throwable th) {
1484
          LOGGER.error("Internal error processing getOrdersByBillingDate", th);
1485
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getOrdersByBillingDate");
1486
          oprot.writeMessageBegin(new TMessage("getOrdersByBillingDate", TMessageType.EXCEPTION, seqid));
1487
          x.write(oprot);
1488
          oprot.writeMessageEnd();
1489
          oprot.getTransport().flush();
1490
          return;
1491
        }
1492
        oprot.writeMessageBegin(new TMessage("getOrdersByBillingDate", TMessageType.REPLY, seqid));
1493
        result.write(oprot);
1494
        oprot.writeMessageEnd();
1495
        oprot.getTransport().flush();
1496
      }
1497
 
1498
    }
1499
 
483 rajveer 1500
    private class changeOrderStatus implements ProcessFunction {
68 ashish 1501
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1502
      {
483 rajveer 1503
        changeOrderStatus_args args = new changeOrderStatus_args();
68 ashish 1504
        args.read(iprot);
1505
        iprot.readMessageEnd();
483 rajveer 1506
        changeOrderStatus_result result = new changeOrderStatus_result();
68 ashish 1507
        try {
483 rajveer 1508
          result.success = iface_.changeOrderStatus(args.orderId, args.status, args.description);
68 ashish 1509
          result.setSuccessIsSet(true);
1510
        } catch (TransactionServiceException ex) {
1511
          result.ex = ex;
1512
        } catch (Throwable th) {
483 rajveer 1513
          LOGGER.error("Internal error processing changeOrderStatus", th);
1514
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing changeOrderStatus");
1515
          oprot.writeMessageBegin(new TMessage("changeOrderStatus", TMessageType.EXCEPTION, seqid));
68 ashish 1516
          x.write(oprot);
1517
          oprot.writeMessageEnd();
1518
          oprot.getTransport().flush();
1519
          return;
1520
        }
483 rajveer 1521
        oprot.writeMessageBegin(new TMessage("changeOrderStatus", TMessageType.REPLY, seqid));
68 ashish 1522
        result.write(oprot);
1523
        oprot.writeMessageEnd();
1524
        oprot.getTransport().flush();
1525
      }
1526
 
1527
    }
1528
 
495 rajveer 1529
    private class addBillingDetails implements ProcessFunction {
1530
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1531
      {
1532
        addBillingDetails_args args = new addBillingDetails_args();
1533
        args.read(iprot);
1534
        iprot.readMessageEnd();
1535
        addBillingDetails_result result = new addBillingDetails_result();
1536
        try {
1148 chandransh 1537
          result.success = iface_.addBillingDetails(args.orderId, args.invoice_number, args.billed_by);
495 rajveer 1538
          result.setSuccessIsSet(true);
1539
        } catch (TransactionServiceException ex) {
1540
          result.ex = ex;
1541
        } catch (Throwable th) {
1542
          LOGGER.error("Internal error processing addBillingDetails", th);
1543
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing addBillingDetails");
1544
          oprot.writeMessageBegin(new TMessage("addBillingDetails", TMessageType.EXCEPTION, seqid));
1545
          x.write(oprot);
1546
          oprot.writeMessageEnd();
1547
          oprot.getTransport().flush();
1548
          return;
1549
        }
1550
        oprot.writeMessageBegin(new TMessage("addBillingDetails", TMessageType.REPLY, seqid));
1551
        result.write(oprot);
1552
        oprot.writeMessageEnd();
1553
        oprot.getTransport().flush();
1554
      }
1555
 
1556
    }
1557
 
1148 chandransh 1558
    private class addJacketNumber implements ProcessFunction {
1559
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1560
      {
1561
        addJacketNumber_args args = new addJacketNumber_args();
1562
        args.read(iprot);
1563
        iprot.readMessageEnd();
1564
        addJacketNumber_result result = new addJacketNumber_result();
1565
        try {
1566
          result.success = iface_.addJacketNumber(args.orderId, args.jacketNumber);
1567
          result.setSuccessIsSet(true);
1568
        } catch (TransactionServiceException ex) {
1569
          result.ex = ex;
1570
        } catch (Throwable th) {
1571
          LOGGER.error("Internal error processing addJacketNumber", th);
1572
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing addJacketNumber");
1573
          oprot.writeMessageBegin(new TMessage("addJacketNumber", TMessageType.EXCEPTION, seqid));
1574
          x.write(oprot);
1575
          oprot.writeMessageEnd();
1576
          oprot.getTransport().flush();
1577
          return;
1578
        }
1579
        oprot.writeMessageBegin(new TMessage("addJacketNumber", TMessageType.REPLY, seqid));
1580
        result.write(oprot);
1581
        oprot.writeMessageEnd();
1582
        oprot.getTransport().flush();
1583
      }
1584
 
1585
    }
1586
 
923 rajveer 1587
    private class acceptOrder implements ProcessFunction {
1588
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1589
      {
1590
        acceptOrder_args args = new acceptOrder_args();
1591
        args.read(iprot);
1592
        iprot.readMessageEnd();
1593
        acceptOrder_result result = new acceptOrder_result();
1594
        try {
1595
          result.success = iface_.acceptOrder(args.orderId);
1596
          result.setSuccessIsSet(true);
1597
        } catch (TransactionServiceException ex) {
1598
          result.ex = ex;
1599
        } catch (Throwable th) {
1600
          LOGGER.error("Internal error processing acceptOrder", th);
1601
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing acceptOrder");
1602
          oprot.writeMessageBegin(new TMessage("acceptOrder", TMessageType.EXCEPTION, seqid));
1603
          x.write(oprot);
1604
          oprot.writeMessageEnd();
1605
          oprot.getTransport().flush();
1606
          return;
1607
        }
1608
        oprot.writeMessageBegin(new TMessage("acceptOrder", TMessageType.REPLY, seqid));
1609
        result.write(oprot);
1610
        oprot.writeMessageEnd();
1611
        oprot.getTransport().flush();
1612
      }
1613
 
1614
    }
1615
 
1616
    private class billOrder implements ProcessFunction {
1617
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1618
      {
1619
        billOrder_args args = new billOrder_args();
1620
        args.read(iprot);
1621
        iprot.readMessageEnd();
1622
        billOrder_result result = new billOrder_result();
1623
        try {
1624
          result.success = iface_.billOrder(args.orderId);
1625
          result.setSuccessIsSet(true);
1626
        } catch (TransactionServiceException ex) {
1627
          result.ex = ex;
1628
        } catch (Throwable th) {
1629
          LOGGER.error("Internal error processing billOrder", th);
1630
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing billOrder");
1631
          oprot.writeMessageBegin(new TMessage("billOrder", TMessageType.EXCEPTION, seqid));
1632
          x.write(oprot);
1633
          oprot.writeMessageEnd();
1634
          oprot.getTransport().flush();
1635
          return;
1636
        }
1637
        oprot.writeMessageBegin(new TMessage("billOrder", TMessageType.REPLY, seqid));
1638
        result.write(oprot);
1639
        oprot.writeMessageEnd();
1640
        oprot.getTransport().flush();
1641
      }
1642
 
1643
    }
1644
 
483 rajveer 1645
    private class getOrdersForTransaction implements ProcessFunction {
68 ashish 1646
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1647
      {
483 rajveer 1648
        getOrdersForTransaction_args args = new getOrdersForTransaction_args();
68 ashish 1649
        args.read(iprot);
1650
        iprot.readMessageEnd();
483 rajveer 1651
        getOrdersForTransaction_result result = new getOrdersForTransaction_result();
68 ashish 1652
        try {
483 rajveer 1653
          result.success = iface_.getOrdersForTransaction(args.transactionId);
68 ashish 1654
        } catch (TransactionServiceException ex) {
1655
          result.ex = ex;
1656
        } catch (Throwable th) {
483 rajveer 1657
          LOGGER.error("Internal error processing getOrdersForTransaction", th);
1658
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getOrdersForTransaction");
1659
          oprot.writeMessageBegin(new TMessage("getOrdersForTransaction", TMessageType.EXCEPTION, seqid));
68 ashish 1660
          x.write(oprot);
1661
          oprot.writeMessageEnd();
1662
          oprot.getTransport().flush();
1663
          return;
1664
        }
483 rajveer 1665
        oprot.writeMessageBegin(new TMessage("getOrdersForTransaction", TMessageType.REPLY, seqid));
68 ashish 1666
        result.write(oprot);
1667
        oprot.writeMessageEnd();
1668
        oprot.getTransport().flush();
1669
      }
1670
 
1671
    }
1672
 
483 rajveer 1673
    private class getOrdersForCustomer implements ProcessFunction {
68 ashish 1674
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1675
      {
483 rajveer 1676
        getOrdersForCustomer_args args = new getOrdersForCustomer_args();
68 ashish 1677
        args.read(iprot);
1678
        iprot.readMessageEnd();
483 rajveer 1679
        getOrdersForCustomer_result result = new getOrdersForCustomer_result();
68 ashish 1680
        try {
483 rajveer 1681
          result.success = iface_.getOrdersForCustomer(args.customerId, args.from_date, args.to_date, args.status);
68 ashish 1682
        } catch (TransactionServiceException ex) {
1683
          result.ex = ex;
1684
        } catch (Throwable th) {
483 rajveer 1685
          LOGGER.error("Internal error processing getOrdersForCustomer", th);
1686
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getOrdersForCustomer");
1687
          oprot.writeMessageBegin(new TMessage("getOrdersForCustomer", TMessageType.EXCEPTION, seqid));
68 ashish 1688
          x.write(oprot);
1689
          oprot.writeMessageEnd();
1690
          oprot.getTransport().flush();
1691
          return;
1692
        }
483 rajveer 1693
        oprot.writeMessageBegin(new TMessage("getOrdersForCustomer", TMessageType.REPLY, seqid));
68 ashish 1694
        result.write(oprot);
1695
        oprot.writeMessageEnd();
1696
        oprot.getTransport().flush();
1697
      }
1698
 
1699
    }
1700
 
483 rajveer 1701
    private class createOrder implements ProcessFunction {
68 ashish 1702
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1703
      {
483 rajveer 1704
        createOrder_args args = new createOrder_args();
68 ashish 1705
        args.read(iprot);
1706
        iprot.readMessageEnd();
483 rajveer 1707
        createOrder_result result = new createOrder_result();
68 ashish 1708
        try {
483 rajveer 1709
          result.success = iface_.createOrder(args.order);
68 ashish 1710
          result.setSuccessIsSet(true);
1711
        } catch (TransactionServiceException ex) {
1712
          result.ex = ex;
1713
        } catch (Throwable th) {
483 rajveer 1714
          LOGGER.error("Internal error processing createOrder", th);
1715
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing createOrder");
1716
          oprot.writeMessageBegin(new TMessage("createOrder", TMessageType.EXCEPTION, seqid));
68 ashish 1717
          x.write(oprot);
1718
          oprot.writeMessageEnd();
1719
          oprot.getTransport().flush();
1720
          return;
1721
        }
483 rajveer 1722
        oprot.writeMessageBegin(new TMessage("createOrder", TMessageType.REPLY, seqid));
68 ashish 1723
        result.write(oprot);
1724
        oprot.writeMessageEnd();
1725
        oprot.getTransport().flush();
1726
      }
1727
 
1728
    }
1729
 
483 rajveer 1730
    private class getOrder implements ProcessFunction {
68 ashish 1731
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1732
      {
483 rajveer 1733
        getOrder_args args = new getOrder_args();
68 ashish 1734
        args.read(iprot);
1735
        iprot.readMessageEnd();
483 rajveer 1736
        getOrder_result result = new getOrder_result();
68 ashish 1737
        try {
483 rajveer 1738
          result.success = iface_.getOrder(args.id);
68 ashish 1739
        } catch (TransactionServiceException ex) {
1740
          result.ex = ex;
1741
        } catch (Throwable th) {
483 rajveer 1742
          LOGGER.error("Internal error processing getOrder", th);
1743
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getOrder");
1744
          oprot.writeMessageBegin(new TMessage("getOrder", TMessageType.EXCEPTION, seqid));
68 ashish 1745
          x.write(oprot);
1746
          oprot.writeMessageEnd();
1747
          oprot.getTransport().flush();
1748
          return;
1749
        }
483 rajveer 1750
        oprot.writeMessageBegin(new TMessage("getOrder", TMessageType.REPLY, seqid));
68 ashish 1751
        result.write(oprot);
1752
        oprot.writeMessageEnd();
1753
        oprot.getTransport().flush();
1754
      }
1755
 
1756
    }
1757
 
483 rajveer 1758
    private class getLineItemsForOrder implements ProcessFunction {
68 ashish 1759
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1760
      {
483 rajveer 1761
        getLineItemsForOrder_args args = new getLineItemsForOrder_args();
68 ashish 1762
        args.read(iprot);
1763
        iprot.readMessageEnd();
483 rajveer 1764
        getLineItemsForOrder_result result = new getLineItemsForOrder_result();
68 ashish 1765
        try {
483 rajveer 1766
          result.success = iface_.getLineItemsForOrder(args.orderId);
68 ashish 1767
        } catch (TransactionServiceException ex) {
1768
          result.ex = ex;
1769
        } catch (Throwable th) {
483 rajveer 1770
          LOGGER.error("Internal error processing getLineItemsForOrder", th);
1771
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getLineItemsForOrder");
1772
          oprot.writeMessageBegin(new TMessage("getLineItemsForOrder", TMessageType.EXCEPTION, seqid));
68 ashish 1773
          x.write(oprot);
1774
          oprot.writeMessageEnd();
1775
          oprot.getTransport().flush();
1776
          return;
1777
        }
483 rajveer 1778
        oprot.writeMessageBegin(new TMessage("getLineItemsForOrder", TMessageType.REPLY, seqid));
68 ashish 1779
        result.write(oprot);
1780
        oprot.writeMessageEnd();
1781
        oprot.getTransport().flush();
1782
      }
1783
 
1784
    }
1785
 
1221 chandransh 1786
    private class batchOrders implements ProcessFunction {
1787
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1788
      {
1789
        batchOrders_args args = new batchOrders_args();
1790
        args.read(iprot);
1791
        iprot.readMessageEnd();
1792
        batchOrders_result result = new batchOrders_result();
1793
        try {
1794
          result.success = iface_.batchOrders(args.warehouseId);
1795
        } catch (TransactionServiceException ex) {
1796
          result.ex = ex;
1797
        } catch (Throwable th) {
1798
          LOGGER.error("Internal error processing batchOrders", th);
1799
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing batchOrders");
1800
          oprot.writeMessageBegin(new TMessage("batchOrders", TMessageType.EXCEPTION, seqid));
1801
          x.write(oprot);
1802
          oprot.writeMessageEnd();
1803
          oprot.getTransport().flush();
1804
          return;
1805
        }
1806
        oprot.writeMessageBegin(new TMessage("batchOrders", TMessageType.REPLY, seqid));
1807
        result.write(oprot);
1808
        oprot.writeMessageEnd();
1809
        oprot.getTransport().flush();
1810
      }
1811
 
1812
    }
1813
 
1209 chandransh 1814
    private class markOrderAsOutOfStock implements ProcessFunction {
1815
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1816
      {
1817
        markOrderAsOutOfStock_args args = new markOrderAsOutOfStock_args();
1818
        args.read(iprot);
1819
        iprot.readMessageEnd();
1820
        markOrderAsOutOfStock_result result = new markOrderAsOutOfStock_result();
1821
        try {
1822
          result.success = iface_.markOrderAsOutOfStock(args.orderId);
1823
          result.setSuccessIsSet(true);
1824
        } catch (TransactionServiceException ex) {
1825
          result.ex = ex;
1826
        } catch (Throwable th) {
1827
          LOGGER.error("Internal error processing markOrderAsOutOfStock", th);
1828
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing markOrderAsOutOfStock");
1829
          oprot.writeMessageBegin(new TMessage("markOrderAsOutOfStock", TMessageType.EXCEPTION, seqid));
1830
          x.write(oprot);
1831
          oprot.writeMessageEnd();
1832
          oprot.getTransport().flush();
1833
          return;
1834
        }
1835
        oprot.writeMessageBegin(new TMessage("markOrderAsOutOfStock", TMessageType.REPLY, seqid));
1836
        result.write(oprot);
1837
        oprot.writeMessageEnd();
1838
        oprot.getTransport().flush();
1839
      }
1840
 
1841
    }
1842
 
758 chandransh 1843
    private class markOrdersAsManifested implements ProcessFunction {
1844
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1845
      {
1846
        markOrdersAsManifested_args args = new markOrdersAsManifested_args();
1847
        args.read(iprot);
1848
        iprot.readMessageEnd();
1849
        markOrdersAsManifested_result result = new markOrdersAsManifested_result();
1850
        try {
1851
          result.success = iface_.markOrdersAsManifested(args.warehouseId, args.providerId);
1852
          result.setSuccessIsSet(true);
1853
        } catch (TransactionServiceException ex) {
1854
          result.ex = ex;
1855
        } catch (Throwable th) {
1856
          LOGGER.error("Internal error processing markOrdersAsManifested", th);
1857
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing markOrdersAsManifested");
1858
          oprot.writeMessageBegin(new TMessage("markOrdersAsManifested", TMessageType.EXCEPTION, seqid));
1859
          x.write(oprot);
1860
          oprot.writeMessageEnd();
1861
          oprot.getTransport().flush();
1862
          return;
1863
        }
1864
        oprot.writeMessageBegin(new TMessage("markOrdersAsManifested", TMessageType.REPLY, seqid));
1865
        result.write(oprot);
1866
        oprot.writeMessageEnd();
1867
        oprot.getTransport().flush();
1868
      }
1869
 
1870
    }
1871
 
1114 chandransh 1872
    private class markOrdersAsPickedUp implements ProcessFunction {
1873
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1874
      {
1875
        markOrdersAsPickedUp_args args = new markOrdersAsPickedUp_args();
1876
        args.read(iprot);
1877
        iprot.readMessageEnd();
1878
        markOrdersAsPickedUp_result result = new markOrdersAsPickedUp_result();
1879
        try {
1880
          result.success = iface_.markOrdersAsPickedUp(args.providerId, args.pickupDetails);
1881
        } catch (TransactionServiceException ex) {
1882
          result.ex = ex;
1883
        } catch (Throwable th) {
1884
          LOGGER.error("Internal error processing markOrdersAsPickedUp", th);
1885
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing markOrdersAsPickedUp");
1886
          oprot.writeMessageBegin(new TMessage("markOrdersAsPickedUp", TMessageType.EXCEPTION, seqid));
1887
          x.write(oprot);
1888
          oprot.writeMessageEnd();
1889
          oprot.getTransport().flush();
1890
          return;
1891
        }
1892
        oprot.writeMessageBegin(new TMessage("markOrdersAsPickedUp", TMessageType.REPLY, seqid));
1893
        result.write(oprot);
1894
        oprot.writeMessageEnd();
1895
        oprot.getTransport().flush();
1896
      }
1897
 
1898
    }
1899
 
1133 chandransh 1900
    private class markOrdersAsDelivered implements ProcessFunction {
1901
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1902
      {
1903
        markOrdersAsDelivered_args args = new markOrdersAsDelivered_args();
1904
        args.read(iprot);
1905
        iprot.readMessageEnd();
1906
        markOrdersAsDelivered_result result = new markOrdersAsDelivered_result();
1907
        try {
1908
          iface_.markOrdersAsDelivered(args.providerId, args.deliveredOrders);
1909
        } catch (TransactionServiceException ex) {
1910
          result.ex = ex;
1911
        } catch (Throwable th) {
1912
          LOGGER.error("Internal error processing markOrdersAsDelivered", th);
1913
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing markOrdersAsDelivered");
1914
          oprot.writeMessageBegin(new TMessage("markOrdersAsDelivered", TMessageType.EXCEPTION, seqid));
1915
          x.write(oprot);
1916
          oprot.writeMessageEnd();
1917
          oprot.getTransport().flush();
1918
          return;
1919
        }
1920
        oprot.writeMessageBegin(new TMessage("markOrdersAsDelivered", TMessageType.REPLY, seqid));
1921
        result.write(oprot);
1922
        oprot.writeMessageEnd();
1923
        oprot.getTransport().flush();
1924
      }
1925
 
1926
    }
1927
 
1928
    private class markOrdersAsFailed implements ProcessFunction {
1929
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1930
      {
1931
        markOrdersAsFailed_args args = new markOrdersAsFailed_args();
1932
        args.read(iprot);
1933
        iprot.readMessageEnd();
1934
        markOrdersAsFailed_result result = new markOrdersAsFailed_result();
1935
        try {
1936
          iface_.markOrdersAsFailed(args.providerId, args.returnedOrders);
1937
        } catch (TransactionServiceException ex) {
1938
          result.ex = ex;
1939
        } catch (Throwable th) {
1940
          LOGGER.error("Internal error processing markOrdersAsFailed", th);
1941
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing markOrdersAsFailed");
1942
          oprot.writeMessageBegin(new TMessage("markOrdersAsFailed", TMessageType.EXCEPTION, seqid));
1943
          x.write(oprot);
1944
          oprot.writeMessageEnd();
1945
          oprot.getTransport().flush();
1946
          return;
1947
        }
1948
        oprot.writeMessageBegin(new TMessage("markOrdersAsFailed", TMessageType.REPLY, seqid));
1949
        result.write(oprot);
1950
        oprot.writeMessageEnd();
1951
        oprot.getTransport().flush();
1952
      }
1953
 
1954
    }
1955
 
1245 chandransh 1956
    private class updateNonDeliveryReason implements ProcessFunction {
1957
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1958
      {
1959
        updateNonDeliveryReason_args args = new updateNonDeliveryReason_args();
1960
        args.read(iprot);
1961
        iprot.readMessageEnd();
1962
        updateNonDeliveryReason_result result = new updateNonDeliveryReason_result();
1963
        try {
1964
          iface_.updateNonDeliveryReason(args.providerId, args.undeliveredOrders);
1965
        } catch (TransactionServiceException ex) {
1966
          result.ex = ex;
1967
        } catch (Throwable th) {
1968
          LOGGER.error("Internal error processing updateNonDeliveryReason", th);
1969
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing updateNonDeliveryReason");
1970
          oprot.writeMessageBegin(new TMessage("updateNonDeliveryReason", TMessageType.EXCEPTION, seqid));
1971
          x.write(oprot);
1972
          oprot.writeMessageEnd();
1973
          oprot.getTransport().flush();
1974
          return;
1975
        }
1976
        oprot.writeMessageBegin(new TMessage("updateNonDeliveryReason", TMessageType.REPLY, seqid));
1977
        result.write(oprot);
1978
        oprot.writeMessageEnd();
1979
        oprot.getTransport().flush();
1980
      }
1981
 
1982
    }
1983
 
305 ashish 1984
    private class getAlerts implements ProcessFunction {
1985
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1986
      {
1987
        getAlerts_args args = new getAlerts_args();
1988
        args.read(iprot);
1989
        iprot.readMessageEnd();
1990
        getAlerts_result result = new getAlerts_result();
483 rajveer 1991
        result.success = iface_.getAlerts(args.orderId, args.valid);
305 ashish 1992
        oprot.writeMessageBegin(new TMessage("getAlerts", TMessageType.REPLY, seqid));
1993
        result.write(oprot);
1994
        oprot.writeMessageEnd();
1995
        oprot.getTransport().flush();
1996
      }
1997
 
1998
    }
1999
 
2000
    private class setAlert implements ProcessFunction {
2001
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2002
      {
2003
        setAlert_args args = new setAlert_args();
2004
        args.read(iprot);
2005
        iprot.readMessageEnd();
2006
        setAlert_result result = new setAlert_result();
483 rajveer 2007
        iface_.setAlert(args.orderId, args.unset, args.type, args.comment);
305 ashish 2008
        oprot.writeMessageBegin(new TMessage("setAlert", TMessageType.REPLY, seqid));
2009
        result.write(oprot);
2010
        oprot.writeMessageEnd();
2011
        oprot.getTransport().flush();
2012
      }
2013
 
2014
    }
2015
 
68 ashish 2016
  }
2017
 
764 rajveer 2018
  public static class closeSession_args implements TBase<closeSession_args._Fields>, java.io.Serializable, Cloneable, Comparable<closeSession_args>   {
2019
    private static final TStruct STRUCT_DESC = new TStruct("closeSession_args");
2020
 
2021
 
2022
 
2023
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2024
    public enum _Fields implements TFieldIdEnum {
2025
;
2026
 
2027
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
2028
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2029
 
2030
      static {
2031
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2032
          byId.put((int)field._thriftId, field);
2033
          byName.put(field.getFieldName(), field);
2034
        }
2035
      }
2036
 
2037
      /**
2038
       * Find the _Fields constant that matches fieldId, or null if its not found.
2039
       */
2040
      public static _Fields findByThriftId(int fieldId) {
2041
        return byId.get(fieldId);
2042
      }
2043
 
2044
      /**
2045
       * Find the _Fields constant that matches fieldId, throwing an exception
2046
       * if it is not found.
2047
       */
2048
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2049
        _Fields fields = findByThriftId(fieldId);
2050
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2051
        return fields;
2052
      }
2053
 
2054
      /**
2055
       * Find the _Fields constant that matches name, or null if its not found.
2056
       */
2057
      public static _Fields findByName(String name) {
2058
        return byName.get(name);
2059
      }
2060
 
2061
      private final short _thriftId;
2062
      private final String _fieldName;
2063
 
2064
      _Fields(short thriftId, String fieldName) {
2065
        _thriftId = thriftId;
2066
        _fieldName = fieldName;
2067
      }
2068
 
2069
      public short getThriftFieldId() {
2070
        return _thriftId;
2071
      }
2072
 
2073
      public String getFieldName() {
2074
        return _fieldName;
2075
      }
2076
    }
2077
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
2078
    }});
2079
 
2080
    static {
2081
      FieldMetaData.addStructMetaDataMap(closeSession_args.class, metaDataMap);
2082
    }
2083
 
2084
    public closeSession_args() {
2085
    }
2086
 
2087
    /**
2088
     * Performs a deep copy on <i>other</i>.
2089
     */
2090
    public closeSession_args(closeSession_args other) {
2091
    }
2092
 
2093
    public closeSession_args deepCopy() {
2094
      return new closeSession_args(this);
2095
    }
2096
 
2097
    @Deprecated
2098
    public closeSession_args clone() {
2099
      return new closeSession_args(this);
2100
    }
2101
 
2102
    public void setFieldValue(_Fields field, Object value) {
2103
      switch (field) {
2104
      }
2105
    }
2106
 
2107
    public void setFieldValue(int fieldID, Object value) {
2108
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
2109
    }
2110
 
2111
    public Object getFieldValue(_Fields field) {
2112
      switch (field) {
2113
      }
2114
      throw new IllegalStateException();
2115
    }
2116
 
2117
    public Object getFieldValue(int fieldId) {
2118
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
2119
    }
2120
 
2121
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
2122
    public boolean isSet(_Fields field) {
2123
      switch (field) {
2124
      }
2125
      throw new IllegalStateException();
2126
    }
2127
 
2128
    public boolean isSet(int fieldID) {
2129
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
2130
    }
2131
 
2132
    @Override
2133
    public boolean equals(Object that) {
2134
      if (that == null)
2135
        return false;
2136
      if (that instanceof closeSession_args)
2137
        return this.equals((closeSession_args)that);
2138
      return false;
2139
    }
2140
 
2141
    public boolean equals(closeSession_args that) {
2142
      if (that == null)
2143
        return false;
2144
 
2145
      return true;
2146
    }
2147
 
2148
    @Override
2149
    public int hashCode() {
2150
      return 0;
2151
    }
2152
 
2153
    public int compareTo(closeSession_args other) {
2154
      if (!getClass().equals(other.getClass())) {
2155
        return getClass().getName().compareTo(other.getClass().getName());
2156
      }
2157
 
2158
      int lastComparison = 0;
2159
      closeSession_args typedOther = (closeSession_args)other;
2160
 
2161
      return 0;
2162
    }
2163
 
2164
    public void read(TProtocol iprot) throws TException {
2165
      TField field;
2166
      iprot.readStructBegin();
2167
      while (true)
2168
      {
2169
        field = iprot.readFieldBegin();
2170
        if (field.type == TType.STOP) { 
2171
          break;
2172
        }
2173
        _Fields fieldId = _Fields.findByThriftId(field.id);
2174
        if (fieldId == null) {
2175
          TProtocolUtil.skip(iprot, field.type);
2176
        } else {
2177
          switch (fieldId) {
2178
          }
2179
          iprot.readFieldEnd();
2180
        }
2181
      }
2182
      iprot.readStructEnd();
2183
      validate();
2184
    }
2185
 
2186
    public void write(TProtocol oprot) throws TException {
2187
      validate();
2188
 
2189
      oprot.writeStructBegin(STRUCT_DESC);
2190
      oprot.writeFieldStop();
2191
      oprot.writeStructEnd();
2192
    }
2193
 
2194
    @Override
2195
    public String toString() {
2196
      StringBuilder sb = new StringBuilder("closeSession_args(");
2197
      boolean first = true;
2198
 
2199
      sb.append(")");
2200
      return sb.toString();
2201
    }
2202
 
2203
    public void validate() throws TException {
2204
      // check for required fields
2205
    }
2206
 
2207
  }
2208
 
2209
  public static class closeSession_result implements TBase<closeSession_result._Fields>, java.io.Serializable, Cloneable, Comparable<closeSession_result>   {
2210
    private static final TStruct STRUCT_DESC = new TStruct("closeSession_result");
2211
 
2212
 
2213
 
2214
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2215
    public enum _Fields implements TFieldIdEnum {
2216
;
2217
 
2218
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
2219
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2220
 
2221
      static {
2222
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2223
          byId.put((int)field._thriftId, field);
2224
          byName.put(field.getFieldName(), field);
2225
        }
2226
      }
2227
 
2228
      /**
2229
       * Find the _Fields constant that matches fieldId, or null if its not found.
2230
       */
2231
      public static _Fields findByThriftId(int fieldId) {
2232
        return byId.get(fieldId);
2233
      }
2234
 
2235
      /**
2236
       * Find the _Fields constant that matches fieldId, throwing an exception
2237
       * if it is not found.
2238
       */
2239
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2240
        _Fields fields = findByThriftId(fieldId);
2241
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2242
        return fields;
2243
      }
2244
 
2245
      /**
2246
       * Find the _Fields constant that matches name, or null if its not found.
2247
       */
2248
      public static _Fields findByName(String name) {
2249
        return byName.get(name);
2250
      }
2251
 
2252
      private final short _thriftId;
2253
      private final String _fieldName;
2254
 
2255
      _Fields(short thriftId, String fieldName) {
2256
        _thriftId = thriftId;
2257
        _fieldName = fieldName;
2258
      }
2259
 
2260
      public short getThriftFieldId() {
2261
        return _thriftId;
2262
      }
2263
 
2264
      public String getFieldName() {
2265
        return _fieldName;
2266
      }
2267
    }
2268
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
2269
    }});
2270
 
2271
    static {
2272
      FieldMetaData.addStructMetaDataMap(closeSession_result.class, metaDataMap);
2273
    }
2274
 
2275
    public closeSession_result() {
2276
    }
2277
 
2278
    /**
2279
     * Performs a deep copy on <i>other</i>.
2280
     */
2281
    public closeSession_result(closeSession_result other) {
2282
    }
2283
 
2284
    public closeSession_result deepCopy() {
2285
      return new closeSession_result(this);
2286
    }
2287
 
2288
    @Deprecated
2289
    public closeSession_result clone() {
2290
      return new closeSession_result(this);
2291
    }
2292
 
2293
    public void setFieldValue(_Fields field, Object value) {
2294
      switch (field) {
2295
      }
2296
    }
2297
 
2298
    public void setFieldValue(int fieldID, Object value) {
2299
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
2300
    }
2301
 
2302
    public Object getFieldValue(_Fields field) {
2303
      switch (field) {
2304
      }
2305
      throw new IllegalStateException();
2306
    }
2307
 
2308
    public Object getFieldValue(int fieldId) {
2309
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
2310
    }
2311
 
2312
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
2313
    public boolean isSet(_Fields field) {
2314
      switch (field) {
2315
      }
2316
      throw new IllegalStateException();
2317
    }
2318
 
2319
    public boolean isSet(int fieldID) {
2320
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
2321
    }
2322
 
2323
    @Override
2324
    public boolean equals(Object that) {
2325
      if (that == null)
2326
        return false;
2327
      if (that instanceof closeSession_result)
2328
        return this.equals((closeSession_result)that);
2329
      return false;
2330
    }
2331
 
2332
    public boolean equals(closeSession_result that) {
2333
      if (that == null)
2334
        return false;
2335
 
2336
      return true;
2337
    }
2338
 
2339
    @Override
2340
    public int hashCode() {
2341
      return 0;
2342
    }
2343
 
2344
    public int compareTo(closeSession_result other) {
2345
      if (!getClass().equals(other.getClass())) {
2346
        return getClass().getName().compareTo(other.getClass().getName());
2347
      }
2348
 
2349
      int lastComparison = 0;
2350
      closeSession_result typedOther = (closeSession_result)other;
2351
 
2352
      return 0;
2353
    }
2354
 
2355
    public void read(TProtocol iprot) throws TException {
2356
      TField field;
2357
      iprot.readStructBegin();
2358
      while (true)
2359
      {
2360
        field = iprot.readFieldBegin();
2361
        if (field.type == TType.STOP) { 
2362
          break;
2363
        }
2364
        _Fields fieldId = _Fields.findByThriftId(field.id);
2365
        if (fieldId == null) {
2366
          TProtocolUtil.skip(iprot, field.type);
2367
        } else {
2368
          switch (fieldId) {
2369
          }
2370
          iprot.readFieldEnd();
2371
        }
2372
      }
2373
      iprot.readStructEnd();
2374
      validate();
2375
    }
2376
 
2377
    public void write(TProtocol oprot) throws TException {
2378
      oprot.writeStructBegin(STRUCT_DESC);
2379
 
2380
      oprot.writeFieldStop();
2381
      oprot.writeStructEnd();
2382
    }
2383
 
2384
    @Override
2385
    public String toString() {
2386
      StringBuilder sb = new StringBuilder("closeSession_result(");
2387
      boolean first = true;
2388
 
2389
      sb.append(")");
2390
      return sb.toString();
2391
    }
2392
 
2393
    public void validate() throws TException {
2394
      // check for required fields
2395
    }
2396
 
2397
  }
2398
 
684 chandransh 2399
  public static class createTransaction_args implements TBase<createTransaction_args._Fields>, java.io.Serializable, Cloneable, Comparable<createTransaction_args>   {
68 ashish 2400
    private static final TStruct STRUCT_DESC = new TStruct("createTransaction_args");
2401
 
2402
    private static final TField TRANSACTION_FIELD_DESC = new TField("transaction", TType.STRUCT, (short)1);
2403
 
2404
    private Transaction transaction;
2405
 
2406
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2407
    public enum _Fields implements TFieldIdEnum {
2408
      TRANSACTION((short)1, "transaction");
2409
 
2410
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
2411
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2412
 
2413
      static {
2414
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2415
          byId.put((int)field._thriftId, field);
2416
          byName.put(field.getFieldName(), field);
2417
        }
2418
      }
2419
 
2420
      /**
2421
       * Find the _Fields constant that matches fieldId, or null if its not found.
2422
       */
2423
      public static _Fields findByThriftId(int fieldId) {
2424
        return byId.get(fieldId);
2425
      }
2426
 
2427
      /**
2428
       * Find the _Fields constant that matches fieldId, throwing an exception
2429
       * if it is not found.
2430
       */
2431
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2432
        _Fields fields = findByThriftId(fieldId);
2433
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2434
        return fields;
2435
      }
2436
 
2437
      /**
2438
       * Find the _Fields constant that matches name, or null if its not found.
2439
       */
2440
      public static _Fields findByName(String name) {
2441
        return byName.get(name);
2442
      }
2443
 
2444
      private final short _thriftId;
2445
      private final String _fieldName;
2446
 
2447
      _Fields(short thriftId, String fieldName) {
2448
        _thriftId = thriftId;
2449
        _fieldName = fieldName;
2450
      }
2451
 
2452
      public short getThriftFieldId() {
2453
        return _thriftId;
2454
      }
2455
 
2456
      public String getFieldName() {
2457
        return _fieldName;
2458
      }
2459
    }
2460
 
2461
    // isset id assignments
2462
 
2463
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
2464
      put(_Fields.TRANSACTION, new FieldMetaData("transaction", TFieldRequirementType.DEFAULT, 
2465
          new StructMetaData(TType.STRUCT, Transaction.class)));
2466
    }});
2467
 
2468
    static {
2469
      FieldMetaData.addStructMetaDataMap(createTransaction_args.class, metaDataMap);
2470
    }
2471
 
2472
    public createTransaction_args() {
2473
    }
2474
 
2475
    public createTransaction_args(
2476
      Transaction transaction)
2477
    {
2478
      this();
2479
      this.transaction = transaction;
2480
    }
2481
 
2482
    /**
2483
     * Performs a deep copy on <i>other</i>.
2484
     */
2485
    public createTransaction_args(createTransaction_args other) {
2486
      if (other.isSetTransaction()) {
2487
        this.transaction = new Transaction(other.transaction);
2488
      }
2489
    }
2490
 
2491
    public createTransaction_args deepCopy() {
2492
      return new createTransaction_args(this);
2493
    }
2494
 
2495
    @Deprecated
2496
    public createTransaction_args clone() {
2497
      return new createTransaction_args(this);
2498
    }
2499
 
2500
    public Transaction getTransaction() {
2501
      return this.transaction;
2502
    }
2503
 
2504
    public createTransaction_args setTransaction(Transaction transaction) {
2505
      this.transaction = transaction;
2506
      return this;
2507
    }
2508
 
2509
    public void unsetTransaction() {
2510
      this.transaction = null;
2511
    }
2512
 
2513
    /** Returns true if field transaction is set (has been asigned a value) and false otherwise */
2514
    public boolean isSetTransaction() {
2515
      return this.transaction != null;
2516
    }
2517
 
2518
    public void setTransactionIsSet(boolean value) {
2519
      if (!value) {
2520
        this.transaction = null;
2521
      }
2522
    }
2523
 
2524
    public void setFieldValue(_Fields field, Object value) {
2525
      switch (field) {
2526
      case TRANSACTION:
2527
        if (value == null) {
2528
          unsetTransaction();
2529
        } else {
2530
          setTransaction((Transaction)value);
2531
        }
2532
        break;
2533
 
2534
      }
2535
    }
2536
 
2537
    public void setFieldValue(int fieldID, Object value) {
2538
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
2539
    }
2540
 
2541
    public Object getFieldValue(_Fields field) {
2542
      switch (field) {
2543
      case TRANSACTION:
2544
        return getTransaction();
2545
 
2546
      }
2547
      throw new IllegalStateException();
2548
    }
2549
 
2550
    public Object getFieldValue(int fieldId) {
2551
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
2552
    }
2553
 
2554
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
2555
    public boolean isSet(_Fields field) {
2556
      switch (field) {
2557
      case TRANSACTION:
2558
        return isSetTransaction();
2559
      }
2560
      throw new IllegalStateException();
2561
    }
2562
 
2563
    public boolean isSet(int fieldID) {
2564
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
2565
    }
2566
 
2567
    @Override
2568
    public boolean equals(Object that) {
2569
      if (that == null)
2570
        return false;
2571
      if (that instanceof createTransaction_args)
2572
        return this.equals((createTransaction_args)that);
2573
      return false;
2574
    }
2575
 
2576
    public boolean equals(createTransaction_args that) {
2577
      if (that == null)
2578
        return false;
2579
 
2580
      boolean this_present_transaction = true && this.isSetTransaction();
2581
      boolean that_present_transaction = true && that.isSetTransaction();
2582
      if (this_present_transaction || that_present_transaction) {
2583
        if (!(this_present_transaction && that_present_transaction))
2584
          return false;
2585
        if (!this.transaction.equals(that.transaction))
2586
          return false;
2587
      }
2588
 
2589
      return true;
2590
    }
2591
 
2592
    @Override
2593
    public int hashCode() {
2594
      return 0;
2595
    }
2596
 
684 chandransh 2597
    public int compareTo(createTransaction_args other) {
2598
      if (!getClass().equals(other.getClass())) {
2599
        return getClass().getName().compareTo(other.getClass().getName());
2600
      }
2601
 
2602
      int lastComparison = 0;
2603
      createTransaction_args typedOther = (createTransaction_args)other;
2604
 
2605
      lastComparison = Boolean.valueOf(isSetTransaction()).compareTo(isSetTransaction());
2606
      if (lastComparison != 0) {
2607
        return lastComparison;
2608
      }
2609
      lastComparison = TBaseHelper.compareTo(transaction, typedOther.transaction);
2610
      if (lastComparison != 0) {
2611
        return lastComparison;
2612
      }
2613
      return 0;
2614
    }
2615
 
68 ashish 2616
    public void read(TProtocol iprot) throws TException {
2617
      TField field;
2618
      iprot.readStructBegin();
2619
      while (true)
2620
      {
2621
        field = iprot.readFieldBegin();
2622
        if (field.type == TType.STOP) { 
2623
          break;
2624
        }
2625
        _Fields fieldId = _Fields.findByThriftId(field.id);
2626
        if (fieldId == null) {
2627
          TProtocolUtil.skip(iprot, field.type);
2628
        } else {
2629
          switch (fieldId) {
2630
            case TRANSACTION:
2631
              if (field.type == TType.STRUCT) {
2632
                this.transaction = new Transaction();
2633
                this.transaction.read(iprot);
2634
              } else { 
2635
                TProtocolUtil.skip(iprot, field.type);
2636
              }
2637
              break;
2638
          }
2639
          iprot.readFieldEnd();
2640
        }
2641
      }
2642
      iprot.readStructEnd();
2643
      validate();
2644
    }
2645
 
2646
    public void write(TProtocol oprot) throws TException {
2647
      validate();
2648
 
2649
      oprot.writeStructBegin(STRUCT_DESC);
2650
      if (this.transaction != null) {
2651
        oprot.writeFieldBegin(TRANSACTION_FIELD_DESC);
2652
        this.transaction.write(oprot);
2653
        oprot.writeFieldEnd();
2654
      }
2655
      oprot.writeFieldStop();
2656
      oprot.writeStructEnd();
2657
    }
2658
 
2659
    @Override
2660
    public String toString() {
2661
      StringBuilder sb = new StringBuilder("createTransaction_args(");
2662
      boolean first = true;
2663
 
2664
      sb.append("transaction:");
2665
      if (this.transaction == null) {
2666
        sb.append("null");
2667
      } else {
2668
        sb.append(this.transaction);
2669
      }
2670
      first = false;
2671
      sb.append(")");
2672
      return sb.toString();
2673
    }
2674
 
2675
    public void validate() throws TException {
2676
      // check for required fields
2677
    }
2678
 
2679
  }
2680
 
2681
  public static class createTransaction_result implements TBase<createTransaction_result._Fields>, java.io.Serializable, Cloneable, Comparable<createTransaction_result>   {
2682
    private static final TStruct STRUCT_DESC = new TStruct("createTransaction_result");
2683
 
132 ashish 2684
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
68 ashish 2685
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
2686
 
132 ashish 2687
    private long success;
68 ashish 2688
    private TransactionServiceException ex;
2689
 
2690
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2691
    public enum _Fields implements TFieldIdEnum {
132 ashish 2692
      SUCCESS((short)0, "success"),
68 ashish 2693
      EX((short)1, "ex");
2694
 
2695
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
2696
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2697
 
2698
      static {
2699
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2700
          byId.put((int)field._thriftId, field);
2701
          byName.put(field.getFieldName(), field);
2702
        }
2703
      }
2704
 
2705
      /**
2706
       * Find the _Fields constant that matches fieldId, or null if its not found.
2707
       */
2708
      public static _Fields findByThriftId(int fieldId) {
2709
        return byId.get(fieldId);
2710
      }
2711
 
2712
      /**
2713
       * Find the _Fields constant that matches fieldId, throwing an exception
2714
       * if it is not found.
2715
       */
2716
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2717
        _Fields fields = findByThriftId(fieldId);
2718
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2719
        return fields;
2720
      }
2721
 
2722
      /**
2723
       * Find the _Fields constant that matches name, or null if its not found.
2724
       */
2725
      public static _Fields findByName(String name) {
2726
        return byName.get(name);
2727
      }
2728
 
2729
      private final short _thriftId;
2730
      private final String _fieldName;
2731
 
2732
      _Fields(short thriftId, String fieldName) {
2733
        _thriftId = thriftId;
2734
        _fieldName = fieldName;
2735
      }
2736
 
2737
      public short getThriftFieldId() {
2738
        return _thriftId;
2739
      }
2740
 
2741
      public String getFieldName() {
2742
        return _fieldName;
2743
      }
2744
    }
2745
 
2746
    // isset id assignments
132 ashish 2747
    private static final int __SUCCESS_ISSET_ID = 0;
2748
    private BitSet __isset_bit_vector = new BitSet(1);
68 ashish 2749
 
2750
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
132 ashish 2751
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
2752
          new FieldValueMetaData(TType.I64)));
68 ashish 2753
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
2754
          new FieldValueMetaData(TType.STRUCT)));
2755
    }});
2756
 
2757
    static {
2758
      FieldMetaData.addStructMetaDataMap(createTransaction_result.class, metaDataMap);
2759
    }
2760
 
2761
    public createTransaction_result() {
2762
    }
2763
 
2764
    public createTransaction_result(
132 ashish 2765
      long success,
68 ashish 2766
      TransactionServiceException ex)
2767
    {
2768
      this();
132 ashish 2769
      this.success = success;
2770
      setSuccessIsSet(true);
68 ashish 2771
      this.ex = ex;
2772
    }
2773
 
2774
    /**
2775
     * Performs a deep copy on <i>other</i>.
2776
     */
2777
    public createTransaction_result(createTransaction_result other) {
132 ashish 2778
      __isset_bit_vector.clear();
2779
      __isset_bit_vector.or(other.__isset_bit_vector);
2780
      this.success = other.success;
68 ashish 2781
      if (other.isSetEx()) {
2782
        this.ex = new TransactionServiceException(other.ex);
2783
      }
2784
    }
2785
 
2786
    public createTransaction_result deepCopy() {
2787
      return new createTransaction_result(this);
2788
    }
2789
 
2790
    @Deprecated
2791
    public createTransaction_result clone() {
2792
      return new createTransaction_result(this);
2793
    }
2794
 
132 ashish 2795
    public long getSuccess() {
2796
      return this.success;
2797
    }
2798
 
2799
    public createTransaction_result setSuccess(long success) {
2800
      this.success = success;
2801
      setSuccessIsSet(true);
2802
      return this;
2803
    }
2804
 
2805
    public void unsetSuccess() {
2806
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
2807
    }
2808
 
2809
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
2810
    public boolean isSetSuccess() {
2811
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
2812
    }
2813
 
2814
    public void setSuccessIsSet(boolean value) {
2815
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
2816
    }
2817
 
68 ashish 2818
    public TransactionServiceException getEx() {
2819
      return this.ex;
2820
    }
2821
 
2822
    public createTransaction_result setEx(TransactionServiceException ex) {
2823
      this.ex = ex;
2824
      return this;
2825
    }
2826
 
2827
    public void unsetEx() {
2828
      this.ex = null;
2829
    }
2830
 
2831
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
2832
    public boolean isSetEx() {
2833
      return this.ex != null;
2834
    }
2835
 
2836
    public void setExIsSet(boolean value) {
2837
      if (!value) {
2838
        this.ex = null;
2839
      }
2840
    }
2841
 
2842
    public void setFieldValue(_Fields field, Object value) {
2843
      switch (field) {
132 ashish 2844
      case SUCCESS:
2845
        if (value == null) {
2846
          unsetSuccess();
2847
        } else {
2848
          setSuccess((Long)value);
2849
        }
2850
        break;
2851
 
68 ashish 2852
      case EX:
2853
        if (value == null) {
2854
          unsetEx();
2855
        } else {
2856
          setEx((TransactionServiceException)value);
2857
        }
2858
        break;
2859
 
2860
      }
2861
    }
2862
 
2863
    public void setFieldValue(int fieldID, Object value) {
2864
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
2865
    }
2866
 
2867
    public Object getFieldValue(_Fields field) {
2868
      switch (field) {
132 ashish 2869
      case SUCCESS:
2870
        return new Long(getSuccess());
2871
 
68 ashish 2872
      case EX:
2873
        return getEx();
2874
 
2875
      }
2876
      throw new IllegalStateException();
2877
    }
2878
 
2879
    public Object getFieldValue(int fieldId) {
2880
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
2881
    }
2882
 
2883
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
2884
    public boolean isSet(_Fields field) {
2885
      switch (field) {
132 ashish 2886
      case SUCCESS:
2887
        return isSetSuccess();
68 ashish 2888
      case EX:
2889
        return isSetEx();
2890
      }
2891
      throw new IllegalStateException();
2892
    }
2893
 
2894
    public boolean isSet(int fieldID) {
2895
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
2896
    }
2897
 
2898
    @Override
2899
    public boolean equals(Object that) {
2900
      if (that == null)
2901
        return false;
2902
      if (that instanceof createTransaction_result)
2903
        return this.equals((createTransaction_result)that);
2904
      return false;
2905
    }
2906
 
2907
    public boolean equals(createTransaction_result that) {
2908
      if (that == null)
2909
        return false;
2910
 
132 ashish 2911
      boolean this_present_success = true;
2912
      boolean that_present_success = true;
2913
      if (this_present_success || that_present_success) {
2914
        if (!(this_present_success && that_present_success))
2915
          return false;
2916
        if (this.success != that.success)
2917
          return false;
2918
      }
2919
 
68 ashish 2920
      boolean this_present_ex = true && this.isSetEx();
2921
      boolean that_present_ex = true && that.isSetEx();
2922
      if (this_present_ex || that_present_ex) {
2923
        if (!(this_present_ex && that_present_ex))
2924
          return false;
2925
        if (!this.ex.equals(that.ex))
2926
          return false;
2927
      }
2928
 
2929
      return true;
2930
    }
2931
 
2932
    @Override
2933
    public int hashCode() {
2934
      return 0;
2935
    }
2936
 
2937
    public int compareTo(createTransaction_result other) {
2938
      if (!getClass().equals(other.getClass())) {
2939
        return getClass().getName().compareTo(other.getClass().getName());
2940
      }
2941
 
2942
      int lastComparison = 0;
2943
      createTransaction_result typedOther = (createTransaction_result)other;
2944
 
132 ashish 2945
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
2946
      if (lastComparison != 0) {
2947
        return lastComparison;
2948
      }
2949
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
2950
      if (lastComparison != 0) {
2951
        return lastComparison;
2952
      }
68 ashish 2953
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
2954
      if (lastComparison != 0) {
2955
        return lastComparison;
2956
      }
2957
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
2958
      if (lastComparison != 0) {
2959
        return lastComparison;
2960
      }
2961
      return 0;
2962
    }
2963
 
2964
    public void read(TProtocol iprot) throws TException {
2965
      TField field;
2966
      iprot.readStructBegin();
2967
      while (true)
2968
      {
2969
        field = iprot.readFieldBegin();
2970
        if (field.type == TType.STOP) { 
2971
          break;
2972
        }
2973
        _Fields fieldId = _Fields.findByThriftId(field.id);
2974
        if (fieldId == null) {
2975
          TProtocolUtil.skip(iprot, field.type);
2976
        } else {
2977
          switch (fieldId) {
132 ashish 2978
            case SUCCESS:
2979
              if (field.type == TType.I64) {
2980
                this.success = iprot.readI64();
2981
                setSuccessIsSet(true);
2982
              } else { 
2983
                TProtocolUtil.skip(iprot, field.type);
2984
              }
2985
              break;
68 ashish 2986
            case EX:
2987
              if (field.type == TType.STRUCT) {
2988
                this.ex = new TransactionServiceException();
2989
                this.ex.read(iprot);
2990
              } else { 
2991
                TProtocolUtil.skip(iprot, field.type);
2992
              }
2993
              break;
2994
          }
2995
          iprot.readFieldEnd();
2996
        }
2997
      }
2998
      iprot.readStructEnd();
2999
      validate();
3000
    }
3001
 
3002
    public void write(TProtocol oprot) throws TException {
3003
      oprot.writeStructBegin(STRUCT_DESC);
3004
 
132 ashish 3005
      if (this.isSetSuccess()) {
3006
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
3007
        oprot.writeI64(this.success);
3008
        oprot.writeFieldEnd();
3009
      } else if (this.isSetEx()) {
68 ashish 3010
        oprot.writeFieldBegin(EX_FIELD_DESC);
3011
        this.ex.write(oprot);
3012
        oprot.writeFieldEnd();
3013
      }
3014
      oprot.writeFieldStop();
3015
      oprot.writeStructEnd();
3016
    }
3017
 
3018
    @Override
3019
    public String toString() {
3020
      StringBuilder sb = new StringBuilder("createTransaction_result(");
3021
      boolean first = true;
3022
 
132 ashish 3023
      sb.append("success:");
3024
      sb.append(this.success);
3025
      first = false;
3026
      if (!first) sb.append(", ");
68 ashish 3027
      sb.append("ex:");
3028
      if (this.ex == null) {
3029
        sb.append("null");
3030
      } else {
3031
        sb.append(this.ex);
3032
      }
3033
      first = false;
3034
      sb.append(")");
3035
      return sb.toString();
3036
    }
3037
 
3038
    public void validate() throws TException {
3039
      // check for required fields
3040
    }
3041
 
3042
  }
3043
 
3044
  public static class getTransaction_args implements TBase<getTransaction_args._Fields>, java.io.Serializable, Cloneable, Comparable<getTransaction_args>   {
3045
    private static final TStruct STRUCT_DESC = new TStruct("getTransaction_args");
3046
 
3047
    private static final TField ID_FIELD_DESC = new TField("id", TType.I64, (short)1);
3048
 
3049
    private long id;
3050
 
3051
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3052
    public enum _Fields implements TFieldIdEnum {
3053
      ID((short)1, "id");
3054
 
3055
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3056
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3057
 
3058
      static {
3059
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3060
          byId.put((int)field._thriftId, field);
3061
          byName.put(field.getFieldName(), field);
3062
        }
3063
      }
3064
 
3065
      /**
3066
       * Find the _Fields constant that matches fieldId, or null if its not found.
3067
       */
3068
      public static _Fields findByThriftId(int fieldId) {
3069
        return byId.get(fieldId);
3070
      }
3071
 
3072
      /**
3073
       * Find the _Fields constant that matches fieldId, throwing an exception
3074
       * if it is not found.
3075
       */
3076
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3077
        _Fields fields = findByThriftId(fieldId);
3078
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3079
        return fields;
3080
      }
3081
 
3082
      /**
3083
       * Find the _Fields constant that matches name, or null if its not found.
3084
       */
3085
      public static _Fields findByName(String name) {
3086
        return byName.get(name);
3087
      }
3088
 
3089
      private final short _thriftId;
3090
      private final String _fieldName;
3091
 
3092
      _Fields(short thriftId, String fieldName) {
3093
        _thriftId = thriftId;
3094
        _fieldName = fieldName;
3095
      }
3096
 
3097
      public short getThriftFieldId() {
3098
        return _thriftId;
3099
      }
3100
 
3101
      public String getFieldName() {
3102
        return _fieldName;
3103
      }
3104
    }
3105
 
3106
    // isset id assignments
3107
    private static final int __ID_ISSET_ID = 0;
3108
    private BitSet __isset_bit_vector = new BitSet(1);
3109
 
3110
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3111
      put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, 
3112
          new FieldValueMetaData(TType.I64)));
3113
    }});
3114
 
3115
    static {
3116
      FieldMetaData.addStructMetaDataMap(getTransaction_args.class, metaDataMap);
3117
    }
3118
 
3119
    public getTransaction_args() {
3120
    }
3121
 
3122
    public getTransaction_args(
3123
      long id)
3124
    {
3125
      this();
3126
      this.id = id;
3127
      setIdIsSet(true);
3128
    }
3129
 
3130
    /**
3131
     * Performs a deep copy on <i>other</i>.
3132
     */
3133
    public getTransaction_args(getTransaction_args other) {
3134
      __isset_bit_vector.clear();
3135
      __isset_bit_vector.or(other.__isset_bit_vector);
3136
      this.id = other.id;
3137
    }
3138
 
3139
    public getTransaction_args deepCopy() {
3140
      return new getTransaction_args(this);
3141
    }
3142
 
3143
    @Deprecated
3144
    public getTransaction_args clone() {
3145
      return new getTransaction_args(this);
3146
    }
3147
 
3148
    public long getId() {
3149
      return this.id;
3150
    }
3151
 
3152
    public getTransaction_args setId(long id) {
3153
      this.id = id;
3154
      setIdIsSet(true);
3155
      return this;
3156
    }
3157
 
3158
    public void unsetId() {
3159
      __isset_bit_vector.clear(__ID_ISSET_ID);
3160
    }
3161
 
3162
    /** Returns true if field id is set (has been asigned a value) and false otherwise */
3163
    public boolean isSetId() {
3164
      return __isset_bit_vector.get(__ID_ISSET_ID);
3165
    }
3166
 
3167
    public void setIdIsSet(boolean value) {
3168
      __isset_bit_vector.set(__ID_ISSET_ID, value);
3169
    }
3170
 
3171
    public void setFieldValue(_Fields field, Object value) {
3172
      switch (field) {
3173
      case ID:
3174
        if (value == null) {
3175
          unsetId();
3176
        } else {
3177
          setId((Long)value);
3178
        }
3179
        break;
3180
 
3181
      }
3182
    }
3183
 
3184
    public void setFieldValue(int fieldID, Object value) {
3185
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3186
    }
3187
 
3188
    public Object getFieldValue(_Fields field) {
3189
      switch (field) {
3190
      case ID:
3191
        return new Long(getId());
3192
 
3193
      }
3194
      throw new IllegalStateException();
3195
    }
3196
 
3197
    public Object getFieldValue(int fieldId) {
3198
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3199
    }
3200
 
3201
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3202
    public boolean isSet(_Fields field) {
3203
      switch (field) {
3204
      case ID:
3205
        return isSetId();
3206
      }
3207
      throw new IllegalStateException();
3208
    }
3209
 
3210
    public boolean isSet(int fieldID) {
3211
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3212
    }
3213
 
3214
    @Override
3215
    public boolean equals(Object that) {
3216
      if (that == null)
3217
        return false;
3218
      if (that instanceof getTransaction_args)
3219
        return this.equals((getTransaction_args)that);
3220
      return false;
3221
    }
3222
 
3223
    public boolean equals(getTransaction_args that) {
3224
      if (that == null)
3225
        return false;
3226
 
3227
      boolean this_present_id = true;
3228
      boolean that_present_id = true;
3229
      if (this_present_id || that_present_id) {
3230
        if (!(this_present_id && that_present_id))
3231
          return false;
3232
        if (this.id != that.id)
3233
          return false;
3234
      }
3235
 
3236
      return true;
3237
    }
3238
 
3239
    @Override
3240
    public int hashCode() {
3241
      return 0;
3242
    }
3243
 
3244
    public int compareTo(getTransaction_args other) {
3245
      if (!getClass().equals(other.getClass())) {
3246
        return getClass().getName().compareTo(other.getClass().getName());
3247
      }
3248
 
3249
      int lastComparison = 0;
3250
      getTransaction_args typedOther = (getTransaction_args)other;
3251
 
3252
      lastComparison = Boolean.valueOf(isSetId()).compareTo(isSetId());
3253
      if (lastComparison != 0) {
3254
        return lastComparison;
3255
      }
3256
      lastComparison = TBaseHelper.compareTo(id, typedOther.id);
3257
      if (lastComparison != 0) {
3258
        return lastComparison;
3259
      }
3260
      return 0;
3261
    }
3262
 
3263
    public void read(TProtocol iprot) throws TException {
3264
      TField field;
3265
      iprot.readStructBegin();
3266
      while (true)
3267
      {
3268
        field = iprot.readFieldBegin();
3269
        if (field.type == TType.STOP) { 
3270
          break;
3271
        }
3272
        _Fields fieldId = _Fields.findByThriftId(field.id);
3273
        if (fieldId == null) {
3274
          TProtocolUtil.skip(iprot, field.type);
3275
        } else {
3276
          switch (fieldId) {
3277
            case ID:
3278
              if (field.type == TType.I64) {
3279
                this.id = iprot.readI64();
3280
                setIdIsSet(true);
3281
              } else { 
3282
                TProtocolUtil.skip(iprot, field.type);
3283
              }
3284
              break;
3285
          }
3286
          iprot.readFieldEnd();
3287
        }
3288
      }
3289
      iprot.readStructEnd();
3290
      validate();
3291
    }
3292
 
3293
    public void write(TProtocol oprot) throws TException {
3294
      validate();
3295
 
3296
      oprot.writeStructBegin(STRUCT_DESC);
3297
      oprot.writeFieldBegin(ID_FIELD_DESC);
3298
      oprot.writeI64(this.id);
3299
      oprot.writeFieldEnd();
3300
      oprot.writeFieldStop();
3301
      oprot.writeStructEnd();
3302
    }
3303
 
3304
    @Override
3305
    public String toString() {
3306
      StringBuilder sb = new StringBuilder("getTransaction_args(");
3307
      boolean first = true;
3308
 
3309
      sb.append("id:");
3310
      sb.append(this.id);
3311
      first = false;
3312
      sb.append(")");
3313
      return sb.toString();
3314
    }
3315
 
3316
    public void validate() throws TException {
3317
      // check for required fields
3318
    }
3319
 
3320
  }
3321
 
684 chandransh 3322
  public static class getTransaction_result implements TBase<getTransaction_result._Fields>, java.io.Serializable, Cloneable, Comparable<getTransaction_result>   {
68 ashish 3323
    private static final TStruct STRUCT_DESC = new TStruct("getTransaction_result");
3324
 
3325
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
3326
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
3327
 
3328
    private Transaction success;
3329
    private TransactionServiceException ex;
3330
 
3331
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3332
    public enum _Fields implements TFieldIdEnum {
3333
      SUCCESS((short)0, "success"),
3334
      EX((short)1, "ex");
3335
 
3336
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3337
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3338
 
3339
      static {
3340
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3341
          byId.put((int)field._thriftId, field);
3342
          byName.put(field.getFieldName(), field);
3343
        }
3344
      }
3345
 
3346
      /**
3347
       * Find the _Fields constant that matches fieldId, or null if its not found.
3348
       */
3349
      public static _Fields findByThriftId(int fieldId) {
3350
        return byId.get(fieldId);
3351
      }
3352
 
3353
      /**
3354
       * Find the _Fields constant that matches fieldId, throwing an exception
3355
       * if it is not found.
3356
       */
3357
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3358
        _Fields fields = findByThriftId(fieldId);
3359
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3360
        return fields;
3361
      }
3362
 
3363
      /**
3364
       * Find the _Fields constant that matches name, or null if its not found.
3365
       */
3366
      public static _Fields findByName(String name) {
3367
        return byName.get(name);
3368
      }
3369
 
3370
      private final short _thriftId;
3371
      private final String _fieldName;
3372
 
3373
      _Fields(short thriftId, String fieldName) {
3374
        _thriftId = thriftId;
3375
        _fieldName = fieldName;
3376
      }
3377
 
3378
      public short getThriftFieldId() {
3379
        return _thriftId;
3380
      }
3381
 
3382
      public String getFieldName() {
3383
        return _fieldName;
3384
      }
3385
    }
3386
 
3387
    // isset id assignments
3388
 
3389
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3390
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
3391
          new StructMetaData(TType.STRUCT, Transaction.class)));
3392
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
3393
          new FieldValueMetaData(TType.STRUCT)));
3394
    }});
3395
 
3396
    static {
3397
      FieldMetaData.addStructMetaDataMap(getTransaction_result.class, metaDataMap);
3398
    }
3399
 
3400
    public getTransaction_result() {
3401
    }
3402
 
3403
    public getTransaction_result(
3404
      Transaction success,
3405
      TransactionServiceException ex)
3406
    {
3407
      this();
3408
      this.success = success;
3409
      this.ex = ex;
3410
    }
3411
 
3412
    /**
3413
     * Performs a deep copy on <i>other</i>.
3414
     */
3415
    public getTransaction_result(getTransaction_result other) {
3416
      if (other.isSetSuccess()) {
3417
        this.success = new Transaction(other.success);
3418
      }
3419
      if (other.isSetEx()) {
3420
        this.ex = new TransactionServiceException(other.ex);
3421
      }
3422
    }
3423
 
3424
    public getTransaction_result deepCopy() {
3425
      return new getTransaction_result(this);
3426
    }
3427
 
3428
    @Deprecated
3429
    public getTransaction_result clone() {
3430
      return new getTransaction_result(this);
3431
    }
3432
 
3433
    public Transaction getSuccess() {
3434
      return this.success;
3435
    }
3436
 
3437
    public getTransaction_result setSuccess(Transaction success) {
3438
      this.success = success;
3439
      return this;
3440
    }
3441
 
3442
    public void unsetSuccess() {
3443
      this.success = null;
3444
    }
3445
 
3446
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
3447
    public boolean isSetSuccess() {
3448
      return this.success != null;
3449
    }
3450
 
3451
    public void setSuccessIsSet(boolean value) {
3452
      if (!value) {
3453
        this.success = null;
3454
      }
3455
    }
3456
 
3457
    public TransactionServiceException getEx() {
3458
      return this.ex;
3459
    }
3460
 
3461
    public getTransaction_result setEx(TransactionServiceException ex) {
3462
      this.ex = ex;
3463
      return this;
3464
    }
3465
 
3466
    public void unsetEx() {
3467
      this.ex = null;
3468
    }
3469
 
3470
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
3471
    public boolean isSetEx() {
3472
      return this.ex != null;
3473
    }
3474
 
3475
    public void setExIsSet(boolean value) {
3476
      if (!value) {
3477
        this.ex = null;
3478
      }
3479
    }
3480
 
3481
    public void setFieldValue(_Fields field, Object value) {
3482
      switch (field) {
3483
      case SUCCESS:
3484
        if (value == null) {
3485
          unsetSuccess();
3486
        } else {
3487
          setSuccess((Transaction)value);
3488
        }
3489
        break;
3490
 
3491
      case EX:
3492
        if (value == null) {
3493
          unsetEx();
3494
        } else {
3495
          setEx((TransactionServiceException)value);
3496
        }
3497
        break;
3498
 
3499
      }
3500
    }
3501
 
3502
    public void setFieldValue(int fieldID, Object value) {
3503
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3504
    }
3505
 
3506
    public Object getFieldValue(_Fields field) {
3507
      switch (field) {
3508
      case SUCCESS:
3509
        return getSuccess();
3510
 
3511
      case EX:
3512
        return getEx();
3513
 
3514
      }
3515
      throw new IllegalStateException();
3516
    }
3517
 
3518
    public Object getFieldValue(int fieldId) {
3519
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3520
    }
3521
 
3522
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3523
    public boolean isSet(_Fields field) {
3524
      switch (field) {
3525
      case SUCCESS:
3526
        return isSetSuccess();
3527
      case EX:
3528
        return isSetEx();
3529
      }
3530
      throw new IllegalStateException();
3531
    }
3532
 
3533
    public boolean isSet(int fieldID) {
3534
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3535
    }
3536
 
3537
    @Override
3538
    public boolean equals(Object that) {
3539
      if (that == null)
3540
        return false;
3541
      if (that instanceof getTransaction_result)
3542
        return this.equals((getTransaction_result)that);
3543
      return false;
3544
    }
3545
 
3546
    public boolean equals(getTransaction_result that) {
3547
      if (that == null)
3548
        return false;
3549
 
3550
      boolean this_present_success = true && this.isSetSuccess();
3551
      boolean that_present_success = true && that.isSetSuccess();
3552
      if (this_present_success || that_present_success) {
3553
        if (!(this_present_success && that_present_success))
3554
          return false;
3555
        if (!this.success.equals(that.success))
3556
          return false;
3557
      }
3558
 
3559
      boolean this_present_ex = true && this.isSetEx();
3560
      boolean that_present_ex = true && that.isSetEx();
3561
      if (this_present_ex || that_present_ex) {
3562
        if (!(this_present_ex && that_present_ex))
3563
          return false;
3564
        if (!this.ex.equals(that.ex))
3565
          return false;
3566
      }
3567
 
3568
      return true;
3569
    }
3570
 
3571
    @Override
3572
    public int hashCode() {
3573
      return 0;
3574
    }
3575
 
684 chandransh 3576
    public int compareTo(getTransaction_result other) {
3577
      if (!getClass().equals(other.getClass())) {
3578
        return getClass().getName().compareTo(other.getClass().getName());
3579
      }
3580
 
3581
      int lastComparison = 0;
3582
      getTransaction_result typedOther = (getTransaction_result)other;
3583
 
3584
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
3585
      if (lastComparison != 0) {
3586
        return lastComparison;
3587
      }
3588
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
3589
      if (lastComparison != 0) {
3590
        return lastComparison;
3591
      }
3592
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
3593
      if (lastComparison != 0) {
3594
        return lastComparison;
3595
      }
3596
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
3597
      if (lastComparison != 0) {
3598
        return lastComparison;
3599
      }
3600
      return 0;
3601
    }
3602
 
68 ashish 3603
    public void read(TProtocol iprot) throws TException {
3604
      TField field;
3605
      iprot.readStructBegin();
3606
      while (true)
3607
      {
3608
        field = iprot.readFieldBegin();
3609
        if (field.type == TType.STOP) { 
3610
          break;
3611
        }
3612
        _Fields fieldId = _Fields.findByThriftId(field.id);
3613
        if (fieldId == null) {
3614
          TProtocolUtil.skip(iprot, field.type);
3615
        } else {
3616
          switch (fieldId) {
3617
            case SUCCESS:
3618
              if (field.type == TType.STRUCT) {
3619
                this.success = new Transaction();
3620
                this.success.read(iprot);
3621
              } else { 
3622
                TProtocolUtil.skip(iprot, field.type);
3623
              }
3624
              break;
3625
            case EX:
3626
              if (field.type == TType.STRUCT) {
3627
                this.ex = new TransactionServiceException();
3628
                this.ex.read(iprot);
3629
              } else { 
3630
                TProtocolUtil.skip(iprot, field.type);
3631
              }
3632
              break;
3633
          }
3634
          iprot.readFieldEnd();
3635
        }
3636
      }
3637
      iprot.readStructEnd();
3638
      validate();
3639
    }
3640
 
3641
    public void write(TProtocol oprot) throws TException {
3642
      oprot.writeStructBegin(STRUCT_DESC);
3643
 
3644
      if (this.isSetSuccess()) {
3645
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
3646
        this.success.write(oprot);
3647
        oprot.writeFieldEnd();
3648
      } else if (this.isSetEx()) {
3649
        oprot.writeFieldBegin(EX_FIELD_DESC);
3650
        this.ex.write(oprot);
3651
        oprot.writeFieldEnd();
3652
      }
3653
      oprot.writeFieldStop();
3654
      oprot.writeStructEnd();
3655
    }
3656
 
3657
    @Override
3658
    public String toString() {
3659
      StringBuilder sb = new StringBuilder("getTransaction_result(");
3660
      boolean first = true;
3661
 
3662
      sb.append("success:");
3663
      if (this.success == null) {
3664
        sb.append("null");
3665
      } else {
3666
        sb.append(this.success);
3667
      }
3668
      first = false;
3669
      if (!first) sb.append(", ");
3670
      sb.append("ex:");
3671
      if (this.ex == null) {
3672
        sb.append("null");
3673
      } else {
3674
        sb.append(this.ex);
3675
      }
3676
      first = false;
3677
      sb.append(")");
3678
      return sb.toString();
3679
    }
3680
 
3681
    public void validate() throws TException {
3682
      // check for required fields
3683
    }
3684
 
3685
  }
3686
 
3687
  public static class getTransactionsForCustomer_args implements TBase<getTransactionsForCustomer_args._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionsForCustomer_args>   {
3688
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionsForCustomer_args");
3689
 
3690
    private static final TField CUSTOMER_ID_FIELD_DESC = new TField("customerId", TType.I64, (short)1);
132 ashish 3691
    private static final TField FROM_DATE_FIELD_DESC = new TField("from_date", TType.I64, (short)2);
3692
    private static final TField TO_DATE_FIELD_DESC = new TField("to_date", TType.I64, (short)3);
68 ashish 3693
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)4);
3694
 
3695
    private long customerId;
132 ashish 3696
    private long from_date;
3697
    private long to_date;
68 ashish 3698
    private TransactionStatus status;
3699
 
3700
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3701
    public enum _Fields implements TFieldIdEnum {
3702
      CUSTOMER_ID((short)1, "customerId"),
132 ashish 3703
      FROM_DATE((short)2, "from_date"),
3704
      TO_DATE((short)3, "to_date"),
68 ashish 3705
      /**
3706
       * 
3707
       * @see TransactionStatus
3708
       */
3709
      STATUS((short)4, "status");
3710
 
3711
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3712
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3713
 
3714
      static {
3715
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3716
          byId.put((int)field._thriftId, field);
3717
          byName.put(field.getFieldName(), field);
3718
        }
3719
      }
3720
 
3721
      /**
3722
       * Find the _Fields constant that matches fieldId, or null if its not found.
3723
       */
3724
      public static _Fields findByThriftId(int fieldId) {
3725
        return byId.get(fieldId);
3726
      }
3727
 
3728
      /**
3729
       * Find the _Fields constant that matches fieldId, throwing an exception
3730
       * if it is not found.
3731
       */
3732
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3733
        _Fields fields = findByThriftId(fieldId);
3734
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3735
        return fields;
3736
      }
3737
 
3738
      /**
3739
       * Find the _Fields constant that matches name, or null if its not found.
3740
       */
3741
      public static _Fields findByName(String name) {
3742
        return byName.get(name);
3743
      }
3744
 
3745
      private final short _thriftId;
3746
      private final String _fieldName;
3747
 
3748
      _Fields(short thriftId, String fieldName) {
3749
        _thriftId = thriftId;
3750
        _fieldName = fieldName;
3751
      }
3752
 
3753
      public short getThriftFieldId() {
3754
        return _thriftId;
3755
      }
3756
 
3757
      public String getFieldName() {
3758
        return _fieldName;
3759
      }
3760
    }
3761
 
3762
    // isset id assignments
3763
    private static final int __CUSTOMERID_ISSET_ID = 0;
132 ashish 3764
    private static final int __FROM_DATE_ISSET_ID = 1;
3765
    private static final int __TO_DATE_ISSET_ID = 2;
68 ashish 3766
    private BitSet __isset_bit_vector = new BitSet(3);
3767
 
3768
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3769
      put(_Fields.CUSTOMER_ID, new FieldMetaData("customerId", TFieldRequirementType.DEFAULT, 
3770
          new FieldValueMetaData(TType.I64)));
132 ashish 3771
      put(_Fields.FROM_DATE, new FieldMetaData("from_date", TFieldRequirementType.DEFAULT, 
68 ashish 3772
          new FieldValueMetaData(TType.I64)));
132 ashish 3773
      put(_Fields.TO_DATE, new FieldMetaData("to_date", TFieldRequirementType.DEFAULT, 
68 ashish 3774
          new FieldValueMetaData(TType.I64)));
3775
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
3776
          new EnumMetaData(TType.ENUM, TransactionStatus.class)));
3777
    }});
3778
 
3779
    static {
3780
      FieldMetaData.addStructMetaDataMap(getTransactionsForCustomer_args.class, metaDataMap);
3781
    }
3782
 
3783
    public getTransactionsForCustomer_args() {
3784
    }
3785
 
3786
    public getTransactionsForCustomer_args(
3787
      long customerId,
132 ashish 3788
      long from_date,
3789
      long to_date,
68 ashish 3790
      TransactionStatus status)
3791
    {
3792
      this();
3793
      this.customerId = customerId;
3794
      setCustomerIdIsSet(true);
132 ashish 3795
      this.from_date = from_date;
3796
      setFrom_dateIsSet(true);
3797
      this.to_date = to_date;
3798
      setTo_dateIsSet(true);
68 ashish 3799
      this.status = status;
3800
    }
3801
 
3802
    /**
3803
     * Performs a deep copy on <i>other</i>.
3804
     */
3805
    public getTransactionsForCustomer_args(getTransactionsForCustomer_args other) {
3806
      __isset_bit_vector.clear();
3807
      __isset_bit_vector.or(other.__isset_bit_vector);
3808
      this.customerId = other.customerId;
132 ashish 3809
      this.from_date = other.from_date;
3810
      this.to_date = other.to_date;
68 ashish 3811
      if (other.isSetStatus()) {
3812
        this.status = other.status;
3813
      }
3814
    }
3815
 
3816
    public getTransactionsForCustomer_args deepCopy() {
3817
      return new getTransactionsForCustomer_args(this);
3818
    }
3819
 
3820
    @Deprecated
3821
    public getTransactionsForCustomer_args clone() {
3822
      return new getTransactionsForCustomer_args(this);
3823
    }
3824
 
3825
    public long getCustomerId() {
3826
      return this.customerId;
3827
    }
3828
 
3829
    public getTransactionsForCustomer_args setCustomerId(long customerId) {
3830
      this.customerId = customerId;
3831
      setCustomerIdIsSet(true);
3832
      return this;
3833
    }
3834
 
3835
    public void unsetCustomerId() {
3836
      __isset_bit_vector.clear(__CUSTOMERID_ISSET_ID);
3837
    }
3838
 
3839
    /** Returns true if field customerId is set (has been asigned a value) and false otherwise */
3840
    public boolean isSetCustomerId() {
3841
      return __isset_bit_vector.get(__CUSTOMERID_ISSET_ID);
3842
    }
3843
 
3844
    public void setCustomerIdIsSet(boolean value) {
3845
      __isset_bit_vector.set(__CUSTOMERID_ISSET_ID, value);
3846
    }
3847
 
132 ashish 3848
    public long getFrom_date() {
3849
      return this.from_date;
68 ashish 3850
    }
3851
 
132 ashish 3852
    public getTransactionsForCustomer_args setFrom_date(long from_date) {
3853
      this.from_date = from_date;
3854
      setFrom_dateIsSet(true);
68 ashish 3855
      return this;
3856
    }
3857
 
132 ashish 3858
    public void unsetFrom_date() {
3859
      __isset_bit_vector.clear(__FROM_DATE_ISSET_ID);
68 ashish 3860
    }
3861
 
132 ashish 3862
    /** Returns true if field from_date is set (has been asigned a value) and false otherwise */
3863
    public boolean isSetFrom_date() {
3864
      return __isset_bit_vector.get(__FROM_DATE_ISSET_ID);
68 ashish 3865
    }
3866
 
132 ashish 3867
    public void setFrom_dateIsSet(boolean value) {
3868
      __isset_bit_vector.set(__FROM_DATE_ISSET_ID, value);
68 ashish 3869
    }
3870
 
132 ashish 3871
    public long getTo_date() {
3872
      return this.to_date;
68 ashish 3873
    }
3874
 
132 ashish 3875
    public getTransactionsForCustomer_args setTo_date(long to_date) {
3876
      this.to_date = to_date;
3877
      setTo_dateIsSet(true);
68 ashish 3878
      return this;
3879
    }
3880
 
132 ashish 3881
    public void unsetTo_date() {
3882
      __isset_bit_vector.clear(__TO_DATE_ISSET_ID);
68 ashish 3883
    }
3884
 
132 ashish 3885
    /** Returns true if field to_date is set (has been asigned a value) and false otherwise */
3886
    public boolean isSetTo_date() {
3887
      return __isset_bit_vector.get(__TO_DATE_ISSET_ID);
68 ashish 3888
    }
3889
 
132 ashish 3890
    public void setTo_dateIsSet(boolean value) {
3891
      __isset_bit_vector.set(__TO_DATE_ISSET_ID, value);
68 ashish 3892
    }
3893
 
3894
    /**
3895
     * 
3896
     * @see TransactionStatus
3897
     */
3898
    public TransactionStatus getStatus() {
3899
      return this.status;
3900
    }
3901
 
3902
    /**
3903
     * 
3904
     * @see TransactionStatus
3905
     */
3906
    public getTransactionsForCustomer_args setStatus(TransactionStatus status) {
3907
      this.status = status;
3908
      return this;
3909
    }
3910
 
3911
    public void unsetStatus() {
3912
      this.status = null;
3913
    }
3914
 
3915
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
3916
    public boolean isSetStatus() {
3917
      return this.status != null;
3918
    }
3919
 
3920
    public void setStatusIsSet(boolean value) {
3921
      if (!value) {
3922
        this.status = null;
3923
      }
3924
    }
3925
 
3926
    public void setFieldValue(_Fields field, Object value) {
3927
      switch (field) {
3928
      case CUSTOMER_ID:
3929
        if (value == null) {
3930
          unsetCustomerId();
3931
        } else {
3932
          setCustomerId((Long)value);
3933
        }
3934
        break;
3935
 
132 ashish 3936
      case FROM_DATE:
68 ashish 3937
        if (value == null) {
132 ashish 3938
          unsetFrom_date();
68 ashish 3939
        } else {
132 ashish 3940
          setFrom_date((Long)value);
68 ashish 3941
        }
3942
        break;
3943
 
132 ashish 3944
      case TO_DATE:
68 ashish 3945
        if (value == null) {
132 ashish 3946
          unsetTo_date();
68 ashish 3947
        } else {
132 ashish 3948
          setTo_date((Long)value);
68 ashish 3949
        }
3950
        break;
3951
 
3952
      case STATUS:
3953
        if (value == null) {
3954
          unsetStatus();
3955
        } else {
3956
          setStatus((TransactionStatus)value);
3957
        }
3958
        break;
3959
 
3960
      }
3961
    }
3962
 
3963
    public void setFieldValue(int fieldID, Object value) {
3964
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3965
    }
3966
 
3967
    public Object getFieldValue(_Fields field) {
3968
      switch (field) {
3969
      case CUSTOMER_ID:
3970
        return new Long(getCustomerId());
3971
 
132 ashish 3972
      case FROM_DATE:
3973
        return new Long(getFrom_date());
68 ashish 3974
 
132 ashish 3975
      case TO_DATE:
3976
        return new Long(getTo_date());
68 ashish 3977
 
3978
      case STATUS:
3979
        return getStatus();
3980
 
3981
      }
3982
      throw new IllegalStateException();
3983
    }
3984
 
3985
    public Object getFieldValue(int fieldId) {
3986
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3987
    }
3988
 
3989
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3990
    public boolean isSet(_Fields field) {
3991
      switch (field) {
3992
      case CUSTOMER_ID:
3993
        return isSetCustomerId();
132 ashish 3994
      case FROM_DATE:
3995
        return isSetFrom_date();
3996
      case TO_DATE:
3997
        return isSetTo_date();
68 ashish 3998
      case STATUS:
3999
        return isSetStatus();
4000
      }
4001
      throw new IllegalStateException();
4002
    }
4003
 
4004
    public boolean isSet(int fieldID) {
4005
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4006
    }
4007
 
4008
    @Override
4009
    public boolean equals(Object that) {
4010
      if (that == null)
4011
        return false;
4012
      if (that instanceof getTransactionsForCustomer_args)
4013
        return this.equals((getTransactionsForCustomer_args)that);
4014
      return false;
4015
    }
4016
 
4017
    public boolean equals(getTransactionsForCustomer_args that) {
4018
      if (that == null)
4019
        return false;
4020
 
4021
      boolean this_present_customerId = true;
4022
      boolean that_present_customerId = true;
4023
      if (this_present_customerId || that_present_customerId) {
4024
        if (!(this_present_customerId && that_present_customerId))
4025
          return false;
4026
        if (this.customerId != that.customerId)
4027
          return false;
4028
      }
4029
 
132 ashish 4030
      boolean this_present_from_date = true;
4031
      boolean that_present_from_date = true;
4032
      if (this_present_from_date || that_present_from_date) {
4033
        if (!(this_present_from_date && that_present_from_date))
68 ashish 4034
          return false;
132 ashish 4035
        if (this.from_date != that.from_date)
68 ashish 4036
          return false;
4037
      }
4038
 
132 ashish 4039
      boolean this_present_to_date = true;
4040
      boolean that_present_to_date = true;
4041
      if (this_present_to_date || that_present_to_date) {
4042
        if (!(this_present_to_date && that_present_to_date))
68 ashish 4043
          return false;
132 ashish 4044
        if (this.to_date != that.to_date)
68 ashish 4045
          return false;
4046
      }
4047
 
4048
      boolean this_present_status = true && this.isSetStatus();
4049
      boolean that_present_status = true && that.isSetStatus();
4050
      if (this_present_status || that_present_status) {
4051
        if (!(this_present_status && that_present_status))
4052
          return false;
4053
        if (!this.status.equals(that.status))
4054
          return false;
4055
      }
4056
 
4057
      return true;
4058
    }
4059
 
4060
    @Override
4061
    public int hashCode() {
4062
      return 0;
4063
    }
4064
 
4065
    public int compareTo(getTransactionsForCustomer_args other) {
4066
      if (!getClass().equals(other.getClass())) {
4067
        return getClass().getName().compareTo(other.getClass().getName());
4068
      }
4069
 
4070
      int lastComparison = 0;
4071
      getTransactionsForCustomer_args typedOther = (getTransactionsForCustomer_args)other;
4072
 
4073
      lastComparison = Boolean.valueOf(isSetCustomerId()).compareTo(isSetCustomerId());
4074
      if (lastComparison != 0) {
4075
        return lastComparison;
4076
      }
4077
      lastComparison = TBaseHelper.compareTo(customerId, typedOther.customerId);
4078
      if (lastComparison != 0) {
4079
        return lastComparison;
4080
      }
132 ashish 4081
      lastComparison = Boolean.valueOf(isSetFrom_date()).compareTo(isSetFrom_date());
68 ashish 4082
      if (lastComparison != 0) {
4083
        return lastComparison;
4084
      }
132 ashish 4085
      lastComparison = TBaseHelper.compareTo(from_date, typedOther.from_date);
68 ashish 4086
      if (lastComparison != 0) {
4087
        return lastComparison;
4088
      }
132 ashish 4089
      lastComparison = Boolean.valueOf(isSetTo_date()).compareTo(isSetTo_date());
68 ashish 4090
      if (lastComparison != 0) {
4091
        return lastComparison;
4092
      }
132 ashish 4093
      lastComparison = TBaseHelper.compareTo(to_date, typedOther.to_date);
68 ashish 4094
      if (lastComparison != 0) {
4095
        return lastComparison;
4096
      }
4097
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
4098
      if (lastComparison != 0) {
4099
        return lastComparison;
4100
      }
4101
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
4102
      if (lastComparison != 0) {
4103
        return lastComparison;
4104
      }
4105
      return 0;
4106
    }
4107
 
4108
    public void read(TProtocol iprot) throws TException {
4109
      TField field;
4110
      iprot.readStructBegin();
4111
      while (true)
4112
      {
4113
        field = iprot.readFieldBegin();
4114
        if (field.type == TType.STOP) { 
4115
          break;
4116
        }
4117
        _Fields fieldId = _Fields.findByThriftId(field.id);
4118
        if (fieldId == null) {
4119
          TProtocolUtil.skip(iprot, field.type);
4120
        } else {
4121
          switch (fieldId) {
4122
            case CUSTOMER_ID:
4123
              if (field.type == TType.I64) {
4124
                this.customerId = iprot.readI64();
4125
                setCustomerIdIsSet(true);
4126
              } else { 
4127
                TProtocolUtil.skip(iprot, field.type);
4128
              }
4129
              break;
132 ashish 4130
            case FROM_DATE:
68 ashish 4131
              if (field.type == TType.I64) {
132 ashish 4132
                this.from_date = iprot.readI64();
4133
                setFrom_dateIsSet(true);
68 ashish 4134
              } else { 
4135
                TProtocolUtil.skip(iprot, field.type);
4136
              }
4137
              break;
132 ashish 4138
            case TO_DATE:
68 ashish 4139
              if (field.type == TType.I64) {
132 ashish 4140
                this.to_date = iprot.readI64();
4141
                setTo_dateIsSet(true);
68 ashish 4142
              } else { 
4143
                TProtocolUtil.skip(iprot, field.type);
4144
              }
4145
              break;
4146
            case STATUS:
4147
              if (field.type == TType.I32) {
4148
                this.status = TransactionStatus.findByValue(iprot.readI32());
4149
              } else { 
4150
                TProtocolUtil.skip(iprot, field.type);
4151
              }
4152
              break;
4153
          }
4154
          iprot.readFieldEnd();
4155
        }
4156
      }
4157
      iprot.readStructEnd();
4158
      validate();
4159
    }
4160
 
4161
    public void write(TProtocol oprot) throws TException {
4162
      validate();
4163
 
4164
      oprot.writeStructBegin(STRUCT_DESC);
4165
      oprot.writeFieldBegin(CUSTOMER_ID_FIELD_DESC);
4166
      oprot.writeI64(this.customerId);
4167
      oprot.writeFieldEnd();
132 ashish 4168
      oprot.writeFieldBegin(FROM_DATE_FIELD_DESC);
4169
      oprot.writeI64(this.from_date);
68 ashish 4170
      oprot.writeFieldEnd();
132 ashish 4171
      oprot.writeFieldBegin(TO_DATE_FIELD_DESC);
4172
      oprot.writeI64(this.to_date);
68 ashish 4173
      oprot.writeFieldEnd();
4174
      if (this.status != null) {
4175
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
4176
        oprot.writeI32(this.status.getValue());
4177
        oprot.writeFieldEnd();
4178
      }
4179
      oprot.writeFieldStop();
4180
      oprot.writeStructEnd();
4181
    }
4182
 
4183
    @Override
4184
    public String toString() {
4185
      StringBuilder sb = new StringBuilder("getTransactionsForCustomer_args(");
4186
      boolean first = true;
4187
 
4188
      sb.append("customerId:");
4189
      sb.append(this.customerId);
4190
      first = false;
4191
      if (!first) sb.append(", ");
132 ashish 4192
      sb.append("from_date:");
4193
      sb.append(this.from_date);
68 ashish 4194
      first = false;
4195
      if (!first) sb.append(", ");
132 ashish 4196
      sb.append("to_date:");
4197
      sb.append(this.to_date);
68 ashish 4198
      first = false;
4199
      if (!first) sb.append(", ");
4200
      sb.append("status:");
4201
      if (this.status == null) {
4202
        sb.append("null");
4203
      } else {
4204
        String status_name = status.name();
4205
        if (status_name != null) {
4206
          sb.append(status_name);
4207
          sb.append(" (");
4208
        }
4209
        sb.append(this.status);
4210
        if (status_name != null) {
4211
          sb.append(")");
4212
        }
4213
      }
4214
      first = false;
4215
      sb.append(")");
4216
      return sb.toString();
4217
    }
4218
 
4219
    public void validate() throws TException {
4220
      // check for required fields
4221
    }
4222
 
4223
  }
4224
 
684 chandransh 4225
  public static class getTransactionsForCustomer_result implements TBase<getTransactionsForCustomer_result._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionsForCustomer_result>   {
68 ashish 4226
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionsForCustomer_result");
4227
 
4228
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
4229
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
4230
 
4231
    private List<Transaction> success;
4232
    private TransactionServiceException ex;
4233
 
4234
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4235
    public enum _Fields implements TFieldIdEnum {
4236
      SUCCESS((short)0, "success"),
4237
      EX((short)1, "ex");
4238
 
4239
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4240
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4241
 
4242
      static {
4243
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4244
          byId.put((int)field._thriftId, field);
4245
          byName.put(field.getFieldName(), field);
4246
        }
4247
      }
4248
 
4249
      /**
4250
       * Find the _Fields constant that matches fieldId, or null if its not found.
4251
       */
4252
      public static _Fields findByThriftId(int fieldId) {
4253
        return byId.get(fieldId);
4254
      }
4255
 
4256
      /**
4257
       * Find the _Fields constant that matches fieldId, throwing an exception
4258
       * if it is not found.
4259
       */
4260
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4261
        _Fields fields = findByThriftId(fieldId);
4262
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4263
        return fields;
4264
      }
4265
 
4266
      /**
4267
       * Find the _Fields constant that matches name, or null if its not found.
4268
       */
4269
      public static _Fields findByName(String name) {
4270
        return byName.get(name);
4271
      }
4272
 
4273
      private final short _thriftId;
4274
      private final String _fieldName;
4275
 
4276
      _Fields(short thriftId, String fieldName) {
4277
        _thriftId = thriftId;
4278
        _fieldName = fieldName;
4279
      }
4280
 
4281
      public short getThriftFieldId() {
4282
        return _thriftId;
4283
      }
4284
 
4285
      public String getFieldName() {
4286
        return _fieldName;
4287
      }
4288
    }
4289
 
4290
    // isset id assignments
4291
 
4292
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
4293
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
4294
          new ListMetaData(TType.LIST, 
4295
              new StructMetaData(TType.STRUCT, Transaction.class))));
4296
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
4297
          new FieldValueMetaData(TType.STRUCT)));
4298
    }});
4299
 
4300
    static {
4301
      FieldMetaData.addStructMetaDataMap(getTransactionsForCustomer_result.class, metaDataMap);
4302
    }
4303
 
4304
    public getTransactionsForCustomer_result() {
4305
    }
4306
 
4307
    public getTransactionsForCustomer_result(
4308
      List<Transaction> success,
4309
      TransactionServiceException ex)
4310
    {
4311
      this();
4312
      this.success = success;
4313
      this.ex = ex;
4314
    }
4315
 
4316
    /**
4317
     * Performs a deep copy on <i>other</i>.
4318
     */
4319
    public getTransactionsForCustomer_result(getTransactionsForCustomer_result other) {
4320
      if (other.isSetSuccess()) {
4321
        List<Transaction> __this__success = new ArrayList<Transaction>();
4322
        for (Transaction other_element : other.success) {
4323
          __this__success.add(new Transaction(other_element));
4324
        }
4325
        this.success = __this__success;
4326
      }
4327
      if (other.isSetEx()) {
4328
        this.ex = new TransactionServiceException(other.ex);
4329
      }
4330
    }
4331
 
4332
    public getTransactionsForCustomer_result deepCopy() {
4333
      return new getTransactionsForCustomer_result(this);
4334
    }
4335
 
4336
    @Deprecated
4337
    public getTransactionsForCustomer_result clone() {
4338
      return new getTransactionsForCustomer_result(this);
4339
    }
4340
 
4341
    public int getSuccessSize() {
4342
      return (this.success == null) ? 0 : this.success.size();
4343
    }
4344
 
4345
    public java.util.Iterator<Transaction> getSuccessIterator() {
4346
      return (this.success == null) ? null : this.success.iterator();
4347
    }
4348
 
4349
    public void addToSuccess(Transaction elem) {
4350
      if (this.success == null) {
4351
        this.success = new ArrayList<Transaction>();
4352
      }
4353
      this.success.add(elem);
4354
    }
4355
 
4356
    public List<Transaction> getSuccess() {
4357
      return this.success;
4358
    }
4359
 
4360
    public getTransactionsForCustomer_result setSuccess(List<Transaction> success) {
4361
      this.success = success;
4362
      return this;
4363
    }
4364
 
4365
    public void unsetSuccess() {
4366
      this.success = null;
4367
    }
4368
 
4369
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
4370
    public boolean isSetSuccess() {
4371
      return this.success != null;
4372
    }
4373
 
4374
    public void setSuccessIsSet(boolean value) {
4375
      if (!value) {
4376
        this.success = null;
4377
      }
4378
    }
4379
 
4380
    public TransactionServiceException getEx() {
4381
      return this.ex;
4382
    }
4383
 
4384
    public getTransactionsForCustomer_result setEx(TransactionServiceException ex) {
4385
      this.ex = ex;
4386
      return this;
4387
    }
4388
 
4389
    public void unsetEx() {
4390
      this.ex = null;
4391
    }
4392
 
4393
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
4394
    public boolean isSetEx() {
4395
      return this.ex != null;
4396
    }
4397
 
4398
    public void setExIsSet(boolean value) {
4399
      if (!value) {
4400
        this.ex = null;
4401
      }
4402
    }
4403
 
4404
    public void setFieldValue(_Fields field, Object value) {
4405
      switch (field) {
4406
      case SUCCESS:
4407
        if (value == null) {
4408
          unsetSuccess();
4409
        } else {
4410
          setSuccess((List<Transaction>)value);
4411
        }
4412
        break;
4413
 
4414
      case EX:
4415
        if (value == null) {
4416
          unsetEx();
4417
        } else {
4418
          setEx((TransactionServiceException)value);
4419
        }
4420
        break;
4421
 
4422
      }
4423
    }
4424
 
4425
    public void setFieldValue(int fieldID, Object value) {
4426
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4427
    }
4428
 
4429
    public Object getFieldValue(_Fields field) {
4430
      switch (field) {
4431
      case SUCCESS:
4432
        return getSuccess();
4433
 
4434
      case EX:
4435
        return getEx();
4436
 
4437
      }
4438
      throw new IllegalStateException();
4439
    }
4440
 
4441
    public Object getFieldValue(int fieldId) {
4442
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4443
    }
4444
 
4445
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4446
    public boolean isSet(_Fields field) {
4447
      switch (field) {
4448
      case SUCCESS:
4449
        return isSetSuccess();
4450
      case EX:
4451
        return isSetEx();
4452
      }
4453
      throw new IllegalStateException();
4454
    }
4455
 
4456
    public boolean isSet(int fieldID) {
4457
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4458
    }
4459
 
4460
    @Override
4461
    public boolean equals(Object that) {
4462
      if (that == null)
4463
        return false;
4464
      if (that instanceof getTransactionsForCustomer_result)
4465
        return this.equals((getTransactionsForCustomer_result)that);
4466
      return false;
4467
    }
4468
 
4469
    public boolean equals(getTransactionsForCustomer_result that) {
4470
      if (that == null)
4471
        return false;
4472
 
4473
      boolean this_present_success = true && this.isSetSuccess();
4474
      boolean that_present_success = true && that.isSetSuccess();
4475
      if (this_present_success || that_present_success) {
4476
        if (!(this_present_success && that_present_success))
4477
          return false;
4478
        if (!this.success.equals(that.success))
4479
          return false;
4480
      }
4481
 
4482
      boolean this_present_ex = true && this.isSetEx();
4483
      boolean that_present_ex = true && that.isSetEx();
4484
      if (this_present_ex || that_present_ex) {
4485
        if (!(this_present_ex && that_present_ex))
4486
          return false;
4487
        if (!this.ex.equals(that.ex))
4488
          return false;
4489
      }
4490
 
4491
      return true;
4492
    }
4493
 
4494
    @Override
4495
    public int hashCode() {
4496
      return 0;
4497
    }
4498
 
684 chandransh 4499
    public int compareTo(getTransactionsForCustomer_result other) {
4500
      if (!getClass().equals(other.getClass())) {
4501
        return getClass().getName().compareTo(other.getClass().getName());
4502
      }
4503
 
4504
      int lastComparison = 0;
4505
      getTransactionsForCustomer_result typedOther = (getTransactionsForCustomer_result)other;
4506
 
4507
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
4508
      if (lastComparison != 0) {
4509
        return lastComparison;
4510
      }
4511
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
4512
      if (lastComparison != 0) {
4513
        return lastComparison;
4514
      }
4515
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
4516
      if (lastComparison != 0) {
4517
        return lastComparison;
4518
      }
4519
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
4520
      if (lastComparison != 0) {
4521
        return lastComparison;
4522
      }
4523
      return 0;
4524
    }
4525
 
68 ashish 4526
    public void read(TProtocol iprot) throws TException {
4527
      TField field;
4528
      iprot.readStructBegin();
4529
      while (true)
4530
      {
4531
        field = iprot.readFieldBegin();
4532
        if (field.type == TType.STOP) { 
4533
          break;
4534
        }
4535
        _Fields fieldId = _Fields.findByThriftId(field.id);
4536
        if (fieldId == null) {
4537
          TProtocolUtil.skip(iprot, field.type);
4538
        } else {
4539
          switch (fieldId) {
4540
            case SUCCESS:
4541
              if (field.type == TType.LIST) {
4542
                {
684 chandransh 4543
                  TList _list8 = iprot.readListBegin();
4544
                  this.success = new ArrayList<Transaction>(_list8.size);
4545
                  for (int _i9 = 0; _i9 < _list8.size; ++_i9)
68 ashish 4546
                  {
684 chandransh 4547
                    Transaction _elem10;
4548
                    _elem10 = new Transaction();
4549
                    _elem10.read(iprot);
4550
                    this.success.add(_elem10);
68 ashish 4551
                  }
4552
                  iprot.readListEnd();
4553
                }
4554
              } else { 
4555
                TProtocolUtil.skip(iprot, field.type);
4556
              }
4557
              break;
4558
            case EX:
4559
              if (field.type == TType.STRUCT) {
4560
                this.ex = new TransactionServiceException();
4561
                this.ex.read(iprot);
4562
              } else { 
4563
                TProtocolUtil.skip(iprot, field.type);
4564
              }
4565
              break;
4566
          }
4567
          iprot.readFieldEnd();
4568
        }
4569
      }
4570
      iprot.readStructEnd();
4571
      validate();
4572
    }
4573
 
4574
    public void write(TProtocol oprot) throws TException {
4575
      oprot.writeStructBegin(STRUCT_DESC);
4576
 
4577
      if (this.isSetSuccess()) {
4578
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
4579
        {
4580
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
684 chandransh 4581
          for (Transaction _iter11 : this.success)
68 ashish 4582
          {
684 chandransh 4583
            _iter11.write(oprot);
68 ashish 4584
          }
4585
          oprot.writeListEnd();
4586
        }
4587
        oprot.writeFieldEnd();
4588
      } else if (this.isSetEx()) {
4589
        oprot.writeFieldBegin(EX_FIELD_DESC);
4590
        this.ex.write(oprot);
4591
        oprot.writeFieldEnd();
4592
      }
4593
      oprot.writeFieldStop();
4594
      oprot.writeStructEnd();
4595
    }
4596
 
4597
    @Override
4598
    public String toString() {
4599
      StringBuilder sb = new StringBuilder("getTransactionsForCustomer_result(");
4600
      boolean first = true;
4601
 
4602
      sb.append("success:");
4603
      if (this.success == null) {
4604
        sb.append("null");
4605
      } else {
4606
        sb.append(this.success);
4607
      }
4608
      first = false;
4609
      if (!first) sb.append(", ");
4610
      sb.append("ex:");
4611
      if (this.ex == null) {
4612
        sb.append("null");
4613
      } else {
4614
        sb.append(this.ex);
4615
      }
4616
      first = false;
4617
      sb.append(")");
4618
      return sb.toString();
4619
    }
4620
 
4621
    public void validate() throws TException {
4622
      // check for required fields
4623
    }
4624
 
4625
  }
4626
 
132 ashish 4627
  public static class getTransactionsForShoppingCartId_args implements TBase<getTransactionsForShoppingCartId_args._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionsForShoppingCartId_args>   {
4628
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionsForShoppingCartId_args");
4629
 
4630
    private static final TField SHOPPING_CART_ID_FIELD_DESC = new TField("shoppingCartId", TType.I64, (short)1);
4631
 
4632
    private long shoppingCartId;
4633
 
4634
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4635
    public enum _Fields implements TFieldIdEnum {
4636
      SHOPPING_CART_ID((short)1, "shoppingCartId");
4637
 
4638
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4639
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4640
 
4641
      static {
4642
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4643
          byId.put((int)field._thriftId, field);
4644
          byName.put(field.getFieldName(), field);
4645
        }
4646
      }
4647
 
4648
      /**
4649
       * Find the _Fields constant that matches fieldId, or null if its not found.
4650
       */
4651
      public static _Fields findByThriftId(int fieldId) {
4652
        return byId.get(fieldId);
4653
      }
4654
 
4655
      /**
4656
       * Find the _Fields constant that matches fieldId, throwing an exception
4657
       * if it is not found.
4658
       */
4659
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4660
        _Fields fields = findByThriftId(fieldId);
4661
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4662
        return fields;
4663
      }
4664
 
4665
      /**
4666
       * Find the _Fields constant that matches name, or null if its not found.
4667
       */
4668
      public static _Fields findByName(String name) {
4669
        return byName.get(name);
4670
      }
4671
 
4672
      private final short _thriftId;
4673
      private final String _fieldName;
4674
 
4675
      _Fields(short thriftId, String fieldName) {
4676
        _thriftId = thriftId;
4677
        _fieldName = fieldName;
4678
      }
4679
 
4680
      public short getThriftFieldId() {
4681
        return _thriftId;
4682
      }
4683
 
4684
      public String getFieldName() {
4685
        return _fieldName;
4686
      }
4687
    }
4688
 
4689
    // isset id assignments
4690
    private static final int __SHOPPINGCARTID_ISSET_ID = 0;
4691
    private BitSet __isset_bit_vector = new BitSet(1);
4692
 
4693
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
4694
      put(_Fields.SHOPPING_CART_ID, new FieldMetaData("shoppingCartId", TFieldRequirementType.DEFAULT, 
4695
          new FieldValueMetaData(TType.I64)));
4696
    }});
4697
 
4698
    static {
4699
      FieldMetaData.addStructMetaDataMap(getTransactionsForShoppingCartId_args.class, metaDataMap);
4700
    }
4701
 
4702
    public getTransactionsForShoppingCartId_args() {
4703
    }
4704
 
4705
    public getTransactionsForShoppingCartId_args(
4706
      long shoppingCartId)
4707
    {
4708
      this();
4709
      this.shoppingCartId = shoppingCartId;
4710
      setShoppingCartIdIsSet(true);
4711
    }
4712
 
4713
    /**
4714
     * Performs a deep copy on <i>other</i>.
4715
     */
4716
    public getTransactionsForShoppingCartId_args(getTransactionsForShoppingCartId_args other) {
4717
      __isset_bit_vector.clear();
4718
      __isset_bit_vector.or(other.__isset_bit_vector);
4719
      this.shoppingCartId = other.shoppingCartId;
4720
    }
4721
 
4722
    public getTransactionsForShoppingCartId_args deepCopy() {
4723
      return new getTransactionsForShoppingCartId_args(this);
4724
    }
4725
 
4726
    @Deprecated
4727
    public getTransactionsForShoppingCartId_args clone() {
4728
      return new getTransactionsForShoppingCartId_args(this);
4729
    }
4730
 
4731
    public long getShoppingCartId() {
4732
      return this.shoppingCartId;
4733
    }
4734
 
4735
    public getTransactionsForShoppingCartId_args setShoppingCartId(long shoppingCartId) {
4736
      this.shoppingCartId = shoppingCartId;
4737
      setShoppingCartIdIsSet(true);
4738
      return this;
4739
    }
4740
 
4741
    public void unsetShoppingCartId() {
4742
      __isset_bit_vector.clear(__SHOPPINGCARTID_ISSET_ID);
4743
    }
4744
 
4745
    /** Returns true if field shoppingCartId is set (has been asigned a value) and false otherwise */
4746
    public boolean isSetShoppingCartId() {
4747
      return __isset_bit_vector.get(__SHOPPINGCARTID_ISSET_ID);
4748
    }
4749
 
4750
    public void setShoppingCartIdIsSet(boolean value) {
4751
      __isset_bit_vector.set(__SHOPPINGCARTID_ISSET_ID, value);
4752
    }
4753
 
4754
    public void setFieldValue(_Fields field, Object value) {
4755
      switch (field) {
4756
      case SHOPPING_CART_ID:
4757
        if (value == null) {
4758
          unsetShoppingCartId();
4759
        } else {
4760
          setShoppingCartId((Long)value);
4761
        }
4762
        break;
4763
 
4764
      }
4765
    }
4766
 
4767
    public void setFieldValue(int fieldID, Object value) {
4768
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4769
    }
4770
 
4771
    public Object getFieldValue(_Fields field) {
4772
      switch (field) {
4773
      case SHOPPING_CART_ID:
4774
        return new Long(getShoppingCartId());
4775
 
4776
      }
4777
      throw new IllegalStateException();
4778
    }
4779
 
4780
    public Object getFieldValue(int fieldId) {
4781
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4782
    }
4783
 
4784
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4785
    public boolean isSet(_Fields field) {
4786
      switch (field) {
4787
      case SHOPPING_CART_ID:
4788
        return isSetShoppingCartId();
4789
      }
4790
      throw new IllegalStateException();
4791
    }
4792
 
4793
    public boolean isSet(int fieldID) {
4794
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4795
    }
4796
 
4797
    @Override
4798
    public boolean equals(Object that) {
4799
      if (that == null)
4800
        return false;
4801
      if (that instanceof getTransactionsForShoppingCartId_args)
4802
        return this.equals((getTransactionsForShoppingCartId_args)that);
4803
      return false;
4804
    }
4805
 
4806
    public boolean equals(getTransactionsForShoppingCartId_args that) {
4807
      if (that == null)
4808
        return false;
4809
 
4810
      boolean this_present_shoppingCartId = true;
4811
      boolean that_present_shoppingCartId = true;
4812
      if (this_present_shoppingCartId || that_present_shoppingCartId) {
4813
        if (!(this_present_shoppingCartId && that_present_shoppingCartId))
4814
          return false;
4815
        if (this.shoppingCartId != that.shoppingCartId)
4816
          return false;
4817
      }
4818
 
4819
      return true;
4820
    }
4821
 
4822
    @Override
4823
    public int hashCode() {
4824
      return 0;
4825
    }
4826
 
4827
    public int compareTo(getTransactionsForShoppingCartId_args other) {
4828
      if (!getClass().equals(other.getClass())) {
4829
        return getClass().getName().compareTo(other.getClass().getName());
4830
      }
4831
 
4832
      int lastComparison = 0;
4833
      getTransactionsForShoppingCartId_args typedOther = (getTransactionsForShoppingCartId_args)other;
4834
 
4835
      lastComparison = Boolean.valueOf(isSetShoppingCartId()).compareTo(isSetShoppingCartId());
4836
      if (lastComparison != 0) {
4837
        return lastComparison;
4838
      }
4839
      lastComparison = TBaseHelper.compareTo(shoppingCartId, typedOther.shoppingCartId);
4840
      if (lastComparison != 0) {
4841
        return lastComparison;
4842
      }
4843
      return 0;
4844
    }
4845
 
4846
    public void read(TProtocol iprot) throws TException {
4847
      TField field;
4848
      iprot.readStructBegin();
4849
      while (true)
4850
      {
4851
        field = iprot.readFieldBegin();
4852
        if (field.type == TType.STOP) { 
4853
          break;
4854
        }
4855
        _Fields fieldId = _Fields.findByThriftId(field.id);
4856
        if (fieldId == null) {
4857
          TProtocolUtil.skip(iprot, field.type);
4858
        } else {
4859
          switch (fieldId) {
4860
            case SHOPPING_CART_ID:
4861
              if (field.type == TType.I64) {
4862
                this.shoppingCartId = iprot.readI64();
4863
                setShoppingCartIdIsSet(true);
4864
              } else { 
4865
                TProtocolUtil.skip(iprot, field.type);
4866
              }
4867
              break;
4868
          }
4869
          iprot.readFieldEnd();
4870
        }
4871
      }
4872
      iprot.readStructEnd();
4873
      validate();
4874
    }
4875
 
4876
    public void write(TProtocol oprot) throws TException {
4877
      validate();
4878
 
4879
      oprot.writeStructBegin(STRUCT_DESC);
4880
      oprot.writeFieldBegin(SHOPPING_CART_ID_FIELD_DESC);
4881
      oprot.writeI64(this.shoppingCartId);
4882
      oprot.writeFieldEnd();
4883
      oprot.writeFieldStop();
4884
      oprot.writeStructEnd();
4885
    }
4886
 
4887
    @Override
4888
    public String toString() {
4889
      StringBuilder sb = new StringBuilder("getTransactionsForShoppingCartId_args(");
4890
      boolean first = true;
4891
 
4892
      sb.append("shoppingCartId:");
4893
      sb.append(this.shoppingCartId);
4894
      first = false;
4895
      sb.append(")");
4896
      return sb.toString();
4897
    }
4898
 
4899
    public void validate() throws TException {
4900
      // check for required fields
4901
    }
4902
 
4903
  }
4904
 
684 chandransh 4905
  public static class getTransactionsForShoppingCartId_result implements TBase<getTransactionsForShoppingCartId_result._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionsForShoppingCartId_result>   {
132 ashish 4906
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionsForShoppingCartId_result");
4907
 
4908
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
4909
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
4910
 
4911
    private List<Transaction> success;
4912
    private TransactionServiceException ex;
4913
 
4914
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4915
    public enum _Fields implements TFieldIdEnum {
4916
      SUCCESS((short)0, "success"),
4917
      EX((short)1, "ex");
4918
 
4919
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4920
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4921
 
4922
      static {
4923
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4924
          byId.put((int)field._thriftId, field);
4925
          byName.put(field.getFieldName(), field);
4926
        }
4927
      }
4928
 
4929
      /**
4930
       * Find the _Fields constant that matches fieldId, or null if its not found.
4931
       */
4932
      public static _Fields findByThriftId(int fieldId) {
4933
        return byId.get(fieldId);
4934
      }
4935
 
4936
      /**
4937
       * Find the _Fields constant that matches fieldId, throwing an exception
4938
       * if it is not found.
4939
       */
4940
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4941
        _Fields fields = findByThriftId(fieldId);
4942
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4943
        return fields;
4944
      }
4945
 
4946
      /**
4947
       * Find the _Fields constant that matches name, or null if its not found.
4948
       */
4949
      public static _Fields findByName(String name) {
4950
        return byName.get(name);
4951
      }
4952
 
4953
      private final short _thriftId;
4954
      private final String _fieldName;
4955
 
4956
      _Fields(short thriftId, String fieldName) {
4957
        _thriftId = thriftId;
4958
        _fieldName = fieldName;
4959
      }
4960
 
4961
      public short getThriftFieldId() {
4962
        return _thriftId;
4963
      }
4964
 
4965
      public String getFieldName() {
4966
        return _fieldName;
4967
      }
4968
    }
4969
 
4970
    // isset id assignments
4971
 
4972
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
4973
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
4974
          new ListMetaData(TType.LIST, 
4975
              new StructMetaData(TType.STRUCT, Transaction.class))));
4976
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
4977
          new FieldValueMetaData(TType.STRUCT)));
4978
    }});
4979
 
4980
    static {
4981
      FieldMetaData.addStructMetaDataMap(getTransactionsForShoppingCartId_result.class, metaDataMap);
4982
    }
4983
 
4984
    public getTransactionsForShoppingCartId_result() {
4985
    }
4986
 
4987
    public getTransactionsForShoppingCartId_result(
4988
      List<Transaction> success,
4989
      TransactionServiceException ex)
4990
    {
4991
      this();
4992
      this.success = success;
4993
      this.ex = ex;
4994
    }
4995
 
4996
    /**
4997
     * Performs a deep copy on <i>other</i>.
4998
     */
4999
    public getTransactionsForShoppingCartId_result(getTransactionsForShoppingCartId_result other) {
5000
      if (other.isSetSuccess()) {
5001
        List<Transaction> __this__success = new ArrayList<Transaction>();
5002
        for (Transaction other_element : other.success) {
5003
          __this__success.add(new Transaction(other_element));
5004
        }
5005
        this.success = __this__success;
5006
      }
5007
      if (other.isSetEx()) {
5008
        this.ex = new TransactionServiceException(other.ex);
5009
      }
5010
    }
5011
 
5012
    public getTransactionsForShoppingCartId_result deepCopy() {
5013
      return new getTransactionsForShoppingCartId_result(this);
5014
    }
5015
 
5016
    @Deprecated
5017
    public getTransactionsForShoppingCartId_result clone() {
5018
      return new getTransactionsForShoppingCartId_result(this);
5019
    }
5020
 
5021
    public int getSuccessSize() {
5022
      return (this.success == null) ? 0 : this.success.size();
5023
    }
5024
 
5025
    public java.util.Iterator<Transaction> getSuccessIterator() {
5026
      return (this.success == null) ? null : this.success.iterator();
5027
    }
5028
 
5029
    public void addToSuccess(Transaction elem) {
5030
      if (this.success == null) {
5031
        this.success = new ArrayList<Transaction>();
5032
      }
5033
      this.success.add(elem);
5034
    }
5035
 
5036
    public List<Transaction> getSuccess() {
5037
      return this.success;
5038
    }
5039
 
5040
    public getTransactionsForShoppingCartId_result setSuccess(List<Transaction> success) {
5041
      this.success = success;
5042
      return this;
5043
    }
5044
 
5045
    public void unsetSuccess() {
5046
      this.success = null;
5047
    }
5048
 
5049
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
5050
    public boolean isSetSuccess() {
5051
      return this.success != null;
5052
    }
5053
 
5054
    public void setSuccessIsSet(boolean value) {
5055
      if (!value) {
5056
        this.success = null;
5057
      }
5058
    }
5059
 
5060
    public TransactionServiceException getEx() {
5061
      return this.ex;
5062
    }
5063
 
5064
    public getTransactionsForShoppingCartId_result setEx(TransactionServiceException ex) {
5065
      this.ex = ex;
5066
      return this;
5067
    }
5068
 
5069
    public void unsetEx() {
5070
      this.ex = null;
5071
    }
5072
 
5073
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
5074
    public boolean isSetEx() {
5075
      return this.ex != null;
5076
    }
5077
 
5078
    public void setExIsSet(boolean value) {
5079
      if (!value) {
5080
        this.ex = null;
5081
      }
5082
    }
5083
 
5084
    public void setFieldValue(_Fields field, Object value) {
5085
      switch (field) {
5086
      case SUCCESS:
5087
        if (value == null) {
5088
          unsetSuccess();
5089
        } else {
5090
          setSuccess((List<Transaction>)value);
5091
        }
5092
        break;
5093
 
5094
      case EX:
5095
        if (value == null) {
5096
          unsetEx();
5097
        } else {
5098
          setEx((TransactionServiceException)value);
5099
        }
5100
        break;
5101
 
5102
      }
5103
    }
5104
 
5105
    public void setFieldValue(int fieldID, Object value) {
5106
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5107
    }
5108
 
5109
    public Object getFieldValue(_Fields field) {
5110
      switch (field) {
5111
      case SUCCESS:
5112
        return getSuccess();
5113
 
5114
      case EX:
5115
        return getEx();
5116
 
5117
      }
5118
      throw new IllegalStateException();
5119
    }
5120
 
5121
    public Object getFieldValue(int fieldId) {
5122
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5123
    }
5124
 
5125
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5126
    public boolean isSet(_Fields field) {
5127
      switch (field) {
5128
      case SUCCESS:
5129
        return isSetSuccess();
5130
      case EX:
5131
        return isSetEx();
5132
      }
5133
      throw new IllegalStateException();
5134
    }
5135
 
5136
    public boolean isSet(int fieldID) {
5137
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5138
    }
5139
 
5140
    @Override
5141
    public boolean equals(Object that) {
5142
      if (that == null)
5143
        return false;
5144
      if (that instanceof getTransactionsForShoppingCartId_result)
5145
        return this.equals((getTransactionsForShoppingCartId_result)that);
5146
      return false;
5147
    }
5148
 
5149
    public boolean equals(getTransactionsForShoppingCartId_result that) {
5150
      if (that == null)
5151
        return false;
5152
 
5153
      boolean this_present_success = true && this.isSetSuccess();
5154
      boolean that_present_success = true && that.isSetSuccess();
5155
      if (this_present_success || that_present_success) {
5156
        if (!(this_present_success && that_present_success))
5157
          return false;
5158
        if (!this.success.equals(that.success))
5159
          return false;
5160
      }
5161
 
5162
      boolean this_present_ex = true && this.isSetEx();
5163
      boolean that_present_ex = true && that.isSetEx();
5164
      if (this_present_ex || that_present_ex) {
5165
        if (!(this_present_ex && that_present_ex))
5166
          return false;
5167
        if (!this.ex.equals(that.ex))
5168
          return false;
5169
      }
5170
 
5171
      return true;
5172
    }
5173
 
5174
    @Override
5175
    public int hashCode() {
5176
      return 0;
5177
    }
5178
 
684 chandransh 5179
    public int compareTo(getTransactionsForShoppingCartId_result other) {
5180
      if (!getClass().equals(other.getClass())) {
5181
        return getClass().getName().compareTo(other.getClass().getName());
5182
      }
5183
 
5184
      int lastComparison = 0;
5185
      getTransactionsForShoppingCartId_result typedOther = (getTransactionsForShoppingCartId_result)other;
5186
 
5187
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
5188
      if (lastComparison != 0) {
5189
        return lastComparison;
5190
      }
5191
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
5192
      if (lastComparison != 0) {
5193
        return lastComparison;
5194
      }
5195
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
5196
      if (lastComparison != 0) {
5197
        return lastComparison;
5198
      }
5199
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
5200
      if (lastComparison != 0) {
5201
        return lastComparison;
5202
      }
5203
      return 0;
5204
    }
5205
 
132 ashish 5206
    public void read(TProtocol iprot) throws TException {
5207
      TField field;
5208
      iprot.readStructBegin();
5209
      while (true)
5210
      {
5211
        field = iprot.readFieldBegin();
5212
        if (field.type == TType.STOP) { 
5213
          break;
5214
        }
5215
        _Fields fieldId = _Fields.findByThriftId(field.id);
5216
        if (fieldId == null) {
5217
          TProtocolUtil.skip(iprot, field.type);
5218
        } else {
5219
          switch (fieldId) {
5220
            case SUCCESS:
5221
              if (field.type == TType.LIST) {
5222
                {
684 chandransh 5223
                  TList _list12 = iprot.readListBegin();
5224
                  this.success = new ArrayList<Transaction>(_list12.size);
5225
                  for (int _i13 = 0; _i13 < _list12.size; ++_i13)
132 ashish 5226
                  {
684 chandransh 5227
                    Transaction _elem14;
5228
                    _elem14 = new Transaction();
5229
                    _elem14.read(iprot);
5230
                    this.success.add(_elem14);
132 ashish 5231
                  }
5232
                  iprot.readListEnd();
5233
                }
5234
              } else { 
5235
                TProtocolUtil.skip(iprot, field.type);
5236
              }
5237
              break;
5238
            case EX:
5239
              if (field.type == TType.STRUCT) {
5240
                this.ex = new TransactionServiceException();
5241
                this.ex.read(iprot);
5242
              } else { 
5243
                TProtocolUtil.skip(iprot, field.type);
5244
              }
5245
              break;
5246
          }
5247
          iprot.readFieldEnd();
5248
        }
5249
      }
5250
      iprot.readStructEnd();
5251
      validate();
5252
    }
5253
 
5254
    public void write(TProtocol oprot) throws TException {
5255
      oprot.writeStructBegin(STRUCT_DESC);
5256
 
5257
      if (this.isSetSuccess()) {
5258
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
5259
        {
5260
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
684 chandransh 5261
          for (Transaction _iter15 : this.success)
132 ashish 5262
          {
684 chandransh 5263
            _iter15.write(oprot);
132 ashish 5264
          }
5265
          oprot.writeListEnd();
5266
        }
5267
        oprot.writeFieldEnd();
5268
      } else if (this.isSetEx()) {
5269
        oprot.writeFieldBegin(EX_FIELD_DESC);
5270
        this.ex.write(oprot);
5271
        oprot.writeFieldEnd();
5272
      }
5273
      oprot.writeFieldStop();
5274
      oprot.writeStructEnd();
5275
    }
5276
 
5277
    @Override
5278
    public String toString() {
5279
      StringBuilder sb = new StringBuilder("getTransactionsForShoppingCartId_result(");
5280
      boolean first = true;
5281
 
5282
      sb.append("success:");
5283
      if (this.success == null) {
5284
        sb.append("null");
5285
      } else {
5286
        sb.append(this.success);
5287
      }
5288
      first = false;
5289
      if (!first) sb.append(", ");
5290
      sb.append("ex:");
5291
      if (this.ex == null) {
5292
        sb.append("null");
5293
      } else {
5294
        sb.append(this.ex);
5295
      }
5296
      first = false;
5297
      sb.append(")");
5298
      return sb.toString();
5299
    }
5300
 
5301
    public void validate() throws TException {
5302
      // check for required fields
5303
    }
5304
 
5305
  }
5306
 
68 ashish 5307
  public static class getTransactionStatus_args implements TBase<getTransactionStatus_args._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionStatus_args>   {
5308
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionStatus_args");
5309
 
5310
    private static final TField TRANSACTION_ID_FIELD_DESC = new TField("transactionId", TType.I64, (short)1);
5311
 
5312
    private long transactionId;
5313
 
5314
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5315
    public enum _Fields implements TFieldIdEnum {
5316
      TRANSACTION_ID((short)1, "transactionId");
5317
 
5318
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5319
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5320
 
5321
      static {
5322
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5323
          byId.put((int)field._thriftId, field);
5324
          byName.put(field.getFieldName(), field);
5325
        }
5326
      }
5327
 
5328
      /**
5329
       * Find the _Fields constant that matches fieldId, or null if its not found.
5330
       */
5331
      public static _Fields findByThriftId(int fieldId) {
5332
        return byId.get(fieldId);
5333
      }
5334
 
5335
      /**
5336
       * Find the _Fields constant that matches fieldId, throwing an exception
5337
       * if it is not found.
5338
       */
5339
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5340
        _Fields fields = findByThriftId(fieldId);
5341
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5342
        return fields;
5343
      }
5344
 
5345
      /**
5346
       * Find the _Fields constant that matches name, or null if its not found.
5347
       */
5348
      public static _Fields findByName(String name) {
5349
        return byName.get(name);
5350
      }
5351
 
5352
      private final short _thriftId;
5353
      private final String _fieldName;
5354
 
5355
      _Fields(short thriftId, String fieldName) {
5356
        _thriftId = thriftId;
5357
        _fieldName = fieldName;
5358
      }
5359
 
5360
      public short getThriftFieldId() {
5361
        return _thriftId;
5362
      }
5363
 
5364
      public String getFieldName() {
5365
        return _fieldName;
5366
      }
5367
    }
5368
 
5369
    // isset id assignments
5370
    private static final int __TRANSACTIONID_ISSET_ID = 0;
5371
    private BitSet __isset_bit_vector = new BitSet(1);
5372
 
5373
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
5374
      put(_Fields.TRANSACTION_ID, new FieldMetaData("transactionId", TFieldRequirementType.DEFAULT, 
5375
          new FieldValueMetaData(TType.I64)));
5376
    }});
5377
 
5378
    static {
5379
      FieldMetaData.addStructMetaDataMap(getTransactionStatus_args.class, metaDataMap);
5380
    }
5381
 
5382
    public getTransactionStatus_args() {
5383
    }
5384
 
5385
    public getTransactionStatus_args(
5386
      long transactionId)
5387
    {
5388
      this();
5389
      this.transactionId = transactionId;
5390
      setTransactionIdIsSet(true);
5391
    }
5392
 
5393
    /**
5394
     * Performs a deep copy on <i>other</i>.
5395
     */
5396
    public getTransactionStatus_args(getTransactionStatus_args other) {
5397
      __isset_bit_vector.clear();
5398
      __isset_bit_vector.or(other.__isset_bit_vector);
5399
      this.transactionId = other.transactionId;
5400
    }
5401
 
5402
    public getTransactionStatus_args deepCopy() {
5403
      return new getTransactionStatus_args(this);
5404
    }
5405
 
5406
    @Deprecated
5407
    public getTransactionStatus_args clone() {
5408
      return new getTransactionStatus_args(this);
5409
    }
5410
 
5411
    public long getTransactionId() {
5412
      return this.transactionId;
5413
    }
5414
 
5415
    public getTransactionStatus_args setTransactionId(long transactionId) {
5416
      this.transactionId = transactionId;
5417
      setTransactionIdIsSet(true);
5418
      return this;
5419
    }
5420
 
5421
    public void unsetTransactionId() {
5422
      __isset_bit_vector.clear(__TRANSACTIONID_ISSET_ID);
5423
    }
5424
 
5425
    /** Returns true if field transactionId is set (has been asigned a value) and false otherwise */
5426
    public boolean isSetTransactionId() {
5427
      return __isset_bit_vector.get(__TRANSACTIONID_ISSET_ID);
5428
    }
5429
 
5430
    public void setTransactionIdIsSet(boolean value) {
5431
      __isset_bit_vector.set(__TRANSACTIONID_ISSET_ID, value);
5432
    }
5433
 
5434
    public void setFieldValue(_Fields field, Object value) {
5435
      switch (field) {
5436
      case TRANSACTION_ID:
5437
        if (value == null) {
5438
          unsetTransactionId();
5439
        } else {
5440
          setTransactionId((Long)value);
5441
        }
5442
        break;
5443
 
5444
      }
5445
    }
5446
 
5447
    public void setFieldValue(int fieldID, Object value) {
5448
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5449
    }
5450
 
5451
    public Object getFieldValue(_Fields field) {
5452
      switch (field) {
5453
      case TRANSACTION_ID:
5454
        return new Long(getTransactionId());
5455
 
5456
      }
5457
      throw new IllegalStateException();
5458
    }
5459
 
5460
    public Object getFieldValue(int fieldId) {
5461
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5462
    }
5463
 
5464
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5465
    public boolean isSet(_Fields field) {
5466
      switch (field) {
5467
      case TRANSACTION_ID:
5468
        return isSetTransactionId();
5469
      }
5470
      throw new IllegalStateException();
5471
    }
5472
 
5473
    public boolean isSet(int fieldID) {
5474
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5475
    }
5476
 
5477
    @Override
5478
    public boolean equals(Object that) {
5479
      if (that == null)
5480
        return false;
5481
      if (that instanceof getTransactionStatus_args)
5482
        return this.equals((getTransactionStatus_args)that);
5483
      return false;
5484
    }
5485
 
5486
    public boolean equals(getTransactionStatus_args that) {
5487
      if (that == null)
5488
        return false;
5489
 
5490
      boolean this_present_transactionId = true;
5491
      boolean that_present_transactionId = true;
5492
      if (this_present_transactionId || that_present_transactionId) {
5493
        if (!(this_present_transactionId && that_present_transactionId))
5494
          return false;
5495
        if (this.transactionId != that.transactionId)
5496
          return false;
5497
      }
5498
 
5499
      return true;
5500
    }
5501
 
5502
    @Override
5503
    public int hashCode() {
5504
      return 0;
5505
    }
5506
 
5507
    public int compareTo(getTransactionStatus_args other) {
5508
      if (!getClass().equals(other.getClass())) {
5509
        return getClass().getName().compareTo(other.getClass().getName());
5510
      }
5511
 
5512
      int lastComparison = 0;
5513
      getTransactionStatus_args typedOther = (getTransactionStatus_args)other;
5514
 
5515
      lastComparison = Boolean.valueOf(isSetTransactionId()).compareTo(isSetTransactionId());
5516
      if (lastComparison != 0) {
5517
        return lastComparison;
5518
      }
5519
      lastComparison = TBaseHelper.compareTo(transactionId, typedOther.transactionId);
5520
      if (lastComparison != 0) {
5521
        return lastComparison;
5522
      }
5523
      return 0;
5524
    }
5525
 
5526
    public void read(TProtocol iprot) throws TException {
5527
      TField field;
5528
      iprot.readStructBegin();
5529
      while (true)
5530
      {
5531
        field = iprot.readFieldBegin();
5532
        if (field.type == TType.STOP) { 
5533
          break;
5534
        }
5535
        _Fields fieldId = _Fields.findByThriftId(field.id);
5536
        if (fieldId == null) {
5537
          TProtocolUtil.skip(iprot, field.type);
5538
        } else {
5539
          switch (fieldId) {
5540
            case TRANSACTION_ID:
5541
              if (field.type == TType.I64) {
5542
                this.transactionId = iprot.readI64();
5543
                setTransactionIdIsSet(true);
5544
              } else { 
5545
                TProtocolUtil.skip(iprot, field.type);
5546
              }
5547
              break;
5548
          }
5549
          iprot.readFieldEnd();
5550
        }
5551
      }
5552
      iprot.readStructEnd();
5553
      validate();
5554
    }
5555
 
5556
    public void write(TProtocol oprot) throws TException {
5557
      validate();
5558
 
5559
      oprot.writeStructBegin(STRUCT_DESC);
5560
      oprot.writeFieldBegin(TRANSACTION_ID_FIELD_DESC);
5561
      oprot.writeI64(this.transactionId);
5562
      oprot.writeFieldEnd();
5563
      oprot.writeFieldStop();
5564
      oprot.writeStructEnd();
5565
    }
5566
 
5567
    @Override
5568
    public String toString() {
5569
      StringBuilder sb = new StringBuilder("getTransactionStatus_args(");
5570
      boolean first = true;
5571
 
5572
      sb.append("transactionId:");
5573
      sb.append(this.transactionId);
5574
      first = false;
5575
      sb.append(")");
5576
      return sb.toString();
5577
    }
5578
 
5579
    public void validate() throws TException {
5580
      // check for required fields
5581
    }
5582
 
5583
  }
5584
 
5585
  public static class getTransactionStatus_result implements TBase<getTransactionStatus_result._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionStatus_result>   {
5586
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionStatus_result");
5587
 
5588
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I32, (short)0);
5589
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
5590
 
5591
    private TransactionStatus success;
5592
    private TransactionServiceException ex;
5593
 
5594
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5595
    public enum _Fields implements TFieldIdEnum {
5596
      /**
5597
       * 
5598
       * @see TransactionStatus
5599
       */
5600
      SUCCESS((short)0, "success"),
5601
      EX((short)1, "ex");
5602
 
5603
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5604
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5605
 
5606
      static {
5607
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5608
          byId.put((int)field._thriftId, field);
5609
          byName.put(field.getFieldName(), field);
5610
        }
5611
      }
5612
 
5613
      /**
5614
       * Find the _Fields constant that matches fieldId, or null if its not found.
5615
       */
5616
      public static _Fields findByThriftId(int fieldId) {
5617
        return byId.get(fieldId);
5618
      }
5619
 
5620
      /**
5621
       * Find the _Fields constant that matches fieldId, throwing an exception
5622
       * if it is not found.
5623
       */
5624
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5625
        _Fields fields = findByThriftId(fieldId);
5626
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5627
        return fields;
5628
      }
5629
 
5630
      /**
5631
       * Find the _Fields constant that matches name, or null if its not found.
5632
       */
5633
      public static _Fields findByName(String name) {
5634
        return byName.get(name);
5635
      }
5636
 
5637
      private final short _thriftId;
5638
      private final String _fieldName;
5639
 
5640
      _Fields(short thriftId, String fieldName) {
5641
        _thriftId = thriftId;
5642
        _fieldName = fieldName;
5643
      }
5644
 
5645
      public short getThriftFieldId() {
5646
        return _thriftId;
5647
      }
5648
 
5649
      public String getFieldName() {
5650
        return _fieldName;
5651
      }
5652
    }
5653
 
5654
    // isset id assignments
5655
 
5656
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
5657
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
5658
          new EnumMetaData(TType.ENUM, TransactionStatus.class)));
5659
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
5660
          new FieldValueMetaData(TType.STRUCT)));
5661
    }});
5662
 
5663
    static {
5664
      FieldMetaData.addStructMetaDataMap(getTransactionStatus_result.class, metaDataMap);
5665
    }
5666
 
5667
    public getTransactionStatus_result() {
5668
    }
5669
 
5670
    public getTransactionStatus_result(
5671
      TransactionStatus success,
5672
      TransactionServiceException ex)
5673
    {
5674
      this();
5675
      this.success = success;
5676
      this.ex = ex;
5677
    }
5678
 
5679
    /**
5680
     * Performs a deep copy on <i>other</i>.
5681
     */
5682
    public getTransactionStatus_result(getTransactionStatus_result other) {
5683
      if (other.isSetSuccess()) {
5684
        this.success = other.success;
5685
      }
5686
      if (other.isSetEx()) {
5687
        this.ex = new TransactionServiceException(other.ex);
5688
      }
5689
    }
5690
 
5691
    public getTransactionStatus_result deepCopy() {
5692
      return new getTransactionStatus_result(this);
5693
    }
5694
 
5695
    @Deprecated
5696
    public getTransactionStatus_result clone() {
5697
      return new getTransactionStatus_result(this);
5698
    }
5699
 
5700
    /**
5701
     * 
5702
     * @see TransactionStatus
5703
     */
5704
    public TransactionStatus getSuccess() {
5705
      return this.success;
5706
    }
5707
 
5708
    /**
5709
     * 
5710
     * @see TransactionStatus
5711
     */
5712
    public getTransactionStatus_result setSuccess(TransactionStatus success) {
5713
      this.success = success;
5714
      return this;
5715
    }
5716
 
5717
    public void unsetSuccess() {
5718
      this.success = null;
5719
    }
5720
 
5721
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
5722
    public boolean isSetSuccess() {
5723
      return this.success != null;
5724
    }
5725
 
5726
    public void setSuccessIsSet(boolean value) {
5727
      if (!value) {
5728
        this.success = null;
5729
      }
5730
    }
5731
 
5732
    public TransactionServiceException getEx() {
5733
      return this.ex;
5734
    }
5735
 
5736
    public getTransactionStatus_result setEx(TransactionServiceException ex) {
5737
      this.ex = ex;
5738
      return this;
5739
    }
5740
 
5741
    public void unsetEx() {
5742
      this.ex = null;
5743
    }
5744
 
5745
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
5746
    public boolean isSetEx() {
5747
      return this.ex != null;
5748
    }
5749
 
5750
    public void setExIsSet(boolean value) {
5751
      if (!value) {
5752
        this.ex = null;
5753
      }
5754
    }
5755
 
5756
    public void setFieldValue(_Fields field, Object value) {
5757
      switch (field) {
5758
      case SUCCESS:
5759
        if (value == null) {
5760
          unsetSuccess();
5761
        } else {
5762
          setSuccess((TransactionStatus)value);
5763
        }
5764
        break;
5765
 
5766
      case EX:
5767
        if (value == null) {
5768
          unsetEx();
5769
        } else {
5770
          setEx((TransactionServiceException)value);
5771
        }
5772
        break;
5773
 
5774
      }
5775
    }
5776
 
5777
    public void setFieldValue(int fieldID, Object value) {
5778
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5779
    }
5780
 
5781
    public Object getFieldValue(_Fields field) {
5782
      switch (field) {
5783
      case SUCCESS:
5784
        return getSuccess();
5785
 
5786
      case EX:
5787
        return getEx();
5788
 
5789
      }
5790
      throw new IllegalStateException();
5791
    }
5792
 
5793
    public Object getFieldValue(int fieldId) {
5794
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5795
    }
5796
 
5797
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5798
    public boolean isSet(_Fields field) {
5799
      switch (field) {
5800
      case SUCCESS:
5801
        return isSetSuccess();
5802
      case EX:
5803
        return isSetEx();
5804
      }
5805
      throw new IllegalStateException();
5806
    }
5807
 
5808
    public boolean isSet(int fieldID) {
5809
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5810
    }
5811
 
5812
    @Override
5813
    public boolean equals(Object that) {
5814
      if (that == null)
5815
        return false;
5816
      if (that instanceof getTransactionStatus_result)
5817
        return this.equals((getTransactionStatus_result)that);
5818
      return false;
5819
    }
5820
 
5821
    public boolean equals(getTransactionStatus_result that) {
5822
      if (that == null)
5823
        return false;
5824
 
5825
      boolean this_present_success = true && this.isSetSuccess();
5826
      boolean that_present_success = true && that.isSetSuccess();
5827
      if (this_present_success || that_present_success) {
5828
        if (!(this_present_success && that_present_success))
5829
          return false;
5830
        if (!this.success.equals(that.success))
5831
          return false;
5832
      }
5833
 
5834
      boolean this_present_ex = true && this.isSetEx();
5835
      boolean that_present_ex = true && that.isSetEx();
5836
      if (this_present_ex || that_present_ex) {
5837
        if (!(this_present_ex && that_present_ex))
5838
          return false;
5839
        if (!this.ex.equals(that.ex))
5840
          return false;
5841
      }
5842
 
5843
      return true;
5844
    }
5845
 
5846
    @Override
5847
    public int hashCode() {
5848
      return 0;
5849
    }
5850
 
5851
    public int compareTo(getTransactionStatus_result other) {
5852
      if (!getClass().equals(other.getClass())) {
5853
        return getClass().getName().compareTo(other.getClass().getName());
5854
      }
5855
 
5856
      int lastComparison = 0;
5857
      getTransactionStatus_result typedOther = (getTransactionStatus_result)other;
5858
 
5859
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
5860
      if (lastComparison != 0) {
5861
        return lastComparison;
5862
      }
5863
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
5864
      if (lastComparison != 0) {
5865
        return lastComparison;
5866
      }
5867
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
5868
      if (lastComparison != 0) {
5869
        return lastComparison;
5870
      }
5871
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
5872
      if (lastComparison != 0) {
5873
        return lastComparison;
5874
      }
5875
      return 0;
5876
    }
5877
 
5878
    public void read(TProtocol iprot) throws TException {
5879
      TField field;
5880
      iprot.readStructBegin();
5881
      while (true)
5882
      {
5883
        field = iprot.readFieldBegin();
5884
        if (field.type == TType.STOP) { 
5885
          break;
5886
        }
5887
        _Fields fieldId = _Fields.findByThriftId(field.id);
5888
        if (fieldId == null) {
5889
          TProtocolUtil.skip(iprot, field.type);
5890
        } else {
5891
          switch (fieldId) {
5892
            case SUCCESS:
5893
              if (field.type == TType.I32) {
5894
                this.success = TransactionStatus.findByValue(iprot.readI32());
5895
              } else { 
5896
                TProtocolUtil.skip(iprot, field.type);
5897
              }
5898
              break;
5899
            case EX:
5900
              if (field.type == TType.STRUCT) {
5901
                this.ex = new TransactionServiceException();
5902
                this.ex.read(iprot);
5903
              } else { 
5904
                TProtocolUtil.skip(iprot, field.type);
5905
              }
5906
              break;
5907
          }
5908
          iprot.readFieldEnd();
5909
        }
5910
      }
5911
      iprot.readStructEnd();
5912
      validate();
5913
    }
5914
 
5915
    public void write(TProtocol oprot) throws TException {
5916
      oprot.writeStructBegin(STRUCT_DESC);
5917
 
5918
      if (this.isSetSuccess()) {
5919
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
5920
        oprot.writeI32(this.success.getValue());
5921
        oprot.writeFieldEnd();
5922
      } else if (this.isSetEx()) {
5923
        oprot.writeFieldBegin(EX_FIELD_DESC);
5924
        this.ex.write(oprot);
5925
        oprot.writeFieldEnd();
5926
      }
5927
      oprot.writeFieldStop();
5928
      oprot.writeStructEnd();
5929
    }
5930
 
5931
    @Override
5932
    public String toString() {
5933
      StringBuilder sb = new StringBuilder("getTransactionStatus_result(");
5934
      boolean first = true;
5935
 
5936
      sb.append("success:");
5937
      if (this.success == null) {
5938
        sb.append("null");
5939
      } else {
5940
        String success_name = success.name();
5941
        if (success_name != null) {
5942
          sb.append(success_name);
5943
          sb.append(" (");
5944
        }
5945
        sb.append(this.success);
5946
        if (success_name != null) {
5947
          sb.append(")");
5948
        }
5949
      }
5950
      first = false;
5951
      if (!first) sb.append(", ");
5952
      sb.append("ex:");
5953
      if (this.ex == null) {
5954
        sb.append("null");
5955
      } else {
5956
        sb.append(this.ex);
5957
      }
5958
      first = false;
5959
      sb.append(")");
5960
      return sb.toString();
5961
    }
5962
 
5963
    public void validate() throws TException {
5964
      // check for required fields
5965
    }
5966
 
5967
  }
5968
 
5969
  public static class changeTransactionStatus_args implements TBase<changeTransactionStatus_args._Fields>, java.io.Serializable, Cloneable, Comparable<changeTransactionStatus_args>   {
5970
    private static final TStruct STRUCT_DESC = new TStruct("changeTransactionStatus_args");
5971
 
5972
    private static final TField TRANSACTION_ID_FIELD_DESC = new TField("transactionId", TType.I64, (short)1);
5973
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)2);
5974
    private static final TField DESCRIPTION_FIELD_DESC = new TField("description", TType.STRING, (short)3);
5975
 
5976
    private long transactionId;
5977
    private TransactionStatus status;
5978
    private String description;
5979
 
5980
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5981
    public enum _Fields implements TFieldIdEnum {
5982
      TRANSACTION_ID((short)1, "transactionId"),
5983
      /**
5984
       * 
5985
       * @see TransactionStatus
5986
       */
5987
      STATUS((short)2, "status"),
5988
      DESCRIPTION((short)3, "description");
5989
 
5990
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5991
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5992
 
5993
      static {
5994
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5995
          byId.put((int)field._thriftId, field);
5996
          byName.put(field.getFieldName(), field);
5997
        }
5998
      }
5999
 
6000
      /**
6001
       * Find the _Fields constant that matches fieldId, or null if its not found.
6002
       */
6003
      public static _Fields findByThriftId(int fieldId) {
6004
        return byId.get(fieldId);
6005
      }
6006
 
6007
      /**
6008
       * Find the _Fields constant that matches fieldId, throwing an exception
6009
       * if it is not found.
6010
       */
6011
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6012
        _Fields fields = findByThriftId(fieldId);
6013
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6014
        return fields;
6015
      }
6016
 
6017
      /**
6018
       * Find the _Fields constant that matches name, or null if its not found.
6019
       */
6020
      public static _Fields findByName(String name) {
6021
        return byName.get(name);
6022
      }
6023
 
6024
      private final short _thriftId;
6025
      private final String _fieldName;
6026
 
6027
      _Fields(short thriftId, String fieldName) {
6028
        _thriftId = thriftId;
6029
        _fieldName = fieldName;
6030
      }
6031
 
6032
      public short getThriftFieldId() {
6033
        return _thriftId;
6034
      }
6035
 
6036
      public String getFieldName() {
6037
        return _fieldName;
6038
      }
6039
    }
6040
 
6041
    // isset id assignments
6042
    private static final int __TRANSACTIONID_ISSET_ID = 0;
6043
    private BitSet __isset_bit_vector = new BitSet(1);
6044
 
6045
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
6046
      put(_Fields.TRANSACTION_ID, new FieldMetaData("transactionId", TFieldRequirementType.DEFAULT, 
6047
          new FieldValueMetaData(TType.I64)));
6048
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
6049
          new EnumMetaData(TType.ENUM, TransactionStatus.class)));
6050
      put(_Fields.DESCRIPTION, new FieldMetaData("description", TFieldRequirementType.DEFAULT, 
6051
          new FieldValueMetaData(TType.STRING)));
6052
    }});
6053
 
6054
    static {
6055
      FieldMetaData.addStructMetaDataMap(changeTransactionStatus_args.class, metaDataMap);
6056
    }
6057
 
6058
    public changeTransactionStatus_args() {
6059
    }
6060
 
6061
    public changeTransactionStatus_args(
6062
      long transactionId,
6063
      TransactionStatus status,
6064
      String description)
6065
    {
6066
      this();
6067
      this.transactionId = transactionId;
6068
      setTransactionIdIsSet(true);
6069
      this.status = status;
6070
      this.description = description;
6071
    }
6072
 
6073
    /**
6074
     * Performs a deep copy on <i>other</i>.
6075
     */
6076
    public changeTransactionStatus_args(changeTransactionStatus_args other) {
6077
      __isset_bit_vector.clear();
6078
      __isset_bit_vector.or(other.__isset_bit_vector);
6079
      this.transactionId = other.transactionId;
6080
      if (other.isSetStatus()) {
6081
        this.status = other.status;
6082
      }
6083
      if (other.isSetDescription()) {
6084
        this.description = other.description;
6085
      }
6086
    }
6087
 
6088
    public changeTransactionStatus_args deepCopy() {
6089
      return new changeTransactionStatus_args(this);
6090
    }
6091
 
6092
    @Deprecated
6093
    public changeTransactionStatus_args clone() {
6094
      return new changeTransactionStatus_args(this);
6095
    }
6096
 
6097
    public long getTransactionId() {
6098
      return this.transactionId;
6099
    }
6100
 
6101
    public changeTransactionStatus_args setTransactionId(long transactionId) {
6102
      this.transactionId = transactionId;
6103
      setTransactionIdIsSet(true);
6104
      return this;
6105
    }
6106
 
6107
    public void unsetTransactionId() {
6108
      __isset_bit_vector.clear(__TRANSACTIONID_ISSET_ID);
6109
    }
6110
 
6111
    /** Returns true if field transactionId is set (has been asigned a value) and false otherwise */
6112
    public boolean isSetTransactionId() {
6113
      return __isset_bit_vector.get(__TRANSACTIONID_ISSET_ID);
6114
    }
6115
 
6116
    public void setTransactionIdIsSet(boolean value) {
6117
      __isset_bit_vector.set(__TRANSACTIONID_ISSET_ID, value);
6118
    }
6119
 
6120
    /**
6121
     * 
6122
     * @see TransactionStatus
6123
     */
6124
    public TransactionStatus getStatus() {
6125
      return this.status;
6126
    }
6127
 
6128
    /**
6129
     * 
6130
     * @see TransactionStatus
6131
     */
6132
    public changeTransactionStatus_args setStatus(TransactionStatus status) {
6133
      this.status = status;
6134
      return this;
6135
    }
6136
 
6137
    public void unsetStatus() {
6138
      this.status = null;
6139
    }
6140
 
6141
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
6142
    public boolean isSetStatus() {
6143
      return this.status != null;
6144
    }
6145
 
6146
    public void setStatusIsSet(boolean value) {
6147
      if (!value) {
6148
        this.status = null;
6149
      }
6150
    }
6151
 
6152
    public String getDescription() {
6153
      return this.description;
6154
    }
6155
 
6156
    public changeTransactionStatus_args setDescription(String description) {
6157
      this.description = description;
6158
      return this;
6159
    }
6160
 
6161
    public void unsetDescription() {
6162
      this.description = null;
6163
    }
6164
 
6165
    /** Returns true if field description is set (has been asigned a value) and false otherwise */
6166
    public boolean isSetDescription() {
6167
      return this.description != null;
6168
    }
6169
 
6170
    public void setDescriptionIsSet(boolean value) {
6171
      if (!value) {
6172
        this.description = null;
6173
      }
6174
    }
6175
 
6176
    public void setFieldValue(_Fields field, Object value) {
6177
      switch (field) {
6178
      case TRANSACTION_ID:
6179
        if (value == null) {
6180
          unsetTransactionId();
6181
        } else {
6182
          setTransactionId((Long)value);
6183
        }
6184
        break;
6185
 
6186
      case STATUS:
6187
        if (value == null) {
6188
          unsetStatus();
6189
        } else {
6190
          setStatus((TransactionStatus)value);
6191
        }
6192
        break;
6193
 
6194
      case DESCRIPTION:
6195
        if (value == null) {
6196
          unsetDescription();
6197
        } else {
6198
          setDescription((String)value);
6199
        }
6200
        break;
6201
 
6202
      }
6203
    }
6204
 
6205
    public void setFieldValue(int fieldID, Object value) {
6206
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
6207
    }
6208
 
6209
    public Object getFieldValue(_Fields field) {
6210
      switch (field) {
6211
      case TRANSACTION_ID:
6212
        return new Long(getTransactionId());
6213
 
6214
      case STATUS:
6215
        return getStatus();
6216
 
6217
      case DESCRIPTION:
6218
        return getDescription();
6219
 
6220
      }
6221
      throw new IllegalStateException();
6222
    }
6223
 
6224
    public Object getFieldValue(int fieldId) {
6225
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
6226
    }
6227
 
6228
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
6229
    public boolean isSet(_Fields field) {
6230
      switch (field) {
6231
      case TRANSACTION_ID:
6232
        return isSetTransactionId();
6233
      case STATUS:
6234
        return isSetStatus();
6235
      case DESCRIPTION:
6236
        return isSetDescription();
6237
      }
6238
      throw new IllegalStateException();
6239
    }
6240
 
6241
    public boolean isSet(int fieldID) {
6242
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
6243
    }
6244
 
6245
    @Override
6246
    public boolean equals(Object that) {
6247
      if (that == null)
6248
        return false;
6249
      if (that instanceof changeTransactionStatus_args)
6250
        return this.equals((changeTransactionStatus_args)that);
6251
      return false;
6252
    }
6253
 
6254
    public boolean equals(changeTransactionStatus_args that) {
6255
      if (that == null)
6256
        return false;
6257
 
6258
      boolean this_present_transactionId = true;
6259
      boolean that_present_transactionId = true;
6260
      if (this_present_transactionId || that_present_transactionId) {
6261
        if (!(this_present_transactionId && that_present_transactionId))
6262
          return false;
6263
        if (this.transactionId != that.transactionId)
6264
          return false;
6265
      }
6266
 
6267
      boolean this_present_status = true && this.isSetStatus();
6268
      boolean that_present_status = true && that.isSetStatus();
6269
      if (this_present_status || that_present_status) {
6270
        if (!(this_present_status && that_present_status))
6271
          return false;
6272
        if (!this.status.equals(that.status))
6273
          return false;
6274
      }
6275
 
6276
      boolean this_present_description = true && this.isSetDescription();
6277
      boolean that_present_description = true && that.isSetDescription();
6278
      if (this_present_description || that_present_description) {
6279
        if (!(this_present_description && that_present_description))
6280
          return false;
6281
        if (!this.description.equals(that.description))
6282
          return false;
6283
      }
6284
 
6285
      return true;
6286
    }
6287
 
6288
    @Override
6289
    public int hashCode() {
6290
      return 0;
6291
    }
6292
 
6293
    public int compareTo(changeTransactionStatus_args other) {
6294
      if (!getClass().equals(other.getClass())) {
6295
        return getClass().getName().compareTo(other.getClass().getName());
6296
      }
6297
 
6298
      int lastComparison = 0;
6299
      changeTransactionStatus_args typedOther = (changeTransactionStatus_args)other;
6300
 
6301
      lastComparison = Boolean.valueOf(isSetTransactionId()).compareTo(isSetTransactionId());
6302
      if (lastComparison != 0) {
6303
        return lastComparison;
6304
      }
6305
      lastComparison = TBaseHelper.compareTo(transactionId, typedOther.transactionId);
6306
      if (lastComparison != 0) {
6307
        return lastComparison;
6308
      }
6309
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
6310
      if (lastComparison != 0) {
6311
        return lastComparison;
6312
      }
6313
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
6314
      if (lastComparison != 0) {
6315
        return lastComparison;
6316
      }
6317
      lastComparison = Boolean.valueOf(isSetDescription()).compareTo(isSetDescription());
6318
      if (lastComparison != 0) {
6319
        return lastComparison;
6320
      }
6321
      lastComparison = TBaseHelper.compareTo(description, typedOther.description);
6322
      if (lastComparison != 0) {
6323
        return lastComparison;
6324
      }
6325
      return 0;
6326
    }
6327
 
6328
    public void read(TProtocol iprot) throws TException {
6329
      TField field;
6330
      iprot.readStructBegin();
6331
      while (true)
6332
      {
6333
        field = iprot.readFieldBegin();
6334
        if (field.type == TType.STOP) { 
6335
          break;
6336
        }
6337
        _Fields fieldId = _Fields.findByThriftId(field.id);
6338
        if (fieldId == null) {
6339
          TProtocolUtil.skip(iprot, field.type);
6340
        } else {
6341
          switch (fieldId) {
6342
            case TRANSACTION_ID:
6343
              if (field.type == TType.I64) {
6344
                this.transactionId = iprot.readI64();
6345
                setTransactionIdIsSet(true);
6346
              } else { 
6347
                TProtocolUtil.skip(iprot, field.type);
6348
              }
6349
              break;
6350
            case STATUS:
6351
              if (field.type == TType.I32) {
6352
                this.status = TransactionStatus.findByValue(iprot.readI32());
6353
              } else { 
6354
                TProtocolUtil.skip(iprot, field.type);
6355
              }
6356
              break;
6357
            case DESCRIPTION:
6358
              if (field.type == TType.STRING) {
6359
                this.description = iprot.readString();
6360
              } else { 
6361
                TProtocolUtil.skip(iprot, field.type);
6362
              }
6363
              break;
6364
          }
6365
          iprot.readFieldEnd();
6366
        }
6367
      }
6368
      iprot.readStructEnd();
6369
      validate();
6370
    }
6371
 
6372
    public void write(TProtocol oprot) throws TException {
6373
      validate();
6374
 
6375
      oprot.writeStructBegin(STRUCT_DESC);
6376
      oprot.writeFieldBegin(TRANSACTION_ID_FIELD_DESC);
6377
      oprot.writeI64(this.transactionId);
6378
      oprot.writeFieldEnd();
6379
      if (this.status != null) {
6380
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
6381
        oprot.writeI32(this.status.getValue());
6382
        oprot.writeFieldEnd();
6383
      }
6384
      if (this.description != null) {
6385
        oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC);
6386
        oprot.writeString(this.description);
6387
        oprot.writeFieldEnd();
6388
      }
6389
      oprot.writeFieldStop();
6390
      oprot.writeStructEnd();
6391
    }
6392
 
6393
    @Override
6394
    public String toString() {
6395
      StringBuilder sb = new StringBuilder("changeTransactionStatus_args(");
6396
      boolean first = true;
6397
 
6398
      sb.append("transactionId:");
6399
      sb.append(this.transactionId);
6400
      first = false;
6401
      if (!first) sb.append(", ");
6402
      sb.append("status:");
6403
      if (this.status == null) {
6404
        sb.append("null");
6405
      } else {
6406
        String status_name = status.name();
6407
        if (status_name != null) {
6408
          sb.append(status_name);
6409
          sb.append(" (");
6410
        }
6411
        sb.append(this.status);
6412
        if (status_name != null) {
6413
          sb.append(")");
6414
        }
6415
      }
6416
      first = false;
6417
      if (!first) sb.append(", ");
6418
      sb.append("description:");
6419
      if (this.description == null) {
6420
        sb.append("null");
6421
      } else {
6422
        sb.append(this.description);
6423
      }
6424
      first = false;
6425
      sb.append(")");
6426
      return sb.toString();
6427
    }
6428
 
6429
    public void validate() throws TException {
6430
      // check for required fields
6431
    }
6432
 
6433
  }
6434
 
6435
  public static class changeTransactionStatus_result implements TBase<changeTransactionStatus_result._Fields>, java.io.Serializable, Cloneable, Comparable<changeTransactionStatus_result>   {
6436
    private static final TStruct STRUCT_DESC = new TStruct("changeTransactionStatus_result");
6437
 
6438
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
6439
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
6440
 
6441
    private boolean success;
6442
    private TransactionServiceException ex;
6443
 
6444
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6445
    public enum _Fields implements TFieldIdEnum {
6446
      SUCCESS((short)0, "success"),
6447
      EX((short)1, "ex");
6448
 
6449
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
6450
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6451
 
6452
      static {
6453
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6454
          byId.put((int)field._thriftId, field);
6455
          byName.put(field.getFieldName(), field);
6456
        }
6457
      }
6458
 
6459
      /**
6460
       * Find the _Fields constant that matches fieldId, or null if its not found.
6461
       */
6462
      public static _Fields findByThriftId(int fieldId) {
6463
        return byId.get(fieldId);
6464
      }
6465
 
6466
      /**
6467
       * Find the _Fields constant that matches fieldId, throwing an exception
6468
       * if it is not found.
6469
       */
6470
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6471
        _Fields fields = findByThriftId(fieldId);
6472
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6473
        return fields;
6474
      }
6475
 
6476
      /**
6477
       * Find the _Fields constant that matches name, or null if its not found.
6478
       */
6479
      public static _Fields findByName(String name) {
6480
        return byName.get(name);
6481
      }
6482
 
6483
      private final short _thriftId;
6484
      private final String _fieldName;
6485
 
6486
      _Fields(short thriftId, String fieldName) {
6487
        _thriftId = thriftId;
6488
        _fieldName = fieldName;
6489
      }
6490
 
6491
      public short getThriftFieldId() {
6492
        return _thriftId;
6493
      }
6494
 
6495
      public String getFieldName() {
6496
        return _fieldName;
6497
      }
6498
    }
6499
 
6500
    // isset id assignments
6501
    private static final int __SUCCESS_ISSET_ID = 0;
6502
    private BitSet __isset_bit_vector = new BitSet(1);
6503
 
6504
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
6505
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
6506
          new FieldValueMetaData(TType.BOOL)));
6507
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
6508
          new FieldValueMetaData(TType.STRUCT)));
6509
    }});
6510
 
6511
    static {
6512
      FieldMetaData.addStructMetaDataMap(changeTransactionStatus_result.class, metaDataMap);
6513
    }
6514
 
6515
    public changeTransactionStatus_result() {
6516
    }
6517
 
6518
    public changeTransactionStatus_result(
6519
      boolean success,
6520
      TransactionServiceException ex)
6521
    {
6522
      this();
6523
      this.success = success;
6524
      setSuccessIsSet(true);
6525
      this.ex = ex;
6526
    }
6527
 
6528
    /**
6529
     * Performs a deep copy on <i>other</i>.
6530
     */
6531
    public changeTransactionStatus_result(changeTransactionStatus_result other) {
6532
      __isset_bit_vector.clear();
6533
      __isset_bit_vector.or(other.__isset_bit_vector);
6534
      this.success = other.success;
6535
      if (other.isSetEx()) {
6536
        this.ex = new TransactionServiceException(other.ex);
6537
      }
6538
    }
6539
 
6540
    public changeTransactionStatus_result deepCopy() {
6541
      return new changeTransactionStatus_result(this);
6542
    }
6543
 
6544
    @Deprecated
6545
    public changeTransactionStatus_result clone() {
6546
      return new changeTransactionStatus_result(this);
6547
    }
6548
 
6549
    public boolean isSuccess() {
6550
      return this.success;
6551
    }
6552
 
6553
    public changeTransactionStatus_result setSuccess(boolean success) {
6554
      this.success = success;
6555
      setSuccessIsSet(true);
6556
      return this;
6557
    }
6558
 
6559
    public void unsetSuccess() {
6560
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
6561
    }
6562
 
6563
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
6564
    public boolean isSetSuccess() {
6565
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
6566
    }
6567
 
6568
    public void setSuccessIsSet(boolean value) {
6569
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
6570
    }
6571
 
6572
    public TransactionServiceException getEx() {
6573
      return this.ex;
6574
    }
6575
 
6576
    public changeTransactionStatus_result setEx(TransactionServiceException ex) {
6577
      this.ex = ex;
6578
      return this;
6579
    }
6580
 
6581
    public void unsetEx() {
6582
      this.ex = null;
6583
    }
6584
 
6585
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
6586
    public boolean isSetEx() {
6587
      return this.ex != null;
6588
    }
6589
 
6590
    public void setExIsSet(boolean value) {
6591
      if (!value) {
6592
        this.ex = null;
6593
      }
6594
    }
6595
 
6596
    public void setFieldValue(_Fields field, Object value) {
6597
      switch (field) {
6598
      case SUCCESS:
6599
        if (value == null) {
6600
          unsetSuccess();
6601
        } else {
6602
          setSuccess((Boolean)value);
6603
        }
6604
        break;
6605
 
6606
      case EX:
6607
        if (value == null) {
6608
          unsetEx();
6609
        } else {
6610
          setEx((TransactionServiceException)value);
6611
        }
6612
        break;
6613
 
6614
      }
6615
    }
6616
 
6617
    public void setFieldValue(int fieldID, Object value) {
6618
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
6619
    }
6620
 
6621
    public Object getFieldValue(_Fields field) {
6622
      switch (field) {
6623
      case SUCCESS:
6624
        return new Boolean(isSuccess());
6625
 
6626
      case EX:
6627
        return getEx();
6628
 
6629
      }
6630
      throw new IllegalStateException();
6631
    }
6632
 
6633
    public Object getFieldValue(int fieldId) {
6634
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
6635
    }
6636
 
6637
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
6638
    public boolean isSet(_Fields field) {
6639
      switch (field) {
6640
      case SUCCESS:
6641
        return isSetSuccess();
6642
      case EX:
6643
        return isSetEx();
6644
      }
6645
      throw new IllegalStateException();
6646
    }
6647
 
6648
    public boolean isSet(int fieldID) {
6649
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
6650
    }
6651
 
6652
    @Override
6653
    public boolean equals(Object that) {
6654
      if (that == null)
6655
        return false;
6656
      if (that instanceof changeTransactionStatus_result)
6657
        return this.equals((changeTransactionStatus_result)that);
6658
      return false;
6659
    }
6660
 
6661
    public boolean equals(changeTransactionStatus_result that) {
6662
      if (that == null)
6663
        return false;
6664
 
6665
      boolean this_present_success = true;
6666
      boolean that_present_success = true;
6667
      if (this_present_success || that_present_success) {
6668
        if (!(this_present_success && that_present_success))
6669
          return false;
6670
        if (this.success != that.success)
6671
          return false;
6672
      }
6673
 
6674
      boolean this_present_ex = true && this.isSetEx();
6675
      boolean that_present_ex = true && that.isSetEx();
6676
      if (this_present_ex || that_present_ex) {
6677
        if (!(this_present_ex && that_present_ex))
6678
          return false;
6679
        if (!this.ex.equals(that.ex))
6680
          return false;
6681
      }
6682
 
6683
      return true;
6684
    }
6685
 
6686
    @Override
6687
    public int hashCode() {
6688
      return 0;
6689
    }
6690
 
6691
    public int compareTo(changeTransactionStatus_result other) {
6692
      if (!getClass().equals(other.getClass())) {
6693
        return getClass().getName().compareTo(other.getClass().getName());
6694
      }
6695
 
6696
      int lastComparison = 0;
6697
      changeTransactionStatus_result typedOther = (changeTransactionStatus_result)other;
6698
 
6699
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
6700
      if (lastComparison != 0) {
6701
        return lastComparison;
6702
      }
6703
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
6704
      if (lastComparison != 0) {
6705
        return lastComparison;
6706
      }
6707
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
6708
      if (lastComparison != 0) {
6709
        return lastComparison;
6710
      }
6711
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
6712
      if (lastComparison != 0) {
6713
        return lastComparison;
6714
      }
6715
      return 0;
6716
    }
6717
 
6718
    public void read(TProtocol iprot) throws TException {
6719
      TField field;
6720
      iprot.readStructBegin();
6721
      while (true)
6722
      {
6723
        field = iprot.readFieldBegin();
6724
        if (field.type == TType.STOP) { 
6725
          break;
6726
        }
6727
        _Fields fieldId = _Fields.findByThriftId(field.id);
6728
        if (fieldId == null) {
6729
          TProtocolUtil.skip(iprot, field.type);
6730
        } else {
6731
          switch (fieldId) {
6732
            case SUCCESS:
6733
              if (field.type == TType.BOOL) {
6734
                this.success = iprot.readBool();
6735
                setSuccessIsSet(true);
6736
              } else { 
6737
                TProtocolUtil.skip(iprot, field.type);
6738
              }
6739
              break;
6740
            case EX:
6741
              if (field.type == TType.STRUCT) {
6742
                this.ex = new TransactionServiceException();
6743
                this.ex.read(iprot);
6744
              } else { 
6745
                TProtocolUtil.skip(iprot, field.type);
6746
              }
6747
              break;
6748
          }
6749
          iprot.readFieldEnd();
6750
        }
6751
      }
6752
      iprot.readStructEnd();
6753
      validate();
6754
    }
6755
 
6756
    public void write(TProtocol oprot) throws TException {
6757
      oprot.writeStructBegin(STRUCT_DESC);
6758
 
6759
      if (this.isSetSuccess()) {
6760
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
6761
        oprot.writeBool(this.success);
6762
        oprot.writeFieldEnd();
6763
      } else if (this.isSetEx()) {
6764
        oprot.writeFieldBegin(EX_FIELD_DESC);
6765
        this.ex.write(oprot);
6766
        oprot.writeFieldEnd();
6767
      }
6768
      oprot.writeFieldStop();
6769
      oprot.writeStructEnd();
6770
    }
6771
 
6772
    @Override
6773
    public String toString() {
6774
      StringBuilder sb = new StringBuilder("changeTransactionStatus_result(");
6775
      boolean first = true;
6776
 
6777
      sb.append("success:");
6778
      sb.append(this.success);
6779
      first = false;
6780
      if (!first) sb.append(", ");
6781
      sb.append("ex:");
6782
      if (this.ex == null) {
6783
        sb.append("null");
6784
      } else {
6785
        sb.append(this.ex);
6786
      }
6787
      first = false;
6788
      sb.append(")");
6789
      return sb.toString();
6790
    }
6791
 
6792
    public void validate() throws TException {
6793
      // check for required fields
6794
    }
6795
 
6796
  }
6797
 
483 rajveer 6798
  public static class getAllOrders_args implements TBase<getAllOrders_args._Fields>, java.io.Serializable, Cloneable, Comparable<getAllOrders_args>   {
6799
    private static final TStruct STRUCT_DESC = new TStruct("getAllOrders_args");
68 ashish 6800
 
483 rajveer 6801
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)1);
6802
    private static final TField FROM_DATE_FIELD_DESC = new TField("from_date", TType.I64, (short)2);
6803
    private static final TField TO_DATE_FIELD_DESC = new TField("to_date", TType.I64, (short)3);
6804
    private static final TField WAREHOUSE_ID_FIELD_DESC = new TField("warehouse_id", TType.I64, (short)4);
68 ashish 6805
 
483 rajveer 6806
    private OrderStatus status;
6807
    private long from_date;
6808
    private long to_date;
6809
    private long warehouse_id;
68 ashish 6810
 
6811
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6812
    public enum _Fields implements TFieldIdEnum {
483 rajveer 6813
      /**
6814
       * 
6815
       * @see OrderStatus
6816
       */
6817
      STATUS((short)1, "status"),
6818
      FROM_DATE((short)2, "from_date"),
6819
      TO_DATE((short)3, "to_date"),
6820
      WAREHOUSE_ID((short)4, "warehouse_id");
68 ashish 6821
 
6822
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
6823
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6824
 
6825
      static {
6826
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6827
          byId.put((int)field._thriftId, field);
6828
          byName.put(field.getFieldName(), field);
6829
        }
6830
      }
6831
 
6832
      /**
6833
       * Find the _Fields constant that matches fieldId, or null if its not found.
6834
       */
6835
      public static _Fields findByThriftId(int fieldId) {
6836
        return byId.get(fieldId);
6837
      }
6838
 
6839
      /**
6840
       * Find the _Fields constant that matches fieldId, throwing an exception
6841
       * if it is not found.
6842
       */
6843
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6844
        _Fields fields = findByThriftId(fieldId);
6845
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6846
        return fields;
6847
      }
6848
 
6849
      /**
6850
       * Find the _Fields constant that matches name, or null if its not found.
6851
       */
6852
      public static _Fields findByName(String name) {
6853
        return byName.get(name);
6854
      }
6855
 
6856
      private final short _thriftId;
6857
      private final String _fieldName;
6858
 
6859
      _Fields(short thriftId, String fieldName) {
6860
        _thriftId = thriftId;
6861
        _fieldName = fieldName;
6862
      }
6863
 
6864
      public short getThriftFieldId() {
6865
        return _thriftId;
6866
      }
6867
 
6868
      public String getFieldName() {
6869
        return _fieldName;
6870
      }
6871
    }
6872
 
6873
    // isset id assignments
483 rajveer 6874
    private static final int __FROM_DATE_ISSET_ID = 0;
6875
    private static final int __TO_DATE_ISSET_ID = 1;
6876
    private static final int __WAREHOUSE_ID_ISSET_ID = 2;
6877
    private BitSet __isset_bit_vector = new BitSet(3);
68 ashish 6878
 
6879
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 6880
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
6881
          new EnumMetaData(TType.ENUM, OrderStatus.class)));
6882
      put(_Fields.FROM_DATE, new FieldMetaData("from_date", TFieldRequirementType.DEFAULT, 
68 ashish 6883
          new FieldValueMetaData(TType.I64)));
483 rajveer 6884
      put(_Fields.TO_DATE, new FieldMetaData("to_date", TFieldRequirementType.DEFAULT, 
6885
          new FieldValueMetaData(TType.I64)));
6886
      put(_Fields.WAREHOUSE_ID, new FieldMetaData("warehouse_id", TFieldRequirementType.DEFAULT, 
6887
          new FieldValueMetaData(TType.I64)));
68 ashish 6888
    }});
6889
 
6890
    static {
483 rajveer 6891
      FieldMetaData.addStructMetaDataMap(getAllOrders_args.class, metaDataMap);
68 ashish 6892
    }
6893
 
483 rajveer 6894
    public getAllOrders_args() {
68 ashish 6895
    }
6896
 
483 rajveer 6897
    public getAllOrders_args(
6898
      OrderStatus status,
6899
      long from_date,
6900
      long to_date,
6901
      long warehouse_id)
68 ashish 6902
    {
6903
      this();
483 rajveer 6904
      this.status = status;
6905
      this.from_date = from_date;
6906
      setFrom_dateIsSet(true);
6907
      this.to_date = to_date;
6908
      setTo_dateIsSet(true);
6909
      this.warehouse_id = warehouse_id;
6910
      setWarehouse_idIsSet(true);
68 ashish 6911
    }
6912
 
6913
    /**
6914
     * Performs a deep copy on <i>other</i>.
6915
     */
483 rajveer 6916
    public getAllOrders_args(getAllOrders_args other) {
68 ashish 6917
      __isset_bit_vector.clear();
6918
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 6919
      if (other.isSetStatus()) {
6920
        this.status = other.status;
6921
      }
6922
      this.from_date = other.from_date;
6923
      this.to_date = other.to_date;
6924
      this.warehouse_id = other.warehouse_id;
68 ashish 6925
    }
6926
 
483 rajveer 6927
    public getAllOrders_args deepCopy() {
6928
      return new getAllOrders_args(this);
68 ashish 6929
    }
6930
 
6931
    @Deprecated
483 rajveer 6932
    public getAllOrders_args clone() {
6933
      return new getAllOrders_args(this);
68 ashish 6934
    }
6935
 
483 rajveer 6936
    /**
6937
     * 
6938
     * @see OrderStatus
6939
     */
6940
    public OrderStatus getStatus() {
6941
      return this.status;
68 ashish 6942
    }
6943
 
483 rajveer 6944
    /**
6945
     * 
6946
     * @see OrderStatus
6947
     */
6948
    public getAllOrders_args setStatus(OrderStatus status) {
6949
      this.status = status;
68 ashish 6950
      return this;
6951
    }
6952
 
483 rajveer 6953
    public void unsetStatus() {
6954
      this.status = null;
68 ashish 6955
    }
6956
 
483 rajveer 6957
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
6958
    public boolean isSetStatus() {
6959
      return this.status != null;
68 ashish 6960
    }
6961
 
483 rajveer 6962
    public void setStatusIsSet(boolean value) {
6963
      if (!value) {
6964
        this.status = null;
68 ashish 6965
      }
6966
    }
6967
 
483 rajveer 6968
    public long getFrom_date() {
6969
      return this.from_date;
68 ashish 6970
    }
6971
 
483 rajveer 6972
    public getAllOrders_args setFrom_date(long from_date) {
6973
      this.from_date = from_date;
6974
      setFrom_dateIsSet(true);
6975
      return this;
68 ashish 6976
    }
6977
 
483 rajveer 6978
    public void unsetFrom_date() {
6979
      __isset_bit_vector.clear(__FROM_DATE_ISSET_ID);
68 ashish 6980
    }
6981
 
483 rajveer 6982
    /** Returns true if field from_date is set (has been asigned a value) and false otherwise */
6983
    public boolean isSetFrom_date() {
6984
      return __isset_bit_vector.get(__FROM_DATE_ISSET_ID);
68 ashish 6985
    }
6986
 
483 rajveer 6987
    public void setFrom_dateIsSet(boolean value) {
6988
      __isset_bit_vector.set(__FROM_DATE_ISSET_ID, value);
68 ashish 6989
    }
6990
 
483 rajveer 6991
    public long getTo_date() {
6992
      return this.to_date;
68 ashish 6993
    }
6994
 
483 rajveer 6995
    public getAllOrders_args setTo_date(long to_date) {
6996
      this.to_date = to_date;
6997
      setTo_dateIsSet(true);
68 ashish 6998
      return this;
6999
    }
7000
 
483 rajveer 7001
    public void unsetTo_date() {
7002
      __isset_bit_vector.clear(__TO_DATE_ISSET_ID);
68 ashish 7003
    }
7004
 
483 rajveer 7005
    /** Returns true if field to_date is set (has been asigned a value) and false otherwise */
7006
    public boolean isSetTo_date() {
7007
      return __isset_bit_vector.get(__TO_DATE_ISSET_ID);
68 ashish 7008
    }
7009
 
483 rajveer 7010
    public void setTo_dateIsSet(boolean value) {
7011
      __isset_bit_vector.set(__TO_DATE_ISSET_ID, value);
68 ashish 7012
    }
7013
 
483 rajveer 7014
    public long getWarehouse_id() {
7015
      return this.warehouse_id;
68 ashish 7016
    }
7017
 
483 rajveer 7018
    public getAllOrders_args setWarehouse_id(long warehouse_id) {
7019
      this.warehouse_id = warehouse_id;
7020
      setWarehouse_idIsSet(true);
68 ashish 7021
      return this;
7022
    }
7023
 
483 rajveer 7024
    public void unsetWarehouse_id() {
7025
      __isset_bit_vector.clear(__WAREHOUSE_ID_ISSET_ID);
68 ashish 7026
    }
7027
 
483 rajveer 7028
    /** Returns true if field warehouse_id is set (has been asigned a value) and false otherwise */
7029
    public boolean isSetWarehouse_id() {
7030
      return __isset_bit_vector.get(__WAREHOUSE_ID_ISSET_ID);
68 ashish 7031
    }
7032
 
483 rajveer 7033
    public void setWarehouse_idIsSet(boolean value) {
7034
      __isset_bit_vector.set(__WAREHOUSE_ID_ISSET_ID, value);
68 ashish 7035
    }
7036
 
7037
    public void setFieldValue(_Fields field, Object value) {
7038
      switch (field) {
483 rajveer 7039
      case STATUS:
68 ashish 7040
        if (value == null) {
483 rajveer 7041
          unsetStatus();
68 ashish 7042
        } else {
483 rajveer 7043
          setStatus((OrderStatus)value);
68 ashish 7044
        }
7045
        break;
7046
 
483 rajveer 7047
      case FROM_DATE:
68 ashish 7048
        if (value == null) {
483 rajveer 7049
          unsetFrom_date();
68 ashish 7050
        } else {
483 rajveer 7051
          setFrom_date((Long)value);
68 ashish 7052
        }
7053
        break;
7054
 
483 rajveer 7055
      case TO_DATE:
7056
        if (value == null) {
7057
          unsetTo_date();
7058
        } else {
7059
          setTo_date((Long)value);
7060
        }
7061
        break;
7062
 
7063
      case WAREHOUSE_ID:
7064
        if (value == null) {
7065
          unsetWarehouse_id();
7066
        } else {
7067
          setWarehouse_id((Long)value);
7068
        }
7069
        break;
7070
 
68 ashish 7071
      }
7072
    }
7073
 
7074
    public void setFieldValue(int fieldID, Object value) {
7075
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
7076
    }
7077
 
7078
    public Object getFieldValue(_Fields field) {
7079
      switch (field) {
483 rajveer 7080
      case STATUS:
7081
        return getStatus();
68 ashish 7082
 
483 rajveer 7083
      case FROM_DATE:
7084
        return new Long(getFrom_date());
68 ashish 7085
 
483 rajveer 7086
      case TO_DATE:
7087
        return new Long(getTo_date());
7088
 
7089
      case WAREHOUSE_ID:
7090
        return new Long(getWarehouse_id());
7091
 
68 ashish 7092
      }
7093
      throw new IllegalStateException();
7094
    }
7095
 
7096
    public Object getFieldValue(int fieldId) {
7097
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
7098
    }
7099
 
7100
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
7101
    public boolean isSet(_Fields field) {
7102
      switch (field) {
483 rajveer 7103
      case STATUS:
7104
        return isSetStatus();
7105
      case FROM_DATE:
7106
        return isSetFrom_date();
7107
      case TO_DATE:
7108
        return isSetTo_date();
7109
      case WAREHOUSE_ID:
7110
        return isSetWarehouse_id();
68 ashish 7111
      }
7112
      throw new IllegalStateException();
7113
    }
7114
 
7115
    public boolean isSet(int fieldID) {
7116
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
7117
    }
7118
 
7119
    @Override
7120
    public boolean equals(Object that) {
7121
      if (that == null)
7122
        return false;
483 rajveer 7123
      if (that instanceof getAllOrders_args)
7124
        return this.equals((getAllOrders_args)that);
68 ashish 7125
      return false;
7126
    }
7127
 
483 rajveer 7128
    public boolean equals(getAllOrders_args that) {
68 ashish 7129
      if (that == null)
7130
        return false;
7131
 
483 rajveer 7132
      boolean this_present_status = true && this.isSetStatus();
7133
      boolean that_present_status = true && that.isSetStatus();
7134
      if (this_present_status || that_present_status) {
7135
        if (!(this_present_status && that_present_status))
68 ashish 7136
          return false;
483 rajveer 7137
        if (!this.status.equals(that.status))
68 ashish 7138
          return false;
7139
      }
7140
 
483 rajveer 7141
      boolean this_present_from_date = true;
7142
      boolean that_present_from_date = true;
7143
      if (this_present_from_date || that_present_from_date) {
7144
        if (!(this_present_from_date && that_present_from_date))
68 ashish 7145
          return false;
483 rajveer 7146
        if (this.from_date != that.from_date)
68 ashish 7147
          return false;
7148
      }
7149
 
483 rajveer 7150
      boolean this_present_to_date = true;
7151
      boolean that_present_to_date = true;
7152
      if (this_present_to_date || that_present_to_date) {
7153
        if (!(this_present_to_date && that_present_to_date))
7154
          return false;
7155
        if (this.to_date != that.to_date)
7156
          return false;
68 ashish 7157
      }
7158
 
483 rajveer 7159
      boolean this_present_warehouse_id = true;
7160
      boolean that_present_warehouse_id = true;
7161
      if (this_present_warehouse_id || that_present_warehouse_id) {
7162
        if (!(this_present_warehouse_id && that_present_warehouse_id))
68 ashish 7163
          return false;
483 rajveer 7164
        if (this.warehouse_id != that.warehouse_id)
68 ashish 7165
          return false;
7166
      }
7167
 
7168
      return true;
7169
    }
7170
 
7171
    @Override
7172
    public int hashCode() {
7173
      return 0;
7174
    }
7175
 
483 rajveer 7176
    public int compareTo(getAllOrders_args other) {
68 ashish 7177
      if (!getClass().equals(other.getClass())) {
7178
        return getClass().getName().compareTo(other.getClass().getName());
7179
      }
7180
 
7181
      int lastComparison = 0;
483 rajveer 7182
      getAllOrders_args typedOther = (getAllOrders_args)other;
68 ashish 7183
 
483 rajveer 7184
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
68 ashish 7185
      if (lastComparison != 0) {
7186
        return lastComparison;
7187
      }
483 rajveer 7188
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
68 ashish 7189
      if (lastComparison != 0) {
7190
        return lastComparison;
7191
      }
483 rajveer 7192
      lastComparison = Boolean.valueOf(isSetFrom_date()).compareTo(isSetFrom_date());
7193
      if (lastComparison != 0) {
7194
        return lastComparison;
7195
      }
7196
      lastComparison = TBaseHelper.compareTo(from_date, typedOther.from_date);
7197
      if (lastComparison != 0) {
7198
        return lastComparison;
7199
      }
7200
      lastComparison = Boolean.valueOf(isSetTo_date()).compareTo(isSetTo_date());
7201
      if (lastComparison != 0) {
7202
        return lastComparison;
7203
      }
7204
      lastComparison = TBaseHelper.compareTo(to_date, typedOther.to_date);
7205
      if (lastComparison != 0) {
7206
        return lastComparison;
7207
      }
7208
      lastComparison = Boolean.valueOf(isSetWarehouse_id()).compareTo(isSetWarehouse_id());
7209
      if (lastComparison != 0) {
7210
        return lastComparison;
7211
      }
7212
      lastComparison = TBaseHelper.compareTo(warehouse_id, typedOther.warehouse_id);
7213
      if (lastComparison != 0) {
7214
        return lastComparison;
7215
      }
68 ashish 7216
      return 0;
7217
    }
7218
 
7219
    public void read(TProtocol iprot) throws TException {
7220
      TField field;
7221
      iprot.readStructBegin();
7222
      while (true)
7223
      {
7224
        field = iprot.readFieldBegin();
7225
        if (field.type == TType.STOP) { 
7226
          break;
7227
        }
7228
        _Fields fieldId = _Fields.findByThriftId(field.id);
7229
        if (fieldId == null) {
7230
          TProtocolUtil.skip(iprot, field.type);
7231
        } else {
7232
          switch (fieldId) {
483 rajveer 7233
            case STATUS:
7234
              if (field.type == TType.I32) {
7235
                this.status = OrderStatus.findByValue(iprot.readI32());
7236
              } else { 
7237
                TProtocolUtil.skip(iprot, field.type);
7238
              }
7239
              break;
7240
            case FROM_DATE:
68 ashish 7241
              if (field.type == TType.I64) {
483 rajveer 7242
                this.from_date = iprot.readI64();
7243
                setFrom_dateIsSet(true);
68 ashish 7244
              } else { 
7245
                TProtocolUtil.skip(iprot, field.type);
7246
              }
7247
              break;
483 rajveer 7248
            case TO_DATE:
7249
              if (field.type == TType.I64) {
7250
                this.to_date = iprot.readI64();
7251
                setTo_dateIsSet(true);
7252
              } else { 
7253
                TProtocolUtil.skip(iprot, field.type);
7254
              }
7255
              break;
7256
            case WAREHOUSE_ID:
7257
              if (field.type == TType.I64) {
7258
                this.warehouse_id = iprot.readI64();
7259
                setWarehouse_idIsSet(true);
7260
              } else { 
7261
                TProtocolUtil.skip(iprot, field.type);
7262
              }
7263
              break;
68 ashish 7264
          }
7265
          iprot.readFieldEnd();
7266
        }
7267
      }
7268
      iprot.readStructEnd();
7269
      validate();
7270
    }
7271
 
7272
    public void write(TProtocol oprot) throws TException {
7273
      validate();
7274
 
7275
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 7276
      if (this.status != null) {
7277
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
7278
        oprot.writeI32(this.status.getValue());
7279
        oprot.writeFieldEnd();
7280
      }
7281
      oprot.writeFieldBegin(FROM_DATE_FIELD_DESC);
7282
      oprot.writeI64(this.from_date);
68 ashish 7283
      oprot.writeFieldEnd();
483 rajveer 7284
      oprot.writeFieldBegin(TO_DATE_FIELD_DESC);
7285
      oprot.writeI64(this.to_date);
7286
      oprot.writeFieldEnd();
7287
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
7288
      oprot.writeI64(this.warehouse_id);
7289
      oprot.writeFieldEnd();
68 ashish 7290
      oprot.writeFieldStop();
7291
      oprot.writeStructEnd();
7292
    }
7293
 
7294
    @Override
7295
    public String toString() {
483 rajveer 7296
      StringBuilder sb = new StringBuilder("getAllOrders_args(");
68 ashish 7297
      boolean first = true;
7298
 
483 rajveer 7299
      sb.append("status:");
7300
      if (this.status == null) {
7301
        sb.append("null");
7302
      } else {
7303
        String status_name = status.name();
7304
        if (status_name != null) {
7305
          sb.append(status_name);
7306
          sb.append(" (");
7307
        }
7308
        sb.append(this.status);
7309
        if (status_name != null) {
7310
          sb.append(")");
7311
        }
7312
      }
68 ashish 7313
      first = false;
483 rajveer 7314
      if (!first) sb.append(", ");
7315
      sb.append("from_date:");
7316
      sb.append(this.from_date);
7317
      first = false;
7318
      if (!first) sb.append(", ");
7319
      sb.append("to_date:");
7320
      sb.append(this.to_date);
7321
      first = false;
7322
      if (!first) sb.append(", ");
7323
      sb.append("warehouse_id:");
7324
      sb.append(this.warehouse_id);
7325
      first = false;
68 ashish 7326
      sb.append(")");
7327
      return sb.toString();
7328
    }
7329
 
7330
    public void validate() throws TException {
7331
      // check for required fields
7332
    }
7333
 
7334
  }
7335
 
483 rajveer 7336
  public static class getAllOrders_result implements TBase<getAllOrders_result._Fields>, java.io.Serializable, Cloneable, Comparable<getAllOrders_result>   {
7337
    private static final TStruct STRUCT_DESC = new TStruct("getAllOrders_result");
68 ashish 7338
 
483 rajveer 7339
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
68 ashish 7340
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
7341
 
483 rajveer 7342
    private List<Order> success;
68 ashish 7343
    private TransactionServiceException ex;
7344
 
7345
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7346
    public enum _Fields implements TFieldIdEnum {
7347
      SUCCESS((short)0, "success"),
7348
      EX((short)1, "ex");
7349
 
7350
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
7351
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7352
 
7353
      static {
7354
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7355
          byId.put((int)field._thriftId, field);
7356
          byName.put(field.getFieldName(), field);
7357
        }
7358
      }
7359
 
7360
      /**
7361
       * Find the _Fields constant that matches fieldId, or null if its not found.
7362
       */
7363
      public static _Fields findByThriftId(int fieldId) {
7364
        return byId.get(fieldId);
7365
      }
7366
 
7367
      /**
7368
       * Find the _Fields constant that matches fieldId, throwing an exception
7369
       * if it is not found.
7370
       */
7371
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7372
        _Fields fields = findByThriftId(fieldId);
7373
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7374
        return fields;
7375
      }
7376
 
7377
      /**
7378
       * Find the _Fields constant that matches name, or null if its not found.
7379
       */
7380
      public static _Fields findByName(String name) {
7381
        return byName.get(name);
7382
      }
7383
 
7384
      private final short _thriftId;
7385
      private final String _fieldName;
7386
 
7387
      _Fields(short thriftId, String fieldName) {
7388
        _thriftId = thriftId;
7389
        _fieldName = fieldName;
7390
      }
7391
 
7392
      public short getThriftFieldId() {
7393
        return _thriftId;
7394
      }
7395
 
7396
      public String getFieldName() {
7397
        return _fieldName;
7398
      }
7399
    }
7400
 
7401
    // isset id assignments
7402
 
7403
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
7404
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
483 rajveer 7405
          new ListMetaData(TType.LIST, 
7406
              new StructMetaData(TType.STRUCT, Order.class))));
68 ashish 7407
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
7408
          new FieldValueMetaData(TType.STRUCT)));
7409
    }});
7410
 
7411
    static {
483 rajveer 7412
      FieldMetaData.addStructMetaDataMap(getAllOrders_result.class, metaDataMap);
68 ashish 7413
    }
7414
 
483 rajveer 7415
    public getAllOrders_result() {
68 ashish 7416
    }
7417
 
483 rajveer 7418
    public getAllOrders_result(
7419
      List<Order> success,
68 ashish 7420
      TransactionServiceException ex)
7421
    {
7422
      this();
7423
      this.success = success;
7424
      this.ex = ex;
7425
    }
7426
 
7427
    /**
7428
     * Performs a deep copy on <i>other</i>.
7429
     */
483 rajveer 7430
    public getAllOrders_result(getAllOrders_result other) {
68 ashish 7431
      if (other.isSetSuccess()) {
483 rajveer 7432
        List<Order> __this__success = new ArrayList<Order>();
7433
        for (Order other_element : other.success) {
7434
          __this__success.add(new Order(other_element));
7435
        }
7436
        this.success = __this__success;
68 ashish 7437
      }
7438
      if (other.isSetEx()) {
7439
        this.ex = new TransactionServiceException(other.ex);
7440
      }
7441
    }
7442
 
483 rajveer 7443
    public getAllOrders_result deepCopy() {
7444
      return new getAllOrders_result(this);
68 ashish 7445
    }
7446
 
7447
    @Deprecated
483 rajveer 7448
    public getAllOrders_result clone() {
7449
      return new getAllOrders_result(this);
68 ashish 7450
    }
7451
 
483 rajveer 7452
    public int getSuccessSize() {
7453
      return (this.success == null) ? 0 : this.success.size();
7454
    }
7455
 
7456
    public java.util.Iterator<Order> getSuccessIterator() {
7457
      return (this.success == null) ? null : this.success.iterator();
7458
    }
7459
 
7460
    public void addToSuccess(Order elem) {
7461
      if (this.success == null) {
7462
        this.success = new ArrayList<Order>();
7463
      }
7464
      this.success.add(elem);
7465
    }
7466
 
7467
    public List<Order> getSuccess() {
68 ashish 7468
      return this.success;
7469
    }
7470
 
483 rajveer 7471
    public getAllOrders_result setSuccess(List<Order> success) {
68 ashish 7472
      this.success = success;
7473
      return this;
7474
    }
7475
 
7476
    public void unsetSuccess() {
7477
      this.success = null;
7478
    }
7479
 
7480
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
7481
    public boolean isSetSuccess() {
7482
      return this.success != null;
7483
    }
7484
 
7485
    public void setSuccessIsSet(boolean value) {
7486
      if (!value) {
7487
        this.success = null;
7488
      }
7489
    }
7490
 
7491
    public TransactionServiceException getEx() {
7492
      return this.ex;
7493
    }
7494
 
483 rajveer 7495
    public getAllOrders_result setEx(TransactionServiceException ex) {
68 ashish 7496
      this.ex = ex;
7497
      return this;
7498
    }
7499
 
7500
    public void unsetEx() {
7501
      this.ex = null;
7502
    }
7503
 
7504
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
7505
    public boolean isSetEx() {
7506
      return this.ex != null;
7507
    }
7508
 
7509
    public void setExIsSet(boolean value) {
7510
      if (!value) {
7511
        this.ex = null;
7512
      }
7513
    }
7514
 
7515
    public void setFieldValue(_Fields field, Object value) {
7516
      switch (field) {
7517
      case SUCCESS:
7518
        if (value == null) {
7519
          unsetSuccess();
7520
        } else {
483 rajveer 7521
          setSuccess((List<Order>)value);
68 ashish 7522
        }
7523
        break;
7524
 
7525
      case EX:
7526
        if (value == null) {
7527
          unsetEx();
7528
        } else {
7529
          setEx((TransactionServiceException)value);
7530
        }
7531
        break;
7532
 
7533
      }
7534
    }
7535
 
7536
    public void setFieldValue(int fieldID, Object value) {
7537
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
7538
    }
7539
 
7540
    public Object getFieldValue(_Fields field) {
7541
      switch (field) {
7542
      case SUCCESS:
7543
        return getSuccess();
7544
 
7545
      case EX:
7546
        return getEx();
7547
 
7548
      }
7549
      throw new IllegalStateException();
7550
    }
7551
 
7552
    public Object getFieldValue(int fieldId) {
7553
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
7554
    }
7555
 
7556
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
7557
    public boolean isSet(_Fields field) {
7558
      switch (field) {
7559
      case SUCCESS:
7560
        return isSetSuccess();
7561
      case EX:
7562
        return isSetEx();
7563
      }
7564
      throw new IllegalStateException();
7565
    }
7566
 
7567
    public boolean isSet(int fieldID) {
7568
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
7569
    }
7570
 
7571
    @Override
7572
    public boolean equals(Object that) {
7573
      if (that == null)
7574
        return false;
483 rajveer 7575
      if (that instanceof getAllOrders_result)
7576
        return this.equals((getAllOrders_result)that);
68 ashish 7577
      return false;
7578
    }
7579
 
483 rajveer 7580
    public boolean equals(getAllOrders_result that) {
68 ashish 7581
      if (that == null)
7582
        return false;
7583
 
7584
      boolean this_present_success = true && this.isSetSuccess();
7585
      boolean that_present_success = true && that.isSetSuccess();
7586
      if (this_present_success || that_present_success) {
7587
        if (!(this_present_success && that_present_success))
7588
          return false;
7589
        if (!this.success.equals(that.success))
7590
          return false;
7591
      }
7592
 
7593
      boolean this_present_ex = true && this.isSetEx();
7594
      boolean that_present_ex = true && that.isSetEx();
7595
      if (this_present_ex || that_present_ex) {
7596
        if (!(this_present_ex && that_present_ex))
7597
          return false;
7598
        if (!this.ex.equals(that.ex))
7599
          return false;
7600
      }
7601
 
7602
      return true;
7603
    }
7604
 
7605
    @Override
7606
    public int hashCode() {
7607
      return 0;
7608
    }
7609
 
483 rajveer 7610
    public int compareTo(getAllOrders_result other) {
7611
      if (!getClass().equals(other.getClass())) {
7612
        return getClass().getName().compareTo(other.getClass().getName());
7613
      }
7614
 
7615
      int lastComparison = 0;
7616
      getAllOrders_result typedOther = (getAllOrders_result)other;
7617
 
7618
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
7619
      if (lastComparison != 0) {
7620
        return lastComparison;
7621
      }
7622
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
7623
      if (lastComparison != 0) {
7624
        return lastComparison;
7625
      }
7626
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
7627
      if (lastComparison != 0) {
7628
        return lastComparison;
7629
      }
7630
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
7631
      if (lastComparison != 0) {
7632
        return lastComparison;
7633
      }
7634
      return 0;
7635
    }
7636
 
68 ashish 7637
    public void read(TProtocol iprot) throws TException {
7638
      TField field;
7639
      iprot.readStructBegin();
7640
      while (true)
7641
      {
7642
        field = iprot.readFieldBegin();
7643
        if (field.type == TType.STOP) { 
7644
          break;
7645
        }
7646
        _Fields fieldId = _Fields.findByThriftId(field.id);
7647
        if (fieldId == null) {
7648
          TProtocolUtil.skip(iprot, field.type);
7649
        } else {
7650
          switch (fieldId) {
7651
            case SUCCESS:
483 rajveer 7652
              if (field.type == TType.LIST) {
7653
                {
684 chandransh 7654
                  TList _list16 = iprot.readListBegin();
7655
                  this.success = new ArrayList<Order>(_list16.size);
7656
                  for (int _i17 = 0; _i17 < _list16.size; ++_i17)
483 rajveer 7657
                  {
684 chandransh 7658
                    Order _elem18;
7659
                    _elem18 = new Order();
7660
                    _elem18.read(iprot);
7661
                    this.success.add(_elem18);
483 rajveer 7662
                  }
7663
                  iprot.readListEnd();
7664
                }
68 ashish 7665
              } else { 
7666
                TProtocolUtil.skip(iprot, field.type);
7667
              }
7668
              break;
7669
            case EX:
7670
              if (field.type == TType.STRUCT) {
7671
                this.ex = new TransactionServiceException();
7672
                this.ex.read(iprot);
7673
              } else { 
7674
                TProtocolUtil.skip(iprot, field.type);
7675
              }
7676
              break;
7677
          }
7678
          iprot.readFieldEnd();
7679
        }
7680
      }
7681
      iprot.readStructEnd();
7682
      validate();
7683
    }
7684
 
7685
    public void write(TProtocol oprot) throws TException {
7686
      oprot.writeStructBegin(STRUCT_DESC);
7687
 
7688
      if (this.isSetSuccess()) {
7689
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
483 rajveer 7690
        {
7691
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
684 chandransh 7692
          for (Order _iter19 : this.success)
483 rajveer 7693
          {
684 chandransh 7694
            _iter19.write(oprot);
483 rajveer 7695
          }
7696
          oprot.writeListEnd();
7697
        }
68 ashish 7698
        oprot.writeFieldEnd();
7699
      } else if (this.isSetEx()) {
7700
        oprot.writeFieldBegin(EX_FIELD_DESC);
7701
        this.ex.write(oprot);
7702
        oprot.writeFieldEnd();
7703
      }
7704
      oprot.writeFieldStop();
7705
      oprot.writeStructEnd();
7706
    }
7707
 
7708
    @Override
7709
    public String toString() {
483 rajveer 7710
      StringBuilder sb = new StringBuilder("getAllOrders_result(");
68 ashish 7711
      boolean first = true;
7712
 
7713
      sb.append("success:");
7714
      if (this.success == null) {
7715
        sb.append("null");
7716
      } else {
7717
        sb.append(this.success);
7718
      }
7719
      first = false;
7720
      if (!first) sb.append(", ");
7721
      sb.append("ex:");
7722
      if (this.ex == null) {
7723
        sb.append("null");
7724
      } else {
7725
        sb.append(this.ex);
7726
      }
7727
      first = false;
7728
      sb.append(")");
7729
      return sb.toString();
7730
    }
7731
 
7732
    public void validate() throws TException {
7733
      // check for required fields
7734
    }
7735
 
7736
  }
7737
 
1022 varun.gupt 7738
  public static class getOrdersByBillingDate_args implements TBase<getOrdersByBillingDate_args._Fields>, java.io.Serializable, Cloneable, Comparable<getOrdersByBillingDate_args>   {
7739
    private static final TStruct STRUCT_DESC = new TStruct("getOrdersByBillingDate_args");
7740
 
7741
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)1);
7742
    private static final TField START_BILLING_DATE_FIELD_DESC = new TField("start_billing_date", TType.I64, (short)2);
7743
    private static final TField END_BILLING_DATE_FIELD_DESC = new TField("end_billing_date", TType.I64, (short)3);
7744
    private static final TField WAREHOUSE_ID_FIELD_DESC = new TField("warehouse_id", TType.I64, (short)4);
7745
 
7746
    private OrderStatus status;
7747
    private long start_billing_date;
7748
    private long end_billing_date;
7749
    private long warehouse_id;
7750
 
7751
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7752
    public enum _Fields implements TFieldIdEnum {
7753
      /**
7754
       * 
7755
       * @see OrderStatus
7756
       */
7757
      STATUS((short)1, "status"),
7758
      START_BILLING_DATE((short)2, "start_billing_date"),
7759
      END_BILLING_DATE((short)3, "end_billing_date"),
7760
      WAREHOUSE_ID((short)4, "warehouse_id");
7761
 
7762
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
7763
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7764
 
7765
      static {
7766
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7767
          byId.put((int)field._thriftId, field);
7768
          byName.put(field.getFieldName(), field);
7769
        }
7770
      }
7771
 
7772
      /**
7773
       * Find the _Fields constant that matches fieldId, or null if its not found.
7774
       */
7775
      public static _Fields findByThriftId(int fieldId) {
7776
        return byId.get(fieldId);
7777
      }
7778
 
7779
      /**
7780
       * Find the _Fields constant that matches fieldId, throwing an exception
7781
       * if it is not found.
7782
       */
7783
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7784
        _Fields fields = findByThriftId(fieldId);
7785
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7786
        return fields;
7787
      }
7788
 
7789
      /**
7790
       * Find the _Fields constant that matches name, or null if its not found.
7791
       */
7792
      public static _Fields findByName(String name) {
7793
        return byName.get(name);
7794
      }
7795
 
7796
      private final short _thriftId;
7797
      private final String _fieldName;
7798
 
7799
      _Fields(short thriftId, String fieldName) {
7800
        _thriftId = thriftId;
7801
        _fieldName = fieldName;
7802
      }
7803
 
7804
      public short getThriftFieldId() {
7805
        return _thriftId;
7806
      }
7807
 
7808
      public String getFieldName() {
7809
        return _fieldName;
7810
      }
7811
    }
7812
 
7813
    // isset id assignments
7814
    private static final int __START_BILLING_DATE_ISSET_ID = 0;
7815
    private static final int __END_BILLING_DATE_ISSET_ID = 1;
7816
    private static final int __WAREHOUSE_ID_ISSET_ID = 2;
7817
    private BitSet __isset_bit_vector = new BitSet(3);
7818
 
7819
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
7820
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
7821
          new EnumMetaData(TType.ENUM, OrderStatus.class)));
7822
      put(_Fields.START_BILLING_DATE, new FieldMetaData("start_billing_date", TFieldRequirementType.DEFAULT, 
7823
          new FieldValueMetaData(TType.I64)));
7824
      put(_Fields.END_BILLING_DATE, new FieldMetaData("end_billing_date", TFieldRequirementType.DEFAULT, 
7825
          new FieldValueMetaData(TType.I64)));
7826
      put(_Fields.WAREHOUSE_ID, new FieldMetaData("warehouse_id", TFieldRequirementType.DEFAULT, 
7827
          new FieldValueMetaData(TType.I64)));
7828
    }});
7829
 
7830
    static {
7831
      FieldMetaData.addStructMetaDataMap(getOrdersByBillingDate_args.class, metaDataMap);
7832
    }
7833
 
7834
    public getOrdersByBillingDate_args() {
7835
    }
7836
 
7837
    public getOrdersByBillingDate_args(
7838
      OrderStatus status,
7839
      long start_billing_date,
7840
      long end_billing_date,
7841
      long warehouse_id)
7842
    {
7843
      this();
7844
      this.status = status;
7845
      this.start_billing_date = start_billing_date;
7846
      setStart_billing_dateIsSet(true);
7847
      this.end_billing_date = end_billing_date;
7848
      setEnd_billing_dateIsSet(true);
7849
      this.warehouse_id = warehouse_id;
7850
      setWarehouse_idIsSet(true);
7851
    }
7852
 
7853
    /**
7854
     * Performs a deep copy on <i>other</i>.
7855
     */
7856
    public getOrdersByBillingDate_args(getOrdersByBillingDate_args other) {
7857
      __isset_bit_vector.clear();
7858
      __isset_bit_vector.or(other.__isset_bit_vector);
7859
      if (other.isSetStatus()) {
7860
        this.status = other.status;
7861
      }
7862
      this.start_billing_date = other.start_billing_date;
7863
      this.end_billing_date = other.end_billing_date;
7864
      this.warehouse_id = other.warehouse_id;
7865
    }
7866
 
7867
    public getOrdersByBillingDate_args deepCopy() {
7868
      return new getOrdersByBillingDate_args(this);
7869
    }
7870
 
7871
    @Deprecated
7872
    public getOrdersByBillingDate_args clone() {
7873
      return new getOrdersByBillingDate_args(this);
7874
    }
7875
 
7876
    /**
7877
     * 
7878
     * @see OrderStatus
7879
     */
7880
    public OrderStatus getStatus() {
7881
      return this.status;
7882
    }
7883
 
7884
    /**
7885
     * 
7886
     * @see OrderStatus
7887
     */
7888
    public getOrdersByBillingDate_args setStatus(OrderStatus status) {
7889
      this.status = status;
7890
      return this;
7891
    }
7892
 
7893
    public void unsetStatus() {
7894
      this.status = null;
7895
    }
7896
 
7897
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
7898
    public boolean isSetStatus() {
7899
      return this.status != null;
7900
    }
7901
 
7902
    public void setStatusIsSet(boolean value) {
7903
      if (!value) {
7904
        this.status = null;
7905
      }
7906
    }
7907
 
7908
    public long getStart_billing_date() {
7909
      return this.start_billing_date;
7910
    }
7911
 
7912
    public getOrdersByBillingDate_args setStart_billing_date(long start_billing_date) {
7913
      this.start_billing_date = start_billing_date;
7914
      setStart_billing_dateIsSet(true);
7915
      return this;
7916
    }
7917
 
7918
    public void unsetStart_billing_date() {
7919
      __isset_bit_vector.clear(__START_BILLING_DATE_ISSET_ID);
7920
    }
7921
 
7922
    /** Returns true if field start_billing_date is set (has been asigned a value) and false otherwise */
7923
    public boolean isSetStart_billing_date() {
7924
      return __isset_bit_vector.get(__START_BILLING_DATE_ISSET_ID);
7925
    }
7926
 
7927
    public void setStart_billing_dateIsSet(boolean value) {
7928
      __isset_bit_vector.set(__START_BILLING_DATE_ISSET_ID, value);
7929
    }
7930
 
7931
    public long getEnd_billing_date() {
7932
      return this.end_billing_date;
7933
    }
7934
 
7935
    public getOrdersByBillingDate_args setEnd_billing_date(long end_billing_date) {
7936
      this.end_billing_date = end_billing_date;
7937
      setEnd_billing_dateIsSet(true);
7938
      return this;
7939
    }
7940
 
7941
    public void unsetEnd_billing_date() {
7942
      __isset_bit_vector.clear(__END_BILLING_DATE_ISSET_ID);
7943
    }
7944
 
7945
    /** Returns true if field end_billing_date is set (has been asigned a value) and false otherwise */
7946
    public boolean isSetEnd_billing_date() {
7947
      return __isset_bit_vector.get(__END_BILLING_DATE_ISSET_ID);
7948
    }
7949
 
7950
    public void setEnd_billing_dateIsSet(boolean value) {
7951
      __isset_bit_vector.set(__END_BILLING_DATE_ISSET_ID, value);
7952
    }
7953
 
7954
    public long getWarehouse_id() {
7955
      return this.warehouse_id;
7956
    }
7957
 
7958
    public getOrdersByBillingDate_args setWarehouse_id(long warehouse_id) {
7959
      this.warehouse_id = warehouse_id;
7960
      setWarehouse_idIsSet(true);
7961
      return this;
7962
    }
7963
 
7964
    public void unsetWarehouse_id() {
7965
      __isset_bit_vector.clear(__WAREHOUSE_ID_ISSET_ID);
7966
    }
7967
 
7968
    /** Returns true if field warehouse_id is set (has been asigned a value) and false otherwise */
7969
    public boolean isSetWarehouse_id() {
7970
      return __isset_bit_vector.get(__WAREHOUSE_ID_ISSET_ID);
7971
    }
7972
 
7973
    public void setWarehouse_idIsSet(boolean value) {
7974
      __isset_bit_vector.set(__WAREHOUSE_ID_ISSET_ID, value);
7975
    }
7976
 
7977
    public void setFieldValue(_Fields field, Object value) {
7978
      switch (field) {
7979
      case STATUS:
7980
        if (value == null) {
7981
          unsetStatus();
7982
        } else {
7983
          setStatus((OrderStatus)value);
7984
        }
7985
        break;
7986
 
7987
      case START_BILLING_DATE:
7988
        if (value == null) {
7989
          unsetStart_billing_date();
7990
        } else {
7991
          setStart_billing_date((Long)value);
7992
        }
7993
        break;
7994
 
7995
      case END_BILLING_DATE:
7996
        if (value == null) {
7997
          unsetEnd_billing_date();
7998
        } else {
7999
          setEnd_billing_date((Long)value);
8000
        }
8001
        break;
8002
 
8003
      case WAREHOUSE_ID:
8004
        if (value == null) {
8005
          unsetWarehouse_id();
8006
        } else {
8007
          setWarehouse_id((Long)value);
8008
        }
8009
        break;
8010
 
8011
      }
8012
    }
8013
 
8014
    public void setFieldValue(int fieldID, Object value) {
8015
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
8016
    }
8017
 
8018
    public Object getFieldValue(_Fields field) {
8019
      switch (field) {
8020
      case STATUS:
8021
        return getStatus();
8022
 
8023
      case START_BILLING_DATE:
8024
        return new Long(getStart_billing_date());
8025
 
8026
      case END_BILLING_DATE:
8027
        return new Long(getEnd_billing_date());
8028
 
8029
      case WAREHOUSE_ID:
8030
        return new Long(getWarehouse_id());
8031
 
8032
      }
8033
      throw new IllegalStateException();
8034
    }
8035
 
8036
    public Object getFieldValue(int fieldId) {
8037
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
8038
    }
8039
 
8040
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
8041
    public boolean isSet(_Fields field) {
8042
      switch (field) {
8043
      case STATUS:
8044
        return isSetStatus();
8045
      case START_BILLING_DATE:
8046
        return isSetStart_billing_date();
8047
      case END_BILLING_DATE:
8048
        return isSetEnd_billing_date();
8049
      case WAREHOUSE_ID:
8050
        return isSetWarehouse_id();
8051
      }
8052
      throw new IllegalStateException();
8053
    }
8054
 
8055
    public boolean isSet(int fieldID) {
8056
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
8057
    }
8058
 
8059
    @Override
8060
    public boolean equals(Object that) {
8061
      if (that == null)
8062
        return false;
8063
      if (that instanceof getOrdersByBillingDate_args)
8064
        return this.equals((getOrdersByBillingDate_args)that);
8065
      return false;
8066
    }
8067
 
8068
    public boolean equals(getOrdersByBillingDate_args that) {
8069
      if (that == null)
8070
        return false;
8071
 
8072
      boolean this_present_status = true && this.isSetStatus();
8073
      boolean that_present_status = true && that.isSetStatus();
8074
      if (this_present_status || that_present_status) {
8075
        if (!(this_present_status && that_present_status))
8076
          return false;
8077
        if (!this.status.equals(that.status))
8078
          return false;
8079
      }
8080
 
8081
      boolean this_present_start_billing_date = true;
8082
      boolean that_present_start_billing_date = true;
8083
      if (this_present_start_billing_date || that_present_start_billing_date) {
8084
        if (!(this_present_start_billing_date && that_present_start_billing_date))
8085
          return false;
8086
        if (this.start_billing_date != that.start_billing_date)
8087
          return false;
8088
      }
8089
 
8090
      boolean this_present_end_billing_date = true;
8091
      boolean that_present_end_billing_date = true;
8092
      if (this_present_end_billing_date || that_present_end_billing_date) {
8093
        if (!(this_present_end_billing_date && that_present_end_billing_date))
8094
          return false;
8095
        if (this.end_billing_date != that.end_billing_date)
8096
          return false;
8097
      }
8098
 
8099
      boolean this_present_warehouse_id = true;
8100
      boolean that_present_warehouse_id = true;
8101
      if (this_present_warehouse_id || that_present_warehouse_id) {
8102
        if (!(this_present_warehouse_id && that_present_warehouse_id))
8103
          return false;
8104
        if (this.warehouse_id != that.warehouse_id)
8105
          return false;
8106
      }
8107
 
8108
      return true;
8109
    }
8110
 
8111
    @Override
8112
    public int hashCode() {
8113
      return 0;
8114
    }
8115
 
8116
    public int compareTo(getOrdersByBillingDate_args other) {
8117
      if (!getClass().equals(other.getClass())) {
8118
        return getClass().getName().compareTo(other.getClass().getName());
8119
      }
8120
 
8121
      int lastComparison = 0;
8122
      getOrdersByBillingDate_args typedOther = (getOrdersByBillingDate_args)other;
8123
 
8124
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
8125
      if (lastComparison != 0) {
8126
        return lastComparison;
8127
      }
8128
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
8129
      if (lastComparison != 0) {
8130
        return lastComparison;
8131
      }
8132
      lastComparison = Boolean.valueOf(isSetStart_billing_date()).compareTo(isSetStart_billing_date());
8133
      if (lastComparison != 0) {
8134
        return lastComparison;
8135
      }
8136
      lastComparison = TBaseHelper.compareTo(start_billing_date, typedOther.start_billing_date);
8137
      if (lastComparison != 0) {
8138
        return lastComparison;
8139
      }
8140
      lastComparison = Boolean.valueOf(isSetEnd_billing_date()).compareTo(isSetEnd_billing_date());
8141
      if (lastComparison != 0) {
8142
        return lastComparison;
8143
      }
8144
      lastComparison = TBaseHelper.compareTo(end_billing_date, typedOther.end_billing_date);
8145
      if (lastComparison != 0) {
8146
        return lastComparison;
8147
      }
8148
      lastComparison = Boolean.valueOf(isSetWarehouse_id()).compareTo(isSetWarehouse_id());
8149
      if (lastComparison != 0) {
8150
        return lastComparison;
8151
      }
8152
      lastComparison = TBaseHelper.compareTo(warehouse_id, typedOther.warehouse_id);
8153
      if (lastComparison != 0) {
8154
        return lastComparison;
8155
      }
8156
      return 0;
8157
    }
8158
 
8159
    public void read(TProtocol iprot) throws TException {
8160
      TField field;
8161
      iprot.readStructBegin();
8162
      while (true)
8163
      {
8164
        field = iprot.readFieldBegin();
8165
        if (field.type == TType.STOP) { 
8166
          break;
8167
        }
8168
        _Fields fieldId = _Fields.findByThriftId(field.id);
8169
        if (fieldId == null) {
8170
          TProtocolUtil.skip(iprot, field.type);
8171
        } else {
8172
          switch (fieldId) {
8173
            case STATUS:
8174
              if (field.type == TType.I32) {
8175
                this.status = OrderStatus.findByValue(iprot.readI32());
8176
              } else { 
8177
                TProtocolUtil.skip(iprot, field.type);
8178
              }
8179
              break;
8180
            case START_BILLING_DATE:
8181
              if (field.type == TType.I64) {
8182
                this.start_billing_date = iprot.readI64();
8183
                setStart_billing_dateIsSet(true);
8184
              } else { 
8185
                TProtocolUtil.skip(iprot, field.type);
8186
              }
8187
              break;
8188
            case END_BILLING_DATE:
8189
              if (field.type == TType.I64) {
8190
                this.end_billing_date = iprot.readI64();
8191
                setEnd_billing_dateIsSet(true);
8192
              } else { 
8193
                TProtocolUtil.skip(iprot, field.type);
8194
              }
8195
              break;
8196
            case WAREHOUSE_ID:
8197
              if (field.type == TType.I64) {
8198
                this.warehouse_id = iprot.readI64();
8199
                setWarehouse_idIsSet(true);
8200
              } else { 
8201
                TProtocolUtil.skip(iprot, field.type);
8202
              }
8203
              break;
8204
          }
8205
          iprot.readFieldEnd();
8206
        }
8207
      }
8208
      iprot.readStructEnd();
8209
      validate();
8210
    }
8211
 
8212
    public void write(TProtocol oprot) throws TException {
8213
      validate();
8214
 
8215
      oprot.writeStructBegin(STRUCT_DESC);
8216
      if (this.status != null) {
8217
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
8218
        oprot.writeI32(this.status.getValue());
8219
        oprot.writeFieldEnd();
8220
      }
8221
      oprot.writeFieldBegin(START_BILLING_DATE_FIELD_DESC);
8222
      oprot.writeI64(this.start_billing_date);
8223
      oprot.writeFieldEnd();
8224
      oprot.writeFieldBegin(END_BILLING_DATE_FIELD_DESC);
8225
      oprot.writeI64(this.end_billing_date);
8226
      oprot.writeFieldEnd();
8227
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
8228
      oprot.writeI64(this.warehouse_id);
8229
      oprot.writeFieldEnd();
8230
      oprot.writeFieldStop();
8231
      oprot.writeStructEnd();
8232
    }
8233
 
8234
    @Override
8235
    public String toString() {
8236
      StringBuilder sb = new StringBuilder("getOrdersByBillingDate_args(");
8237
      boolean first = true;
8238
 
8239
      sb.append("status:");
8240
      if (this.status == null) {
8241
        sb.append("null");
8242
      } else {
8243
        String status_name = status.name();
8244
        if (status_name != null) {
8245
          sb.append(status_name);
8246
          sb.append(" (");
8247
        }
8248
        sb.append(this.status);
8249
        if (status_name != null) {
8250
          sb.append(")");
8251
        }
8252
      }
8253
      first = false;
8254
      if (!first) sb.append(", ");
8255
      sb.append("start_billing_date:");
8256
      sb.append(this.start_billing_date);
8257
      first = false;
8258
      if (!first) sb.append(", ");
8259
      sb.append("end_billing_date:");
8260
      sb.append(this.end_billing_date);
8261
      first = false;
8262
      if (!first) sb.append(", ");
8263
      sb.append("warehouse_id:");
8264
      sb.append(this.warehouse_id);
8265
      first = false;
8266
      sb.append(")");
8267
      return sb.toString();
8268
    }
8269
 
8270
    public void validate() throws TException {
8271
      // check for required fields
8272
    }
8273
 
8274
  }
8275
 
8276
  public static class getOrdersByBillingDate_result implements TBase<getOrdersByBillingDate_result._Fields>, java.io.Serializable, Cloneable, Comparable<getOrdersByBillingDate_result>   {
8277
    private static final TStruct STRUCT_DESC = new TStruct("getOrdersByBillingDate_result");
8278
 
8279
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
8280
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
8281
 
8282
    private List<Order> success;
8283
    private TransactionServiceException ex;
8284
 
8285
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8286
    public enum _Fields implements TFieldIdEnum {
8287
      SUCCESS((short)0, "success"),
8288
      EX((short)1, "ex");
8289
 
8290
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
8291
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8292
 
8293
      static {
8294
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8295
          byId.put((int)field._thriftId, field);
8296
          byName.put(field.getFieldName(), field);
8297
        }
8298
      }
8299
 
8300
      /**
8301
       * Find the _Fields constant that matches fieldId, or null if its not found.
8302
       */
8303
      public static _Fields findByThriftId(int fieldId) {
8304
        return byId.get(fieldId);
8305
      }
8306
 
8307
      /**
8308
       * Find the _Fields constant that matches fieldId, throwing an exception
8309
       * if it is not found.
8310
       */
8311
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8312
        _Fields fields = findByThriftId(fieldId);
8313
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8314
        return fields;
8315
      }
8316
 
8317
      /**
8318
       * Find the _Fields constant that matches name, or null if its not found.
8319
       */
8320
      public static _Fields findByName(String name) {
8321
        return byName.get(name);
8322
      }
8323
 
8324
      private final short _thriftId;
8325
      private final String _fieldName;
8326
 
8327
      _Fields(short thriftId, String fieldName) {
8328
        _thriftId = thriftId;
8329
        _fieldName = fieldName;
8330
      }
8331
 
8332
      public short getThriftFieldId() {
8333
        return _thriftId;
8334
      }
8335
 
8336
      public String getFieldName() {
8337
        return _fieldName;
8338
      }
8339
    }
8340
 
8341
    // isset id assignments
8342
 
8343
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
8344
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
8345
          new ListMetaData(TType.LIST, 
8346
              new StructMetaData(TType.STRUCT, Order.class))));
8347
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
8348
          new FieldValueMetaData(TType.STRUCT)));
8349
    }});
8350
 
8351
    static {
8352
      FieldMetaData.addStructMetaDataMap(getOrdersByBillingDate_result.class, metaDataMap);
8353
    }
8354
 
8355
    public getOrdersByBillingDate_result() {
8356
    }
8357
 
8358
    public getOrdersByBillingDate_result(
8359
      List<Order> success,
8360
      TransactionServiceException ex)
8361
    {
8362
      this();
8363
      this.success = success;
8364
      this.ex = ex;
8365
    }
8366
 
8367
    /**
8368
     * Performs a deep copy on <i>other</i>.
8369
     */
8370
    public getOrdersByBillingDate_result(getOrdersByBillingDate_result other) {
8371
      if (other.isSetSuccess()) {
8372
        List<Order> __this__success = new ArrayList<Order>();
8373
        for (Order other_element : other.success) {
8374
          __this__success.add(new Order(other_element));
8375
        }
8376
        this.success = __this__success;
8377
      }
8378
      if (other.isSetEx()) {
8379
        this.ex = new TransactionServiceException(other.ex);
8380
      }
8381
    }
8382
 
8383
    public getOrdersByBillingDate_result deepCopy() {
8384
      return new getOrdersByBillingDate_result(this);
8385
    }
8386
 
8387
    @Deprecated
8388
    public getOrdersByBillingDate_result clone() {
8389
      return new getOrdersByBillingDate_result(this);
8390
    }
8391
 
8392
    public int getSuccessSize() {
8393
      return (this.success == null) ? 0 : this.success.size();
8394
    }
8395
 
8396
    public java.util.Iterator<Order> getSuccessIterator() {
8397
      return (this.success == null) ? null : this.success.iterator();
8398
    }
8399
 
8400
    public void addToSuccess(Order elem) {
8401
      if (this.success == null) {
8402
        this.success = new ArrayList<Order>();
8403
      }
8404
      this.success.add(elem);
8405
    }
8406
 
8407
    public List<Order> getSuccess() {
8408
      return this.success;
8409
    }
8410
 
8411
    public getOrdersByBillingDate_result setSuccess(List<Order> success) {
8412
      this.success = success;
8413
      return this;
8414
    }
8415
 
8416
    public void unsetSuccess() {
8417
      this.success = null;
8418
    }
8419
 
8420
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
8421
    public boolean isSetSuccess() {
8422
      return this.success != null;
8423
    }
8424
 
8425
    public void setSuccessIsSet(boolean value) {
8426
      if (!value) {
8427
        this.success = null;
8428
      }
8429
    }
8430
 
8431
    public TransactionServiceException getEx() {
8432
      return this.ex;
8433
    }
8434
 
8435
    public getOrdersByBillingDate_result setEx(TransactionServiceException ex) {
8436
      this.ex = ex;
8437
      return this;
8438
    }
8439
 
8440
    public void unsetEx() {
8441
      this.ex = null;
8442
    }
8443
 
8444
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
8445
    public boolean isSetEx() {
8446
      return this.ex != null;
8447
    }
8448
 
8449
    public void setExIsSet(boolean value) {
8450
      if (!value) {
8451
        this.ex = null;
8452
      }
8453
    }
8454
 
8455
    public void setFieldValue(_Fields field, Object value) {
8456
      switch (field) {
8457
      case SUCCESS:
8458
        if (value == null) {
8459
          unsetSuccess();
8460
        } else {
8461
          setSuccess((List<Order>)value);
8462
        }
8463
        break;
8464
 
8465
      case EX:
8466
        if (value == null) {
8467
          unsetEx();
8468
        } else {
8469
          setEx((TransactionServiceException)value);
8470
        }
8471
        break;
8472
 
8473
      }
8474
    }
8475
 
8476
    public void setFieldValue(int fieldID, Object value) {
8477
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
8478
    }
8479
 
8480
    public Object getFieldValue(_Fields field) {
8481
      switch (field) {
8482
      case SUCCESS:
8483
        return getSuccess();
8484
 
8485
      case EX:
8486
        return getEx();
8487
 
8488
      }
8489
      throw new IllegalStateException();
8490
    }
8491
 
8492
    public Object getFieldValue(int fieldId) {
8493
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
8494
    }
8495
 
8496
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
8497
    public boolean isSet(_Fields field) {
8498
      switch (field) {
8499
      case SUCCESS:
8500
        return isSetSuccess();
8501
      case EX:
8502
        return isSetEx();
8503
      }
8504
      throw new IllegalStateException();
8505
    }
8506
 
8507
    public boolean isSet(int fieldID) {
8508
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
8509
    }
8510
 
8511
    @Override
8512
    public boolean equals(Object that) {
8513
      if (that == null)
8514
        return false;
8515
      if (that instanceof getOrdersByBillingDate_result)
8516
        return this.equals((getOrdersByBillingDate_result)that);
8517
      return false;
8518
    }
8519
 
8520
    public boolean equals(getOrdersByBillingDate_result that) {
8521
      if (that == null)
8522
        return false;
8523
 
8524
      boolean this_present_success = true && this.isSetSuccess();
8525
      boolean that_present_success = true && that.isSetSuccess();
8526
      if (this_present_success || that_present_success) {
8527
        if (!(this_present_success && that_present_success))
8528
          return false;
8529
        if (!this.success.equals(that.success))
8530
          return false;
8531
      }
8532
 
8533
      boolean this_present_ex = true && this.isSetEx();
8534
      boolean that_present_ex = true && that.isSetEx();
8535
      if (this_present_ex || that_present_ex) {
8536
        if (!(this_present_ex && that_present_ex))
8537
          return false;
8538
        if (!this.ex.equals(that.ex))
8539
          return false;
8540
      }
8541
 
8542
      return true;
8543
    }
8544
 
8545
    @Override
8546
    public int hashCode() {
8547
      return 0;
8548
    }
8549
 
8550
    public int compareTo(getOrdersByBillingDate_result other) {
8551
      if (!getClass().equals(other.getClass())) {
8552
        return getClass().getName().compareTo(other.getClass().getName());
8553
      }
8554
 
8555
      int lastComparison = 0;
8556
      getOrdersByBillingDate_result typedOther = (getOrdersByBillingDate_result)other;
8557
 
8558
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
8559
      if (lastComparison != 0) {
8560
        return lastComparison;
8561
      }
8562
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
8563
      if (lastComparison != 0) {
8564
        return lastComparison;
8565
      }
8566
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
8567
      if (lastComparison != 0) {
8568
        return lastComparison;
8569
      }
8570
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
8571
      if (lastComparison != 0) {
8572
        return lastComparison;
8573
      }
8574
      return 0;
8575
    }
8576
 
8577
    public void read(TProtocol iprot) throws TException {
8578
      TField field;
8579
      iprot.readStructBegin();
8580
      while (true)
8581
      {
8582
        field = iprot.readFieldBegin();
8583
        if (field.type == TType.STOP) { 
8584
          break;
8585
        }
8586
        _Fields fieldId = _Fields.findByThriftId(field.id);
8587
        if (fieldId == null) {
8588
          TProtocolUtil.skip(iprot, field.type);
8589
        } else {
8590
          switch (fieldId) {
8591
            case SUCCESS:
8592
              if (field.type == TType.LIST) {
8593
                {
8594
                  TList _list20 = iprot.readListBegin();
8595
                  this.success = new ArrayList<Order>(_list20.size);
8596
                  for (int _i21 = 0; _i21 < _list20.size; ++_i21)
8597
                  {
8598
                    Order _elem22;
8599
                    _elem22 = new Order();
8600
                    _elem22.read(iprot);
8601
                    this.success.add(_elem22);
8602
                  }
8603
                  iprot.readListEnd();
8604
                }
8605
              } else { 
8606
                TProtocolUtil.skip(iprot, field.type);
8607
              }
8608
              break;
8609
            case EX:
8610
              if (field.type == TType.STRUCT) {
8611
                this.ex = new TransactionServiceException();
8612
                this.ex.read(iprot);
8613
              } else { 
8614
                TProtocolUtil.skip(iprot, field.type);
8615
              }
8616
              break;
8617
          }
8618
          iprot.readFieldEnd();
8619
        }
8620
      }
8621
      iprot.readStructEnd();
8622
      validate();
8623
    }
8624
 
8625
    public void write(TProtocol oprot) throws TException {
8626
      oprot.writeStructBegin(STRUCT_DESC);
8627
 
8628
      if (this.isSetSuccess()) {
8629
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
8630
        {
8631
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
8632
          for (Order _iter23 : this.success)
8633
          {
8634
            _iter23.write(oprot);
8635
          }
8636
          oprot.writeListEnd();
8637
        }
8638
        oprot.writeFieldEnd();
8639
      } else if (this.isSetEx()) {
8640
        oprot.writeFieldBegin(EX_FIELD_DESC);
8641
        this.ex.write(oprot);
8642
        oprot.writeFieldEnd();
8643
      }
8644
      oprot.writeFieldStop();
8645
      oprot.writeStructEnd();
8646
    }
8647
 
8648
    @Override
8649
    public String toString() {
8650
      StringBuilder sb = new StringBuilder("getOrdersByBillingDate_result(");
8651
      boolean first = true;
8652
 
8653
      sb.append("success:");
8654
      if (this.success == null) {
8655
        sb.append("null");
8656
      } else {
8657
        sb.append(this.success);
8658
      }
8659
      first = false;
8660
      if (!first) sb.append(", ");
8661
      sb.append("ex:");
8662
      if (this.ex == null) {
8663
        sb.append("null");
8664
      } else {
8665
        sb.append(this.ex);
8666
      }
8667
      first = false;
8668
      sb.append(")");
8669
      return sb.toString();
8670
    }
8671
 
8672
    public void validate() throws TException {
8673
      // check for required fields
8674
    }
8675
 
8676
  }
8677
 
483 rajveer 8678
  public static class changeOrderStatus_args implements TBase<changeOrderStatus_args._Fields>, java.io.Serializable, Cloneable, Comparable<changeOrderStatus_args>   {
8679
    private static final TStruct STRUCT_DESC = new TStruct("changeOrderStatus_args");
68 ashish 8680
 
483 rajveer 8681
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
8682
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)2);
8683
    private static final TField DESCRIPTION_FIELD_DESC = new TField("description", TType.STRING, (short)3);
68 ashish 8684
 
483 rajveer 8685
    private long orderId;
8686
    private OrderStatus status;
8687
    private String description;
68 ashish 8688
 
8689
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8690
    public enum _Fields implements TFieldIdEnum {
483 rajveer 8691
      ORDER_ID((short)1, "orderId"),
8692
      /**
8693
       * 
8694
       * @see OrderStatus
8695
       */
8696
      STATUS((short)2, "status"),
8697
      DESCRIPTION((short)3, "description");
68 ashish 8698
 
8699
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
8700
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8701
 
8702
      static {
8703
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8704
          byId.put((int)field._thriftId, field);
8705
          byName.put(field.getFieldName(), field);
8706
        }
8707
      }
8708
 
8709
      /**
8710
       * Find the _Fields constant that matches fieldId, or null if its not found.
8711
       */
8712
      public static _Fields findByThriftId(int fieldId) {
8713
        return byId.get(fieldId);
8714
      }
8715
 
8716
      /**
8717
       * Find the _Fields constant that matches fieldId, throwing an exception
8718
       * if it is not found.
8719
       */
8720
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8721
        _Fields fields = findByThriftId(fieldId);
8722
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8723
        return fields;
8724
      }
8725
 
8726
      /**
8727
       * Find the _Fields constant that matches name, or null if its not found.
8728
       */
8729
      public static _Fields findByName(String name) {
8730
        return byName.get(name);
8731
      }
8732
 
8733
      private final short _thriftId;
8734
      private final String _fieldName;
8735
 
8736
      _Fields(short thriftId, String fieldName) {
8737
        _thriftId = thriftId;
8738
        _fieldName = fieldName;
8739
      }
8740
 
8741
      public short getThriftFieldId() {
8742
        return _thriftId;
8743
      }
8744
 
8745
      public String getFieldName() {
8746
        return _fieldName;
8747
      }
8748
    }
8749
 
8750
    // isset id assignments
483 rajveer 8751
    private static final int __ORDERID_ISSET_ID = 0;
68 ashish 8752
    private BitSet __isset_bit_vector = new BitSet(1);
8753
 
8754
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 8755
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
68 ashish 8756
          new FieldValueMetaData(TType.I64)));
483 rajveer 8757
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
8758
          new EnumMetaData(TType.ENUM, OrderStatus.class)));
8759
      put(_Fields.DESCRIPTION, new FieldMetaData("description", TFieldRequirementType.DEFAULT, 
8760
          new FieldValueMetaData(TType.STRING)));
68 ashish 8761
    }});
8762
 
8763
    static {
483 rajveer 8764
      FieldMetaData.addStructMetaDataMap(changeOrderStatus_args.class, metaDataMap);
68 ashish 8765
    }
8766
 
483 rajveer 8767
    public changeOrderStatus_args() {
68 ashish 8768
    }
8769
 
483 rajveer 8770
    public changeOrderStatus_args(
8771
      long orderId,
8772
      OrderStatus status,
8773
      String description)
68 ashish 8774
    {
8775
      this();
483 rajveer 8776
      this.orderId = orderId;
8777
      setOrderIdIsSet(true);
8778
      this.status = status;
8779
      this.description = description;
68 ashish 8780
    }
8781
 
8782
    /**
8783
     * Performs a deep copy on <i>other</i>.
8784
     */
483 rajveer 8785
    public changeOrderStatus_args(changeOrderStatus_args other) {
68 ashish 8786
      __isset_bit_vector.clear();
8787
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 8788
      this.orderId = other.orderId;
8789
      if (other.isSetStatus()) {
8790
        this.status = other.status;
8791
      }
8792
      if (other.isSetDescription()) {
8793
        this.description = other.description;
8794
      }
68 ashish 8795
    }
8796
 
483 rajveer 8797
    public changeOrderStatus_args deepCopy() {
8798
      return new changeOrderStatus_args(this);
68 ashish 8799
    }
8800
 
8801
    @Deprecated
483 rajveer 8802
    public changeOrderStatus_args clone() {
8803
      return new changeOrderStatus_args(this);
68 ashish 8804
    }
8805
 
483 rajveer 8806
    public long getOrderId() {
8807
      return this.orderId;
68 ashish 8808
    }
8809
 
483 rajveer 8810
    public changeOrderStatus_args setOrderId(long orderId) {
8811
      this.orderId = orderId;
8812
      setOrderIdIsSet(true);
68 ashish 8813
      return this;
8814
    }
8815
 
483 rajveer 8816
    public void unsetOrderId() {
8817
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
68 ashish 8818
    }
8819
 
483 rajveer 8820
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
8821
    public boolean isSetOrderId() {
8822
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
68 ashish 8823
    }
8824
 
483 rajveer 8825
    public void setOrderIdIsSet(boolean value) {
8826
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
68 ashish 8827
    }
8828
 
483 rajveer 8829
    /**
8830
     * 
8831
     * @see OrderStatus
8832
     */
8833
    public OrderStatus getStatus() {
8834
      return this.status;
68 ashish 8835
    }
8836
 
8837
    /**
483 rajveer 8838
     * 
8839
     * @see OrderStatus
68 ashish 8840
     */
483 rajveer 8841
    public changeOrderStatus_args setStatus(OrderStatus status) {
8842
      this.status = status;
68 ashish 8843
      return this;
8844
    }
8845
 
483 rajveer 8846
    public void unsetStatus() {
8847
      this.status = null;
68 ashish 8848
    }
8849
 
483 rajveer 8850
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
8851
    public boolean isSetStatus() {
8852
      return this.status != null;
68 ashish 8853
    }
8854
 
483 rajveer 8855
    public void setStatusIsSet(boolean value) {
68 ashish 8856
      if (!value) {
483 rajveer 8857
        this.status = null;
68 ashish 8858
      }
8859
    }
8860
 
483 rajveer 8861
    public String getDescription() {
8862
      return this.description;
68 ashish 8863
    }
8864
 
483 rajveer 8865
    public changeOrderStatus_args setDescription(String description) {
8866
      this.description = description;
68 ashish 8867
      return this;
8868
    }
8869
 
483 rajveer 8870
    public void unsetDescription() {
8871
      this.description = null;
68 ashish 8872
    }
8873
 
483 rajveer 8874
    /** Returns true if field description is set (has been asigned a value) and false otherwise */
8875
    public boolean isSetDescription() {
8876
      return this.description != null;
68 ashish 8877
    }
8878
 
483 rajveer 8879
    public void setDescriptionIsSet(boolean value) {
68 ashish 8880
      if (!value) {
483 rajveer 8881
        this.description = null;
68 ashish 8882
      }
8883
    }
8884
 
8885
    public void setFieldValue(_Fields field, Object value) {
8886
      switch (field) {
483 rajveer 8887
      case ORDER_ID:
68 ashish 8888
        if (value == null) {
483 rajveer 8889
          unsetOrderId();
68 ashish 8890
        } else {
483 rajveer 8891
          setOrderId((Long)value);
68 ashish 8892
        }
8893
        break;
8894
 
483 rajveer 8895
      case STATUS:
68 ashish 8896
        if (value == null) {
483 rajveer 8897
          unsetStatus();
68 ashish 8898
        } else {
483 rajveer 8899
          setStatus((OrderStatus)value);
68 ashish 8900
        }
8901
        break;
8902
 
483 rajveer 8903
      case DESCRIPTION:
8904
        if (value == null) {
8905
          unsetDescription();
8906
        } else {
8907
          setDescription((String)value);
8908
        }
8909
        break;
8910
 
68 ashish 8911
      }
8912
    }
8913
 
8914
    public void setFieldValue(int fieldID, Object value) {
8915
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
8916
    }
8917
 
8918
    public Object getFieldValue(_Fields field) {
8919
      switch (field) {
483 rajveer 8920
      case ORDER_ID:
8921
        return new Long(getOrderId());
68 ashish 8922
 
483 rajveer 8923
      case STATUS:
8924
        return getStatus();
68 ashish 8925
 
483 rajveer 8926
      case DESCRIPTION:
8927
        return getDescription();
8928
 
68 ashish 8929
      }
8930
      throw new IllegalStateException();
8931
    }
8932
 
8933
    public Object getFieldValue(int fieldId) {
8934
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
8935
    }
8936
 
8937
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
8938
    public boolean isSet(_Fields field) {
8939
      switch (field) {
483 rajveer 8940
      case ORDER_ID:
8941
        return isSetOrderId();
8942
      case STATUS:
8943
        return isSetStatus();
8944
      case DESCRIPTION:
8945
        return isSetDescription();
68 ashish 8946
      }
8947
      throw new IllegalStateException();
8948
    }
8949
 
8950
    public boolean isSet(int fieldID) {
8951
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
8952
    }
8953
 
8954
    @Override
8955
    public boolean equals(Object that) {
8956
      if (that == null)
8957
        return false;
483 rajveer 8958
      if (that instanceof changeOrderStatus_args)
8959
        return this.equals((changeOrderStatus_args)that);
68 ashish 8960
      return false;
8961
    }
8962
 
483 rajveer 8963
    public boolean equals(changeOrderStatus_args that) {
68 ashish 8964
      if (that == null)
8965
        return false;
8966
 
483 rajveer 8967
      boolean this_present_orderId = true;
8968
      boolean that_present_orderId = true;
8969
      if (this_present_orderId || that_present_orderId) {
8970
        if (!(this_present_orderId && that_present_orderId))
68 ashish 8971
          return false;
483 rajveer 8972
        if (this.orderId != that.orderId)
68 ashish 8973
          return false;
8974
      }
8975
 
483 rajveer 8976
      boolean this_present_status = true && this.isSetStatus();
8977
      boolean that_present_status = true && that.isSetStatus();
8978
      if (this_present_status || that_present_status) {
8979
        if (!(this_present_status && that_present_status))
68 ashish 8980
          return false;
483 rajveer 8981
        if (!this.status.equals(that.status))
68 ashish 8982
          return false;
8983
      }
8984
 
483 rajveer 8985
      boolean this_present_description = true && this.isSetDescription();
8986
      boolean that_present_description = true && that.isSetDescription();
8987
      if (this_present_description || that_present_description) {
8988
        if (!(this_present_description && that_present_description))
8989
          return false;
8990
        if (!this.description.equals(that.description))
8991
          return false;
8992
      }
8993
 
68 ashish 8994
      return true;
8995
    }
8996
 
8997
    @Override
8998
    public int hashCode() {
8999
      return 0;
9000
    }
9001
 
483 rajveer 9002
    public int compareTo(changeOrderStatus_args other) {
9003
      if (!getClass().equals(other.getClass())) {
9004
        return getClass().getName().compareTo(other.getClass().getName());
68 ashish 9005
      }
9006
 
483 rajveer 9007
      int lastComparison = 0;
9008
      changeOrderStatus_args typedOther = (changeOrderStatus_args)other;
68 ashish 9009
 
483 rajveer 9010
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
9011
      if (lastComparison != 0) {
9012
        return lastComparison;
68 ashish 9013
      }
483 rajveer 9014
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
9015
      if (lastComparison != 0) {
9016
        return lastComparison;
68 ashish 9017
      }
483 rajveer 9018
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
9019
      if (lastComparison != 0) {
9020
        return lastComparison;
68 ashish 9021
      }
483 rajveer 9022
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
9023
      if (lastComparison != 0) {
9024
        return lastComparison;
68 ashish 9025
      }
483 rajveer 9026
      lastComparison = Boolean.valueOf(isSetDescription()).compareTo(isSetDescription());
9027
      if (lastComparison != 0) {
9028
        return lastComparison;
68 ashish 9029
      }
483 rajveer 9030
      lastComparison = TBaseHelper.compareTo(description, typedOther.description);
9031
      if (lastComparison != 0) {
9032
        return lastComparison;
68 ashish 9033
      }
9034
      return 0;
9035
    }
9036
 
9037
    public void read(TProtocol iprot) throws TException {
9038
      TField field;
9039
      iprot.readStructBegin();
9040
      while (true)
9041
      {
9042
        field = iprot.readFieldBegin();
9043
        if (field.type == TType.STOP) { 
9044
          break;
9045
        }
9046
        _Fields fieldId = _Fields.findByThriftId(field.id);
9047
        if (fieldId == null) {
9048
          TProtocolUtil.skip(iprot, field.type);
9049
        } else {
9050
          switch (fieldId) {
483 rajveer 9051
            case ORDER_ID:
68 ashish 9052
              if (field.type == TType.I64) {
483 rajveer 9053
                this.orderId = iprot.readI64();
9054
                setOrderIdIsSet(true);
68 ashish 9055
              } else { 
9056
                TProtocolUtil.skip(iprot, field.type);
9057
              }
9058
              break;
483 rajveer 9059
            case STATUS:
9060
              if (field.type == TType.I32) {
9061
                this.status = OrderStatus.findByValue(iprot.readI32());
68 ashish 9062
              } else { 
9063
                TProtocolUtil.skip(iprot, field.type);
9064
              }
9065
              break;
483 rajveer 9066
            case DESCRIPTION:
9067
              if (field.type == TType.STRING) {
9068
                this.description = iprot.readString();
9069
              } else { 
9070
                TProtocolUtil.skip(iprot, field.type);
9071
              }
9072
              break;
68 ashish 9073
          }
9074
          iprot.readFieldEnd();
9075
        }
9076
      }
9077
      iprot.readStructEnd();
9078
      validate();
9079
    }
9080
 
9081
    public void write(TProtocol oprot) throws TException {
9082
      validate();
9083
 
9084
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 9085
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
9086
      oprot.writeI64(this.orderId);
68 ashish 9087
      oprot.writeFieldEnd();
483 rajveer 9088
      if (this.status != null) {
9089
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
9090
        oprot.writeI32(this.status.getValue());
68 ashish 9091
        oprot.writeFieldEnd();
9092
      }
483 rajveer 9093
      if (this.description != null) {
9094
        oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC);
9095
        oprot.writeString(this.description);
9096
        oprot.writeFieldEnd();
9097
      }
68 ashish 9098
      oprot.writeFieldStop();
9099
      oprot.writeStructEnd();
9100
    }
9101
 
9102
    @Override
9103
    public String toString() {
483 rajveer 9104
      StringBuilder sb = new StringBuilder("changeOrderStatus_args(");
68 ashish 9105
      boolean first = true;
9106
 
483 rajveer 9107
      sb.append("orderId:");
9108
      sb.append(this.orderId);
68 ashish 9109
      first = false;
9110
      if (!first) sb.append(", ");
483 rajveer 9111
      sb.append("status:");
9112
      if (this.status == null) {
68 ashish 9113
        sb.append("null");
9114
      } else {
483 rajveer 9115
        String status_name = status.name();
9116
        if (status_name != null) {
9117
          sb.append(status_name);
9118
          sb.append(" (");
9119
        }
9120
        sb.append(this.status);
9121
        if (status_name != null) {
9122
          sb.append(")");
9123
        }
68 ashish 9124
      }
9125
      first = false;
483 rajveer 9126
      if (!first) sb.append(", ");
9127
      sb.append("description:");
9128
      if (this.description == null) {
9129
        sb.append("null");
9130
      } else {
9131
        sb.append(this.description);
9132
      }
9133
      first = false;
68 ashish 9134
      sb.append(")");
9135
      return sb.toString();
9136
    }
9137
 
9138
    public void validate() throws TException {
9139
      // check for required fields
9140
    }
9141
 
9142
  }
9143
 
483 rajveer 9144
  public static class changeOrderStatus_result implements TBase<changeOrderStatus_result._Fields>, java.io.Serializable, Cloneable, Comparable<changeOrderStatus_result>   {
9145
    private static final TStruct STRUCT_DESC = new TStruct("changeOrderStatus_result");
68 ashish 9146
 
9147
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
9148
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
9149
 
9150
    private boolean success;
9151
    private TransactionServiceException ex;
9152
 
9153
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9154
    public enum _Fields implements TFieldIdEnum {
9155
      SUCCESS((short)0, "success"),
9156
      EX((short)1, "ex");
9157
 
9158
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
9159
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9160
 
9161
      static {
9162
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9163
          byId.put((int)field._thriftId, field);
9164
          byName.put(field.getFieldName(), field);
9165
        }
9166
      }
9167
 
9168
      /**
9169
       * Find the _Fields constant that matches fieldId, or null if its not found.
9170
       */
9171
      public static _Fields findByThriftId(int fieldId) {
9172
        return byId.get(fieldId);
9173
      }
9174
 
9175
      /**
9176
       * Find the _Fields constant that matches fieldId, throwing an exception
9177
       * if it is not found.
9178
       */
9179
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9180
        _Fields fields = findByThriftId(fieldId);
9181
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9182
        return fields;
9183
      }
9184
 
9185
      /**
9186
       * Find the _Fields constant that matches name, or null if its not found.
9187
       */
9188
      public static _Fields findByName(String name) {
9189
        return byName.get(name);
9190
      }
9191
 
9192
      private final short _thriftId;
9193
      private final String _fieldName;
9194
 
9195
      _Fields(short thriftId, String fieldName) {
9196
        _thriftId = thriftId;
9197
        _fieldName = fieldName;
9198
      }
9199
 
9200
      public short getThriftFieldId() {
9201
        return _thriftId;
9202
      }
9203
 
9204
      public String getFieldName() {
9205
        return _fieldName;
9206
      }
9207
    }
9208
 
9209
    // isset id assignments
9210
    private static final int __SUCCESS_ISSET_ID = 0;
9211
    private BitSet __isset_bit_vector = new BitSet(1);
9212
 
9213
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
9214
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
9215
          new FieldValueMetaData(TType.BOOL)));
9216
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
9217
          new FieldValueMetaData(TType.STRUCT)));
9218
    }});
9219
 
9220
    static {
483 rajveer 9221
      FieldMetaData.addStructMetaDataMap(changeOrderStatus_result.class, metaDataMap);
68 ashish 9222
    }
9223
 
483 rajveer 9224
    public changeOrderStatus_result() {
68 ashish 9225
    }
9226
 
483 rajveer 9227
    public changeOrderStatus_result(
68 ashish 9228
      boolean success,
9229
      TransactionServiceException ex)
9230
    {
9231
      this();
9232
      this.success = success;
9233
      setSuccessIsSet(true);
9234
      this.ex = ex;
9235
    }
9236
 
9237
    /**
9238
     * Performs a deep copy on <i>other</i>.
9239
     */
483 rajveer 9240
    public changeOrderStatus_result(changeOrderStatus_result other) {
68 ashish 9241
      __isset_bit_vector.clear();
9242
      __isset_bit_vector.or(other.__isset_bit_vector);
9243
      this.success = other.success;
9244
      if (other.isSetEx()) {
9245
        this.ex = new TransactionServiceException(other.ex);
9246
      }
9247
    }
9248
 
483 rajveer 9249
    public changeOrderStatus_result deepCopy() {
9250
      return new changeOrderStatus_result(this);
68 ashish 9251
    }
9252
 
9253
    @Deprecated
483 rajveer 9254
    public changeOrderStatus_result clone() {
9255
      return new changeOrderStatus_result(this);
68 ashish 9256
    }
9257
 
9258
    public boolean isSuccess() {
9259
      return this.success;
9260
    }
9261
 
483 rajveer 9262
    public changeOrderStatus_result setSuccess(boolean success) {
68 ashish 9263
      this.success = success;
9264
      setSuccessIsSet(true);
9265
      return this;
9266
    }
9267
 
9268
    public void unsetSuccess() {
9269
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
9270
    }
9271
 
9272
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
9273
    public boolean isSetSuccess() {
9274
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
9275
    }
9276
 
9277
    public void setSuccessIsSet(boolean value) {
9278
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
9279
    }
9280
 
9281
    public TransactionServiceException getEx() {
9282
      return this.ex;
9283
    }
9284
 
483 rajveer 9285
    public changeOrderStatus_result setEx(TransactionServiceException ex) {
68 ashish 9286
      this.ex = ex;
9287
      return this;
9288
    }
9289
 
9290
    public void unsetEx() {
9291
      this.ex = null;
9292
    }
9293
 
9294
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
9295
    public boolean isSetEx() {
9296
      return this.ex != null;
9297
    }
9298
 
9299
    public void setExIsSet(boolean value) {
9300
      if (!value) {
9301
        this.ex = null;
9302
      }
9303
    }
9304
 
9305
    public void setFieldValue(_Fields field, Object value) {
9306
      switch (field) {
9307
      case SUCCESS:
9308
        if (value == null) {
9309
          unsetSuccess();
9310
        } else {
9311
          setSuccess((Boolean)value);
9312
        }
9313
        break;
9314
 
9315
      case EX:
9316
        if (value == null) {
9317
          unsetEx();
9318
        } else {
9319
          setEx((TransactionServiceException)value);
9320
        }
9321
        break;
9322
 
9323
      }
9324
    }
9325
 
9326
    public void setFieldValue(int fieldID, Object value) {
9327
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
9328
    }
9329
 
9330
    public Object getFieldValue(_Fields field) {
9331
      switch (field) {
9332
      case SUCCESS:
9333
        return new Boolean(isSuccess());
9334
 
9335
      case EX:
9336
        return getEx();
9337
 
9338
      }
9339
      throw new IllegalStateException();
9340
    }
9341
 
9342
    public Object getFieldValue(int fieldId) {
9343
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
9344
    }
9345
 
9346
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
9347
    public boolean isSet(_Fields field) {
9348
      switch (field) {
9349
      case SUCCESS:
9350
        return isSetSuccess();
9351
      case EX:
9352
        return isSetEx();
9353
      }
9354
      throw new IllegalStateException();
9355
    }
9356
 
9357
    public boolean isSet(int fieldID) {
9358
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
9359
    }
9360
 
9361
    @Override
9362
    public boolean equals(Object that) {
9363
      if (that == null)
9364
        return false;
483 rajveer 9365
      if (that instanceof changeOrderStatus_result)
9366
        return this.equals((changeOrderStatus_result)that);
68 ashish 9367
      return false;
9368
    }
9369
 
483 rajveer 9370
    public boolean equals(changeOrderStatus_result that) {
68 ashish 9371
      if (that == null)
9372
        return false;
9373
 
9374
      boolean this_present_success = true;
9375
      boolean that_present_success = true;
9376
      if (this_present_success || that_present_success) {
9377
        if (!(this_present_success && that_present_success))
9378
          return false;
9379
        if (this.success != that.success)
9380
          return false;
9381
      }
9382
 
9383
      boolean this_present_ex = true && this.isSetEx();
9384
      boolean that_present_ex = true && that.isSetEx();
9385
      if (this_present_ex || that_present_ex) {
9386
        if (!(this_present_ex && that_present_ex))
9387
          return false;
9388
        if (!this.ex.equals(that.ex))
9389
          return false;
9390
      }
9391
 
9392
      return true;
9393
    }
9394
 
9395
    @Override
9396
    public int hashCode() {
9397
      return 0;
9398
    }
9399
 
483 rajveer 9400
    public int compareTo(changeOrderStatus_result other) {
68 ashish 9401
      if (!getClass().equals(other.getClass())) {
9402
        return getClass().getName().compareTo(other.getClass().getName());
9403
      }
9404
 
9405
      int lastComparison = 0;
483 rajveer 9406
      changeOrderStatus_result typedOther = (changeOrderStatus_result)other;
68 ashish 9407
 
9408
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
9409
      if (lastComparison != 0) {
9410
        return lastComparison;
9411
      }
9412
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
9413
      if (lastComparison != 0) {
9414
        return lastComparison;
9415
      }
9416
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
9417
      if (lastComparison != 0) {
9418
        return lastComparison;
9419
      }
9420
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
9421
      if (lastComparison != 0) {
9422
        return lastComparison;
9423
      }
9424
      return 0;
9425
    }
9426
 
9427
    public void read(TProtocol iprot) throws TException {
9428
      TField field;
9429
      iprot.readStructBegin();
9430
      while (true)
9431
      {
9432
        field = iprot.readFieldBegin();
9433
        if (field.type == TType.STOP) { 
9434
          break;
9435
        }
9436
        _Fields fieldId = _Fields.findByThriftId(field.id);
9437
        if (fieldId == null) {
9438
          TProtocolUtil.skip(iprot, field.type);
9439
        } else {
9440
          switch (fieldId) {
9441
            case SUCCESS:
9442
              if (field.type == TType.BOOL) {
9443
                this.success = iprot.readBool();
9444
                setSuccessIsSet(true);
9445
              } else { 
9446
                TProtocolUtil.skip(iprot, field.type);
9447
              }
9448
              break;
9449
            case EX:
9450
              if (field.type == TType.STRUCT) {
9451
                this.ex = new TransactionServiceException();
9452
                this.ex.read(iprot);
9453
              } else { 
9454
                TProtocolUtil.skip(iprot, field.type);
9455
              }
9456
              break;
9457
          }
9458
          iprot.readFieldEnd();
9459
        }
9460
      }
9461
      iprot.readStructEnd();
9462
      validate();
9463
    }
9464
 
9465
    public void write(TProtocol oprot) throws TException {
9466
      oprot.writeStructBegin(STRUCT_DESC);
9467
 
9468
      if (this.isSetSuccess()) {
9469
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
9470
        oprot.writeBool(this.success);
9471
        oprot.writeFieldEnd();
9472
      } else if (this.isSetEx()) {
9473
        oprot.writeFieldBegin(EX_FIELD_DESC);
9474
        this.ex.write(oprot);
9475
        oprot.writeFieldEnd();
9476
      }
9477
      oprot.writeFieldStop();
9478
      oprot.writeStructEnd();
9479
    }
9480
 
9481
    @Override
9482
    public String toString() {
483 rajveer 9483
      StringBuilder sb = new StringBuilder("changeOrderStatus_result(");
68 ashish 9484
      boolean first = true;
9485
 
9486
      sb.append("success:");
9487
      sb.append(this.success);
9488
      first = false;
9489
      if (!first) sb.append(", ");
9490
      sb.append("ex:");
9491
      if (this.ex == null) {
9492
        sb.append("null");
9493
      } else {
9494
        sb.append(this.ex);
9495
      }
9496
      first = false;
9497
      sb.append(")");
9498
      return sb.toString();
9499
    }
9500
 
9501
    public void validate() throws TException {
9502
      // check for required fields
9503
    }
9504
 
9505
  }
9506
 
495 rajveer 9507
  public static class addBillingDetails_args implements TBase<addBillingDetails_args._Fields>, java.io.Serializable, Cloneable, Comparable<addBillingDetails_args>   {
9508
    private static final TStruct STRUCT_DESC = new TStruct("addBillingDetails_args");
9509
 
9510
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
9511
    private static final TField INVOICE_NUMBER_FIELD_DESC = new TField("invoice_number", TType.STRING, (short)2);
1148 chandransh 9512
    private static final TField BILLED_BY_FIELD_DESC = new TField("billed_by", TType.STRING, (short)3);
495 rajveer 9513
 
9514
    private long orderId;
9515
    private String invoice_number;
9516
    private String billed_by;
9517
 
9518
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9519
    public enum _Fields implements TFieldIdEnum {
9520
      ORDER_ID((short)1, "orderId"),
9521
      INVOICE_NUMBER((short)2, "invoice_number"),
1148 chandransh 9522
      BILLED_BY((short)3, "billed_by");
495 rajveer 9523
 
9524
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
9525
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9526
 
9527
      static {
9528
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9529
          byId.put((int)field._thriftId, field);
9530
          byName.put(field.getFieldName(), field);
9531
        }
9532
      }
9533
 
9534
      /**
9535
       * Find the _Fields constant that matches fieldId, or null if its not found.
9536
       */
9537
      public static _Fields findByThriftId(int fieldId) {
9538
        return byId.get(fieldId);
9539
      }
9540
 
9541
      /**
9542
       * Find the _Fields constant that matches fieldId, throwing an exception
9543
       * if it is not found.
9544
       */
9545
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9546
        _Fields fields = findByThriftId(fieldId);
9547
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9548
        return fields;
9549
      }
9550
 
9551
      /**
9552
       * Find the _Fields constant that matches name, or null if its not found.
9553
       */
9554
      public static _Fields findByName(String name) {
9555
        return byName.get(name);
9556
      }
9557
 
9558
      private final short _thriftId;
9559
      private final String _fieldName;
9560
 
9561
      _Fields(short thriftId, String fieldName) {
9562
        _thriftId = thriftId;
9563
        _fieldName = fieldName;
9564
      }
9565
 
9566
      public short getThriftFieldId() {
9567
        return _thriftId;
9568
      }
9569
 
9570
      public String getFieldName() {
9571
        return _fieldName;
9572
      }
9573
    }
9574
 
9575
    // isset id assignments
9576
    private static final int __ORDERID_ISSET_ID = 0;
1148 chandransh 9577
    private BitSet __isset_bit_vector = new BitSet(1);
495 rajveer 9578
 
9579
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
9580
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
9581
          new FieldValueMetaData(TType.I64)));
9582
      put(_Fields.INVOICE_NUMBER, new FieldMetaData("invoice_number", TFieldRequirementType.DEFAULT, 
9583
          new FieldValueMetaData(TType.STRING)));
9584
      put(_Fields.BILLED_BY, new FieldMetaData("billed_by", TFieldRequirementType.DEFAULT, 
9585
          new FieldValueMetaData(TType.STRING)));
9586
    }});
9587
 
9588
    static {
9589
      FieldMetaData.addStructMetaDataMap(addBillingDetails_args.class, metaDataMap);
9590
    }
9591
 
9592
    public addBillingDetails_args() {
9593
    }
9594
 
9595
    public addBillingDetails_args(
9596
      long orderId,
9597
      String invoice_number,
9598
      String billed_by)
9599
    {
9600
      this();
9601
      this.orderId = orderId;
9602
      setOrderIdIsSet(true);
9603
      this.invoice_number = invoice_number;
9604
      this.billed_by = billed_by;
9605
    }
9606
 
9607
    /**
9608
     * Performs a deep copy on <i>other</i>.
9609
     */
9610
    public addBillingDetails_args(addBillingDetails_args other) {
9611
      __isset_bit_vector.clear();
9612
      __isset_bit_vector.or(other.__isset_bit_vector);
9613
      this.orderId = other.orderId;
9614
      if (other.isSetInvoice_number()) {
9615
        this.invoice_number = other.invoice_number;
9616
      }
9617
      if (other.isSetBilled_by()) {
9618
        this.billed_by = other.billed_by;
9619
      }
9620
    }
9621
 
9622
    public addBillingDetails_args deepCopy() {
9623
      return new addBillingDetails_args(this);
9624
    }
9625
 
9626
    @Deprecated
9627
    public addBillingDetails_args clone() {
9628
      return new addBillingDetails_args(this);
9629
    }
9630
 
9631
    public long getOrderId() {
9632
      return this.orderId;
9633
    }
9634
 
9635
    public addBillingDetails_args setOrderId(long orderId) {
9636
      this.orderId = orderId;
9637
      setOrderIdIsSet(true);
9638
      return this;
9639
    }
9640
 
9641
    public void unsetOrderId() {
9642
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
9643
    }
9644
 
9645
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
9646
    public boolean isSetOrderId() {
9647
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
9648
    }
9649
 
9650
    public void setOrderIdIsSet(boolean value) {
9651
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
9652
    }
9653
 
9654
    public String getInvoice_number() {
9655
      return this.invoice_number;
9656
    }
9657
 
9658
    public addBillingDetails_args setInvoice_number(String invoice_number) {
9659
      this.invoice_number = invoice_number;
9660
      return this;
9661
    }
9662
 
9663
    public void unsetInvoice_number() {
9664
      this.invoice_number = null;
9665
    }
9666
 
9667
    /** Returns true if field invoice_number is set (has been asigned a value) and false otherwise */
9668
    public boolean isSetInvoice_number() {
9669
      return this.invoice_number != null;
9670
    }
9671
 
9672
    public void setInvoice_numberIsSet(boolean value) {
9673
      if (!value) {
9674
        this.invoice_number = null;
9675
      }
9676
    }
9677
 
9678
    public String getBilled_by() {
9679
      return this.billed_by;
9680
    }
9681
 
9682
    public addBillingDetails_args setBilled_by(String billed_by) {
9683
      this.billed_by = billed_by;
9684
      return this;
9685
    }
9686
 
9687
    public void unsetBilled_by() {
9688
      this.billed_by = null;
9689
    }
9690
 
9691
    /** Returns true if field billed_by is set (has been asigned a value) and false otherwise */
9692
    public boolean isSetBilled_by() {
9693
      return this.billed_by != null;
9694
    }
9695
 
9696
    public void setBilled_byIsSet(boolean value) {
9697
      if (!value) {
9698
        this.billed_by = null;
9699
      }
9700
    }
9701
 
9702
    public void setFieldValue(_Fields field, Object value) {
9703
      switch (field) {
9704
      case ORDER_ID:
9705
        if (value == null) {
9706
          unsetOrderId();
9707
        } else {
9708
          setOrderId((Long)value);
9709
        }
9710
        break;
9711
 
9712
      case INVOICE_NUMBER:
9713
        if (value == null) {
9714
          unsetInvoice_number();
9715
        } else {
9716
          setInvoice_number((String)value);
9717
        }
9718
        break;
9719
 
9720
      case BILLED_BY:
9721
        if (value == null) {
9722
          unsetBilled_by();
9723
        } else {
9724
          setBilled_by((String)value);
9725
        }
9726
        break;
9727
 
9728
      }
9729
    }
9730
 
9731
    public void setFieldValue(int fieldID, Object value) {
9732
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
9733
    }
9734
 
9735
    public Object getFieldValue(_Fields field) {
9736
      switch (field) {
9737
      case ORDER_ID:
9738
        return new Long(getOrderId());
9739
 
9740
      case INVOICE_NUMBER:
9741
        return getInvoice_number();
9742
 
9743
      case BILLED_BY:
9744
        return getBilled_by();
9745
 
9746
      }
9747
      throw new IllegalStateException();
9748
    }
9749
 
9750
    public Object getFieldValue(int fieldId) {
9751
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
9752
    }
9753
 
9754
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
9755
    public boolean isSet(_Fields field) {
9756
      switch (field) {
9757
      case ORDER_ID:
9758
        return isSetOrderId();
9759
      case INVOICE_NUMBER:
9760
        return isSetInvoice_number();
9761
      case BILLED_BY:
9762
        return isSetBilled_by();
9763
      }
9764
      throw new IllegalStateException();
9765
    }
9766
 
9767
    public boolean isSet(int fieldID) {
9768
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
9769
    }
9770
 
9771
    @Override
9772
    public boolean equals(Object that) {
9773
      if (that == null)
9774
        return false;
9775
      if (that instanceof addBillingDetails_args)
9776
        return this.equals((addBillingDetails_args)that);
9777
      return false;
9778
    }
9779
 
9780
    public boolean equals(addBillingDetails_args that) {
9781
      if (that == null)
9782
        return false;
9783
 
9784
      boolean this_present_orderId = true;
9785
      boolean that_present_orderId = true;
9786
      if (this_present_orderId || that_present_orderId) {
9787
        if (!(this_present_orderId && that_present_orderId))
9788
          return false;
9789
        if (this.orderId != that.orderId)
9790
          return false;
9791
      }
9792
 
9793
      boolean this_present_invoice_number = true && this.isSetInvoice_number();
9794
      boolean that_present_invoice_number = true && that.isSetInvoice_number();
9795
      if (this_present_invoice_number || that_present_invoice_number) {
9796
        if (!(this_present_invoice_number && that_present_invoice_number))
9797
          return false;
9798
        if (!this.invoice_number.equals(that.invoice_number))
9799
          return false;
9800
      }
9801
 
9802
      boolean this_present_billed_by = true && this.isSetBilled_by();
9803
      boolean that_present_billed_by = true && that.isSetBilled_by();
9804
      if (this_present_billed_by || that_present_billed_by) {
9805
        if (!(this_present_billed_by && that_present_billed_by))
9806
          return false;
9807
        if (!this.billed_by.equals(that.billed_by))
9808
          return false;
9809
      }
9810
 
9811
      return true;
9812
    }
9813
 
9814
    @Override
9815
    public int hashCode() {
9816
      return 0;
9817
    }
9818
 
9819
    public int compareTo(addBillingDetails_args other) {
9820
      if (!getClass().equals(other.getClass())) {
9821
        return getClass().getName().compareTo(other.getClass().getName());
9822
      }
9823
 
9824
      int lastComparison = 0;
9825
      addBillingDetails_args typedOther = (addBillingDetails_args)other;
9826
 
9827
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
9828
      if (lastComparison != 0) {
9829
        return lastComparison;
9830
      }
9831
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
9832
      if (lastComparison != 0) {
9833
        return lastComparison;
9834
      }
9835
      lastComparison = Boolean.valueOf(isSetInvoice_number()).compareTo(isSetInvoice_number());
9836
      if (lastComparison != 0) {
9837
        return lastComparison;
9838
      }
9839
      lastComparison = TBaseHelper.compareTo(invoice_number, typedOther.invoice_number);
9840
      if (lastComparison != 0) {
9841
        return lastComparison;
9842
      }
9843
      lastComparison = Boolean.valueOf(isSetBilled_by()).compareTo(isSetBilled_by());
9844
      if (lastComparison != 0) {
9845
        return lastComparison;
9846
      }
9847
      lastComparison = TBaseHelper.compareTo(billed_by, typedOther.billed_by);
9848
      if (lastComparison != 0) {
9849
        return lastComparison;
9850
      }
9851
      return 0;
9852
    }
9853
 
9854
    public void read(TProtocol iprot) throws TException {
9855
      TField field;
9856
      iprot.readStructBegin();
9857
      while (true)
9858
      {
9859
        field = iprot.readFieldBegin();
9860
        if (field.type == TType.STOP) { 
9861
          break;
9862
        }
9863
        _Fields fieldId = _Fields.findByThriftId(field.id);
9864
        if (fieldId == null) {
9865
          TProtocolUtil.skip(iprot, field.type);
9866
        } else {
9867
          switch (fieldId) {
9868
            case ORDER_ID:
9869
              if (field.type == TType.I64) {
9870
                this.orderId = iprot.readI64();
9871
                setOrderIdIsSet(true);
9872
              } else { 
9873
                TProtocolUtil.skip(iprot, field.type);
9874
              }
9875
              break;
9876
            case INVOICE_NUMBER:
9877
              if (field.type == TType.STRING) {
9878
                this.invoice_number = iprot.readString();
9879
              } else { 
9880
                TProtocolUtil.skip(iprot, field.type);
9881
              }
9882
              break;
9883
            case BILLED_BY:
9884
              if (field.type == TType.STRING) {
9885
                this.billed_by = iprot.readString();
9886
              } else { 
9887
                TProtocolUtil.skip(iprot, field.type);
9888
              }
9889
              break;
9890
          }
9891
          iprot.readFieldEnd();
9892
        }
9893
      }
9894
      iprot.readStructEnd();
9895
      validate();
9896
    }
9897
 
9898
    public void write(TProtocol oprot) throws TException {
9899
      validate();
9900
 
9901
      oprot.writeStructBegin(STRUCT_DESC);
9902
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
9903
      oprot.writeI64(this.orderId);
9904
      oprot.writeFieldEnd();
9905
      if (this.invoice_number != null) {
9906
        oprot.writeFieldBegin(INVOICE_NUMBER_FIELD_DESC);
9907
        oprot.writeString(this.invoice_number);
9908
        oprot.writeFieldEnd();
9909
      }
9910
      if (this.billed_by != null) {
9911
        oprot.writeFieldBegin(BILLED_BY_FIELD_DESC);
9912
        oprot.writeString(this.billed_by);
9913
        oprot.writeFieldEnd();
9914
      }
9915
      oprot.writeFieldStop();
9916
      oprot.writeStructEnd();
9917
    }
9918
 
9919
    @Override
9920
    public String toString() {
9921
      StringBuilder sb = new StringBuilder("addBillingDetails_args(");
9922
      boolean first = true;
9923
 
9924
      sb.append("orderId:");
9925
      sb.append(this.orderId);
9926
      first = false;
9927
      if (!first) sb.append(", ");
9928
      sb.append("invoice_number:");
9929
      if (this.invoice_number == null) {
9930
        sb.append("null");
9931
      } else {
9932
        sb.append(this.invoice_number);
9933
      }
9934
      first = false;
9935
      if (!first) sb.append(", ");
9936
      sb.append("billed_by:");
9937
      if (this.billed_by == null) {
9938
        sb.append("null");
9939
      } else {
9940
        sb.append(this.billed_by);
9941
      }
9942
      first = false;
9943
      sb.append(")");
9944
      return sb.toString();
9945
    }
9946
 
9947
    public void validate() throws TException {
9948
      // check for required fields
9949
    }
9950
 
9951
  }
9952
 
9953
  public static class addBillingDetails_result implements TBase<addBillingDetails_result._Fields>, java.io.Serializable, Cloneable, Comparable<addBillingDetails_result>   {
9954
    private static final TStruct STRUCT_DESC = new TStruct("addBillingDetails_result");
9955
 
9956
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
9957
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
9958
 
9959
    private boolean success;
9960
    private TransactionServiceException ex;
9961
 
9962
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9963
    public enum _Fields implements TFieldIdEnum {
9964
      SUCCESS((short)0, "success"),
9965
      EX((short)1, "ex");
9966
 
9967
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
9968
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9969
 
9970
      static {
9971
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9972
          byId.put((int)field._thriftId, field);
9973
          byName.put(field.getFieldName(), field);
9974
        }
9975
      }
9976
 
9977
      /**
9978
       * Find the _Fields constant that matches fieldId, or null if its not found.
9979
       */
9980
      public static _Fields findByThriftId(int fieldId) {
9981
        return byId.get(fieldId);
9982
      }
9983
 
9984
      /**
9985
       * Find the _Fields constant that matches fieldId, throwing an exception
9986
       * if it is not found.
9987
       */
9988
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9989
        _Fields fields = findByThriftId(fieldId);
9990
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9991
        return fields;
9992
      }
9993
 
9994
      /**
9995
       * Find the _Fields constant that matches name, or null if its not found.
9996
       */
9997
      public static _Fields findByName(String name) {
9998
        return byName.get(name);
9999
      }
10000
 
10001
      private final short _thriftId;
10002
      private final String _fieldName;
10003
 
10004
      _Fields(short thriftId, String fieldName) {
10005
        _thriftId = thriftId;
10006
        _fieldName = fieldName;
10007
      }
10008
 
10009
      public short getThriftFieldId() {
10010
        return _thriftId;
10011
      }
10012
 
10013
      public String getFieldName() {
10014
        return _fieldName;
10015
      }
10016
    }
10017
 
10018
    // isset id assignments
10019
    private static final int __SUCCESS_ISSET_ID = 0;
10020
    private BitSet __isset_bit_vector = new BitSet(1);
10021
 
10022
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
10023
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
10024
          new FieldValueMetaData(TType.BOOL)));
10025
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
10026
          new FieldValueMetaData(TType.STRUCT)));
10027
    }});
10028
 
10029
    static {
10030
      FieldMetaData.addStructMetaDataMap(addBillingDetails_result.class, metaDataMap);
10031
    }
10032
 
10033
    public addBillingDetails_result() {
10034
    }
10035
 
10036
    public addBillingDetails_result(
10037
      boolean success,
10038
      TransactionServiceException ex)
10039
    {
10040
      this();
10041
      this.success = success;
10042
      setSuccessIsSet(true);
10043
      this.ex = ex;
10044
    }
10045
 
10046
    /**
10047
     * Performs a deep copy on <i>other</i>.
10048
     */
10049
    public addBillingDetails_result(addBillingDetails_result other) {
10050
      __isset_bit_vector.clear();
10051
      __isset_bit_vector.or(other.__isset_bit_vector);
10052
      this.success = other.success;
10053
      if (other.isSetEx()) {
10054
        this.ex = new TransactionServiceException(other.ex);
10055
      }
10056
    }
10057
 
10058
    public addBillingDetails_result deepCopy() {
10059
      return new addBillingDetails_result(this);
10060
    }
10061
 
10062
    @Deprecated
10063
    public addBillingDetails_result clone() {
10064
      return new addBillingDetails_result(this);
10065
    }
10066
 
10067
    public boolean isSuccess() {
10068
      return this.success;
10069
    }
10070
 
10071
    public addBillingDetails_result setSuccess(boolean success) {
10072
      this.success = success;
10073
      setSuccessIsSet(true);
10074
      return this;
10075
    }
10076
 
10077
    public void unsetSuccess() {
10078
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
10079
    }
10080
 
10081
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
10082
    public boolean isSetSuccess() {
10083
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
10084
    }
10085
 
10086
    public void setSuccessIsSet(boolean value) {
10087
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
10088
    }
10089
 
10090
    public TransactionServiceException getEx() {
10091
      return this.ex;
10092
    }
10093
 
10094
    public addBillingDetails_result setEx(TransactionServiceException ex) {
10095
      this.ex = ex;
10096
      return this;
10097
    }
10098
 
10099
    public void unsetEx() {
10100
      this.ex = null;
10101
    }
10102
 
10103
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
10104
    public boolean isSetEx() {
10105
      return this.ex != null;
10106
    }
10107
 
10108
    public void setExIsSet(boolean value) {
10109
      if (!value) {
10110
        this.ex = null;
10111
      }
10112
    }
10113
 
10114
    public void setFieldValue(_Fields field, Object value) {
10115
      switch (field) {
10116
      case SUCCESS:
10117
        if (value == null) {
10118
          unsetSuccess();
10119
        } else {
10120
          setSuccess((Boolean)value);
10121
        }
10122
        break;
10123
 
10124
      case EX:
10125
        if (value == null) {
10126
          unsetEx();
10127
        } else {
10128
          setEx((TransactionServiceException)value);
10129
        }
10130
        break;
10131
 
10132
      }
10133
    }
10134
 
10135
    public void setFieldValue(int fieldID, Object value) {
10136
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
10137
    }
10138
 
10139
    public Object getFieldValue(_Fields field) {
10140
      switch (field) {
10141
      case SUCCESS:
10142
        return new Boolean(isSuccess());
10143
 
10144
      case EX:
10145
        return getEx();
10146
 
10147
      }
10148
      throw new IllegalStateException();
10149
    }
10150
 
10151
    public Object getFieldValue(int fieldId) {
10152
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
10153
    }
10154
 
10155
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
10156
    public boolean isSet(_Fields field) {
10157
      switch (field) {
10158
      case SUCCESS:
10159
        return isSetSuccess();
10160
      case EX:
10161
        return isSetEx();
10162
      }
10163
      throw new IllegalStateException();
10164
    }
10165
 
10166
    public boolean isSet(int fieldID) {
10167
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
10168
    }
10169
 
10170
    @Override
10171
    public boolean equals(Object that) {
10172
      if (that == null)
10173
        return false;
10174
      if (that instanceof addBillingDetails_result)
10175
        return this.equals((addBillingDetails_result)that);
10176
      return false;
10177
    }
10178
 
10179
    public boolean equals(addBillingDetails_result that) {
10180
      if (that == null)
10181
        return false;
10182
 
10183
      boolean this_present_success = true;
10184
      boolean that_present_success = true;
10185
      if (this_present_success || that_present_success) {
10186
        if (!(this_present_success && that_present_success))
10187
          return false;
10188
        if (this.success != that.success)
10189
          return false;
10190
      }
10191
 
10192
      boolean this_present_ex = true && this.isSetEx();
10193
      boolean that_present_ex = true && that.isSetEx();
10194
      if (this_present_ex || that_present_ex) {
10195
        if (!(this_present_ex && that_present_ex))
10196
          return false;
10197
        if (!this.ex.equals(that.ex))
10198
          return false;
10199
      }
10200
 
10201
      return true;
10202
    }
10203
 
10204
    @Override
10205
    public int hashCode() {
10206
      return 0;
10207
    }
10208
 
10209
    public int compareTo(addBillingDetails_result other) {
10210
      if (!getClass().equals(other.getClass())) {
10211
        return getClass().getName().compareTo(other.getClass().getName());
10212
      }
10213
 
10214
      int lastComparison = 0;
10215
      addBillingDetails_result typedOther = (addBillingDetails_result)other;
10216
 
10217
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
10218
      if (lastComparison != 0) {
10219
        return lastComparison;
10220
      }
10221
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
10222
      if (lastComparison != 0) {
10223
        return lastComparison;
10224
      }
10225
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
10226
      if (lastComparison != 0) {
10227
        return lastComparison;
10228
      }
10229
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
10230
      if (lastComparison != 0) {
10231
        return lastComparison;
10232
      }
10233
      return 0;
10234
    }
10235
 
10236
    public void read(TProtocol iprot) throws TException {
10237
      TField field;
10238
      iprot.readStructBegin();
10239
      while (true)
10240
      {
10241
        field = iprot.readFieldBegin();
10242
        if (field.type == TType.STOP) { 
10243
          break;
10244
        }
10245
        _Fields fieldId = _Fields.findByThriftId(field.id);
10246
        if (fieldId == null) {
10247
          TProtocolUtil.skip(iprot, field.type);
10248
        } else {
10249
          switch (fieldId) {
10250
            case SUCCESS:
10251
              if (field.type == TType.BOOL) {
10252
                this.success = iprot.readBool();
10253
                setSuccessIsSet(true);
10254
              } else { 
10255
                TProtocolUtil.skip(iprot, field.type);
10256
              }
10257
              break;
10258
            case EX:
10259
              if (field.type == TType.STRUCT) {
10260
                this.ex = new TransactionServiceException();
10261
                this.ex.read(iprot);
10262
              } else { 
10263
                TProtocolUtil.skip(iprot, field.type);
10264
              }
10265
              break;
10266
          }
10267
          iprot.readFieldEnd();
10268
        }
10269
      }
10270
      iprot.readStructEnd();
10271
      validate();
10272
    }
10273
 
10274
    public void write(TProtocol oprot) throws TException {
10275
      oprot.writeStructBegin(STRUCT_DESC);
10276
 
10277
      if (this.isSetSuccess()) {
10278
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
10279
        oprot.writeBool(this.success);
10280
        oprot.writeFieldEnd();
10281
      } else if (this.isSetEx()) {
10282
        oprot.writeFieldBegin(EX_FIELD_DESC);
10283
        this.ex.write(oprot);
10284
        oprot.writeFieldEnd();
10285
      }
10286
      oprot.writeFieldStop();
10287
      oprot.writeStructEnd();
10288
    }
10289
 
10290
    @Override
10291
    public String toString() {
10292
      StringBuilder sb = new StringBuilder("addBillingDetails_result(");
10293
      boolean first = true;
10294
 
10295
      sb.append("success:");
10296
      sb.append(this.success);
10297
      first = false;
10298
      if (!first) sb.append(", ");
10299
      sb.append("ex:");
10300
      if (this.ex == null) {
10301
        sb.append("null");
10302
      } else {
10303
        sb.append(this.ex);
10304
      }
10305
      first = false;
10306
      sb.append(")");
10307
      return sb.toString();
10308
    }
10309
 
10310
    public void validate() throws TException {
10311
      // check for required fields
10312
    }
10313
 
10314
  }
10315
 
1148 chandransh 10316
  public static class addJacketNumber_args implements TBase<addJacketNumber_args._Fields>, java.io.Serializable, Cloneable, Comparable<addJacketNumber_args>   {
10317
    private static final TStruct STRUCT_DESC = new TStruct("addJacketNumber_args");
10318
 
10319
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
10320
    private static final TField JACKET_NUMBER_FIELD_DESC = new TField("jacketNumber", TType.I64, (short)2);
10321
 
10322
    private long orderId;
10323
    private long jacketNumber;
10324
 
10325
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10326
    public enum _Fields implements TFieldIdEnum {
10327
      ORDER_ID((short)1, "orderId"),
10328
      JACKET_NUMBER((short)2, "jacketNumber");
10329
 
10330
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
10331
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10332
 
10333
      static {
10334
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10335
          byId.put((int)field._thriftId, field);
10336
          byName.put(field.getFieldName(), field);
10337
        }
10338
      }
10339
 
10340
      /**
10341
       * Find the _Fields constant that matches fieldId, or null if its not found.
10342
       */
10343
      public static _Fields findByThriftId(int fieldId) {
10344
        return byId.get(fieldId);
10345
      }
10346
 
10347
      /**
10348
       * Find the _Fields constant that matches fieldId, throwing an exception
10349
       * if it is not found.
10350
       */
10351
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10352
        _Fields fields = findByThriftId(fieldId);
10353
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10354
        return fields;
10355
      }
10356
 
10357
      /**
10358
       * Find the _Fields constant that matches name, or null if its not found.
10359
       */
10360
      public static _Fields findByName(String name) {
10361
        return byName.get(name);
10362
      }
10363
 
10364
      private final short _thriftId;
10365
      private final String _fieldName;
10366
 
10367
      _Fields(short thriftId, String fieldName) {
10368
        _thriftId = thriftId;
10369
        _fieldName = fieldName;
10370
      }
10371
 
10372
      public short getThriftFieldId() {
10373
        return _thriftId;
10374
      }
10375
 
10376
      public String getFieldName() {
10377
        return _fieldName;
10378
      }
10379
    }
10380
 
10381
    // isset id assignments
10382
    private static final int __ORDERID_ISSET_ID = 0;
10383
    private static final int __JACKETNUMBER_ISSET_ID = 1;
10384
    private BitSet __isset_bit_vector = new BitSet(2);
10385
 
10386
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
10387
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
10388
          new FieldValueMetaData(TType.I64)));
10389
      put(_Fields.JACKET_NUMBER, new FieldMetaData("jacketNumber", TFieldRequirementType.DEFAULT, 
10390
          new FieldValueMetaData(TType.I64)));
10391
    }});
10392
 
10393
    static {
10394
      FieldMetaData.addStructMetaDataMap(addJacketNumber_args.class, metaDataMap);
10395
    }
10396
 
10397
    public addJacketNumber_args() {
10398
    }
10399
 
10400
    public addJacketNumber_args(
10401
      long orderId,
10402
      long jacketNumber)
10403
    {
10404
      this();
10405
      this.orderId = orderId;
10406
      setOrderIdIsSet(true);
10407
      this.jacketNumber = jacketNumber;
10408
      setJacketNumberIsSet(true);
10409
    }
10410
 
10411
    /**
10412
     * Performs a deep copy on <i>other</i>.
10413
     */
10414
    public addJacketNumber_args(addJacketNumber_args other) {
10415
      __isset_bit_vector.clear();
10416
      __isset_bit_vector.or(other.__isset_bit_vector);
10417
      this.orderId = other.orderId;
10418
      this.jacketNumber = other.jacketNumber;
10419
    }
10420
 
10421
    public addJacketNumber_args deepCopy() {
10422
      return new addJacketNumber_args(this);
10423
    }
10424
 
10425
    @Deprecated
10426
    public addJacketNumber_args clone() {
10427
      return new addJacketNumber_args(this);
10428
    }
10429
 
10430
    public long getOrderId() {
10431
      return this.orderId;
10432
    }
10433
 
10434
    public addJacketNumber_args setOrderId(long orderId) {
10435
      this.orderId = orderId;
10436
      setOrderIdIsSet(true);
10437
      return this;
10438
    }
10439
 
10440
    public void unsetOrderId() {
10441
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
10442
    }
10443
 
10444
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
10445
    public boolean isSetOrderId() {
10446
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
10447
    }
10448
 
10449
    public void setOrderIdIsSet(boolean value) {
10450
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
10451
    }
10452
 
10453
    public long getJacketNumber() {
10454
      return this.jacketNumber;
10455
    }
10456
 
10457
    public addJacketNumber_args setJacketNumber(long jacketNumber) {
10458
      this.jacketNumber = jacketNumber;
10459
      setJacketNumberIsSet(true);
10460
      return this;
10461
    }
10462
 
10463
    public void unsetJacketNumber() {
10464
      __isset_bit_vector.clear(__JACKETNUMBER_ISSET_ID);
10465
    }
10466
 
10467
    /** Returns true if field jacketNumber is set (has been asigned a value) and false otherwise */
10468
    public boolean isSetJacketNumber() {
10469
      return __isset_bit_vector.get(__JACKETNUMBER_ISSET_ID);
10470
    }
10471
 
10472
    public void setJacketNumberIsSet(boolean value) {
10473
      __isset_bit_vector.set(__JACKETNUMBER_ISSET_ID, value);
10474
    }
10475
 
10476
    public void setFieldValue(_Fields field, Object value) {
10477
      switch (field) {
10478
      case ORDER_ID:
10479
        if (value == null) {
10480
          unsetOrderId();
10481
        } else {
10482
          setOrderId((Long)value);
10483
        }
10484
        break;
10485
 
10486
      case JACKET_NUMBER:
10487
        if (value == null) {
10488
          unsetJacketNumber();
10489
        } else {
10490
          setJacketNumber((Long)value);
10491
        }
10492
        break;
10493
 
10494
      }
10495
    }
10496
 
10497
    public void setFieldValue(int fieldID, Object value) {
10498
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
10499
    }
10500
 
10501
    public Object getFieldValue(_Fields field) {
10502
      switch (field) {
10503
      case ORDER_ID:
10504
        return new Long(getOrderId());
10505
 
10506
      case JACKET_NUMBER:
10507
        return new Long(getJacketNumber());
10508
 
10509
      }
10510
      throw new IllegalStateException();
10511
    }
10512
 
10513
    public Object getFieldValue(int fieldId) {
10514
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
10515
    }
10516
 
10517
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
10518
    public boolean isSet(_Fields field) {
10519
      switch (field) {
10520
      case ORDER_ID:
10521
        return isSetOrderId();
10522
      case JACKET_NUMBER:
10523
        return isSetJacketNumber();
10524
      }
10525
      throw new IllegalStateException();
10526
    }
10527
 
10528
    public boolean isSet(int fieldID) {
10529
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
10530
    }
10531
 
10532
    @Override
10533
    public boolean equals(Object that) {
10534
      if (that == null)
10535
        return false;
10536
      if (that instanceof addJacketNumber_args)
10537
        return this.equals((addJacketNumber_args)that);
10538
      return false;
10539
    }
10540
 
10541
    public boolean equals(addJacketNumber_args that) {
10542
      if (that == null)
10543
        return false;
10544
 
10545
      boolean this_present_orderId = true;
10546
      boolean that_present_orderId = true;
10547
      if (this_present_orderId || that_present_orderId) {
10548
        if (!(this_present_orderId && that_present_orderId))
10549
          return false;
10550
        if (this.orderId != that.orderId)
10551
          return false;
10552
      }
10553
 
10554
      boolean this_present_jacketNumber = true;
10555
      boolean that_present_jacketNumber = true;
10556
      if (this_present_jacketNumber || that_present_jacketNumber) {
10557
        if (!(this_present_jacketNumber && that_present_jacketNumber))
10558
          return false;
10559
        if (this.jacketNumber != that.jacketNumber)
10560
          return false;
10561
      }
10562
 
10563
      return true;
10564
    }
10565
 
10566
    @Override
10567
    public int hashCode() {
10568
      return 0;
10569
    }
10570
 
10571
    public int compareTo(addJacketNumber_args other) {
10572
      if (!getClass().equals(other.getClass())) {
10573
        return getClass().getName().compareTo(other.getClass().getName());
10574
      }
10575
 
10576
      int lastComparison = 0;
10577
      addJacketNumber_args typedOther = (addJacketNumber_args)other;
10578
 
10579
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
10580
      if (lastComparison != 0) {
10581
        return lastComparison;
10582
      }
10583
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
10584
      if (lastComparison != 0) {
10585
        return lastComparison;
10586
      }
10587
      lastComparison = Boolean.valueOf(isSetJacketNumber()).compareTo(isSetJacketNumber());
10588
      if (lastComparison != 0) {
10589
        return lastComparison;
10590
      }
10591
      lastComparison = TBaseHelper.compareTo(jacketNumber, typedOther.jacketNumber);
10592
      if (lastComparison != 0) {
10593
        return lastComparison;
10594
      }
10595
      return 0;
10596
    }
10597
 
10598
    public void read(TProtocol iprot) throws TException {
10599
      TField field;
10600
      iprot.readStructBegin();
10601
      while (true)
10602
      {
10603
        field = iprot.readFieldBegin();
10604
        if (field.type == TType.STOP) { 
10605
          break;
10606
        }
10607
        _Fields fieldId = _Fields.findByThriftId(field.id);
10608
        if (fieldId == null) {
10609
          TProtocolUtil.skip(iprot, field.type);
10610
        } else {
10611
          switch (fieldId) {
10612
            case ORDER_ID:
10613
              if (field.type == TType.I64) {
10614
                this.orderId = iprot.readI64();
10615
                setOrderIdIsSet(true);
10616
              } else { 
10617
                TProtocolUtil.skip(iprot, field.type);
10618
              }
10619
              break;
10620
            case JACKET_NUMBER:
10621
              if (field.type == TType.I64) {
10622
                this.jacketNumber = iprot.readI64();
10623
                setJacketNumberIsSet(true);
10624
              } else { 
10625
                TProtocolUtil.skip(iprot, field.type);
10626
              }
10627
              break;
10628
          }
10629
          iprot.readFieldEnd();
10630
        }
10631
      }
10632
      iprot.readStructEnd();
10633
      validate();
10634
    }
10635
 
10636
    public void write(TProtocol oprot) throws TException {
10637
      validate();
10638
 
10639
      oprot.writeStructBegin(STRUCT_DESC);
10640
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
10641
      oprot.writeI64(this.orderId);
10642
      oprot.writeFieldEnd();
10643
      oprot.writeFieldBegin(JACKET_NUMBER_FIELD_DESC);
10644
      oprot.writeI64(this.jacketNumber);
10645
      oprot.writeFieldEnd();
10646
      oprot.writeFieldStop();
10647
      oprot.writeStructEnd();
10648
    }
10649
 
10650
    @Override
10651
    public String toString() {
10652
      StringBuilder sb = new StringBuilder("addJacketNumber_args(");
10653
      boolean first = true;
10654
 
10655
      sb.append("orderId:");
10656
      sb.append(this.orderId);
10657
      first = false;
10658
      if (!first) sb.append(", ");
10659
      sb.append("jacketNumber:");
10660
      sb.append(this.jacketNumber);
10661
      first = false;
10662
      sb.append(")");
10663
      return sb.toString();
10664
    }
10665
 
10666
    public void validate() throws TException {
10667
      // check for required fields
10668
    }
10669
 
10670
  }
10671
 
10672
  public static class addJacketNumber_result implements TBase<addJacketNumber_result._Fields>, java.io.Serializable, Cloneable, Comparable<addJacketNumber_result>   {
10673
    private static final TStruct STRUCT_DESC = new TStruct("addJacketNumber_result");
10674
 
10675
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
10676
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
10677
 
10678
    private boolean success;
10679
    private TransactionServiceException ex;
10680
 
10681
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10682
    public enum _Fields implements TFieldIdEnum {
10683
      SUCCESS((short)0, "success"),
10684
      EX((short)1, "ex");
10685
 
10686
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
10687
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10688
 
10689
      static {
10690
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10691
          byId.put((int)field._thriftId, field);
10692
          byName.put(field.getFieldName(), field);
10693
        }
10694
      }
10695
 
10696
      /**
10697
       * Find the _Fields constant that matches fieldId, or null if its not found.
10698
       */
10699
      public static _Fields findByThriftId(int fieldId) {
10700
        return byId.get(fieldId);
10701
      }
10702
 
10703
      /**
10704
       * Find the _Fields constant that matches fieldId, throwing an exception
10705
       * if it is not found.
10706
       */
10707
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10708
        _Fields fields = findByThriftId(fieldId);
10709
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10710
        return fields;
10711
      }
10712
 
10713
      /**
10714
       * Find the _Fields constant that matches name, or null if its not found.
10715
       */
10716
      public static _Fields findByName(String name) {
10717
        return byName.get(name);
10718
      }
10719
 
10720
      private final short _thriftId;
10721
      private final String _fieldName;
10722
 
10723
      _Fields(short thriftId, String fieldName) {
10724
        _thriftId = thriftId;
10725
        _fieldName = fieldName;
10726
      }
10727
 
10728
      public short getThriftFieldId() {
10729
        return _thriftId;
10730
      }
10731
 
10732
      public String getFieldName() {
10733
        return _fieldName;
10734
      }
10735
    }
10736
 
10737
    // isset id assignments
10738
    private static final int __SUCCESS_ISSET_ID = 0;
10739
    private BitSet __isset_bit_vector = new BitSet(1);
10740
 
10741
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
10742
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
10743
          new FieldValueMetaData(TType.BOOL)));
10744
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
10745
          new FieldValueMetaData(TType.STRUCT)));
10746
    }});
10747
 
10748
    static {
10749
      FieldMetaData.addStructMetaDataMap(addJacketNumber_result.class, metaDataMap);
10750
    }
10751
 
10752
    public addJacketNumber_result() {
10753
    }
10754
 
10755
    public addJacketNumber_result(
10756
      boolean success,
10757
      TransactionServiceException ex)
10758
    {
10759
      this();
10760
      this.success = success;
10761
      setSuccessIsSet(true);
10762
      this.ex = ex;
10763
    }
10764
 
10765
    /**
10766
     * Performs a deep copy on <i>other</i>.
10767
     */
10768
    public addJacketNumber_result(addJacketNumber_result other) {
10769
      __isset_bit_vector.clear();
10770
      __isset_bit_vector.or(other.__isset_bit_vector);
10771
      this.success = other.success;
10772
      if (other.isSetEx()) {
10773
        this.ex = new TransactionServiceException(other.ex);
10774
      }
10775
    }
10776
 
10777
    public addJacketNumber_result deepCopy() {
10778
      return new addJacketNumber_result(this);
10779
    }
10780
 
10781
    @Deprecated
10782
    public addJacketNumber_result clone() {
10783
      return new addJacketNumber_result(this);
10784
    }
10785
 
10786
    public boolean isSuccess() {
10787
      return this.success;
10788
    }
10789
 
10790
    public addJacketNumber_result setSuccess(boolean success) {
10791
      this.success = success;
10792
      setSuccessIsSet(true);
10793
      return this;
10794
    }
10795
 
10796
    public void unsetSuccess() {
10797
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
10798
    }
10799
 
10800
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
10801
    public boolean isSetSuccess() {
10802
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
10803
    }
10804
 
10805
    public void setSuccessIsSet(boolean value) {
10806
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
10807
    }
10808
 
10809
    public TransactionServiceException getEx() {
10810
      return this.ex;
10811
    }
10812
 
10813
    public addJacketNumber_result setEx(TransactionServiceException ex) {
10814
      this.ex = ex;
10815
      return this;
10816
    }
10817
 
10818
    public void unsetEx() {
10819
      this.ex = null;
10820
    }
10821
 
10822
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
10823
    public boolean isSetEx() {
10824
      return this.ex != null;
10825
    }
10826
 
10827
    public void setExIsSet(boolean value) {
10828
      if (!value) {
10829
        this.ex = null;
10830
      }
10831
    }
10832
 
10833
    public void setFieldValue(_Fields field, Object value) {
10834
      switch (field) {
10835
      case SUCCESS:
10836
        if (value == null) {
10837
          unsetSuccess();
10838
        } else {
10839
          setSuccess((Boolean)value);
10840
        }
10841
        break;
10842
 
10843
      case EX:
10844
        if (value == null) {
10845
          unsetEx();
10846
        } else {
10847
          setEx((TransactionServiceException)value);
10848
        }
10849
        break;
10850
 
10851
      }
10852
    }
10853
 
10854
    public void setFieldValue(int fieldID, Object value) {
10855
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
10856
    }
10857
 
10858
    public Object getFieldValue(_Fields field) {
10859
      switch (field) {
10860
      case SUCCESS:
10861
        return new Boolean(isSuccess());
10862
 
10863
      case EX:
10864
        return getEx();
10865
 
10866
      }
10867
      throw new IllegalStateException();
10868
    }
10869
 
10870
    public Object getFieldValue(int fieldId) {
10871
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
10872
    }
10873
 
10874
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
10875
    public boolean isSet(_Fields field) {
10876
      switch (field) {
10877
      case SUCCESS:
10878
        return isSetSuccess();
10879
      case EX:
10880
        return isSetEx();
10881
      }
10882
      throw new IllegalStateException();
10883
    }
10884
 
10885
    public boolean isSet(int fieldID) {
10886
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
10887
    }
10888
 
10889
    @Override
10890
    public boolean equals(Object that) {
10891
      if (that == null)
10892
        return false;
10893
      if (that instanceof addJacketNumber_result)
10894
        return this.equals((addJacketNumber_result)that);
10895
      return false;
10896
    }
10897
 
10898
    public boolean equals(addJacketNumber_result that) {
10899
      if (that == null)
10900
        return false;
10901
 
10902
      boolean this_present_success = true;
10903
      boolean that_present_success = true;
10904
      if (this_present_success || that_present_success) {
10905
        if (!(this_present_success && that_present_success))
10906
          return false;
10907
        if (this.success != that.success)
10908
          return false;
10909
      }
10910
 
10911
      boolean this_present_ex = true && this.isSetEx();
10912
      boolean that_present_ex = true && that.isSetEx();
10913
      if (this_present_ex || that_present_ex) {
10914
        if (!(this_present_ex && that_present_ex))
10915
          return false;
10916
        if (!this.ex.equals(that.ex))
10917
          return false;
10918
      }
10919
 
10920
      return true;
10921
    }
10922
 
10923
    @Override
10924
    public int hashCode() {
10925
      return 0;
10926
    }
10927
 
10928
    public int compareTo(addJacketNumber_result other) {
10929
      if (!getClass().equals(other.getClass())) {
10930
        return getClass().getName().compareTo(other.getClass().getName());
10931
      }
10932
 
10933
      int lastComparison = 0;
10934
      addJacketNumber_result typedOther = (addJacketNumber_result)other;
10935
 
10936
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
10937
      if (lastComparison != 0) {
10938
        return lastComparison;
10939
      }
10940
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
10941
      if (lastComparison != 0) {
10942
        return lastComparison;
10943
      }
10944
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
10945
      if (lastComparison != 0) {
10946
        return lastComparison;
10947
      }
10948
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
10949
      if (lastComparison != 0) {
10950
        return lastComparison;
10951
      }
10952
      return 0;
10953
    }
10954
 
10955
    public void read(TProtocol iprot) throws TException {
10956
      TField field;
10957
      iprot.readStructBegin();
10958
      while (true)
10959
      {
10960
        field = iprot.readFieldBegin();
10961
        if (field.type == TType.STOP) { 
10962
          break;
10963
        }
10964
        _Fields fieldId = _Fields.findByThriftId(field.id);
10965
        if (fieldId == null) {
10966
          TProtocolUtil.skip(iprot, field.type);
10967
        } else {
10968
          switch (fieldId) {
10969
            case SUCCESS:
10970
              if (field.type == TType.BOOL) {
10971
                this.success = iprot.readBool();
10972
                setSuccessIsSet(true);
10973
              } else { 
10974
                TProtocolUtil.skip(iprot, field.type);
10975
              }
10976
              break;
10977
            case EX:
10978
              if (field.type == TType.STRUCT) {
10979
                this.ex = new TransactionServiceException();
10980
                this.ex.read(iprot);
10981
              } else { 
10982
                TProtocolUtil.skip(iprot, field.type);
10983
              }
10984
              break;
10985
          }
10986
          iprot.readFieldEnd();
10987
        }
10988
      }
10989
      iprot.readStructEnd();
10990
      validate();
10991
    }
10992
 
10993
    public void write(TProtocol oprot) throws TException {
10994
      oprot.writeStructBegin(STRUCT_DESC);
10995
 
10996
      if (this.isSetSuccess()) {
10997
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
10998
        oprot.writeBool(this.success);
10999
        oprot.writeFieldEnd();
11000
      } else if (this.isSetEx()) {
11001
        oprot.writeFieldBegin(EX_FIELD_DESC);
11002
        this.ex.write(oprot);
11003
        oprot.writeFieldEnd();
11004
      }
11005
      oprot.writeFieldStop();
11006
      oprot.writeStructEnd();
11007
    }
11008
 
11009
    @Override
11010
    public String toString() {
11011
      StringBuilder sb = new StringBuilder("addJacketNumber_result(");
11012
      boolean first = true;
11013
 
11014
      sb.append("success:");
11015
      sb.append(this.success);
11016
      first = false;
11017
      if (!first) sb.append(", ");
11018
      sb.append("ex:");
11019
      if (this.ex == null) {
11020
        sb.append("null");
11021
      } else {
11022
        sb.append(this.ex);
11023
      }
11024
      first = false;
11025
      sb.append(")");
11026
      return sb.toString();
11027
    }
11028
 
11029
    public void validate() throws TException {
11030
      // check for required fields
11031
    }
11032
 
11033
  }
11034
 
923 rajveer 11035
  public static class acceptOrder_args implements TBase<acceptOrder_args._Fields>, java.io.Serializable, Cloneable, Comparable<acceptOrder_args>   {
11036
    private static final TStruct STRUCT_DESC = new TStruct("acceptOrder_args");
11037
 
11038
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
11039
 
11040
    private long orderId;
11041
 
11042
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11043
    public enum _Fields implements TFieldIdEnum {
11044
      ORDER_ID((short)1, "orderId");
11045
 
11046
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
11047
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11048
 
11049
      static {
11050
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11051
          byId.put((int)field._thriftId, field);
11052
          byName.put(field.getFieldName(), field);
11053
        }
11054
      }
11055
 
11056
      /**
11057
       * Find the _Fields constant that matches fieldId, or null if its not found.
11058
       */
11059
      public static _Fields findByThriftId(int fieldId) {
11060
        return byId.get(fieldId);
11061
      }
11062
 
11063
      /**
11064
       * Find the _Fields constant that matches fieldId, throwing an exception
11065
       * if it is not found.
11066
       */
11067
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11068
        _Fields fields = findByThriftId(fieldId);
11069
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11070
        return fields;
11071
      }
11072
 
11073
      /**
11074
       * Find the _Fields constant that matches name, or null if its not found.
11075
       */
11076
      public static _Fields findByName(String name) {
11077
        return byName.get(name);
11078
      }
11079
 
11080
      private final short _thriftId;
11081
      private final String _fieldName;
11082
 
11083
      _Fields(short thriftId, String fieldName) {
11084
        _thriftId = thriftId;
11085
        _fieldName = fieldName;
11086
      }
11087
 
11088
      public short getThriftFieldId() {
11089
        return _thriftId;
11090
      }
11091
 
11092
      public String getFieldName() {
11093
        return _fieldName;
11094
      }
11095
    }
11096
 
11097
    // isset id assignments
11098
    private static final int __ORDERID_ISSET_ID = 0;
11099
    private BitSet __isset_bit_vector = new BitSet(1);
11100
 
11101
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
11102
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
11103
          new FieldValueMetaData(TType.I64)));
11104
    }});
11105
 
11106
    static {
11107
      FieldMetaData.addStructMetaDataMap(acceptOrder_args.class, metaDataMap);
11108
    }
11109
 
11110
    public acceptOrder_args() {
11111
    }
11112
 
11113
    public acceptOrder_args(
11114
      long orderId)
11115
    {
11116
      this();
11117
      this.orderId = orderId;
11118
      setOrderIdIsSet(true);
11119
    }
11120
 
11121
    /**
11122
     * Performs a deep copy on <i>other</i>.
11123
     */
11124
    public acceptOrder_args(acceptOrder_args other) {
11125
      __isset_bit_vector.clear();
11126
      __isset_bit_vector.or(other.__isset_bit_vector);
11127
      this.orderId = other.orderId;
11128
    }
11129
 
11130
    public acceptOrder_args deepCopy() {
11131
      return new acceptOrder_args(this);
11132
    }
11133
 
11134
    @Deprecated
11135
    public acceptOrder_args clone() {
11136
      return new acceptOrder_args(this);
11137
    }
11138
 
11139
    public long getOrderId() {
11140
      return this.orderId;
11141
    }
11142
 
11143
    public acceptOrder_args setOrderId(long orderId) {
11144
      this.orderId = orderId;
11145
      setOrderIdIsSet(true);
11146
      return this;
11147
    }
11148
 
11149
    public void unsetOrderId() {
11150
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
11151
    }
11152
 
11153
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
11154
    public boolean isSetOrderId() {
11155
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
11156
    }
11157
 
11158
    public void setOrderIdIsSet(boolean value) {
11159
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
11160
    }
11161
 
11162
    public void setFieldValue(_Fields field, Object value) {
11163
      switch (field) {
11164
      case ORDER_ID:
11165
        if (value == null) {
11166
          unsetOrderId();
11167
        } else {
11168
          setOrderId((Long)value);
11169
        }
11170
        break;
11171
 
11172
      }
11173
    }
11174
 
11175
    public void setFieldValue(int fieldID, Object value) {
11176
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
11177
    }
11178
 
11179
    public Object getFieldValue(_Fields field) {
11180
      switch (field) {
11181
      case ORDER_ID:
11182
        return new Long(getOrderId());
11183
 
11184
      }
11185
      throw new IllegalStateException();
11186
    }
11187
 
11188
    public Object getFieldValue(int fieldId) {
11189
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
11190
    }
11191
 
11192
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
11193
    public boolean isSet(_Fields field) {
11194
      switch (field) {
11195
      case ORDER_ID:
11196
        return isSetOrderId();
11197
      }
11198
      throw new IllegalStateException();
11199
    }
11200
 
11201
    public boolean isSet(int fieldID) {
11202
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
11203
    }
11204
 
11205
    @Override
11206
    public boolean equals(Object that) {
11207
      if (that == null)
11208
        return false;
11209
      if (that instanceof acceptOrder_args)
11210
        return this.equals((acceptOrder_args)that);
11211
      return false;
11212
    }
11213
 
11214
    public boolean equals(acceptOrder_args that) {
11215
      if (that == null)
11216
        return false;
11217
 
11218
      boolean this_present_orderId = true;
11219
      boolean that_present_orderId = true;
11220
      if (this_present_orderId || that_present_orderId) {
11221
        if (!(this_present_orderId && that_present_orderId))
11222
          return false;
11223
        if (this.orderId != that.orderId)
11224
          return false;
11225
      }
11226
 
11227
      return true;
11228
    }
11229
 
11230
    @Override
11231
    public int hashCode() {
11232
      return 0;
11233
    }
11234
 
11235
    public int compareTo(acceptOrder_args other) {
11236
      if (!getClass().equals(other.getClass())) {
11237
        return getClass().getName().compareTo(other.getClass().getName());
11238
      }
11239
 
11240
      int lastComparison = 0;
11241
      acceptOrder_args typedOther = (acceptOrder_args)other;
11242
 
11243
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
11244
      if (lastComparison != 0) {
11245
        return lastComparison;
11246
      }
11247
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
11248
      if (lastComparison != 0) {
11249
        return lastComparison;
11250
      }
11251
      return 0;
11252
    }
11253
 
11254
    public void read(TProtocol iprot) throws TException {
11255
      TField field;
11256
      iprot.readStructBegin();
11257
      while (true)
11258
      {
11259
        field = iprot.readFieldBegin();
11260
        if (field.type == TType.STOP) { 
11261
          break;
11262
        }
11263
        _Fields fieldId = _Fields.findByThriftId(field.id);
11264
        if (fieldId == null) {
11265
          TProtocolUtil.skip(iprot, field.type);
11266
        } else {
11267
          switch (fieldId) {
11268
            case ORDER_ID:
11269
              if (field.type == TType.I64) {
11270
                this.orderId = iprot.readI64();
11271
                setOrderIdIsSet(true);
11272
              } else { 
11273
                TProtocolUtil.skip(iprot, field.type);
11274
              }
11275
              break;
11276
          }
11277
          iprot.readFieldEnd();
11278
        }
11279
      }
11280
      iprot.readStructEnd();
11281
      validate();
11282
    }
11283
 
11284
    public void write(TProtocol oprot) throws TException {
11285
      validate();
11286
 
11287
      oprot.writeStructBegin(STRUCT_DESC);
11288
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
11289
      oprot.writeI64(this.orderId);
11290
      oprot.writeFieldEnd();
11291
      oprot.writeFieldStop();
11292
      oprot.writeStructEnd();
11293
    }
11294
 
11295
    @Override
11296
    public String toString() {
11297
      StringBuilder sb = new StringBuilder("acceptOrder_args(");
11298
      boolean first = true;
11299
 
11300
      sb.append("orderId:");
11301
      sb.append(this.orderId);
11302
      first = false;
11303
      sb.append(")");
11304
      return sb.toString();
11305
    }
11306
 
11307
    public void validate() throws TException {
11308
      // check for required fields
11309
    }
11310
 
11311
  }
11312
 
11313
  public static class acceptOrder_result implements TBase<acceptOrder_result._Fields>, java.io.Serializable, Cloneable, Comparable<acceptOrder_result>   {
11314
    private static final TStruct STRUCT_DESC = new TStruct("acceptOrder_result");
11315
 
11316
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
11317
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
11318
 
11319
    private boolean success;
11320
    private TransactionServiceException ex;
11321
 
11322
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11323
    public enum _Fields implements TFieldIdEnum {
11324
      SUCCESS((short)0, "success"),
11325
      EX((short)1, "ex");
11326
 
11327
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
11328
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11329
 
11330
      static {
11331
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11332
          byId.put((int)field._thriftId, field);
11333
          byName.put(field.getFieldName(), field);
11334
        }
11335
      }
11336
 
11337
      /**
11338
       * Find the _Fields constant that matches fieldId, or null if its not found.
11339
       */
11340
      public static _Fields findByThriftId(int fieldId) {
11341
        return byId.get(fieldId);
11342
      }
11343
 
11344
      /**
11345
       * Find the _Fields constant that matches fieldId, throwing an exception
11346
       * if it is not found.
11347
       */
11348
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11349
        _Fields fields = findByThriftId(fieldId);
11350
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11351
        return fields;
11352
      }
11353
 
11354
      /**
11355
       * Find the _Fields constant that matches name, or null if its not found.
11356
       */
11357
      public static _Fields findByName(String name) {
11358
        return byName.get(name);
11359
      }
11360
 
11361
      private final short _thriftId;
11362
      private final String _fieldName;
11363
 
11364
      _Fields(short thriftId, String fieldName) {
11365
        _thriftId = thriftId;
11366
        _fieldName = fieldName;
11367
      }
11368
 
11369
      public short getThriftFieldId() {
11370
        return _thriftId;
11371
      }
11372
 
11373
      public String getFieldName() {
11374
        return _fieldName;
11375
      }
11376
    }
11377
 
11378
    // isset id assignments
11379
    private static final int __SUCCESS_ISSET_ID = 0;
11380
    private BitSet __isset_bit_vector = new BitSet(1);
11381
 
11382
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
11383
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
11384
          new FieldValueMetaData(TType.BOOL)));
11385
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
11386
          new FieldValueMetaData(TType.STRUCT)));
11387
    }});
11388
 
11389
    static {
11390
      FieldMetaData.addStructMetaDataMap(acceptOrder_result.class, metaDataMap);
11391
    }
11392
 
11393
    public acceptOrder_result() {
11394
    }
11395
 
11396
    public acceptOrder_result(
11397
      boolean success,
11398
      TransactionServiceException ex)
11399
    {
11400
      this();
11401
      this.success = success;
11402
      setSuccessIsSet(true);
11403
      this.ex = ex;
11404
    }
11405
 
11406
    /**
11407
     * Performs a deep copy on <i>other</i>.
11408
     */
11409
    public acceptOrder_result(acceptOrder_result other) {
11410
      __isset_bit_vector.clear();
11411
      __isset_bit_vector.or(other.__isset_bit_vector);
11412
      this.success = other.success;
11413
      if (other.isSetEx()) {
11414
        this.ex = new TransactionServiceException(other.ex);
11415
      }
11416
    }
11417
 
11418
    public acceptOrder_result deepCopy() {
11419
      return new acceptOrder_result(this);
11420
    }
11421
 
11422
    @Deprecated
11423
    public acceptOrder_result clone() {
11424
      return new acceptOrder_result(this);
11425
    }
11426
 
11427
    public boolean isSuccess() {
11428
      return this.success;
11429
    }
11430
 
11431
    public acceptOrder_result setSuccess(boolean success) {
11432
      this.success = success;
11433
      setSuccessIsSet(true);
11434
      return this;
11435
    }
11436
 
11437
    public void unsetSuccess() {
11438
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
11439
    }
11440
 
11441
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
11442
    public boolean isSetSuccess() {
11443
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
11444
    }
11445
 
11446
    public void setSuccessIsSet(boolean value) {
11447
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
11448
    }
11449
 
11450
    public TransactionServiceException getEx() {
11451
      return this.ex;
11452
    }
11453
 
11454
    public acceptOrder_result setEx(TransactionServiceException ex) {
11455
      this.ex = ex;
11456
      return this;
11457
    }
11458
 
11459
    public void unsetEx() {
11460
      this.ex = null;
11461
    }
11462
 
11463
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
11464
    public boolean isSetEx() {
11465
      return this.ex != null;
11466
    }
11467
 
11468
    public void setExIsSet(boolean value) {
11469
      if (!value) {
11470
        this.ex = null;
11471
      }
11472
    }
11473
 
11474
    public void setFieldValue(_Fields field, Object value) {
11475
      switch (field) {
11476
      case SUCCESS:
11477
        if (value == null) {
11478
          unsetSuccess();
11479
        } else {
11480
          setSuccess((Boolean)value);
11481
        }
11482
        break;
11483
 
11484
      case EX:
11485
        if (value == null) {
11486
          unsetEx();
11487
        } else {
11488
          setEx((TransactionServiceException)value);
11489
        }
11490
        break;
11491
 
11492
      }
11493
    }
11494
 
11495
    public void setFieldValue(int fieldID, Object value) {
11496
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
11497
    }
11498
 
11499
    public Object getFieldValue(_Fields field) {
11500
      switch (field) {
11501
      case SUCCESS:
11502
        return new Boolean(isSuccess());
11503
 
11504
      case EX:
11505
        return getEx();
11506
 
11507
      }
11508
      throw new IllegalStateException();
11509
    }
11510
 
11511
    public Object getFieldValue(int fieldId) {
11512
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
11513
    }
11514
 
11515
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
11516
    public boolean isSet(_Fields field) {
11517
      switch (field) {
11518
      case SUCCESS:
11519
        return isSetSuccess();
11520
      case EX:
11521
        return isSetEx();
11522
      }
11523
      throw new IllegalStateException();
11524
    }
11525
 
11526
    public boolean isSet(int fieldID) {
11527
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
11528
    }
11529
 
11530
    @Override
11531
    public boolean equals(Object that) {
11532
      if (that == null)
11533
        return false;
11534
      if (that instanceof acceptOrder_result)
11535
        return this.equals((acceptOrder_result)that);
11536
      return false;
11537
    }
11538
 
11539
    public boolean equals(acceptOrder_result that) {
11540
      if (that == null)
11541
        return false;
11542
 
11543
      boolean this_present_success = true;
11544
      boolean that_present_success = true;
11545
      if (this_present_success || that_present_success) {
11546
        if (!(this_present_success && that_present_success))
11547
          return false;
11548
        if (this.success != that.success)
11549
          return false;
11550
      }
11551
 
11552
      boolean this_present_ex = true && this.isSetEx();
11553
      boolean that_present_ex = true && that.isSetEx();
11554
      if (this_present_ex || that_present_ex) {
11555
        if (!(this_present_ex && that_present_ex))
11556
          return false;
11557
        if (!this.ex.equals(that.ex))
11558
          return false;
11559
      }
11560
 
11561
      return true;
11562
    }
11563
 
11564
    @Override
11565
    public int hashCode() {
11566
      return 0;
11567
    }
11568
 
11569
    public int compareTo(acceptOrder_result other) {
11570
      if (!getClass().equals(other.getClass())) {
11571
        return getClass().getName().compareTo(other.getClass().getName());
11572
      }
11573
 
11574
      int lastComparison = 0;
11575
      acceptOrder_result typedOther = (acceptOrder_result)other;
11576
 
11577
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
11578
      if (lastComparison != 0) {
11579
        return lastComparison;
11580
      }
11581
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
11582
      if (lastComparison != 0) {
11583
        return lastComparison;
11584
      }
11585
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
11586
      if (lastComparison != 0) {
11587
        return lastComparison;
11588
      }
11589
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
11590
      if (lastComparison != 0) {
11591
        return lastComparison;
11592
      }
11593
      return 0;
11594
    }
11595
 
11596
    public void read(TProtocol iprot) throws TException {
11597
      TField field;
11598
      iprot.readStructBegin();
11599
      while (true)
11600
      {
11601
        field = iprot.readFieldBegin();
11602
        if (field.type == TType.STOP) { 
11603
          break;
11604
        }
11605
        _Fields fieldId = _Fields.findByThriftId(field.id);
11606
        if (fieldId == null) {
11607
          TProtocolUtil.skip(iprot, field.type);
11608
        } else {
11609
          switch (fieldId) {
11610
            case SUCCESS:
11611
              if (field.type == TType.BOOL) {
11612
                this.success = iprot.readBool();
11613
                setSuccessIsSet(true);
11614
              } else { 
11615
                TProtocolUtil.skip(iprot, field.type);
11616
              }
11617
              break;
11618
            case EX:
11619
              if (field.type == TType.STRUCT) {
11620
                this.ex = new TransactionServiceException();
11621
                this.ex.read(iprot);
11622
              } else { 
11623
                TProtocolUtil.skip(iprot, field.type);
11624
              }
11625
              break;
11626
          }
11627
          iprot.readFieldEnd();
11628
        }
11629
      }
11630
      iprot.readStructEnd();
11631
      validate();
11632
    }
11633
 
11634
    public void write(TProtocol oprot) throws TException {
11635
      oprot.writeStructBegin(STRUCT_DESC);
11636
 
11637
      if (this.isSetSuccess()) {
11638
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
11639
        oprot.writeBool(this.success);
11640
        oprot.writeFieldEnd();
11641
      } else if (this.isSetEx()) {
11642
        oprot.writeFieldBegin(EX_FIELD_DESC);
11643
        this.ex.write(oprot);
11644
        oprot.writeFieldEnd();
11645
      }
11646
      oprot.writeFieldStop();
11647
      oprot.writeStructEnd();
11648
    }
11649
 
11650
    @Override
11651
    public String toString() {
11652
      StringBuilder sb = new StringBuilder("acceptOrder_result(");
11653
      boolean first = true;
11654
 
11655
      sb.append("success:");
11656
      sb.append(this.success);
11657
      first = false;
11658
      if (!first) sb.append(", ");
11659
      sb.append("ex:");
11660
      if (this.ex == null) {
11661
        sb.append("null");
11662
      } else {
11663
        sb.append(this.ex);
11664
      }
11665
      first = false;
11666
      sb.append(")");
11667
      return sb.toString();
11668
    }
11669
 
11670
    public void validate() throws TException {
11671
      // check for required fields
11672
    }
11673
 
11674
  }
11675
 
11676
  public static class billOrder_args implements TBase<billOrder_args._Fields>, java.io.Serializable, Cloneable, Comparable<billOrder_args>   {
11677
    private static final TStruct STRUCT_DESC = new TStruct("billOrder_args");
11678
 
11679
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
11680
 
11681
    private long orderId;
11682
 
11683
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11684
    public enum _Fields implements TFieldIdEnum {
11685
      ORDER_ID((short)1, "orderId");
11686
 
11687
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
11688
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11689
 
11690
      static {
11691
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11692
          byId.put((int)field._thriftId, field);
11693
          byName.put(field.getFieldName(), field);
11694
        }
11695
      }
11696
 
11697
      /**
11698
       * Find the _Fields constant that matches fieldId, or null if its not found.
11699
       */
11700
      public static _Fields findByThriftId(int fieldId) {
11701
        return byId.get(fieldId);
11702
      }
11703
 
11704
      /**
11705
       * Find the _Fields constant that matches fieldId, throwing an exception
11706
       * if it is not found.
11707
       */
11708
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11709
        _Fields fields = findByThriftId(fieldId);
11710
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11711
        return fields;
11712
      }
11713
 
11714
      /**
11715
       * Find the _Fields constant that matches name, or null if its not found.
11716
       */
11717
      public static _Fields findByName(String name) {
11718
        return byName.get(name);
11719
      }
11720
 
11721
      private final short _thriftId;
11722
      private final String _fieldName;
11723
 
11724
      _Fields(short thriftId, String fieldName) {
11725
        _thriftId = thriftId;
11726
        _fieldName = fieldName;
11727
      }
11728
 
11729
      public short getThriftFieldId() {
11730
        return _thriftId;
11731
      }
11732
 
11733
      public String getFieldName() {
11734
        return _fieldName;
11735
      }
11736
    }
11737
 
11738
    // isset id assignments
11739
    private static final int __ORDERID_ISSET_ID = 0;
11740
    private BitSet __isset_bit_vector = new BitSet(1);
11741
 
11742
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
11743
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
11744
          new FieldValueMetaData(TType.I64)));
11745
    }});
11746
 
11747
    static {
11748
      FieldMetaData.addStructMetaDataMap(billOrder_args.class, metaDataMap);
11749
    }
11750
 
11751
    public billOrder_args() {
11752
    }
11753
 
11754
    public billOrder_args(
11755
      long orderId)
11756
    {
11757
      this();
11758
      this.orderId = orderId;
11759
      setOrderIdIsSet(true);
11760
    }
11761
 
11762
    /**
11763
     * Performs a deep copy on <i>other</i>.
11764
     */
11765
    public billOrder_args(billOrder_args other) {
11766
      __isset_bit_vector.clear();
11767
      __isset_bit_vector.or(other.__isset_bit_vector);
11768
      this.orderId = other.orderId;
11769
    }
11770
 
11771
    public billOrder_args deepCopy() {
11772
      return new billOrder_args(this);
11773
    }
11774
 
11775
    @Deprecated
11776
    public billOrder_args clone() {
11777
      return new billOrder_args(this);
11778
    }
11779
 
11780
    public long getOrderId() {
11781
      return this.orderId;
11782
    }
11783
 
11784
    public billOrder_args setOrderId(long orderId) {
11785
      this.orderId = orderId;
11786
      setOrderIdIsSet(true);
11787
      return this;
11788
    }
11789
 
11790
    public void unsetOrderId() {
11791
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
11792
    }
11793
 
11794
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
11795
    public boolean isSetOrderId() {
11796
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
11797
    }
11798
 
11799
    public void setOrderIdIsSet(boolean value) {
11800
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
11801
    }
11802
 
11803
    public void setFieldValue(_Fields field, Object value) {
11804
      switch (field) {
11805
      case ORDER_ID:
11806
        if (value == null) {
11807
          unsetOrderId();
11808
        } else {
11809
          setOrderId((Long)value);
11810
        }
11811
        break;
11812
 
11813
      }
11814
    }
11815
 
11816
    public void setFieldValue(int fieldID, Object value) {
11817
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
11818
    }
11819
 
11820
    public Object getFieldValue(_Fields field) {
11821
      switch (field) {
11822
      case ORDER_ID:
11823
        return new Long(getOrderId());
11824
 
11825
      }
11826
      throw new IllegalStateException();
11827
    }
11828
 
11829
    public Object getFieldValue(int fieldId) {
11830
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
11831
    }
11832
 
11833
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
11834
    public boolean isSet(_Fields field) {
11835
      switch (field) {
11836
      case ORDER_ID:
11837
        return isSetOrderId();
11838
      }
11839
      throw new IllegalStateException();
11840
    }
11841
 
11842
    public boolean isSet(int fieldID) {
11843
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
11844
    }
11845
 
11846
    @Override
11847
    public boolean equals(Object that) {
11848
      if (that == null)
11849
        return false;
11850
      if (that instanceof billOrder_args)
11851
        return this.equals((billOrder_args)that);
11852
      return false;
11853
    }
11854
 
11855
    public boolean equals(billOrder_args that) {
11856
      if (that == null)
11857
        return false;
11858
 
11859
      boolean this_present_orderId = true;
11860
      boolean that_present_orderId = true;
11861
      if (this_present_orderId || that_present_orderId) {
11862
        if (!(this_present_orderId && that_present_orderId))
11863
          return false;
11864
        if (this.orderId != that.orderId)
11865
          return false;
11866
      }
11867
 
11868
      return true;
11869
    }
11870
 
11871
    @Override
11872
    public int hashCode() {
11873
      return 0;
11874
    }
11875
 
11876
    public int compareTo(billOrder_args other) {
11877
      if (!getClass().equals(other.getClass())) {
11878
        return getClass().getName().compareTo(other.getClass().getName());
11879
      }
11880
 
11881
      int lastComparison = 0;
11882
      billOrder_args typedOther = (billOrder_args)other;
11883
 
11884
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
11885
      if (lastComparison != 0) {
11886
        return lastComparison;
11887
      }
11888
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
11889
      if (lastComparison != 0) {
11890
        return lastComparison;
11891
      }
11892
      return 0;
11893
    }
11894
 
11895
    public void read(TProtocol iprot) throws TException {
11896
      TField field;
11897
      iprot.readStructBegin();
11898
      while (true)
11899
      {
11900
        field = iprot.readFieldBegin();
11901
        if (field.type == TType.STOP) { 
11902
          break;
11903
        }
11904
        _Fields fieldId = _Fields.findByThriftId(field.id);
11905
        if (fieldId == null) {
11906
          TProtocolUtil.skip(iprot, field.type);
11907
        } else {
11908
          switch (fieldId) {
11909
            case ORDER_ID:
11910
              if (field.type == TType.I64) {
11911
                this.orderId = iprot.readI64();
11912
                setOrderIdIsSet(true);
11913
              } else { 
11914
                TProtocolUtil.skip(iprot, field.type);
11915
              }
11916
              break;
11917
          }
11918
          iprot.readFieldEnd();
11919
        }
11920
      }
11921
      iprot.readStructEnd();
11922
      validate();
11923
    }
11924
 
11925
    public void write(TProtocol oprot) throws TException {
11926
      validate();
11927
 
11928
      oprot.writeStructBegin(STRUCT_DESC);
11929
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
11930
      oprot.writeI64(this.orderId);
11931
      oprot.writeFieldEnd();
11932
      oprot.writeFieldStop();
11933
      oprot.writeStructEnd();
11934
    }
11935
 
11936
    @Override
11937
    public String toString() {
11938
      StringBuilder sb = new StringBuilder("billOrder_args(");
11939
      boolean first = true;
11940
 
11941
      sb.append("orderId:");
11942
      sb.append(this.orderId);
11943
      first = false;
11944
      sb.append(")");
11945
      return sb.toString();
11946
    }
11947
 
11948
    public void validate() throws TException {
11949
      // check for required fields
11950
    }
11951
 
11952
  }
11953
 
11954
  public static class billOrder_result implements TBase<billOrder_result._Fields>, java.io.Serializable, Cloneable, Comparable<billOrder_result>   {
11955
    private static final TStruct STRUCT_DESC = new TStruct("billOrder_result");
11956
 
11957
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
11958
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
11959
 
11960
    private boolean success;
11961
    private TransactionServiceException ex;
11962
 
11963
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11964
    public enum _Fields implements TFieldIdEnum {
11965
      SUCCESS((short)0, "success"),
11966
      EX((short)1, "ex");
11967
 
11968
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
11969
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11970
 
11971
      static {
11972
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11973
          byId.put((int)field._thriftId, field);
11974
          byName.put(field.getFieldName(), field);
11975
        }
11976
      }
11977
 
11978
      /**
11979
       * Find the _Fields constant that matches fieldId, or null if its not found.
11980
       */
11981
      public static _Fields findByThriftId(int fieldId) {
11982
        return byId.get(fieldId);
11983
      }
11984
 
11985
      /**
11986
       * Find the _Fields constant that matches fieldId, throwing an exception
11987
       * if it is not found.
11988
       */
11989
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11990
        _Fields fields = findByThriftId(fieldId);
11991
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11992
        return fields;
11993
      }
11994
 
11995
      /**
11996
       * Find the _Fields constant that matches name, or null if its not found.
11997
       */
11998
      public static _Fields findByName(String name) {
11999
        return byName.get(name);
12000
      }
12001
 
12002
      private final short _thriftId;
12003
      private final String _fieldName;
12004
 
12005
      _Fields(short thriftId, String fieldName) {
12006
        _thriftId = thriftId;
12007
        _fieldName = fieldName;
12008
      }
12009
 
12010
      public short getThriftFieldId() {
12011
        return _thriftId;
12012
      }
12013
 
12014
      public String getFieldName() {
12015
        return _fieldName;
12016
      }
12017
    }
12018
 
12019
    // isset id assignments
12020
    private static final int __SUCCESS_ISSET_ID = 0;
12021
    private BitSet __isset_bit_vector = new BitSet(1);
12022
 
12023
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
12024
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
12025
          new FieldValueMetaData(TType.BOOL)));
12026
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
12027
          new FieldValueMetaData(TType.STRUCT)));
12028
    }});
12029
 
12030
    static {
12031
      FieldMetaData.addStructMetaDataMap(billOrder_result.class, metaDataMap);
12032
    }
12033
 
12034
    public billOrder_result() {
12035
    }
12036
 
12037
    public billOrder_result(
12038
      boolean success,
12039
      TransactionServiceException ex)
12040
    {
12041
      this();
12042
      this.success = success;
12043
      setSuccessIsSet(true);
12044
      this.ex = ex;
12045
    }
12046
 
12047
    /**
12048
     * Performs a deep copy on <i>other</i>.
12049
     */
12050
    public billOrder_result(billOrder_result other) {
12051
      __isset_bit_vector.clear();
12052
      __isset_bit_vector.or(other.__isset_bit_vector);
12053
      this.success = other.success;
12054
      if (other.isSetEx()) {
12055
        this.ex = new TransactionServiceException(other.ex);
12056
      }
12057
    }
12058
 
12059
    public billOrder_result deepCopy() {
12060
      return new billOrder_result(this);
12061
    }
12062
 
12063
    @Deprecated
12064
    public billOrder_result clone() {
12065
      return new billOrder_result(this);
12066
    }
12067
 
12068
    public boolean isSuccess() {
12069
      return this.success;
12070
    }
12071
 
12072
    public billOrder_result setSuccess(boolean success) {
12073
      this.success = success;
12074
      setSuccessIsSet(true);
12075
      return this;
12076
    }
12077
 
12078
    public void unsetSuccess() {
12079
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
12080
    }
12081
 
12082
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
12083
    public boolean isSetSuccess() {
12084
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
12085
    }
12086
 
12087
    public void setSuccessIsSet(boolean value) {
12088
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
12089
    }
12090
 
12091
    public TransactionServiceException getEx() {
12092
      return this.ex;
12093
    }
12094
 
12095
    public billOrder_result setEx(TransactionServiceException ex) {
12096
      this.ex = ex;
12097
      return this;
12098
    }
12099
 
12100
    public void unsetEx() {
12101
      this.ex = null;
12102
    }
12103
 
12104
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
12105
    public boolean isSetEx() {
12106
      return this.ex != null;
12107
    }
12108
 
12109
    public void setExIsSet(boolean value) {
12110
      if (!value) {
12111
        this.ex = null;
12112
      }
12113
    }
12114
 
12115
    public void setFieldValue(_Fields field, Object value) {
12116
      switch (field) {
12117
      case SUCCESS:
12118
        if (value == null) {
12119
          unsetSuccess();
12120
        } else {
12121
          setSuccess((Boolean)value);
12122
        }
12123
        break;
12124
 
12125
      case EX:
12126
        if (value == null) {
12127
          unsetEx();
12128
        } else {
12129
          setEx((TransactionServiceException)value);
12130
        }
12131
        break;
12132
 
12133
      }
12134
    }
12135
 
12136
    public void setFieldValue(int fieldID, Object value) {
12137
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
12138
    }
12139
 
12140
    public Object getFieldValue(_Fields field) {
12141
      switch (field) {
12142
      case SUCCESS:
12143
        return new Boolean(isSuccess());
12144
 
12145
      case EX:
12146
        return getEx();
12147
 
12148
      }
12149
      throw new IllegalStateException();
12150
    }
12151
 
12152
    public Object getFieldValue(int fieldId) {
12153
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
12154
    }
12155
 
12156
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
12157
    public boolean isSet(_Fields field) {
12158
      switch (field) {
12159
      case SUCCESS:
12160
        return isSetSuccess();
12161
      case EX:
12162
        return isSetEx();
12163
      }
12164
      throw new IllegalStateException();
12165
    }
12166
 
12167
    public boolean isSet(int fieldID) {
12168
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
12169
    }
12170
 
12171
    @Override
12172
    public boolean equals(Object that) {
12173
      if (that == null)
12174
        return false;
12175
      if (that instanceof billOrder_result)
12176
        return this.equals((billOrder_result)that);
12177
      return false;
12178
    }
12179
 
12180
    public boolean equals(billOrder_result that) {
12181
      if (that == null)
12182
        return false;
12183
 
12184
      boolean this_present_success = true;
12185
      boolean that_present_success = true;
12186
      if (this_present_success || that_present_success) {
12187
        if (!(this_present_success && that_present_success))
12188
          return false;
12189
        if (this.success != that.success)
12190
          return false;
12191
      }
12192
 
12193
      boolean this_present_ex = true && this.isSetEx();
12194
      boolean that_present_ex = true && that.isSetEx();
12195
      if (this_present_ex || that_present_ex) {
12196
        if (!(this_present_ex && that_present_ex))
12197
          return false;
12198
        if (!this.ex.equals(that.ex))
12199
          return false;
12200
      }
12201
 
12202
      return true;
12203
    }
12204
 
12205
    @Override
12206
    public int hashCode() {
12207
      return 0;
12208
    }
12209
 
12210
    public int compareTo(billOrder_result other) {
12211
      if (!getClass().equals(other.getClass())) {
12212
        return getClass().getName().compareTo(other.getClass().getName());
12213
      }
12214
 
12215
      int lastComparison = 0;
12216
      billOrder_result typedOther = (billOrder_result)other;
12217
 
12218
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
12219
      if (lastComparison != 0) {
12220
        return lastComparison;
12221
      }
12222
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
12223
      if (lastComparison != 0) {
12224
        return lastComparison;
12225
      }
12226
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
12227
      if (lastComparison != 0) {
12228
        return lastComparison;
12229
      }
12230
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
12231
      if (lastComparison != 0) {
12232
        return lastComparison;
12233
      }
12234
      return 0;
12235
    }
12236
 
12237
    public void read(TProtocol iprot) throws TException {
12238
      TField field;
12239
      iprot.readStructBegin();
12240
      while (true)
12241
      {
12242
        field = iprot.readFieldBegin();
12243
        if (field.type == TType.STOP) { 
12244
          break;
12245
        }
12246
        _Fields fieldId = _Fields.findByThriftId(field.id);
12247
        if (fieldId == null) {
12248
          TProtocolUtil.skip(iprot, field.type);
12249
        } else {
12250
          switch (fieldId) {
12251
            case SUCCESS:
12252
              if (field.type == TType.BOOL) {
12253
                this.success = iprot.readBool();
12254
                setSuccessIsSet(true);
12255
              } else { 
12256
                TProtocolUtil.skip(iprot, field.type);
12257
              }
12258
              break;
12259
            case EX:
12260
              if (field.type == TType.STRUCT) {
12261
                this.ex = new TransactionServiceException();
12262
                this.ex.read(iprot);
12263
              } else { 
12264
                TProtocolUtil.skip(iprot, field.type);
12265
              }
12266
              break;
12267
          }
12268
          iprot.readFieldEnd();
12269
        }
12270
      }
12271
      iprot.readStructEnd();
12272
      validate();
12273
    }
12274
 
12275
    public void write(TProtocol oprot) throws TException {
12276
      oprot.writeStructBegin(STRUCT_DESC);
12277
 
12278
      if (this.isSetSuccess()) {
12279
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
12280
        oprot.writeBool(this.success);
12281
        oprot.writeFieldEnd();
12282
      } else if (this.isSetEx()) {
12283
        oprot.writeFieldBegin(EX_FIELD_DESC);
12284
        this.ex.write(oprot);
12285
        oprot.writeFieldEnd();
12286
      }
12287
      oprot.writeFieldStop();
12288
      oprot.writeStructEnd();
12289
    }
12290
 
12291
    @Override
12292
    public String toString() {
12293
      StringBuilder sb = new StringBuilder("billOrder_result(");
12294
      boolean first = true;
12295
 
12296
      sb.append("success:");
12297
      sb.append(this.success);
12298
      first = false;
12299
      if (!first) sb.append(", ");
12300
      sb.append("ex:");
12301
      if (this.ex == null) {
12302
        sb.append("null");
12303
      } else {
12304
        sb.append(this.ex);
12305
      }
12306
      first = false;
12307
      sb.append(")");
12308
      return sb.toString();
12309
    }
12310
 
12311
    public void validate() throws TException {
12312
      // check for required fields
12313
    }
12314
 
12315
  }
12316
 
483 rajveer 12317
  public static class getOrdersForTransaction_args implements TBase<getOrdersForTransaction_args._Fields>, java.io.Serializable, Cloneable, Comparable<getOrdersForTransaction_args>   {
12318
    private static final TStruct STRUCT_DESC = new TStruct("getOrdersForTransaction_args");
68 ashish 12319
 
12320
    private static final TField TRANSACTION_ID_FIELD_DESC = new TField("transactionId", TType.I64, (short)1);
12321
 
12322
    private long transactionId;
12323
 
12324
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12325
    public enum _Fields implements TFieldIdEnum {
483 rajveer 12326
      TRANSACTION_ID((short)1, "transactionId");
68 ashish 12327
 
12328
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
12329
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12330
 
12331
      static {
12332
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12333
          byId.put((int)field._thriftId, field);
12334
          byName.put(field.getFieldName(), field);
12335
        }
12336
      }
12337
 
12338
      /**
12339
       * Find the _Fields constant that matches fieldId, or null if its not found.
12340
       */
12341
      public static _Fields findByThriftId(int fieldId) {
12342
        return byId.get(fieldId);
12343
      }
12344
 
12345
      /**
12346
       * Find the _Fields constant that matches fieldId, throwing an exception
12347
       * if it is not found.
12348
       */
12349
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12350
        _Fields fields = findByThriftId(fieldId);
12351
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12352
        return fields;
12353
      }
12354
 
12355
      /**
12356
       * Find the _Fields constant that matches name, or null if its not found.
12357
       */
12358
      public static _Fields findByName(String name) {
12359
        return byName.get(name);
12360
      }
12361
 
12362
      private final short _thriftId;
12363
      private final String _fieldName;
12364
 
12365
      _Fields(short thriftId, String fieldName) {
12366
        _thriftId = thriftId;
12367
        _fieldName = fieldName;
12368
      }
12369
 
12370
      public short getThriftFieldId() {
12371
        return _thriftId;
12372
      }
12373
 
12374
      public String getFieldName() {
12375
        return _fieldName;
12376
      }
12377
    }
12378
 
12379
    // isset id assignments
12380
    private static final int __TRANSACTIONID_ISSET_ID = 0;
483 rajveer 12381
    private BitSet __isset_bit_vector = new BitSet(1);
68 ashish 12382
 
12383
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
12384
      put(_Fields.TRANSACTION_ID, new FieldMetaData("transactionId", TFieldRequirementType.DEFAULT, 
12385
          new FieldValueMetaData(TType.I64)));
12386
    }});
12387
 
12388
    static {
483 rajveer 12389
      FieldMetaData.addStructMetaDataMap(getOrdersForTransaction_args.class, metaDataMap);
68 ashish 12390
    }
12391
 
483 rajveer 12392
    public getOrdersForTransaction_args() {
68 ashish 12393
    }
12394
 
483 rajveer 12395
    public getOrdersForTransaction_args(
12396
      long transactionId)
68 ashish 12397
    {
12398
      this();
12399
      this.transactionId = transactionId;
12400
      setTransactionIdIsSet(true);
12401
    }
12402
 
12403
    /**
12404
     * Performs a deep copy on <i>other</i>.
12405
     */
483 rajveer 12406
    public getOrdersForTransaction_args(getOrdersForTransaction_args other) {
68 ashish 12407
      __isset_bit_vector.clear();
12408
      __isset_bit_vector.or(other.__isset_bit_vector);
12409
      this.transactionId = other.transactionId;
12410
    }
12411
 
483 rajveer 12412
    public getOrdersForTransaction_args deepCopy() {
12413
      return new getOrdersForTransaction_args(this);
68 ashish 12414
    }
12415
 
12416
    @Deprecated
483 rajveer 12417
    public getOrdersForTransaction_args clone() {
12418
      return new getOrdersForTransaction_args(this);
68 ashish 12419
    }
12420
 
12421
    public long getTransactionId() {
12422
      return this.transactionId;
12423
    }
12424
 
483 rajveer 12425
    public getOrdersForTransaction_args setTransactionId(long transactionId) {
68 ashish 12426
      this.transactionId = transactionId;
12427
      setTransactionIdIsSet(true);
12428
      return this;
12429
    }
12430
 
12431
    public void unsetTransactionId() {
12432
      __isset_bit_vector.clear(__TRANSACTIONID_ISSET_ID);
12433
    }
12434
 
12435
    /** Returns true if field transactionId is set (has been asigned a value) and false otherwise */
12436
    public boolean isSetTransactionId() {
12437
      return __isset_bit_vector.get(__TRANSACTIONID_ISSET_ID);
12438
    }
12439
 
12440
    public void setTransactionIdIsSet(boolean value) {
12441
      __isset_bit_vector.set(__TRANSACTIONID_ISSET_ID, value);
12442
    }
12443
 
12444
    public void setFieldValue(_Fields field, Object value) {
12445
      switch (field) {
12446
      case TRANSACTION_ID:
12447
        if (value == null) {
12448
          unsetTransactionId();
12449
        } else {
12450
          setTransactionId((Long)value);
12451
        }
12452
        break;
12453
 
12454
      }
12455
    }
12456
 
12457
    public void setFieldValue(int fieldID, Object value) {
12458
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
12459
    }
12460
 
12461
    public Object getFieldValue(_Fields field) {
12462
      switch (field) {
12463
      case TRANSACTION_ID:
12464
        return new Long(getTransactionId());
12465
 
12466
      }
12467
      throw new IllegalStateException();
12468
    }
12469
 
12470
    public Object getFieldValue(int fieldId) {
12471
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
12472
    }
12473
 
12474
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
12475
    public boolean isSet(_Fields field) {
12476
      switch (field) {
12477
      case TRANSACTION_ID:
12478
        return isSetTransactionId();
12479
      }
12480
      throw new IllegalStateException();
12481
    }
12482
 
12483
    public boolean isSet(int fieldID) {
12484
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
12485
    }
12486
 
12487
    @Override
12488
    public boolean equals(Object that) {
12489
      if (that == null)
12490
        return false;
483 rajveer 12491
      if (that instanceof getOrdersForTransaction_args)
12492
        return this.equals((getOrdersForTransaction_args)that);
68 ashish 12493
      return false;
12494
    }
12495
 
483 rajveer 12496
    public boolean equals(getOrdersForTransaction_args that) {
68 ashish 12497
      if (that == null)
12498
        return false;
12499
 
12500
      boolean this_present_transactionId = true;
12501
      boolean that_present_transactionId = true;
12502
      if (this_present_transactionId || that_present_transactionId) {
12503
        if (!(this_present_transactionId && that_present_transactionId))
12504
          return false;
12505
        if (this.transactionId != that.transactionId)
12506
          return false;
12507
      }
12508
 
12509
      return true;
12510
    }
12511
 
12512
    @Override
12513
    public int hashCode() {
12514
      return 0;
12515
    }
12516
 
483 rajveer 12517
    public int compareTo(getOrdersForTransaction_args other) {
68 ashish 12518
      if (!getClass().equals(other.getClass())) {
12519
        return getClass().getName().compareTo(other.getClass().getName());
12520
      }
12521
 
12522
      int lastComparison = 0;
483 rajveer 12523
      getOrdersForTransaction_args typedOther = (getOrdersForTransaction_args)other;
68 ashish 12524
 
12525
      lastComparison = Boolean.valueOf(isSetTransactionId()).compareTo(isSetTransactionId());
12526
      if (lastComparison != 0) {
12527
        return lastComparison;
12528
      }
12529
      lastComparison = TBaseHelper.compareTo(transactionId, typedOther.transactionId);
12530
      if (lastComparison != 0) {
12531
        return lastComparison;
12532
      }
12533
      return 0;
12534
    }
12535
 
12536
    public void read(TProtocol iprot) throws TException {
12537
      TField field;
12538
      iprot.readStructBegin();
12539
      while (true)
12540
      {
12541
        field = iprot.readFieldBegin();
12542
        if (field.type == TType.STOP) { 
12543
          break;
12544
        }
12545
        _Fields fieldId = _Fields.findByThriftId(field.id);
12546
        if (fieldId == null) {
12547
          TProtocolUtil.skip(iprot, field.type);
12548
        } else {
12549
          switch (fieldId) {
12550
            case TRANSACTION_ID:
12551
              if (field.type == TType.I64) {
12552
                this.transactionId = iprot.readI64();
12553
                setTransactionIdIsSet(true);
12554
              } else { 
12555
                TProtocolUtil.skip(iprot, field.type);
12556
              }
12557
              break;
12558
          }
12559
          iprot.readFieldEnd();
12560
        }
12561
      }
12562
      iprot.readStructEnd();
12563
      validate();
12564
    }
12565
 
12566
    public void write(TProtocol oprot) throws TException {
12567
      validate();
12568
 
12569
      oprot.writeStructBegin(STRUCT_DESC);
12570
      oprot.writeFieldBegin(TRANSACTION_ID_FIELD_DESC);
12571
      oprot.writeI64(this.transactionId);
12572
      oprot.writeFieldEnd();
12573
      oprot.writeFieldStop();
12574
      oprot.writeStructEnd();
12575
    }
12576
 
12577
    @Override
12578
    public String toString() {
483 rajveer 12579
      StringBuilder sb = new StringBuilder("getOrdersForTransaction_args(");
68 ashish 12580
      boolean first = true;
12581
 
12582
      sb.append("transactionId:");
12583
      sb.append(this.transactionId);
12584
      first = false;
12585
      sb.append(")");
12586
      return sb.toString();
12587
    }
12588
 
12589
    public void validate() throws TException {
12590
      // check for required fields
12591
    }
12592
 
12593
  }
12594
 
483 rajveer 12595
  public static class getOrdersForTransaction_result implements TBase<getOrdersForTransaction_result._Fields>, java.io.Serializable, Cloneable, Comparable<getOrdersForTransaction_result>   {
12596
    private static final TStruct STRUCT_DESC = new TStruct("getOrdersForTransaction_result");
68 ashish 12597
 
483 rajveer 12598
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
68 ashish 12599
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
12600
 
483 rajveer 12601
    private List<Order> success;
68 ashish 12602
    private TransactionServiceException ex;
12603
 
12604
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12605
    public enum _Fields implements TFieldIdEnum {
12606
      SUCCESS((short)0, "success"),
12607
      EX((short)1, "ex");
12608
 
12609
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
12610
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12611
 
12612
      static {
12613
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12614
          byId.put((int)field._thriftId, field);
12615
          byName.put(field.getFieldName(), field);
12616
        }
12617
      }
12618
 
12619
      /**
12620
       * Find the _Fields constant that matches fieldId, or null if its not found.
12621
       */
12622
      public static _Fields findByThriftId(int fieldId) {
12623
        return byId.get(fieldId);
12624
      }
12625
 
12626
      /**
12627
       * Find the _Fields constant that matches fieldId, throwing an exception
12628
       * if it is not found.
12629
       */
12630
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12631
        _Fields fields = findByThriftId(fieldId);
12632
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12633
        return fields;
12634
      }
12635
 
12636
      /**
12637
       * Find the _Fields constant that matches name, or null if its not found.
12638
       */
12639
      public static _Fields findByName(String name) {
12640
        return byName.get(name);
12641
      }
12642
 
12643
      private final short _thriftId;
12644
      private final String _fieldName;
12645
 
12646
      _Fields(short thriftId, String fieldName) {
12647
        _thriftId = thriftId;
12648
        _fieldName = fieldName;
12649
      }
12650
 
12651
      public short getThriftFieldId() {
12652
        return _thriftId;
12653
      }
12654
 
12655
      public String getFieldName() {
12656
        return _fieldName;
12657
      }
12658
    }
12659
 
12660
    // isset id assignments
12661
 
12662
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
12663
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
483 rajveer 12664
          new ListMetaData(TType.LIST, 
12665
              new StructMetaData(TType.STRUCT, Order.class))));
68 ashish 12666
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
12667
          new FieldValueMetaData(TType.STRUCT)));
12668
    }});
12669
 
12670
    static {
483 rajveer 12671
      FieldMetaData.addStructMetaDataMap(getOrdersForTransaction_result.class, metaDataMap);
68 ashish 12672
    }
12673
 
483 rajveer 12674
    public getOrdersForTransaction_result() {
68 ashish 12675
    }
12676
 
483 rajveer 12677
    public getOrdersForTransaction_result(
12678
      List<Order> success,
68 ashish 12679
      TransactionServiceException ex)
12680
    {
12681
      this();
12682
      this.success = success;
12683
      this.ex = ex;
12684
    }
12685
 
12686
    /**
12687
     * Performs a deep copy on <i>other</i>.
12688
     */
483 rajveer 12689
    public getOrdersForTransaction_result(getOrdersForTransaction_result other) {
12690
      if (other.isSetSuccess()) {
12691
        List<Order> __this__success = new ArrayList<Order>();
12692
        for (Order other_element : other.success) {
12693
          __this__success.add(new Order(other_element));
12694
        }
12695
        this.success = __this__success;
12696
      }
68 ashish 12697
      if (other.isSetEx()) {
12698
        this.ex = new TransactionServiceException(other.ex);
12699
      }
12700
    }
12701
 
483 rajveer 12702
    public getOrdersForTransaction_result deepCopy() {
12703
      return new getOrdersForTransaction_result(this);
68 ashish 12704
    }
12705
 
12706
    @Deprecated
483 rajveer 12707
    public getOrdersForTransaction_result clone() {
12708
      return new getOrdersForTransaction_result(this);
68 ashish 12709
    }
12710
 
483 rajveer 12711
    public int getSuccessSize() {
12712
      return (this.success == null) ? 0 : this.success.size();
12713
    }
12714
 
12715
    public java.util.Iterator<Order> getSuccessIterator() {
12716
      return (this.success == null) ? null : this.success.iterator();
12717
    }
12718
 
12719
    public void addToSuccess(Order elem) {
12720
      if (this.success == null) {
12721
        this.success = new ArrayList<Order>();
12722
      }
12723
      this.success.add(elem);
12724
    }
12725
 
12726
    public List<Order> getSuccess() {
68 ashish 12727
      return this.success;
12728
    }
12729
 
483 rajveer 12730
    public getOrdersForTransaction_result setSuccess(List<Order> success) {
68 ashish 12731
      this.success = success;
12732
      return this;
12733
    }
12734
 
12735
    public void unsetSuccess() {
483 rajveer 12736
      this.success = null;
68 ashish 12737
    }
12738
 
12739
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
12740
    public boolean isSetSuccess() {
483 rajveer 12741
      return this.success != null;
68 ashish 12742
    }
12743
 
12744
    public void setSuccessIsSet(boolean value) {
483 rajveer 12745
      if (!value) {
12746
        this.success = null;
12747
      }
68 ashish 12748
    }
12749
 
12750
    public TransactionServiceException getEx() {
12751
      return this.ex;
12752
    }
12753
 
483 rajveer 12754
    public getOrdersForTransaction_result setEx(TransactionServiceException ex) {
68 ashish 12755
      this.ex = ex;
12756
      return this;
12757
    }
12758
 
12759
    public void unsetEx() {
12760
      this.ex = null;
12761
    }
12762
 
12763
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
12764
    public boolean isSetEx() {
12765
      return this.ex != null;
12766
    }
12767
 
12768
    public void setExIsSet(boolean value) {
12769
      if (!value) {
12770
        this.ex = null;
12771
      }
12772
    }
12773
 
12774
    public void setFieldValue(_Fields field, Object value) {
12775
      switch (field) {
12776
      case SUCCESS:
12777
        if (value == null) {
12778
          unsetSuccess();
12779
        } else {
483 rajveer 12780
          setSuccess((List<Order>)value);
68 ashish 12781
        }
12782
        break;
12783
 
12784
      case EX:
12785
        if (value == null) {
12786
          unsetEx();
12787
        } else {
12788
          setEx((TransactionServiceException)value);
12789
        }
12790
        break;
12791
 
12792
      }
12793
    }
12794
 
12795
    public void setFieldValue(int fieldID, Object value) {
12796
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
12797
    }
12798
 
12799
    public Object getFieldValue(_Fields field) {
12800
      switch (field) {
12801
      case SUCCESS:
483 rajveer 12802
        return getSuccess();
68 ashish 12803
 
12804
      case EX:
12805
        return getEx();
12806
 
12807
      }
12808
      throw new IllegalStateException();
12809
    }
12810
 
12811
    public Object getFieldValue(int fieldId) {
12812
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
12813
    }
12814
 
12815
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
12816
    public boolean isSet(_Fields field) {
12817
      switch (field) {
12818
      case SUCCESS:
12819
        return isSetSuccess();
12820
      case EX:
12821
        return isSetEx();
12822
      }
12823
      throw new IllegalStateException();
12824
    }
12825
 
12826
    public boolean isSet(int fieldID) {
12827
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
12828
    }
12829
 
12830
    @Override
12831
    public boolean equals(Object that) {
12832
      if (that == null)
12833
        return false;
483 rajveer 12834
      if (that instanceof getOrdersForTransaction_result)
12835
        return this.equals((getOrdersForTransaction_result)that);
68 ashish 12836
      return false;
12837
    }
12838
 
483 rajveer 12839
    public boolean equals(getOrdersForTransaction_result that) {
68 ashish 12840
      if (that == null)
12841
        return false;
12842
 
483 rajveer 12843
      boolean this_present_success = true && this.isSetSuccess();
12844
      boolean that_present_success = true && that.isSetSuccess();
68 ashish 12845
      if (this_present_success || that_present_success) {
12846
        if (!(this_present_success && that_present_success))
12847
          return false;
483 rajveer 12848
        if (!this.success.equals(that.success))
68 ashish 12849
          return false;
12850
      }
12851
 
12852
      boolean this_present_ex = true && this.isSetEx();
12853
      boolean that_present_ex = true && that.isSetEx();
12854
      if (this_present_ex || that_present_ex) {
12855
        if (!(this_present_ex && that_present_ex))
12856
          return false;
12857
        if (!this.ex.equals(that.ex))
12858
          return false;
12859
      }
12860
 
12861
      return true;
12862
    }
12863
 
12864
    @Override
12865
    public int hashCode() {
12866
      return 0;
12867
    }
12868
 
483 rajveer 12869
    public int compareTo(getOrdersForTransaction_result other) {
68 ashish 12870
      if (!getClass().equals(other.getClass())) {
12871
        return getClass().getName().compareTo(other.getClass().getName());
12872
      }
12873
 
12874
      int lastComparison = 0;
483 rajveer 12875
      getOrdersForTransaction_result typedOther = (getOrdersForTransaction_result)other;
68 ashish 12876
 
12877
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
12878
      if (lastComparison != 0) {
12879
        return lastComparison;
12880
      }
12881
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
12882
      if (lastComparison != 0) {
12883
        return lastComparison;
12884
      }
12885
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
12886
      if (lastComparison != 0) {
12887
        return lastComparison;
12888
      }
12889
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
12890
      if (lastComparison != 0) {
12891
        return lastComparison;
12892
      }
12893
      return 0;
12894
    }
12895
 
12896
    public void read(TProtocol iprot) throws TException {
12897
      TField field;
12898
      iprot.readStructBegin();
12899
      while (true)
12900
      {
12901
        field = iprot.readFieldBegin();
12902
        if (field.type == TType.STOP) { 
12903
          break;
12904
        }
12905
        _Fields fieldId = _Fields.findByThriftId(field.id);
12906
        if (fieldId == null) {
12907
          TProtocolUtil.skip(iprot, field.type);
12908
        } else {
12909
          switch (fieldId) {
12910
            case SUCCESS:
483 rajveer 12911
              if (field.type == TType.LIST) {
12912
                {
1022 varun.gupt 12913
                  TList _list24 = iprot.readListBegin();
12914
                  this.success = new ArrayList<Order>(_list24.size);
12915
                  for (int _i25 = 0; _i25 < _list24.size; ++_i25)
483 rajveer 12916
                  {
1022 varun.gupt 12917
                    Order _elem26;
12918
                    _elem26 = new Order();
12919
                    _elem26.read(iprot);
12920
                    this.success.add(_elem26);
483 rajveer 12921
                  }
12922
                  iprot.readListEnd();
12923
                }
68 ashish 12924
              } else { 
12925
                TProtocolUtil.skip(iprot, field.type);
12926
              }
12927
              break;
12928
            case EX:
12929
              if (field.type == TType.STRUCT) {
12930
                this.ex = new TransactionServiceException();
12931
                this.ex.read(iprot);
12932
              } else { 
12933
                TProtocolUtil.skip(iprot, field.type);
12934
              }
12935
              break;
12936
          }
12937
          iprot.readFieldEnd();
12938
        }
12939
      }
12940
      iprot.readStructEnd();
12941
      validate();
12942
    }
12943
 
12944
    public void write(TProtocol oprot) throws TException {
12945
      oprot.writeStructBegin(STRUCT_DESC);
12946
 
12947
      if (this.isSetSuccess()) {
12948
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
483 rajveer 12949
        {
12950
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
1022 varun.gupt 12951
          for (Order _iter27 : this.success)
483 rajveer 12952
          {
1022 varun.gupt 12953
            _iter27.write(oprot);
483 rajveer 12954
          }
12955
          oprot.writeListEnd();
12956
        }
68 ashish 12957
        oprot.writeFieldEnd();
12958
      } else if (this.isSetEx()) {
12959
        oprot.writeFieldBegin(EX_FIELD_DESC);
12960
        this.ex.write(oprot);
12961
        oprot.writeFieldEnd();
12962
      }
12963
      oprot.writeFieldStop();
12964
      oprot.writeStructEnd();
12965
    }
12966
 
12967
    @Override
12968
    public String toString() {
483 rajveer 12969
      StringBuilder sb = new StringBuilder("getOrdersForTransaction_result(");
68 ashish 12970
      boolean first = true;
12971
 
12972
      sb.append("success:");
483 rajveer 12973
      if (this.success == null) {
12974
        sb.append("null");
12975
      } else {
12976
        sb.append(this.success);
12977
      }
68 ashish 12978
      first = false;
12979
      if (!first) sb.append(", ");
12980
      sb.append("ex:");
12981
      if (this.ex == null) {
12982
        sb.append("null");
12983
      } else {
12984
        sb.append(this.ex);
12985
      }
12986
      first = false;
12987
      sb.append(")");
12988
      return sb.toString();
12989
    }
12990
 
12991
    public void validate() throws TException {
12992
      // check for required fields
12993
    }
12994
 
12995
  }
12996
 
483 rajveer 12997
  public static class getOrdersForCustomer_args implements TBase<getOrdersForCustomer_args._Fields>, java.io.Serializable, Cloneable, Comparable<getOrdersForCustomer_args>   {
12998
    private static final TStruct STRUCT_DESC = new TStruct("getOrdersForCustomer_args");
68 ashish 12999
 
483 rajveer 13000
    private static final TField CUSTOMER_ID_FIELD_DESC = new TField("customerId", TType.I64, (short)1);
13001
    private static final TField FROM_DATE_FIELD_DESC = new TField("from_date", TType.I64, (short)2);
13002
    private static final TField TO_DATE_FIELD_DESC = new TField("to_date", TType.I64, (short)3);
13003
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)4);
68 ashish 13004
 
483 rajveer 13005
    private long customerId;
13006
    private long from_date;
13007
    private long to_date;
13008
    private OrderStatus status;
68 ashish 13009
 
13010
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13011
    public enum _Fields implements TFieldIdEnum {
483 rajveer 13012
      CUSTOMER_ID((short)1, "customerId"),
13013
      FROM_DATE((short)2, "from_date"),
13014
      TO_DATE((short)3, "to_date"),
13015
      /**
13016
       * 
13017
       * @see OrderStatus
13018
       */
13019
      STATUS((short)4, "status");
68 ashish 13020
 
13021
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
13022
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13023
 
13024
      static {
13025
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13026
          byId.put((int)field._thriftId, field);
13027
          byName.put(field.getFieldName(), field);
13028
        }
13029
      }
13030
 
13031
      /**
13032
       * Find the _Fields constant that matches fieldId, or null if its not found.
13033
       */
13034
      public static _Fields findByThriftId(int fieldId) {
13035
        return byId.get(fieldId);
13036
      }
13037
 
13038
      /**
13039
       * Find the _Fields constant that matches fieldId, throwing an exception
13040
       * if it is not found.
13041
       */
13042
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13043
        _Fields fields = findByThriftId(fieldId);
13044
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13045
        return fields;
13046
      }
13047
 
13048
      /**
13049
       * Find the _Fields constant that matches name, or null if its not found.
13050
       */
13051
      public static _Fields findByName(String name) {
13052
        return byName.get(name);
13053
      }
13054
 
13055
      private final short _thriftId;
13056
      private final String _fieldName;
13057
 
13058
      _Fields(short thriftId, String fieldName) {
13059
        _thriftId = thriftId;
13060
        _fieldName = fieldName;
13061
      }
13062
 
13063
      public short getThriftFieldId() {
13064
        return _thriftId;
13065
      }
13066
 
13067
      public String getFieldName() {
13068
        return _fieldName;
13069
      }
13070
    }
13071
 
13072
    // isset id assignments
483 rajveer 13073
    private static final int __CUSTOMERID_ISSET_ID = 0;
13074
    private static final int __FROM_DATE_ISSET_ID = 1;
13075
    private static final int __TO_DATE_ISSET_ID = 2;
68 ashish 13076
    private BitSet __isset_bit_vector = new BitSet(3);
13077
 
13078
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 13079
      put(_Fields.CUSTOMER_ID, new FieldMetaData("customerId", TFieldRequirementType.DEFAULT, 
68 ashish 13080
          new FieldValueMetaData(TType.I64)));
483 rajveer 13081
      put(_Fields.FROM_DATE, new FieldMetaData("from_date", TFieldRequirementType.DEFAULT, 
68 ashish 13082
          new FieldValueMetaData(TType.I64)));
483 rajveer 13083
      put(_Fields.TO_DATE, new FieldMetaData("to_date", TFieldRequirementType.DEFAULT, 
68 ashish 13084
          new FieldValueMetaData(TType.I64)));
483 rajveer 13085
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
13086
          new EnumMetaData(TType.ENUM, OrderStatus.class)));
68 ashish 13087
    }});
13088
 
13089
    static {
483 rajveer 13090
      FieldMetaData.addStructMetaDataMap(getOrdersForCustomer_args.class, metaDataMap);
68 ashish 13091
    }
13092
 
483 rajveer 13093
    public getOrdersForCustomer_args() {
68 ashish 13094
    }
13095
 
483 rajveer 13096
    public getOrdersForCustomer_args(
13097
      long customerId,
13098
      long from_date,
13099
      long to_date,
13100
      OrderStatus status)
68 ashish 13101
    {
13102
      this();
483 rajveer 13103
      this.customerId = customerId;
13104
      setCustomerIdIsSet(true);
13105
      this.from_date = from_date;
13106
      setFrom_dateIsSet(true);
13107
      this.to_date = to_date;
13108
      setTo_dateIsSet(true);
13109
      this.status = status;
68 ashish 13110
    }
13111
 
13112
    /**
13113
     * Performs a deep copy on <i>other</i>.
13114
     */
483 rajveer 13115
    public getOrdersForCustomer_args(getOrdersForCustomer_args other) {
68 ashish 13116
      __isset_bit_vector.clear();
13117
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 13118
      this.customerId = other.customerId;
13119
      this.from_date = other.from_date;
13120
      this.to_date = other.to_date;
13121
      if (other.isSetStatus()) {
13122
        this.status = other.status;
13123
      }
68 ashish 13124
    }
13125
 
483 rajveer 13126
    public getOrdersForCustomer_args deepCopy() {
13127
      return new getOrdersForCustomer_args(this);
68 ashish 13128
    }
13129
 
13130
    @Deprecated
483 rajveer 13131
    public getOrdersForCustomer_args clone() {
13132
      return new getOrdersForCustomer_args(this);
68 ashish 13133
    }
13134
 
483 rajveer 13135
    public long getCustomerId() {
13136
      return this.customerId;
68 ashish 13137
    }
13138
 
483 rajveer 13139
    public getOrdersForCustomer_args setCustomerId(long customerId) {
13140
      this.customerId = customerId;
13141
      setCustomerIdIsSet(true);
68 ashish 13142
      return this;
13143
    }
13144
 
483 rajveer 13145
    public void unsetCustomerId() {
13146
      __isset_bit_vector.clear(__CUSTOMERID_ISSET_ID);
68 ashish 13147
    }
13148
 
483 rajveer 13149
    /** Returns true if field customerId is set (has been asigned a value) and false otherwise */
13150
    public boolean isSetCustomerId() {
13151
      return __isset_bit_vector.get(__CUSTOMERID_ISSET_ID);
68 ashish 13152
    }
13153
 
483 rajveer 13154
    public void setCustomerIdIsSet(boolean value) {
13155
      __isset_bit_vector.set(__CUSTOMERID_ISSET_ID, value);
68 ashish 13156
    }
13157
 
483 rajveer 13158
    public long getFrom_date() {
13159
      return this.from_date;
68 ashish 13160
    }
13161
 
483 rajveer 13162
    public getOrdersForCustomer_args setFrom_date(long from_date) {
13163
      this.from_date = from_date;
13164
      setFrom_dateIsSet(true);
68 ashish 13165
      return this;
13166
    }
13167
 
483 rajveer 13168
    public void unsetFrom_date() {
13169
      __isset_bit_vector.clear(__FROM_DATE_ISSET_ID);
68 ashish 13170
    }
13171
 
483 rajveer 13172
    /** Returns true if field from_date is set (has been asigned a value) and false otherwise */
13173
    public boolean isSetFrom_date() {
13174
      return __isset_bit_vector.get(__FROM_DATE_ISSET_ID);
68 ashish 13175
    }
13176
 
483 rajveer 13177
    public void setFrom_dateIsSet(boolean value) {
13178
      __isset_bit_vector.set(__FROM_DATE_ISSET_ID, value);
68 ashish 13179
    }
13180
 
483 rajveer 13181
    public long getTo_date() {
13182
      return this.to_date;
68 ashish 13183
    }
13184
 
483 rajveer 13185
    public getOrdersForCustomer_args setTo_date(long to_date) {
13186
      this.to_date = to_date;
13187
      setTo_dateIsSet(true);
68 ashish 13188
      return this;
13189
    }
13190
 
483 rajveer 13191
    public void unsetTo_date() {
13192
      __isset_bit_vector.clear(__TO_DATE_ISSET_ID);
68 ashish 13193
    }
13194
 
483 rajveer 13195
    /** Returns true if field to_date is set (has been asigned a value) and false otherwise */
13196
    public boolean isSetTo_date() {
13197
      return __isset_bit_vector.get(__TO_DATE_ISSET_ID);
68 ashish 13198
    }
13199
 
483 rajveer 13200
    public void setTo_dateIsSet(boolean value) {
13201
      __isset_bit_vector.set(__TO_DATE_ISSET_ID, value);
68 ashish 13202
    }
13203
 
483 rajveer 13204
    /**
13205
     * 
13206
     * @see OrderStatus
13207
     */
13208
    public OrderStatus getStatus() {
13209
      return this.status;
13210
    }
13211
 
13212
    /**
13213
     * 
13214
     * @see OrderStatus
13215
     */
13216
    public getOrdersForCustomer_args setStatus(OrderStatus status) {
13217
      this.status = status;
13218
      return this;
13219
    }
13220
 
13221
    public void unsetStatus() {
13222
      this.status = null;
13223
    }
13224
 
13225
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
13226
    public boolean isSetStatus() {
13227
      return this.status != null;
13228
    }
13229
 
13230
    public void setStatusIsSet(boolean value) {
13231
      if (!value) {
13232
        this.status = null;
13233
      }
13234
    }
13235
 
68 ashish 13236
    public void setFieldValue(_Fields field, Object value) {
13237
      switch (field) {
483 rajveer 13238
      case CUSTOMER_ID:
68 ashish 13239
        if (value == null) {
483 rajveer 13240
          unsetCustomerId();
68 ashish 13241
        } else {
483 rajveer 13242
          setCustomerId((Long)value);
68 ashish 13243
        }
13244
        break;
13245
 
483 rajveer 13246
      case FROM_DATE:
68 ashish 13247
        if (value == null) {
483 rajveer 13248
          unsetFrom_date();
68 ashish 13249
        } else {
483 rajveer 13250
          setFrom_date((Long)value);
68 ashish 13251
        }
13252
        break;
13253
 
483 rajveer 13254
      case TO_DATE:
68 ashish 13255
        if (value == null) {
483 rajveer 13256
          unsetTo_date();
68 ashish 13257
        } else {
483 rajveer 13258
          setTo_date((Long)value);
68 ashish 13259
        }
13260
        break;
13261
 
483 rajveer 13262
      case STATUS:
13263
        if (value == null) {
13264
          unsetStatus();
13265
        } else {
13266
          setStatus((OrderStatus)value);
13267
        }
13268
        break;
13269
 
68 ashish 13270
      }
13271
    }
13272
 
13273
    public void setFieldValue(int fieldID, Object value) {
13274
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
13275
    }
13276
 
13277
    public Object getFieldValue(_Fields field) {
13278
      switch (field) {
483 rajveer 13279
      case CUSTOMER_ID:
13280
        return new Long(getCustomerId());
68 ashish 13281
 
483 rajveer 13282
      case FROM_DATE:
13283
        return new Long(getFrom_date());
68 ashish 13284
 
483 rajveer 13285
      case TO_DATE:
13286
        return new Long(getTo_date());
68 ashish 13287
 
483 rajveer 13288
      case STATUS:
13289
        return getStatus();
13290
 
68 ashish 13291
      }
13292
      throw new IllegalStateException();
13293
    }
13294
 
13295
    public Object getFieldValue(int fieldId) {
13296
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
13297
    }
13298
 
13299
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
13300
    public boolean isSet(_Fields field) {
13301
      switch (field) {
483 rajveer 13302
      case CUSTOMER_ID:
13303
        return isSetCustomerId();
13304
      case FROM_DATE:
13305
        return isSetFrom_date();
13306
      case TO_DATE:
13307
        return isSetTo_date();
13308
      case STATUS:
13309
        return isSetStatus();
68 ashish 13310
      }
13311
      throw new IllegalStateException();
13312
    }
13313
 
13314
    public boolean isSet(int fieldID) {
13315
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
13316
    }
13317
 
13318
    @Override
13319
    public boolean equals(Object that) {
13320
      if (that == null)
13321
        return false;
483 rajveer 13322
      if (that instanceof getOrdersForCustomer_args)
13323
        return this.equals((getOrdersForCustomer_args)that);
68 ashish 13324
      return false;
13325
    }
13326
 
483 rajveer 13327
    public boolean equals(getOrdersForCustomer_args that) {
68 ashish 13328
      if (that == null)
13329
        return false;
13330
 
483 rajveer 13331
      boolean this_present_customerId = true;
13332
      boolean that_present_customerId = true;
13333
      if (this_present_customerId || that_present_customerId) {
13334
        if (!(this_present_customerId && that_present_customerId))
68 ashish 13335
          return false;
483 rajveer 13336
        if (this.customerId != that.customerId)
68 ashish 13337
          return false;
13338
      }
13339
 
483 rajveer 13340
      boolean this_present_from_date = true;
13341
      boolean that_present_from_date = true;
13342
      if (this_present_from_date || that_present_from_date) {
13343
        if (!(this_present_from_date && that_present_from_date))
68 ashish 13344
          return false;
483 rajveer 13345
        if (this.from_date != that.from_date)
68 ashish 13346
          return false;
13347
      }
13348
 
483 rajveer 13349
      boolean this_present_to_date = true;
13350
      boolean that_present_to_date = true;
13351
      if (this_present_to_date || that_present_to_date) {
13352
        if (!(this_present_to_date && that_present_to_date))
68 ashish 13353
          return false;
483 rajveer 13354
        if (this.to_date != that.to_date)
68 ashish 13355
          return false;
13356
      }
13357
 
483 rajveer 13358
      boolean this_present_status = true && this.isSetStatus();
13359
      boolean that_present_status = true && that.isSetStatus();
13360
      if (this_present_status || that_present_status) {
13361
        if (!(this_present_status && that_present_status))
13362
          return false;
13363
        if (!this.status.equals(that.status))
13364
          return false;
13365
      }
13366
 
68 ashish 13367
      return true;
13368
    }
13369
 
13370
    @Override
13371
    public int hashCode() {
13372
      return 0;
13373
    }
13374
 
483 rajveer 13375
    public int compareTo(getOrdersForCustomer_args other) {
68 ashish 13376
      if (!getClass().equals(other.getClass())) {
13377
        return getClass().getName().compareTo(other.getClass().getName());
13378
      }
13379
 
13380
      int lastComparison = 0;
483 rajveer 13381
      getOrdersForCustomer_args typedOther = (getOrdersForCustomer_args)other;
68 ashish 13382
 
483 rajveer 13383
      lastComparison = Boolean.valueOf(isSetCustomerId()).compareTo(isSetCustomerId());
68 ashish 13384
      if (lastComparison != 0) {
13385
        return lastComparison;
13386
      }
483 rajveer 13387
      lastComparison = TBaseHelper.compareTo(customerId, typedOther.customerId);
68 ashish 13388
      if (lastComparison != 0) {
13389
        return lastComparison;
13390
      }
483 rajveer 13391
      lastComparison = Boolean.valueOf(isSetFrom_date()).compareTo(isSetFrom_date());
68 ashish 13392
      if (lastComparison != 0) {
13393
        return lastComparison;
13394
      }
483 rajveer 13395
      lastComparison = TBaseHelper.compareTo(from_date, typedOther.from_date);
68 ashish 13396
      if (lastComparison != 0) {
13397
        return lastComparison;
13398
      }
483 rajveer 13399
      lastComparison = Boolean.valueOf(isSetTo_date()).compareTo(isSetTo_date());
68 ashish 13400
      if (lastComparison != 0) {
13401
        return lastComparison;
13402
      }
483 rajveer 13403
      lastComparison = TBaseHelper.compareTo(to_date, typedOther.to_date);
68 ashish 13404
      if (lastComparison != 0) {
13405
        return lastComparison;
13406
      }
483 rajveer 13407
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
13408
      if (lastComparison != 0) {
13409
        return lastComparison;
13410
      }
13411
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
13412
      if (lastComparison != 0) {
13413
        return lastComparison;
13414
      }
68 ashish 13415
      return 0;
13416
    }
13417
 
13418
    public void read(TProtocol iprot) throws TException {
13419
      TField field;
13420
      iprot.readStructBegin();
13421
      while (true)
13422
      {
13423
        field = iprot.readFieldBegin();
13424
        if (field.type == TType.STOP) { 
13425
          break;
13426
        }
13427
        _Fields fieldId = _Fields.findByThriftId(field.id);
13428
        if (fieldId == null) {
13429
          TProtocolUtil.skip(iprot, field.type);
13430
        } else {
13431
          switch (fieldId) {
483 rajveer 13432
            case CUSTOMER_ID:
68 ashish 13433
              if (field.type == TType.I64) {
483 rajveer 13434
                this.customerId = iprot.readI64();
13435
                setCustomerIdIsSet(true);
68 ashish 13436
              } else { 
13437
                TProtocolUtil.skip(iprot, field.type);
13438
              }
13439
              break;
483 rajveer 13440
            case FROM_DATE:
68 ashish 13441
              if (field.type == TType.I64) {
483 rajveer 13442
                this.from_date = iprot.readI64();
13443
                setFrom_dateIsSet(true);
68 ashish 13444
              } else { 
13445
                TProtocolUtil.skip(iprot, field.type);
13446
              }
13447
              break;
483 rajveer 13448
            case TO_DATE:
68 ashish 13449
              if (field.type == TType.I64) {
483 rajveer 13450
                this.to_date = iprot.readI64();
13451
                setTo_dateIsSet(true);
68 ashish 13452
              } else { 
13453
                TProtocolUtil.skip(iprot, field.type);
13454
              }
13455
              break;
483 rajveer 13456
            case STATUS:
13457
              if (field.type == TType.I32) {
13458
                this.status = OrderStatus.findByValue(iprot.readI32());
13459
              } else { 
13460
                TProtocolUtil.skip(iprot, field.type);
13461
              }
13462
              break;
68 ashish 13463
          }
13464
          iprot.readFieldEnd();
13465
        }
13466
      }
13467
      iprot.readStructEnd();
13468
      validate();
13469
    }
13470
 
13471
    public void write(TProtocol oprot) throws TException {
13472
      validate();
13473
 
13474
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 13475
      oprot.writeFieldBegin(CUSTOMER_ID_FIELD_DESC);
13476
      oprot.writeI64(this.customerId);
68 ashish 13477
      oprot.writeFieldEnd();
483 rajveer 13478
      oprot.writeFieldBegin(FROM_DATE_FIELD_DESC);
13479
      oprot.writeI64(this.from_date);
68 ashish 13480
      oprot.writeFieldEnd();
483 rajveer 13481
      oprot.writeFieldBegin(TO_DATE_FIELD_DESC);
13482
      oprot.writeI64(this.to_date);
68 ashish 13483
      oprot.writeFieldEnd();
483 rajveer 13484
      if (this.status != null) {
13485
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
13486
        oprot.writeI32(this.status.getValue());
13487
        oprot.writeFieldEnd();
13488
      }
68 ashish 13489
      oprot.writeFieldStop();
13490
      oprot.writeStructEnd();
13491
    }
13492
 
13493
    @Override
13494
    public String toString() {
483 rajveer 13495
      StringBuilder sb = new StringBuilder("getOrdersForCustomer_args(");
68 ashish 13496
      boolean first = true;
13497
 
483 rajveer 13498
      sb.append("customerId:");
13499
      sb.append(this.customerId);
68 ashish 13500
      first = false;
13501
      if (!first) sb.append(", ");
483 rajveer 13502
      sb.append("from_date:");
13503
      sb.append(this.from_date);
68 ashish 13504
      first = false;
13505
      if (!first) sb.append(", ");
483 rajveer 13506
      sb.append("to_date:");
13507
      sb.append(this.to_date);
68 ashish 13508
      first = false;
483 rajveer 13509
      if (!first) sb.append(", ");
13510
      sb.append("status:");
13511
      if (this.status == null) {
13512
        sb.append("null");
13513
      } else {
13514
        String status_name = status.name();
13515
        if (status_name != null) {
13516
          sb.append(status_name);
13517
          sb.append(" (");
13518
        }
13519
        sb.append(this.status);
13520
        if (status_name != null) {
13521
          sb.append(")");
13522
        }
13523
      }
13524
      first = false;
68 ashish 13525
      sb.append(")");
13526
      return sb.toString();
13527
    }
13528
 
13529
    public void validate() throws TException {
13530
      // check for required fields
13531
    }
13532
 
13533
  }
13534
 
483 rajveer 13535
  public static class getOrdersForCustomer_result implements TBase<getOrdersForCustomer_result._Fields>, java.io.Serializable, Cloneable, Comparable<getOrdersForCustomer_result>   {
13536
    private static final TStruct STRUCT_DESC = new TStruct("getOrdersForCustomer_result");
68 ashish 13537
 
483 rajveer 13538
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
68 ashish 13539
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
13540
 
483 rajveer 13541
    private List<Order> success;
68 ashish 13542
    private TransactionServiceException ex;
13543
 
13544
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13545
    public enum _Fields implements TFieldIdEnum {
13546
      SUCCESS((short)0, "success"),
13547
      EX((short)1, "ex");
13548
 
13549
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
13550
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13551
 
13552
      static {
13553
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13554
          byId.put((int)field._thriftId, field);
13555
          byName.put(field.getFieldName(), field);
13556
        }
13557
      }
13558
 
13559
      /**
13560
       * Find the _Fields constant that matches fieldId, or null if its not found.
13561
       */
13562
      public static _Fields findByThriftId(int fieldId) {
13563
        return byId.get(fieldId);
13564
      }
13565
 
13566
      /**
13567
       * Find the _Fields constant that matches fieldId, throwing an exception
13568
       * if it is not found.
13569
       */
13570
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13571
        _Fields fields = findByThriftId(fieldId);
13572
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13573
        return fields;
13574
      }
13575
 
13576
      /**
13577
       * Find the _Fields constant that matches name, or null if its not found.
13578
       */
13579
      public static _Fields findByName(String name) {
13580
        return byName.get(name);
13581
      }
13582
 
13583
      private final short _thriftId;
13584
      private final String _fieldName;
13585
 
13586
      _Fields(short thriftId, String fieldName) {
13587
        _thriftId = thriftId;
13588
        _fieldName = fieldName;
13589
      }
13590
 
13591
      public short getThriftFieldId() {
13592
        return _thriftId;
13593
      }
13594
 
13595
      public String getFieldName() {
13596
        return _fieldName;
13597
      }
13598
    }
13599
 
13600
    // isset id assignments
13601
 
13602
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
13603
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
483 rajveer 13604
          new ListMetaData(TType.LIST, 
13605
              new StructMetaData(TType.STRUCT, Order.class))));
68 ashish 13606
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
13607
          new FieldValueMetaData(TType.STRUCT)));
13608
    }});
13609
 
13610
    static {
483 rajveer 13611
      FieldMetaData.addStructMetaDataMap(getOrdersForCustomer_result.class, metaDataMap);
68 ashish 13612
    }
13613
 
483 rajveer 13614
    public getOrdersForCustomer_result() {
68 ashish 13615
    }
13616
 
483 rajveer 13617
    public getOrdersForCustomer_result(
13618
      List<Order> success,
68 ashish 13619
      TransactionServiceException ex)
13620
    {
13621
      this();
13622
      this.success = success;
13623
      this.ex = ex;
13624
    }
13625
 
13626
    /**
13627
     * Performs a deep copy on <i>other</i>.
13628
     */
483 rajveer 13629
    public getOrdersForCustomer_result(getOrdersForCustomer_result other) {
13630
      if (other.isSetSuccess()) {
13631
        List<Order> __this__success = new ArrayList<Order>();
13632
        for (Order other_element : other.success) {
13633
          __this__success.add(new Order(other_element));
13634
        }
13635
        this.success = __this__success;
13636
      }
68 ashish 13637
      if (other.isSetEx()) {
13638
        this.ex = new TransactionServiceException(other.ex);
13639
      }
13640
    }
13641
 
483 rajveer 13642
    public getOrdersForCustomer_result deepCopy() {
13643
      return new getOrdersForCustomer_result(this);
68 ashish 13644
    }
13645
 
13646
    @Deprecated
483 rajveer 13647
    public getOrdersForCustomer_result clone() {
13648
      return new getOrdersForCustomer_result(this);
68 ashish 13649
    }
13650
 
483 rajveer 13651
    public int getSuccessSize() {
13652
      return (this.success == null) ? 0 : this.success.size();
13653
    }
13654
 
13655
    public java.util.Iterator<Order> getSuccessIterator() {
13656
      return (this.success == null) ? null : this.success.iterator();
13657
    }
13658
 
13659
    public void addToSuccess(Order elem) {
13660
      if (this.success == null) {
13661
        this.success = new ArrayList<Order>();
13662
      }
13663
      this.success.add(elem);
13664
    }
13665
 
13666
    public List<Order> getSuccess() {
68 ashish 13667
      return this.success;
13668
    }
13669
 
483 rajveer 13670
    public getOrdersForCustomer_result setSuccess(List<Order> success) {
68 ashish 13671
      this.success = success;
13672
      return this;
13673
    }
13674
 
13675
    public void unsetSuccess() {
483 rajveer 13676
      this.success = null;
68 ashish 13677
    }
13678
 
13679
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
13680
    public boolean isSetSuccess() {
483 rajveer 13681
      return this.success != null;
68 ashish 13682
    }
13683
 
13684
    public void setSuccessIsSet(boolean value) {
483 rajveer 13685
      if (!value) {
13686
        this.success = null;
13687
      }
68 ashish 13688
    }
13689
 
13690
    public TransactionServiceException getEx() {
13691
      return this.ex;
13692
    }
13693
 
483 rajveer 13694
    public getOrdersForCustomer_result setEx(TransactionServiceException ex) {
68 ashish 13695
      this.ex = ex;
13696
      return this;
13697
    }
13698
 
13699
    public void unsetEx() {
13700
      this.ex = null;
13701
    }
13702
 
13703
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
13704
    public boolean isSetEx() {
13705
      return this.ex != null;
13706
    }
13707
 
13708
    public void setExIsSet(boolean value) {
13709
      if (!value) {
13710
        this.ex = null;
13711
      }
13712
    }
13713
 
13714
    public void setFieldValue(_Fields field, Object value) {
13715
      switch (field) {
13716
      case SUCCESS:
13717
        if (value == null) {
13718
          unsetSuccess();
13719
        } else {
483 rajveer 13720
          setSuccess((List<Order>)value);
68 ashish 13721
        }
13722
        break;
13723
 
13724
      case EX:
13725
        if (value == null) {
13726
          unsetEx();
13727
        } else {
13728
          setEx((TransactionServiceException)value);
13729
        }
13730
        break;
13731
 
13732
      }
13733
    }
13734
 
13735
    public void setFieldValue(int fieldID, Object value) {
13736
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
13737
    }
13738
 
13739
    public Object getFieldValue(_Fields field) {
13740
      switch (field) {
13741
      case SUCCESS:
483 rajveer 13742
        return getSuccess();
68 ashish 13743
 
13744
      case EX:
13745
        return getEx();
13746
 
13747
      }
13748
      throw new IllegalStateException();
13749
    }
13750
 
13751
    public Object getFieldValue(int fieldId) {
13752
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
13753
    }
13754
 
13755
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
13756
    public boolean isSet(_Fields field) {
13757
      switch (field) {
13758
      case SUCCESS:
13759
        return isSetSuccess();
13760
      case EX:
13761
        return isSetEx();
13762
      }
13763
      throw new IllegalStateException();
13764
    }
13765
 
13766
    public boolean isSet(int fieldID) {
13767
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
13768
    }
13769
 
13770
    @Override
13771
    public boolean equals(Object that) {
13772
      if (that == null)
13773
        return false;
483 rajveer 13774
      if (that instanceof getOrdersForCustomer_result)
13775
        return this.equals((getOrdersForCustomer_result)that);
68 ashish 13776
      return false;
13777
    }
13778
 
483 rajveer 13779
    public boolean equals(getOrdersForCustomer_result that) {
68 ashish 13780
      if (that == null)
13781
        return false;
13782
 
483 rajveer 13783
      boolean this_present_success = true && this.isSetSuccess();
13784
      boolean that_present_success = true && that.isSetSuccess();
68 ashish 13785
      if (this_present_success || that_present_success) {
13786
        if (!(this_present_success && that_present_success))
13787
          return false;
483 rajveer 13788
        if (!this.success.equals(that.success))
68 ashish 13789
          return false;
13790
      }
13791
 
13792
      boolean this_present_ex = true && this.isSetEx();
13793
      boolean that_present_ex = true && that.isSetEx();
13794
      if (this_present_ex || that_present_ex) {
13795
        if (!(this_present_ex && that_present_ex))
13796
          return false;
13797
        if (!this.ex.equals(that.ex))
13798
          return false;
13799
      }
13800
 
13801
      return true;
13802
    }
13803
 
13804
    @Override
13805
    public int hashCode() {
13806
      return 0;
13807
    }
13808
 
483 rajveer 13809
    public int compareTo(getOrdersForCustomer_result other) {
68 ashish 13810
      if (!getClass().equals(other.getClass())) {
13811
        return getClass().getName().compareTo(other.getClass().getName());
13812
      }
13813
 
13814
      int lastComparison = 0;
483 rajveer 13815
      getOrdersForCustomer_result typedOther = (getOrdersForCustomer_result)other;
68 ashish 13816
 
13817
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
13818
      if (lastComparison != 0) {
13819
        return lastComparison;
13820
      }
13821
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
13822
      if (lastComparison != 0) {
13823
        return lastComparison;
13824
      }
13825
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
13826
      if (lastComparison != 0) {
13827
        return lastComparison;
13828
      }
13829
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
13830
      if (lastComparison != 0) {
13831
        return lastComparison;
13832
      }
13833
      return 0;
13834
    }
13835
 
13836
    public void read(TProtocol iprot) throws TException {
13837
      TField field;
13838
      iprot.readStructBegin();
13839
      while (true)
13840
      {
13841
        field = iprot.readFieldBegin();
13842
        if (field.type == TType.STOP) { 
13843
          break;
13844
        }
13845
        _Fields fieldId = _Fields.findByThriftId(field.id);
13846
        if (fieldId == null) {
13847
          TProtocolUtil.skip(iprot, field.type);
13848
        } else {
13849
          switch (fieldId) {
13850
            case SUCCESS:
483 rajveer 13851
              if (field.type == TType.LIST) {
13852
                {
1022 varun.gupt 13853
                  TList _list28 = iprot.readListBegin();
13854
                  this.success = new ArrayList<Order>(_list28.size);
13855
                  for (int _i29 = 0; _i29 < _list28.size; ++_i29)
483 rajveer 13856
                  {
1022 varun.gupt 13857
                    Order _elem30;
13858
                    _elem30 = new Order();
13859
                    _elem30.read(iprot);
13860
                    this.success.add(_elem30);
483 rajveer 13861
                  }
13862
                  iprot.readListEnd();
13863
                }
68 ashish 13864
              } else { 
13865
                TProtocolUtil.skip(iprot, field.type);
13866
              }
13867
              break;
13868
            case EX:
13869
              if (field.type == TType.STRUCT) {
13870
                this.ex = new TransactionServiceException();
13871
                this.ex.read(iprot);
13872
              } else { 
13873
                TProtocolUtil.skip(iprot, field.type);
13874
              }
13875
              break;
13876
          }
13877
          iprot.readFieldEnd();
13878
        }
13879
      }
13880
      iprot.readStructEnd();
13881
      validate();
13882
    }
13883
 
13884
    public void write(TProtocol oprot) throws TException {
13885
      oprot.writeStructBegin(STRUCT_DESC);
13886
 
13887
      if (this.isSetSuccess()) {
13888
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
483 rajveer 13889
        {
13890
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
1022 varun.gupt 13891
          for (Order _iter31 : this.success)
483 rajveer 13892
          {
1022 varun.gupt 13893
            _iter31.write(oprot);
483 rajveer 13894
          }
13895
          oprot.writeListEnd();
13896
        }
68 ashish 13897
        oprot.writeFieldEnd();
13898
      } else if (this.isSetEx()) {
13899
        oprot.writeFieldBegin(EX_FIELD_DESC);
13900
        this.ex.write(oprot);
13901
        oprot.writeFieldEnd();
13902
      }
13903
      oprot.writeFieldStop();
13904
      oprot.writeStructEnd();
13905
    }
13906
 
13907
    @Override
13908
    public String toString() {
483 rajveer 13909
      StringBuilder sb = new StringBuilder("getOrdersForCustomer_result(");
68 ashish 13910
      boolean first = true;
13911
 
13912
      sb.append("success:");
483 rajveer 13913
      if (this.success == null) {
13914
        sb.append("null");
13915
      } else {
13916
        sb.append(this.success);
13917
      }
68 ashish 13918
      first = false;
13919
      if (!first) sb.append(", ");
13920
      sb.append("ex:");
13921
      if (this.ex == null) {
13922
        sb.append("null");
13923
      } else {
13924
        sb.append(this.ex);
13925
      }
13926
      first = false;
13927
      sb.append(")");
13928
      return sb.toString();
13929
    }
13930
 
13931
    public void validate() throws TException {
13932
      // check for required fields
13933
    }
13934
 
13935
  }
13936
 
483 rajveer 13937
  public static class createOrder_args implements TBase<createOrder_args._Fields>, java.io.Serializable, Cloneable, Comparable<createOrder_args>   {
13938
    private static final TStruct STRUCT_DESC = new TStruct("createOrder_args");
68 ashish 13939
 
483 rajveer 13940
    private static final TField ORDER_FIELD_DESC = new TField("order", TType.STRUCT, (short)1);
68 ashish 13941
 
483 rajveer 13942
    private Order order;
68 ashish 13943
 
13944
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13945
    public enum _Fields implements TFieldIdEnum {
483 rajveer 13946
      ORDER((short)1, "order");
68 ashish 13947
 
13948
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
13949
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13950
 
13951
      static {
13952
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13953
          byId.put((int)field._thriftId, field);
13954
          byName.put(field.getFieldName(), field);
13955
        }
13956
      }
13957
 
13958
      /**
13959
       * Find the _Fields constant that matches fieldId, or null if its not found.
13960
       */
13961
      public static _Fields findByThriftId(int fieldId) {
13962
        return byId.get(fieldId);
13963
      }
13964
 
13965
      /**
13966
       * Find the _Fields constant that matches fieldId, throwing an exception
13967
       * if it is not found.
13968
       */
13969
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13970
        _Fields fields = findByThriftId(fieldId);
13971
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13972
        return fields;
13973
      }
13974
 
13975
      /**
13976
       * Find the _Fields constant that matches name, or null if its not found.
13977
       */
13978
      public static _Fields findByName(String name) {
13979
        return byName.get(name);
13980
      }
13981
 
13982
      private final short _thriftId;
13983
      private final String _fieldName;
13984
 
13985
      _Fields(short thriftId, String fieldName) {
13986
        _thriftId = thriftId;
13987
        _fieldName = fieldName;
13988
      }
13989
 
13990
      public short getThriftFieldId() {
13991
        return _thriftId;
13992
      }
13993
 
13994
      public String getFieldName() {
13995
        return _fieldName;
13996
      }
13997
    }
13998
 
13999
    // isset id assignments
14000
 
14001
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 14002
      put(_Fields.ORDER, new FieldMetaData("order", TFieldRequirementType.DEFAULT, 
14003
          new StructMetaData(TType.STRUCT, Order.class)));
68 ashish 14004
    }});
14005
 
14006
    static {
483 rajveer 14007
      FieldMetaData.addStructMetaDataMap(createOrder_args.class, metaDataMap);
68 ashish 14008
    }
14009
 
483 rajveer 14010
    public createOrder_args() {
68 ashish 14011
    }
14012
 
483 rajveer 14013
    public createOrder_args(
14014
      Order order)
68 ashish 14015
    {
14016
      this();
483 rajveer 14017
      this.order = order;
68 ashish 14018
    }
14019
 
14020
    /**
14021
     * Performs a deep copy on <i>other</i>.
14022
     */
483 rajveer 14023
    public createOrder_args(createOrder_args other) {
14024
      if (other.isSetOrder()) {
14025
        this.order = new Order(other.order);
14026
      }
68 ashish 14027
    }
14028
 
483 rajveer 14029
    public createOrder_args deepCopy() {
14030
      return new createOrder_args(this);
68 ashish 14031
    }
14032
 
14033
    @Deprecated
483 rajveer 14034
    public createOrder_args clone() {
14035
      return new createOrder_args(this);
68 ashish 14036
    }
14037
 
483 rajveer 14038
    public Order getOrder() {
14039
      return this.order;
68 ashish 14040
    }
14041
 
483 rajveer 14042
    public createOrder_args setOrder(Order order) {
14043
      this.order = order;
68 ashish 14044
      return this;
14045
    }
14046
 
483 rajveer 14047
    public void unsetOrder() {
14048
      this.order = null;
68 ashish 14049
    }
14050
 
483 rajveer 14051
    /** Returns true if field order is set (has been asigned a value) and false otherwise */
14052
    public boolean isSetOrder() {
14053
      return this.order != null;
68 ashish 14054
    }
14055
 
483 rajveer 14056
    public void setOrderIsSet(boolean value) {
14057
      if (!value) {
14058
        this.order = null;
14059
      }
68 ashish 14060
    }
14061
 
14062
    public void setFieldValue(_Fields field, Object value) {
14063
      switch (field) {
483 rajveer 14064
      case ORDER:
68 ashish 14065
        if (value == null) {
483 rajveer 14066
          unsetOrder();
68 ashish 14067
        } else {
483 rajveer 14068
          setOrder((Order)value);
68 ashish 14069
        }
14070
        break;
14071
 
14072
      }
14073
    }
14074
 
14075
    public void setFieldValue(int fieldID, Object value) {
14076
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
14077
    }
14078
 
14079
    public Object getFieldValue(_Fields field) {
14080
      switch (field) {
483 rajveer 14081
      case ORDER:
14082
        return getOrder();
68 ashish 14083
 
14084
      }
14085
      throw new IllegalStateException();
14086
    }
14087
 
14088
    public Object getFieldValue(int fieldId) {
14089
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
14090
    }
14091
 
14092
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
14093
    public boolean isSet(_Fields field) {
14094
      switch (field) {
483 rajveer 14095
      case ORDER:
14096
        return isSetOrder();
68 ashish 14097
      }
14098
      throw new IllegalStateException();
14099
    }
14100
 
14101
    public boolean isSet(int fieldID) {
14102
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
14103
    }
14104
 
14105
    @Override
14106
    public boolean equals(Object that) {
14107
      if (that == null)
14108
        return false;
483 rajveer 14109
      if (that instanceof createOrder_args)
14110
        return this.equals((createOrder_args)that);
68 ashish 14111
      return false;
14112
    }
14113
 
483 rajveer 14114
    public boolean equals(createOrder_args that) {
68 ashish 14115
      if (that == null)
14116
        return false;
14117
 
483 rajveer 14118
      boolean this_present_order = true && this.isSetOrder();
14119
      boolean that_present_order = true && that.isSetOrder();
14120
      if (this_present_order || that_present_order) {
14121
        if (!(this_present_order && that_present_order))
68 ashish 14122
          return false;
483 rajveer 14123
        if (!this.order.equals(that.order))
68 ashish 14124
          return false;
14125
      }
14126
 
14127
      return true;
14128
    }
14129
 
14130
    @Override
14131
    public int hashCode() {
14132
      return 0;
14133
    }
14134
 
483 rajveer 14135
    public int compareTo(createOrder_args other) {
68 ashish 14136
      if (!getClass().equals(other.getClass())) {
14137
        return getClass().getName().compareTo(other.getClass().getName());
14138
      }
14139
 
14140
      int lastComparison = 0;
483 rajveer 14141
      createOrder_args typedOther = (createOrder_args)other;
68 ashish 14142
 
483 rajveer 14143
      lastComparison = Boolean.valueOf(isSetOrder()).compareTo(isSetOrder());
68 ashish 14144
      if (lastComparison != 0) {
14145
        return lastComparison;
14146
      }
483 rajveer 14147
      lastComparison = TBaseHelper.compareTo(order, typedOther.order);
68 ashish 14148
      if (lastComparison != 0) {
14149
        return lastComparison;
14150
      }
14151
      return 0;
14152
    }
14153
 
14154
    public void read(TProtocol iprot) throws TException {
14155
      TField field;
14156
      iprot.readStructBegin();
14157
      while (true)
14158
      {
14159
        field = iprot.readFieldBegin();
14160
        if (field.type == TType.STOP) { 
14161
          break;
14162
        }
14163
        _Fields fieldId = _Fields.findByThriftId(field.id);
14164
        if (fieldId == null) {
14165
          TProtocolUtil.skip(iprot, field.type);
14166
        } else {
14167
          switch (fieldId) {
483 rajveer 14168
            case ORDER:
14169
              if (field.type == TType.STRUCT) {
14170
                this.order = new Order();
14171
                this.order.read(iprot);
68 ashish 14172
              } else { 
14173
                TProtocolUtil.skip(iprot, field.type);
14174
              }
14175
              break;
14176
          }
14177
          iprot.readFieldEnd();
14178
        }
14179
      }
14180
      iprot.readStructEnd();
14181
      validate();
14182
    }
14183
 
14184
    public void write(TProtocol oprot) throws TException {
14185
      validate();
14186
 
14187
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 14188
      if (this.order != null) {
14189
        oprot.writeFieldBegin(ORDER_FIELD_DESC);
14190
        this.order.write(oprot);
14191
        oprot.writeFieldEnd();
14192
      }
68 ashish 14193
      oprot.writeFieldStop();
14194
      oprot.writeStructEnd();
14195
    }
14196
 
14197
    @Override
14198
    public String toString() {
483 rajveer 14199
      StringBuilder sb = new StringBuilder("createOrder_args(");
68 ashish 14200
      boolean first = true;
14201
 
483 rajveer 14202
      sb.append("order:");
14203
      if (this.order == null) {
14204
        sb.append("null");
14205
      } else {
14206
        sb.append(this.order);
14207
      }
68 ashish 14208
      first = false;
14209
      sb.append(")");
14210
      return sb.toString();
14211
    }
14212
 
14213
    public void validate() throws TException {
14214
      // check for required fields
14215
    }
14216
 
14217
  }
14218
 
483 rajveer 14219
  public static class createOrder_result implements TBase<createOrder_result._Fields>, java.io.Serializable, Cloneable, Comparable<createOrder_result>   {
14220
    private static final TStruct STRUCT_DESC = new TStruct("createOrder_result");
68 ashish 14221
 
483 rajveer 14222
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
68 ashish 14223
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
14224
 
483 rajveer 14225
    private long success;
68 ashish 14226
    private TransactionServiceException ex;
14227
 
14228
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14229
    public enum _Fields implements TFieldIdEnum {
14230
      SUCCESS((short)0, "success"),
14231
      EX((short)1, "ex");
14232
 
14233
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
14234
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14235
 
14236
      static {
14237
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14238
          byId.put((int)field._thriftId, field);
14239
          byName.put(field.getFieldName(), field);
14240
        }
14241
      }
14242
 
14243
      /**
14244
       * Find the _Fields constant that matches fieldId, or null if its not found.
14245
       */
14246
      public static _Fields findByThriftId(int fieldId) {
14247
        return byId.get(fieldId);
14248
      }
14249
 
14250
      /**
14251
       * Find the _Fields constant that matches fieldId, throwing an exception
14252
       * if it is not found.
14253
       */
14254
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14255
        _Fields fields = findByThriftId(fieldId);
14256
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14257
        return fields;
14258
      }
14259
 
14260
      /**
14261
       * Find the _Fields constant that matches name, or null if its not found.
14262
       */
14263
      public static _Fields findByName(String name) {
14264
        return byName.get(name);
14265
      }
14266
 
14267
      private final short _thriftId;
14268
      private final String _fieldName;
14269
 
14270
      _Fields(short thriftId, String fieldName) {
14271
        _thriftId = thriftId;
14272
        _fieldName = fieldName;
14273
      }
14274
 
14275
      public short getThriftFieldId() {
14276
        return _thriftId;
14277
      }
14278
 
14279
      public String getFieldName() {
14280
        return _fieldName;
14281
      }
14282
    }
14283
 
14284
    // isset id assignments
14285
    private static final int __SUCCESS_ISSET_ID = 0;
14286
    private BitSet __isset_bit_vector = new BitSet(1);
14287
 
14288
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
14289
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
483 rajveer 14290
          new FieldValueMetaData(TType.I64)));
68 ashish 14291
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
14292
          new FieldValueMetaData(TType.STRUCT)));
14293
    }});
14294
 
14295
    static {
483 rajveer 14296
      FieldMetaData.addStructMetaDataMap(createOrder_result.class, metaDataMap);
68 ashish 14297
    }
14298
 
483 rajveer 14299
    public createOrder_result() {
68 ashish 14300
    }
14301
 
483 rajveer 14302
    public createOrder_result(
14303
      long success,
68 ashish 14304
      TransactionServiceException ex)
14305
    {
14306
      this();
14307
      this.success = success;
14308
      setSuccessIsSet(true);
14309
      this.ex = ex;
14310
    }
14311
 
14312
    /**
14313
     * Performs a deep copy on <i>other</i>.
14314
     */
483 rajveer 14315
    public createOrder_result(createOrder_result other) {
68 ashish 14316
      __isset_bit_vector.clear();
14317
      __isset_bit_vector.or(other.__isset_bit_vector);
14318
      this.success = other.success;
14319
      if (other.isSetEx()) {
14320
        this.ex = new TransactionServiceException(other.ex);
14321
      }
14322
    }
14323
 
483 rajveer 14324
    public createOrder_result deepCopy() {
14325
      return new createOrder_result(this);
68 ashish 14326
    }
14327
 
14328
    @Deprecated
483 rajveer 14329
    public createOrder_result clone() {
14330
      return new createOrder_result(this);
68 ashish 14331
    }
14332
 
483 rajveer 14333
    public long getSuccess() {
68 ashish 14334
      return this.success;
14335
    }
14336
 
483 rajveer 14337
    public createOrder_result setSuccess(long success) {
68 ashish 14338
      this.success = success;
14339
      setSuccessIsSet(true);
14340
      return this;
14341
    }
14342
 
14343
    public void unsetSuccess() {
14344
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
14345
    }
14346
 
14347
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
14348
    public boolean isSetSuccess() {
14349
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
14350
    }
14351
 
14352
    public void setSuccessIsSet(boolean value) {
14353
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
14354
    }
14355
 
14356
    public TransactionServiceException getEx() {
14357
      return this.ex;
14358
    }
14359
 
483 rajveer 14360
    public createOrder_result setEx(TransactionServiceException ex) {
68 ashish 14361
      this.ex = ex;
14362
      return this;
14363
    }
14364
 
14365
    public void unsetEx() {
14366
      this.ex = null;
14367
    }
14368
 
14369
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
14370
    public boolean isSetEx() {
14371
      return this.ex != null;
14372
    }
14373
 
14374
    public void setExIsSet(boolean value) {
14375
      if (!value) {
14376
        this.ex = null;
14377
      }
14378
    }
14379
 
14380
    public void setFieldValue(_Fields field, Object value) {
14381
      switch (field) {
14382
      case SUCCESS:
14383
        if (value == null) {
14384
          unsetSuccess();
14385
        } else {
483 rajveer 14386
          setSuccess((Long)value);
68 ashish 14387
        }
14388
        break;
14389
 
14390
      case EX:
14391
        if (value == null) {
14392
          unsetEx();
14393
        } else {
14394
          setEx((TransactionServiceException)value);
14395
        }
14396
        break;
14397
 
14398
      }
14399
    }
14400
 
14401
    public void setFieldValue(int fieldID, Object value) {
14402
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
14403
    }
14404
 
14405
    public Object getFieldValue(_Fields field) {
14406
      switch (field) {
14407
      case SUCCESS:
483 rajveer 14408
        return new Long(getSuccess());
68 ashish 14409
 
14410
      case EX:
14411
        return getEx();
14412
 
14413
      }
14414
      throw new IllegalStateException();
14415
    }
14416
 
14417
    public Object getFieldValue(int fieldId) {
14418
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
14419
    }
14420
 
14421
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
14422
    public boolean isSet(_Fields field) {
14423
      switch (field) {
14424
      case SUCCESS:
14425
        return isSetSuccess();
14426
      case EX:
14427
        return isSetEx();
14428
      }
14429
      throw new IllegalStateException();
14430
    }
14431
 
14432
    public boolean isSet(int fieldID) {
14433
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
14434
    }
14435
 
14436
    @Override
14437
    public boolean equals(Object that) {
14438
      if (that == null)
14439
        return false;
483 rajveer 14440
      if (that instanceof createOrder_result)
14441
        return this.equals((createOrder_result)that);
68 ashish 14442
      return false;
14443
    }
14444
 
483 rajveer 14445
    public boolean equals(createOrder_result that) {
68 ashish 14446
      if (that == null)
14447
        return false;
14448
 
14449
      boolean this_present_success = true;
14450
      boolean that_present_success = true;
14451
      if (this_present_success || that_present_success) {
14452
        if (!(this_present_success && that_present_success))
14453
          return false;
14454
        if (this.success != that.success)
14455
          return false;
14456
      }
14457
 
14458
      boolean this_present_ex = true && this.isSetEx();
14459
      boolean that_present_ex = true && that.isSetEx();
14460
      if (this_present_ex || that_present_ex) {
14461
        if (!(this_present_ex && that_present_ex))
14462
          return false;
14463
        if (!this.ex.equals(that.ex))
14464
          return false;
14465
      }
14466
 
14467
      return true;
14468
    }
14469
 
14470
    @Override
14471
    public int hashCode() {
14472
      return 0;
14473
    }
14474
 
483 rajveer 14475
    public int compareTo(createOrder_result other) {
68 ashish 14476
      if (!getClass().equals(other.getClass())) {
14477
        return getClass().getName().compareTo(other.getClass().getName());
14478
      }
14479
 
14480
      int lastComparison = 0;
483 rajveer 14481
      createOrder_result typedOther = (createOrder_result)other;
68 ashish 14482
 
14483
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
14484
      if (lastComparison != 0) {
14485
        return lastComparison;
14486
      }
14487
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
14488
      if (lastComparison != 0) {
14489
        return lastComparison;
14490
      }
14491
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
14492
      if (lastComparison != 0) {
14493
        return lastComparison;
14494
      }
14495
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
14496
      if (lastComparison != 0) {
14497
        return lastComparison;
14498
      }
14499
      return 0;
14500
    }
14501
 
14502
    public void read(TProtocol iprot) throws TException {
14503
      TField field;
14504
      iprot.readStructBegin();
14505
      while (true)
14506
      {
14507
        field = iprot.readFieldBegin();
14508
        if (field.type == TType.STOP) { 
14509
          break;
14510
        }
14511
        _Fields fieldId = _Fields.findByThriftId(field.id);
14512
        if (fieldId == null) {
14513
          TProtocolUtil.skip(iprot, field.type);
14514
        } else {
14515
          switch (fieldId) {
14516
            case SUCCESS:
483 rajveer 14517
              if (field.type == TType.I64) {
14518
                this.success = iprot.readI64();
68 ashish 14519
                setSuccessIsSet(true);
14520
              } else { 
14521
                TProtocolUtil.skip(iprot, field.type);
14522
              }
14523
              break;
14524
            case EX:
14525
              if (field.type == TType.STRUCT) {
14526
                this.ex = new TransactionServiceException();
14527
                this.ex.read(iprot);
14528
              } else { 
14529
                TProtocolUtil.skip(iprot, field.type);
14530
              }
14531
              break;
14532
          }
14533
          iprot.readFieldEnd();
14534
        }
14535
      }
14536
      iprot.readStructEnd();
14537
      validate();
14538
    }
14539
 
14540
    public void write(TProtocol oprot) throws TException {
14541
      oprot.writeStructBegin(STRUCT_DESC);
14542
 
14543
      if (this.isSetSuccess()) {
14544
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
483 rajveer 14545
        oprot.writeI64(this.success);
68 ashish 14546
        oprot.writeFieldEnd();
14547
      } else if (this.isSetEx()) {
14548
        oprot.writeFieldBegin(EX_FIELD_DESC);
14549
        this.ex.write(oprot);
14550
        oprot.writeFieldEnd();
14551
      }
14552
      oprot.writeFieldStop();
14553
      oprot.writeStructEnd();
14554
    }
14555
 
14556
    @Override
14557
    public String toString() {
483 rajveer 14558
      StringBuilder sb = new StringBuilder("createOrder_result(");
68 ashish 14559
      boolean first = true;
14560
 
14561
      sb.append("success:");
14562
      sb.append(this.success);
14563
      first = false;
14564
      if (!first) sb.append(", ");
14565
      sb.append("ex:");
14566
      if (this.ex == null) {
14567
        sb.append("null");
14568
      } else {
14569
        sb.append(this.ex);
14570
      }
14571
      first = false;
14572
      sb.append(")");
14573
      return sb.toString();
14574
    }
14575
 
14576
    public void validate() throws TException {
14577
      // check for required fields
14578
    }
14579
 
14580
  }
14581
 
483 rajveer 14582
  public static class getOrder_args implements TBase<getOrder_args._Fields>, java.io.Serializable, Cloneable, Comparable<getOrder_args>   {
14583
    private static final TStruct STRUCT_DESC = new TStruct("getOrder_args");
68 ashish 14584
 
483 rajveer 14585
    private static final TField ID_FIELD_DESC = new TField("id", TType.I64, (short)1);
68 ashish 14586
 
483 rajveer 14587
    private long id;
68 ashish 14588
 
14589
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14590
    public enum _Fields implements TFieldIdEnum {
483 rajveer 14591
      ID((short)1, "id");
68 ashish 14592
 
14593
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
14594
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14595
 
14596
      static {
14597
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14598
          byId.put((int)field._thriftId, field);
14599
          byName.put(field.getFieldName(), field);
14600
        }
14601
      }
14602
 
14603
      /**
14604
       * Find the _Fields constant that matches fieldId, or null if its not found.
14605
       */
14606
      public static _Fields findByThriftId(int fieldId) {
14607
        return byId.get(fieldId);
14608
      }
14609
 
14610
      /**
14611
       * Find the _Fields constant that matches fieldId, throwing an exception
14612
       * if it is not found.
14613
       */
14614
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14615
        _Fields fields = findByThriftId(fieldId);
14616
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14617
        return fields;
14618
      }
14619
 
14620
      /**
14621
       * Find the _Fields constant that matches name, or null if its not found.
14622
       */
14623
      public static _Fields findByName(String name) {
14624
        return byName.get(name);
14625
      }
14626
 
14627
      private final short _thriftId;
14628
      private final String _fieldName;
14629
 
14630
      _Fields(short thriftId, String fieldName) {
14631
        _thriftId = thriftId;
14632
        _fieldName = fieldName;
14633
      }
14634
 
14635
      public short getThriftFieldId() {
14636
        return _thriftId;
14637
      }
14638
 
14639
      public String getFieldName() {
14640
        return _fieldName;
14641
      }
14642
    }
14643
 
14644
    // isset id assignments
483 rajveer 14645
    private static final int __ID_ISSET_ID = 0;
14646
    private BitSet __isset_bit_vector = new BitSet(1);
68 ashish 14647
 
14648
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 14649
      put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, 
68 ashish 14650
          new FieldValueMetaData(TType.I64)));
14651
    }});
14652
 
14653
    static {
483 rajveer 14654
      FieldMetaData.addStructMetaDataMap(getOrder_args.class, metaDataMap);
68 ashish 14655
    }
14656
 
483 rajveer 14657
    public getOrder_args() {
68 ashish 14658
    }
14659
 
483 rajveer 14660
    public getOrder_args(
14661
      long id)
68 ashish 14662
    {
14663
      this();
483 rajveer 14664
      this.id = id;
14665
      setIdIsSet(true);
68 ashish 14666
    }
14667
 
14668
    /**
14669
     * Performs a deep copy on <i>other</i>.
14670
     */
483 rajveer 14671
    public getOrder_args(getOrder_args other) {
68 ashish 14672
      __isset_bit_vector.clear();
14673
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 14674
      this.id = other.id;
68 ashish 14675
    }
14676
 
483 rajveer 14677
    public getOrder_args deepCopy() {
14678
      return new getOrder_args(this);
68 ashish 14679
    }
14680
 
14681
    @Deprecated
483 rajveer 14682
    public getOrder_args clone() {
14683
      return new getOrder_args(this);
68 ashish 14684
    }
14685
 
483 rajveer 14686
    public long getId() {
14687
      return this.id;
68 ashish 14688
    }
14689
 
483 rajveer 14690
    public getOrder_args setId(long id) {
14691
      this.id = id;
14692
      setIdIsSet(true);
68 ashish 14693
      return this;
14694
    }
14695
 
483 rajveer 14696
    public void unsetId() {
14697
      __isset_bit_vector.clear(__ID_ISSET_ID);
68 ashish 14698
    }
14699
 
483 rajveer 14700
    /** Returns true if field id is set (has been asigned a value) and false otherwise */
14701
    public boolean isSetId() {
14702
      return __isset_bit_vector.get(__ID_ISSET_ID);
68 ashish 14703
    }
14704
 
483 rajveer 14705
    public void setIdIsSet(boolean value) {
14706
      __isset_bit_vector.set(__ID_ISSET_ID, value);
68 ashish 14707
    }
14708
 
14709
    public void setFieldValue(_Fields field, Object value) {
14710
      switch (field) {
483 rajveer 14711
      case ID:
68 ashish 14712
        if (value == null) {
483 rajveer 14713
          unsetId();
68 ashish 14714
        } else {
483 rajveer 14715
          setId((Long)value);
68 ashish 14716
        }
14717
        break;
14718
 
14719
      }
14720
    }
14721
 
14722
    public void setFieldValue(int fieldID, Object value) {
14723
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
14724
    }
14725
 
14726
    public Object getFieldValue(_Fields field) {
14727
      switch (field) {
483 rajveer 14728
      case ID:
14729
        return new Long(getId());
68 ashish 14730
 
14731
      }
14732
      throw new IllegalStateException();
14733
    }
14734
 
14735
    public Object getFieldValue(int fieldId) {
14736
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
14737
    }
14738
 
14739
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
14740
    public boolean isSet(_Fields field) {
14741
      switch (field) {
483 rajveer 14742
      case ID:
14743
        return isSetId();
68 ashish 14744
      }
14745
      throw new IllegalStateException();
14746
    }
14747
 
14748
    public boolean isSet(int fieldID) {
14749
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
14750
    }
14751
 
14752
    @Override
14753
    public boolean equals(Object that) {
14754
      if (that == null)
14755
        return false;
483 rajveer 14756
      if (that instanceof getOrder_args)
14757
        return this.equals((getOrder_args)that);
68 ashish 14758
      return false;
14759
    }
14760
 
483 rajveer 14761
    public boolean equals(getOrder_args that) {
68 ashish 14762
      if (that == null)
14763
        return false;
14764
 
483 rajveer 14765
      boolean this_present_id = true;
14766
      boolean that_present_id = true;
14767
      if (this_present_id || that_present_id) {
14768
        if (!(this_present_id && that_present_id))
68 ashish 14769
          return false;
483 rajveer 14770
        if (this.id != that.id)
68 ashish 14771
          return false;
14772
      }
14773
 
14774
      return true;
14775
    }
14776
 
14777
    @Override
14778
    public int hashCode() {
14779
      return 0;
14780
    }
14781
 
483 rajveer 14782
    public int compareTo(getOrder_args other) {
68 ashish 14783
      if (!getClass().equals(other.getClass())) {
14784
        return getClass().getName().compareTo(other.getClass().getName());
14785
      }
14786
 
14787
      int lastComparison = 0;
483 rajveer 14788
      getOrder_args typedOther = (getOrder_args)other;
68 ashish 14789
 
483 rajveer 14790
      lastComparison = Boolean.valueOf(isSetId()).compareTo(isSetId());
68 ashish 14791
      if (lastComparison != 0) {
14792
        return lastComparison;
14793
      }
483 rajveer 14794
      lastComparison = TBaseHelper.compareTo(id, typedOther.id);
68 ashish 14795
      if (lastComparison != 0) {
14796
        return lastComparison;
14797
      }
14798
      return 0;
14799
    }
14800
 
14801
    public void read(TProtocol iprot) throws TException {
14802
      TField field;
14803
      iprot.readStructBegin();
14804
      while (true)
14805
      {
14806
        field = iprot.readFieldBegin();
14807
        if (field.type == TType.STOP) { 
14808
          break;
14809
        }
14810
        _Fields fieldId = _Fields.findByThriftId(field.id);
14811
        if (fieldId == null) {
14812
          TProtocolUtil.skip(iprot, field.type);
14813
        } else {
14814
          switch (fieldId) {
483 rajveer 14815
            case ID:
68 ashish 14816
              if (field.type == TType.I64) {
483 rajveer 14817
                this.id = iprot.readI64();
14818
                setIdIsSet(true);
68 ashish 14819
              } else { 
14820
                TProtocolUtil.skip(iprot, field.type);
14821
              }
14822
              break;
14823
          }
14824
          iprot.readFieldEnd();
14825
        }
14826
      }
14827
      iprot.readStructEnd();
14828
      validate();
14829
    }
14830
 
14831
    public void write(TProtocol oprot) throws TException {
14832
      validate();
14833
 
14834
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 14835
      oprot.writeFieldBegin(ID_FIELD_DESC);
14836
      oprot.writeI64(this.id);
68 ashish 14837
      oprot.writeFieldEnd();
14838
      oprot.writeFieldStop();
14839
      oprot.writeStructEnd();
14840
    }
14841
 
14842
    @Override
14843
    public String toString() {
483 rajveer 14844
      StringBuilder sb = new StringBuilder("getOrder_args(");
68 ashish 14845
      boolean first = true;
14846
 
483 rajveer 14847
      sb.append("id:");
14848
      sb.append(this.id);
68 ashish 14849
      first = false;
14850
      sb.append(")");
14851
      return sb.toString();
14852
    }
14853
 
14854
    public void validate() throws TException {
14855
      // check for required fields
14856
    }
14857
 
14858
  }
14859
 
483 rajveer 14860
  public static class getOrder_result implements TBase<getOrder_result._Fields>, java.io.Serializable, Cloneable, Comparable<getOrder_result>   {
14861
    private static final TStruct STRUCT_DESC = new TStruct("getOrder_result");
68 ashish 14862
 
483 rajveer 14863
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
68 ashish 14864
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
14865
 
483 rajveer 14866
    private Order success;
68 ashish 14867
    private TransactionServiceException ex;
14868
 
14869
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14870
    public enum _Fields implements TFieldIdEnum {
14871
      SUCCESS((short)0, "success"),
14872
      EX((short)1, "ex");
14873
 
14874
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
14875
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14876
 
14877
      static {
14878
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14879
          byId.put((int)field._thriftId, field);
14880
          byName.put(field.getFieldName(), field);
14881
        }
14882
      }
14883
 
14884
      /**
14885
       * Find the _Fields constant that matches fieldId, or null if its not found.
14886
       */
14887
      public static _Fields findByThriftId(int fieldId) {
14888
        return byId.get(fieldId);
14889
      }
14890
 
14891
      /**
14892
       * Find the _Fields constant that matches fieldId, throwing an exception
14893
       * if it is not found.
14894
       */
14895
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14896
        _Fields fields = findByThriftId(fieldId);
14897
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14898
        return fields;
14899
      }
14900
 
14901
      /**
14902
       * Find the _Fields constant that matches name, or null if its not found.
14903
       */
14904
      public static _Fields findByName(String name) {
14905
        return byName.get(name);
14906
      }
14907
 
14908
      private final short _thriftId;
14909
      private final String _fieldName;
14910
 
14911
      _Fields(short thriftId, String fieldName) {
14912
        _thriftId = thriftId;
14913
        _fieldName = fieldName;
14914
      }
14915
 
14916
      public short getThriftFieldId() {
14917
        return _thriftId;
14918
      }
14919
 
14920
      public String getFieldName() {
14921
        return _fieldName;
14922
      }
14923
    }
14924
 
14925
    // isset id assignments
14926
 
14927
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
14928
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
483 rajveer 14929
          new StructMetaData(TType.STRUCT, Order.class)));
68 ashish 14930
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
14931
          new FieldValueMetaData(TType.STRUCT)));
14932
    }});
14933
 
14934
    static {
483 rajveer 14935
      FieldMetaData.addStructMetaDataMap(getOrder_result.class, metaDataMap);
68 ashish 14936
    }
14937
 
483 rajveer 14938
    public getOrder_result() {
68 ashish 14939
    }
14940
 
483 rajveer 14941
    public getOrder_result(
14942
      Order success,
68 ashish 14943
      TransactionServiceException ex)
14944
    {
14945
      this();
14946
      this.success = success;
14947
      this.ex = ex;
14948
    }
14949
 
14950
    /**
14951
     * Performs a deep copy on <i>other</i>.
14952
     */
483 rajveer 14953
    public getOrder_result(getOrder_result other) {
14954
      if (other.isSetSuccess()) {
14955
        this.success = new Order(other.success);
14956
      }
68 ashish 14957
      if (other.isSetEx()) {
14958
        this.ex = new TransactionServiceException(other.ex);
14959
      }
14960
    }
14961
 
483 rajveer 14962
    public getOrder_result deepCopy() {
14963
      return new getOrder_result(this);
68 ashish 14964
    }
14965
 
14966
    @Deprecated
483 rajveer 14967
    public getOrder_result clone() {
14968
      return new getOrder_result(this);
68 ashish 14969
    }
14970
 
483 rajveer 14971
    public Order getSuccess() {
68 ashish 14972
      return this.success;
14973
    }
14974
 
483 rajveer 14975
    public getOrder_result setSuccess(Order success) {
68 ashish 14976
      this.success = success;
14977
      return this;
14978
    }
14979
 
14980
    public void unsetSuccess() {
483 rajveer 14981
      this.success = null;
68 ashish 14982
    }
14983
 
14984
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
14985
    public boolean isSetSuccess() {
483 rajveer 14986
      return this.success != null;
68 ashish 14987
    }
14988
 
14989
    public void setSuccessIsSet(boolean value) {
483 rajveer 14990
      if (!value) {
14991
        this.success = null;
14992
      }
68 ashish 14993
    }
14994
 
14995
    public TransactionServiceException getEx() {
14996
      return this.ex;
14997
    }
14998
 
483 rajveer 14999
    public getOrder_result setEx(TransactionServiceException ex) {
68 ashish 15000
      this.ex = ex;
15001
      return this;
15002
    }
15003
 
15004
    public void unsetEx() {
15005
      this.ex = null;
15006
    }
15007
 
15008
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
15009
    public boolean isSetEx() {
15010
      return this.ex != null;
15011
    }
15012
 
15013
    public void setExIsSet(boolean value) {
15014
      if (!value) {
15015
        this.ex = null;
15016
      }
15017
    }
15018
 
15019
    public void setFieldValue(_Fields field, Object value) {
15020
      switch (field) {
15021
      case SUCCESS:
15022
        if (value == null) {
15023
          unsetSuccess();
15024
        } else {
483 rajveer 15025
          setSuccess((Order)value);
68 ashish 15026
        }
15027
        break;
15028
 
15029
      case EX:
15030
        if (value == null) {
15031
          unsetEx();
15032
        } else {
15033
          setEx((TransactionServiceException)value);
15034
        }
15035
        break;
15036
 
15037
      }
15038
    }
15039
 
15040
    public void setFieldValue(int fieldID, Object value) {
15041
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
15042
    }
15043
 
15044
    public Object getFieldValue(_Fields field) {
15045
      switch (field) {
15046
      case SUCCESS:
483 rajveer 15047
        return getSuccess();
68 ashish 15048
 
15049
      case EX:
15050
        return getEx();
15051
 
15052
      }
15053
      throw new IllegalStateException();
15054
    }
15055
 
15056
    public Object getFieldValue(int fieldId) {
15057
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
15058
    }
15059
 
15060
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
15061
    public boolean isSet(_Fields field) {
15062
      switch (field) {
15063
      case SUCCESS:
15064
        return isSetSuccess();
15065
      case EX:
15066
        return isSetEx();
15067
      }
15068
      throw new IllegalStateException();
15069
    }
15070
 
15071
    public boolean isSet(int fieldID) {
15072
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
15073
    }
15074
 
15075
    @Override
15076
    public boolean equals(Object that) {
15077
      if (that == null)
15078
        return false;
483 rajveer 15079
      if (that instanceof getOrder_result)
15080
        return this.equals((getOrder_result)that);
68 ashish 15081
      return false;
15082
    }
15083
 
483 rajveer 15084
    public boolean equals(getOrder_result that) {
68 ashish 15085
      if (that == null)
15086
        return false;
15087
 
483 rajveer 15088
      boolean this_present_success = true && this.isSetSuccess();
15089
      boolean that_present_success = true && that.isSetSuccess();
68 ashish 15090
      if (this_present_success || that_present_success) {
15091
        if (!(this_present_success && that_present_success))
15092
          return false;
483 rajveer 15093
        if (!this.success.equals(that.success))
68 ashish 15094
          return false;
15095
      }
15096
 
15097
      boolean this_present_ex = true && this.isSetEx();
15098
      boolean that_present_ex = true && that.isSetEx();
15099
      if (this_present_ex || that_present_ex) {
15100
        if (!(this_present_ex && that_present_ex))
15101
          return false;
15102
        if (!this.ex.equals(that.ex))
15103
          return false;
15104
      }
15105
 
15106
      return true;
15107
    }
15108
 
15109
    @Override
15110
    public int hashCode() {
15111
      return 0;
15112
    }
15113
 
483 rajveer 15114
    public int compareTo(getOrder_result other) {
68 ashish 15115
      if (!getClass().equals(other.getClass())) {
15116
        return getClass().getName().compareTo(other.getClass().getName());
15117
      }
15118
 
15119
      int lastComparison = 0;
483 rajveer 15120
      getOrder_result typedOther = (getOrder_result)other;
68 ashish 15121
 
15122
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
15123
      if (lastComparison != 0) {
15124
        return lastComparison;
15125
      }
15126
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
15127
      if (lastComparison != 0) {
15128
        return lastComparison;
15129
      }
15130
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
15131
      if (lastComparison != 0) {
15132
        return lastComparison;
15133
      }
15134
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
15135
      if (lastComparison != 0) {
15136
        return lastComparison;
15137
      }
15138
      return 0;
15139
    }
15140
 
15141
    public void read(TProtocol iprot) throws TException {
15142
      TField field;
15143
      iprot.readStructBegin();
15144
      while (true)
15145
      {
15146
        field = iprot.readFieldBegin();
15147
        if (field.type == TType.STOP) { 
15148
          break;
15149
        }
15150
        _Fields fieldId = _Fields.findByThriftId(field.id);
15151
        if (fieldId == null) {
15152
          TProtocolUtil.skip(iprot, field.type);
15153
        } else {
15154
          switch (fieldId) {
15155
            case SUCCESS:
483 rajveer 15156
              if (field.type == TType.STRUCT) {
15157
                this.success = new Order();
15158
                this.success.read(iprot);
68 ashish 15159
              } else { 
15160
                TProtocolUtil.skip(iprot, field.type);
15161
              }
15162
              break;
15163
            case EX:
15164
              if (field.type == TType.STRUCT) {
15165
                this.ex = new TransactionServiceException();
15166
                this.ex.read(iprot);
15167
              } else { 
15168
                TProtocolUtil.skip(iprot, field.type);
15169
              }
15170
              break;
15171
          }
15172
          iprot.readFieldEnd();
15173
        }
15174
      }
15175
      iprot.readStructEnd();
15176
      validate();
15177
    }
15178
 
15179
    public void write(TProtocol oprot) throws TException {
15180
      oprot.writeStructBegin(STRUCT_DESC);
15181
 
15182
      if (this.isSetSuccess()) {
15183
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
483 rajveer 15184
        this.success.write(oprot);
68 ashish 15185
        oprot.writeFieldEnd();
15186
      } else if (this.isSetEx()) {
15187
        oprot.writeFieldBegin(EX_FIELD_DESC);
15188
        this.ex.write(oprot);
15189
        oprot.writeFieldEnd();
15190
      }
15191
      oprot.writeFieldStop();
15192
      oprot.writeStructEnd();
15193
    }
15194
 
15195
    @Override
15196
    public String toString() {
483 rajveer 15197
      StringBuilder sb = new StringBuilder("getOrder_result(");
68 ashish 15198
      boolean first = true;
15199
 
15200
      sb.append("success:");
483 rajveer 15201
      if (this.success == null) {
15202
        sb.append("null");
15203
      } else {
15204
        sb.append(this.success);
15205
      }
68 ashish 15206
      first = false;
15207
      if (!first) sb.append(", ");
15208
      sb.append("ex:");
15209
      if (this.ex == null) {
15210
        sb.append("null");
15211
      } else {
15212
        sb.append(this.ex);
15213
      }
15214
      first = false;
15215
      sb.append(")");
15216
      return sb.toString();
15217
    }
15218
 
15219
    public void validate() throws TException {
15220
      // check for required fields
15221
    }
15222
 
15223
  }
15224
 
483 rajveer 15225
  public static class getLineItemsForOrder_args implements TBase<getLineItemsForOrder_args._Fields>, java.io.Serializable, Cloneable, Comparable<getLineItemsForOrder_args>   {
15226
    private static final TStruct STRUCT_DESC = new TStruct("getLineItemsForOrder_args");
68 ashish 15227
 
483 rajveer 15228
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
68 ashish 15229
 
483 rajveer 15230
    private long orderId;
68 ashish 15231
 
15232
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15233
    public enum _Fields implements TFieldIdEnum {
483 rajveer 15234
      ORDER_ID((short)1, "orderId");
68 ashish 15235
 
15236
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
15237
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15238
 
15239
      static {
15240
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15241
          byId.put((int)field._thriftId, field);
15242
          byName.put(field.getFieldName(), field);
15243
        }
15244
      }
15245
 
15246
      /**
15247
       * Find the _Fields constant that matches fieldId, or null if its not found.
15248
       */
15249
      public static _Fields findByThriftId(int fieldId) {
15250
        return byId.get(fieldId);
15251
      }
15252
 
15253
      /**
15254
       * Find the _Fields constant that matches fieldId, throwing an exception
15255
       * if it is not found.
15256
       */
15257
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15258
        _Fields fields = findByThriftId(fieldId);
15259
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15260
        return fields;
15261
      }
15262
 
15263
      /**
15264
       * Find the _Fields constant that matches name, or null if its not found.
15265
       */
15266
      public static _Fields findByName(String name) {
15267
        return byName.get(name);
15268
      }
15269
 
15270
      private final short _thriftId;
15271
      private final String _fieldName;
15272
 
15273
      _Fields(short thriftId, String fieldName) {
15274
        _thriftId = thriftId;
15275
        _fieldName = fieldName;
15276
      }
15277
 
15278
      public short getThriftFieldId() {
15279
        return _thriftId;
15280
      }
15281
 
15282
      public String getFieldName() {
15283
        return _fieldName;
15284
      }
15285
    }
15286
 
15287
    // isset id assignments
483 rajveer 15288
    private static final int __ORDERID_ISSET_ID = 0;
68 ashish 15289
    private BitSet __isset_bit_vector = new BitSet(1);
15290
 
15291
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 15292
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
68 ashish 15293
          new FieldValueMetaData(TType.I64)));
15294
    }});
15295
 
15296
    static {
483 rajveer 15297
      FieldMetaData.addStructMetaDataMap(getLineItemsForOrder_args.class, metaDataMap);
68 ashish 15298
    }
15299
 
483 rajveer 15300
    public getLineItemsForOrder_args() {
68 ashish 15301
    }
15302
 
483 rajveer 15303
    public getLineItemsForOrder_args(
15304
      long orderId)
68 ashish 15305
    {
15306
      this();
483 rajveer 15307
      this.orderId = orderId;
15308
      setOrderIdIsSet(true);
68 ashish 15309
    }
15310
 
15311
    /**
15312
     * Performs a deep copy on <i>other</i>.
15313
     */
483 rajveer 15314
    public getLineItemsForOrder_args(getLineItemsForOrder_args other) {
68 ashish 15315
      __isset_bit_vector.clear();
15316
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 15317
      this.orderId = other.orderId;
68 ashish 15318
    }
15319
 
483 rajveer 15320
    public getLineItemsForOrder_args deepCopy() {
15321
      return new getLineItemsForOrder_args(this);
68 ashish 15322
    }
15323
 
15324
    @Deprecated
483 rajveer 15325
    public getLineItemsForOrder_args clone() {
15326
      return new getLineItemsForOrder_args(this);
68 ashish 15327
    }
15328
 
483 rajveer 15329
    public long getOrderId() {
15330
      return this.orderId;
68 ashish 15331
    }
15332
 
483 rajveer 15333
    public getLineItemsForOrder_args setOrderId(long orderId) {
15334
      this.orderId = orderId;
15335
      setOrderIdIsSet(true);
68 ashish 15336
      return this;
15337
    }
15338
 
483 rajveer 15339
    public void unsetOrderId() {
15340
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
68 ashish 15341
    }
15342
 
483 rajveer 15343
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
15344
    public boolean isSetOrderId() {
15345
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
68 ashish 15346
    }
15347
 
483 rajveer 15348
    public void setOrderIdIsSet(boolean value) {
15349
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
68 ashish 15350
    }
15351
 
15352
    public void setFieldValue(_Fields field, Object value) {
15353
      switch (field) {
483 rajveer 15354
      case ORDER_ID:
68 ashish 15355
        if (value == null) {
483 rajveer 15356
          unsetOrderId();
68 ashish 15357
        } else {
483 rajveer 15358
          setOrderId((Long)value);
68 ashish 15359
        }
15360
        break;
15361
 
15362
      }
15363
    }
15364
 
15365
    public void setFieldValue(int fieldID, Object value) {
15366
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
15367
    }
15368
 
15369
    public Object getFieldValue(_Fields field) {
15370
      switch (field) {
483 rajveer 15371
      case ORDER_ID:
15372
        return new Long(getOrderId());
68 ashish 15373
 
15374
      }
15375
      throw new IllegalStateException();
15376
    }
15377
 
15378
    public Object getFieldValue(int fieldId) {
15379
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
15380
    }
15381
 
15382
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
15383
    public boolean isSet(_Fields field) {
15384
      switch (field) {
483 rajveer 15385
      case ORDER_ID:
15386
        return isSetOrderId();
68 ashish 15387
      }
15388
      throw new IllegalStateException();
15389
    }
15390
 
15391
    public boolean isSet(int fieldID) {
15392
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
15393
    }
15394
 
15395
    @Override
15396
    public boolean equals(Object that) {
15397
      if (that == null)
15398
        return false;
483 rajveer 15399
      if (that instanceof getLineItemsForOrder_args)
15400
        return this.equals((getLineItemsForOrder_args)that);
68 ashish 15401
      return false;
15402
    }
15403
 
483 rajveer 15404
    public boolean equals(getLineItemsForOrder_args that) {
68 ashish 15405
      if (that == null)
15406
        return false;
15407
 
483 rajveer 15408
      boolean this_present_orderId = true;
15409
      boolean that_present_orderId = true;
15410
      if (this_present_orderId || that_present_orderId) {
15411
        if (!(this_present_orderId && that_present_orderId))
68 ashish 15412
          return false;
483 rajveer 15413
        if (this.orderId != that.orderId)
68 ashish 15414
          return false;
15415
      }
15416
 
15417
      return true;
15418
    }
15419
 
15420
    @Override
15421
    public int hashCode() {
15422
      return 0;
15423
    }
15424
 
483 rajveer 15425
    public int compareTo(getLineItemsForOrder_args other) {
68 ashish 15426
      if (!getClass().equals(other.getClass())) {
15427
        return getClass().getName().compareTo(other.getClass().getName());
15428
      }
15429
 
15430
      int lastComparison = 0;
483 rajveer 15431
      getLineItemsForOrder_args typedOther = (getLineItemsForOrder_args)other;
68 ashish 15432
 
483 rajveer 15433
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
68 ashish 15434
      if (lastComparison != 0) {
15435
        return lastComparison;
15436
      }
483 rajveer 15437
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
68 ashish 15438
      if (lastComparison != 0) {
15439
        return lastComparison;
15440
      }
15441
      return 0;
15442
    }
15443
 
15444
    public void read(TProtocol iprot) throws TException {
15445
      TField field;
15446
      iprot.readStructBegin();
15447
      while (true)
15448
      {
15449
        field = iprot.readFieldBegin();
15450
        if (field.type == TType.STOP) { 
15451
          break;
15452
        }
15453
        _Fields fieldId = _Fields.findByThriftId(field.id);
15454
        if (fieldId == null) {
15455
          TProtocolUtil.skip(iprot, field.type);
15456
        } else {
15457
          switch (fieldId) {
483 rajveer 15458
            case ORDER_ID:
68 ashish 15459
              if (field.type == TType.I64) {
483 rajveer 15460
                this.orderId = iprot.readI64();
15461
                setOrderIdIsSet(true);
68 ashish 15462
              } else { 
15463
                TProtocolUtil.skip(iprot, field.type);
15464
              }
15465
              break;
15466
          }
15467
          iprot.readFieldEnd();
15468
        }
15469
      }
15470
      iprot.readStructEnd();
15471
      validate();
15472
    }
15473
 
15474
    public void write(TProtocol oprot) throws TException {
15475
      validate();
15476
 
15477
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 15478
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
15479
      oprot.writeI64(this.orderId);
68 ashish 15480
      oprot.writeFieldEnd();
15481
      oprot.writeFieldStop();
15482
      oprot.writeStructEnd();
15483
    }
15484
 
15485
    @Override
15486
    public String toString() {
483 rajveer 15487
      StringBuilder sb = new StringBuilder("getLineItemsForOrder_args(");
68 ashish 15488
      boolean first = true;
15489
 
483 rajveer 15490
      sb.append("orderId:");
15491
      sb.append(this.orderId);
68 ashish 15492
      first = false;
15493
      sb.append(")");
15494
      return sb.toString();
15495
    }
15496
 
15497
    public void validate() throws TException {
15498
      // check for required fields
15499
    }
15500
 
15501
  }
15502
 
483 rajveer 15503
  public static class getLineItemsForOrder_result implements TBase<getLineItemsForOrder_result._Fields>, java.io.Serializable, Cloneable, Comparable<getLineItemsForOrder_result>   {
15504
    private static final TStruct STRUCT_DESC = new TStruct("getLineItemsForOrder_result");
68 ashish 15505
 
483 rajveer 15506
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
68 ashish 15507
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
15508
 
483 rajveer 15509
    private List<LineItem> success;
68 ashish 15510
    private TransactionServiceException ex;
15511
 
15512
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15513
    public enum _Fields implements TFieldIdEnum {
15514
      SUCCESS((short)0, "success"),
15515
      EX((short)1, "ex");
15516
 
15517
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
15518
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15519
 
15520
      static {
15521
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15522
          byId.put((int)field._thriftId, field);
15523
          byName.put(field.getFieldName(), field);
15524
        }
15525
      }
15526
 
15527
      /**
15528
       * Find the _Fields constant that matches fieldId, or null if its not found.
15529
       */
15530
      public static _Fields findByThriftId(int fieldId) {
15531
        return byId.get(fieldId);
15532
      }
15533
 
15534
      /**
15535
       * Find the _Fields constant that matches fieldId, throwing an exception
15536
       * if it is not found.
15537
       */
15538
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15539
        _Fields fields = findByThriftId(fieldId);
15540
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15541
        return fields;
15542
      }
15543
 
15544
      /**
15545
       * Find the _Fields constant that matches name, or null if its not found.
15546
       */
15547
      public static _Fields findByName(String name) {
15548
        return byName.get(name);
15549
      }
15550
 
15551
      private final short _thriftId;
15552
      private final String _fieldName;
15553
 
15554
      _Fields(short thriftId, String fieldName) {
15555
        _thriftId = thriftId;
15556
        _fieldName = fieldName;
15557
      }
15558
 
15559
      public short getThriftFieldId() {
15560
        return _thriftId;
15561
      }
15562
 
15563
      public String getFieldName() {
15564
        return _fieldName;
15565
      }
15566
    }
15567
 
15568
    // isset id assignments
15569
 
15570
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
15571
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
483 rajveer 15572
          new ListMetaData(TType.LIST, 
15573
              new StructMetaData(TType.STRUCT, LineItem.class))));
68 ashish 15574
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
15575
          new FieldValueMetaData(TType.STRUCT)));
15576
    }});
15577
 
15578
    static {
483 rajveer 15579
      FieldMetaData.addStructMetaDataMap(getLineItemsForOrder_result.class, metaDataMap);
68 ashish 15580
    }
15581
 
483 rajveer 15582
    public getLineItemsForOrder_result() {
68 ashish 15583
    }
15584
 
483 rajveer 15585
    public getLineItemsForOrder_result(
15586
      List<LineItem> success,
68 ashish 15587
      TransactionServiceException ex)
15588
    {
15589
      this();
15590
      this.success = success;
15591
      this.ex = ex;
15592
    }
15593
 
15594
    /**
15595
     * Performs a deep copy on <i>other</i>.
15596
     */
483 rajveer 15597
    public getLineItemsForOrder_result(getLineItemsForOrder_result other) {
15598
      if (other.isSetSuccess()) {
15599
        List<LineItem> __this__success = new ArrayList<LineItem>();
15600
        for (LineItem other_element : other.success) {
15601
          __this__success.add(new LineItem(other_element));
15602
        }
15603
        this.success = __this__success;
15604
      }
68 ashish 15605
      if (other.isSetEx()) {
15606
        this.ex = new TransactionServiceException(other.ex);
15607
      }
15608
    }
15609
 
483 rajveer 15610
    public getLineItemsForOrder_result deepCopy() {
15611
      return new getLineItemsForOrder_result(this);
68 ashish 15612
    }
15613
 
15614
    @Deprecated
483 rajveer 15615
    public getLineItemsForOrder_result clone() {
15616
      return new getLineItemsForOrder_result(this);
68 ashish 15617
    }
15618
 
483 rajveer 15619
    public int getSuccessSize() {
15620
      return (this.success == null) ? 0 : this.success.size();
15621
    }
15622
 
15623
    public java.util.Iterator<LineItem> getSuccessIterator() {
15624
      return (this.success == null) ? null : this.success.iterator();
15625
    }
15626
 
15627
    public void addToSuccess(LineItem elem) {
15628
      if (this.success == null) {
15629
        this.success = new ArrayList<LineItem>();
15630
      }
15631
      this.success.add(elem);
15632
    }
15633
 
15634
    public List<LineItem> getSuccess() {
68 ashish 15635
      return this.success;
15636
    }
15637
 
483 rajveer 15638
    public getLineItemsForOrder_result setSuccess(List<LineItem> success) {
68 ashish 15639
      this.success = success;
15640
      return this;
15641
    }
15642
 
15643
    public void unsetSuccess() {
483 rajveer 15644
      this.success = null;
68 ashish 15645
    }
15646
 
15647
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
15648
    public boolean isSetSuccess() {
483 rajveer 15649
      return this.success != null;
68 ashish 15650
    }
15651
 
15652
    public void setSuccessIsSet(boolean value) {
483 rajveer 15653
      if (!value) {
15654
        this.success = null;
15655
      }
68 ashish 15656
    }
15657
 
15658
    public TransactionServiceException getEx() {
15659
      return this.ex;
15660
    }
15661
 
483 rajveer 15662
    public getLineItemsForOrder_result setEx(TransactionServiceException ex) {
68 ashish 15663
      this.ex = ex;
15664
      return this;
15665
    }
15666
 
15667
    public void unsetEx() {
15668
      this.ex = null;
15669
    }
15670
 
15671
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
15672
    public boolean isSetEx() {
15673
      return this.ex != null;
15674
    }
15675
 
15676
    public void setExIsSet(boolean value) {
15677
      if (!value) {
15678
        this.ex = null;
15679
      }
15680
    }
15681
 
15682
    public void setFieldValue(_Fields field, Object value) {
15683
      switch (field) {
15684
      case SUCCESS:
15685
        if (value == null) {
15686
          unsetSuccess();
15687
        } else {
483 rajveer 15688
          setSuccess((List<LineItem>)value);
68 ashish 15689
        }
15690
        break;
15691
 
15692
      case EX:
15693
        if (value == null) {
15694
          unsetEx();
15695
        } else {
15696
          setEx((TransactionServiceException)value);
15697
        }
15698
        break;
15699
 
15700
      }
15701
    }
15702
 
15703
    public void setFieldValue(int fieldID, Object value) {
15704
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
15705
    }
15706
 
15707
    public Object getFieldValue(_Fields field) {
15708
      switch (field) {
15709
      case SUCCESS:
483 rajveer 15710
        return getSuccess();
68 ashish 15711
 
15712
      case EX:
15713
        return getEx();
15714
 
15715
      }
15716
      throw new IllegalStateException();
15717
    }
15718
 
15719
    public Object getFieldValue(int fieldId) {
15720
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
15721
    }
15722
 
15723
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
15724
    public boolean isSet(_Fields field) {
15725
      switch (field) {
15726
      case SUCCESS:
15727
        return isSetSuccess();
15728
      case EX:
15729
        return isSetEx();
15730
      }
15731
      throw new IllegalStateException();
15732
    }
15733
 
15734
    public boolean isSet(int fieldID) {
15735
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
15736
    }
15737
 
15738
    @Override
15739
    public boolean equals(Object that) {
15740
      if (that == null)
15741
        return false;
483 rajveer 15742
      if (that instanceof getLineItemsForOrder_result)
15743
        return this.equals((getLineItemsForOrder_result)that);
68 ashish 15744
      return false;
15745
    }
15746
 
483 rajveer 15747
    public boolean equals(getLineItemsForOrder_result that) {
68 ashish 15748
      if (that == null)
15749
        return false;
15750
 
483 rajveer 15751
      boolean this_present_success = true && this.isSetSuccess();
15752
      boolean that_present_success = true && that.isSetSuccess();
68 ashish 15753
      if (this_present_success || that_present_success) {
15754
        if (!(this_present_success && that_present_success))
15755
          return false;
483 rajveer 15756
        if (!this.success.equals(that.success))
68 ashish 15757
          return false;
15758
      }
15759
 
15760
      boolean this_present_ex = true && this.isSetEx();
15761
      boolean that_present_ex = true && that.isSetEx();
15762
      if (this_present_ex || that_present_ex) {
15763
        if (!(this_present_ex && that_present_ex))
15764
          return false;
15765
        if (!this.ex.equals(that.ex))
15766
          return false;
15767
      }
15768
 
15769
      return true;
15770
    }
15771
 
15772
    @Override
15773
    public int hashCode() {
15774
      return 0;
15775
    }
15776
 
483 rajveer 15777
    public int compareTo(getLineItemsForOrder_result other) {
68 ashish 15778
      if (!getClass().equals(other.getClass())) {
15779
        return getClass().getName().compareTo(other.getClass().getName());
15780
      }
15781
 
15782
      int lastComparison = 0;
483 rajveer 15783
      getLineItemsForOrder_result typedOther = (getLineItemsForOrder_result)other;
68 ashish 15784
 
15785
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
15786
      if (lastComparison != 0) {
15787
        return lastComparison;
15788
      }
15789
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
15790
      if (lastComparison != 0) {
15791
        return lastComparison;
15792
      }
15793
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
15794
      if (lastComparison != 0) {
15795
        return lastComparison;
15796
      }
15797
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
15798
      if (lastComparison != 0) {
15799
        return lastComparison;
15800
      }
15801
      return 0;
15802
    }
15803
 
15804
    public void read(TProtocol iprot) throws TException {
15805
      TField field;
15806
      iprot.readStructBegin();
15807
      while (true)
15808
      {
15809
        field = iprot.readFieldBegin();
15810
        if (field.type == TType.STOP) { 
15811
          break;
15812
        }
15813
        _Fields fieldId = _Fields.findByThriftId(field.id);
15814
        if (fieldId == null) {
15815
          TProtocolUtil.skip(iprot, field.type);
15816
        } else {
15817
          switch (fieldId) {
15818
            case SUCCESS:
483 rajveer 15819
              if (field.type == TType.LIST) {
15820
                {
1022 varun.gupt 15821
                  TList _list32 = iprot.readListBegin();
15822
                  this.success = new ArrayList<LineItem>(_list32.size);
15823
                  for (int _i33 = 0; _i33 < _list32.size; ++_i33)
483 rajveer 15824
                  {
1022 varun.gupt 15825
                    LineItem _elem34;
15826
                    _elem34 = new LineItem();
15827
                    _elem34.read(iprot);
15828
                    this.success.add(_elem34);
483 rajveer 15829
                  }
15830
                  iprot.readListEnd();
15831
                }
68 ashish 15832
              } else { 
15833
                TProtocolUtil.skip(iprot, field.type);
15834
              }
15835
              break;
15836
            case EX:
15837
              if (field.type == TType.STRUCT) {
15838
                this.ex = new TransactionServiceException();
15839
                this.ex.read(iprot);
15840
              } else { 
15841
                TProtocolUtil.skip(iprot, field.type);
15842
              }
15843
              break;
15844
          }
15845
          iprot.readFieldEnd();
15846
        }
15847
      }
15848
      iprot.readStructEnd();
15849
      validate();
15850
    }
15851
 
15852
    public void write(TProtocol oprot) throws TException {
15853
      oprot.writeStructBegin(STRUCT_DESC);
15854
 
15855
      if (this.isSetSuccess()) {
15856
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
483 rajveer 15857
        {
15858
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
1022 varun.gupt 15859
          for (LineItem _iter35 : this.success)
483 rajveer 15860
          {
1022 varun.gupt 15861
            _iter35.write(oprot);
483 rajveer 15862
          }
15863
          oprot.writeListEnd();
15864
        }
68 ashish 15865
        oprot.writeFieldEnd();
15866
      } else if (this.isSetEx()) {
15867
        oprot.writeFieldBegin(EX_FIELD_DESC);
15868
        this.ex.write(oprot);
15869
        oprot.writeFieldEnd();
15870
      }
15871
      oprot.writeFieldStop();
15872
      oprot.writeStructEnd();
15873
    }
15874
 
15875
    @Override
15876
    public String toString() {
483 rajveer 15877
      StringBuilder sb = new StringBuilder("getLineItemsForOrder_result(");
68 ashish 15878
      boolean first = true;
15879
 
15880
      sb.append("success:");
483 rajveer 15881
      if (this.success == null) {
15882
        sb.append("null");
15883
      } else {
15884
        sb.append(this.success);
15885
      }
68 ashish 15886
      first = false;
15887
      if (!first) sb.append(", ");
15888
      sb.append("ex:");
15889
      if (this.ex == null) {
15890
        sb.append("null");
15891
      } else {
15892
        sb.append(this.ex);
15893
      }
15894
      first = false;
15895
      sb.append(")");
15896
      return sb.toString();
15897
    }
15898
 
15899
    public void validate() throws TException {
15900
      // check for required fields
15901
    }
15902
 
15903
  }
15904
 
1221 chandransh 15905
  public static class batchOrders_args implements TBase<batchOrders_args._Fields>, java.io.Serializable, Cloneable, Comparable<batchOrders_args>   {
15906
    private static final TStruct STRUCT_DESC = new TStruct("batchOrders_args");
15907
 
15908
    private static final TField WAREHOUSE_ID_FIELD_DESC = new TField("warehouseId", TType.I64, (short)1);
15909
 
15910
    private long warehouseId;
15911
 
15912
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15913
    public enum _Fields implements TFieldIdEnum {
15914
      WAREHOUSE_ID((short)1, "warehouseId");
15915
 
15916
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
15917
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15918
 
15919
      static {
15920
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15921
          byId.put((int)field._thriftId, field);
15922
          byName.put(field.getFieldName(), field);
15923
        }
15924
      }
15925
 
15926
      /**
15927
       * Find the _Fields constant that matches fieldId, or null if its not found.
15928
       */
15929
      public static _Fields findByThriftId(int fieldId) {
15930
        return byId.get(fieldId);
15931
      }
15932
 
15933
      /**
15934
       * Find the _Fields constant that matches fieldId, throwing an exception
15935
       * if it is not found.
15936
       */
15937
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15938
        _Fields fields = findByThriftId(fieldId);
15939
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15940
        return fields;
15941
      }
15942
 
15943
      /**
15944
       * Find the _Fields constant that matches name, or null if its not found.
15945
       */
15946
      public static _Fields findByName(String name) {
15947
        return byName.get(name);
15948
      }
15949
 
15950
      private final short _thriftId;
15951
      private final String _fieldName;
15952
 
15953
      _Fields(short thriftId, String fieldName) {
15954
        _thriftId = thriftId;
15955
        _fieldName = fieldName;
15956
      }
15957
 
15958
      public short getThriftFieldId() {
15959
        return _thriftId;
15960
      }
15961
 
15962
      public String getFieldName() {
15963
        return _fieldName;
15964
      }
15965
    }
15966
 
15967
    // isset id assignments
15968
    private static final int __WAREHOUSEID_ISSET_ID = 0;
15969
    private BitSet __isset_bit_vector = new BitSet(1);
15970
 
15971
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
15972
      put(_Fields.WAREHOUSE_ID, new FieldMetaData("warehouseId", TFieldRequirementType.DEFAULT, 
15973
          new FieldValueMetaData(TType.I64)));
15974
    }});
15975
 
15976
    static {
15977
      FieldMetaData.addStructMetaDataMap(batchOrders_args.class, metaDataMap);
15978
    }
15979
 
15980
    public batchOrders_args() {
15981
    }
15982
 
15983
    public batchOrders_args(
15984
      long warehouseId)
15985
    {
15986
      this();
15987
      this.warehouseId = warehouseId;
15988
      setWarehouseIdIsSet(true);
15989
    }
15990
 
15991
    /**
15992
     * Performs a deep copy on <i>other</i>.
15993
     */
15994
    public batchOrders_args(batchOrders_args other) {
15995
      __isset_bit_vector.clear();
15996
      __isset_bit_vector.or(other.__isset_bit_vector);
15997
      this.warehouseId = other.warehouseId;
15998
    }
15999
 
16000
    public batchOrders_args deepCopy() {
16001
      return new batchOrders_args(this);
16002
    }
16003
 
16004
    @Deprecated
16005
    public batchOrders_args clone() {
16006
      return new batchOrders_args(this);
16007
    }
16008
 
16009
    public long getWarehouseId() {
16010
      return this.warehouseId;
16011
    }
16012
 
16013
    public batchOrders_args setWarehouseId(long warehouseId) {
16014
      this.warehouseId = warehouseId;
16015
      setWarehouseIdIsSet(true);
16016
      return this;
16017
    }
16018
 
16019
    public void unsetWarehouseId() {
16020
      __isset_bit_vector.clear(__WAREHOUSEID_ISSET_ID);
16021
    }
16022
 
16023
    /** Returns true if field warehouseId is set (has been asigned a value) and false otherwise */
16024
    public boolean isSetWarehouseId() {
16025
      return __isset_bit_vector.get(__WAREHOUSEID_ISSET_ID);
16026
    }
16027
 
16028
    public void setWarehouseIdIsSet(boolean value) {
16029
      __isset_bit_vector.set(__WAREHOUSEID_ISSET_ID, value);
16030
    }
16031
 
16032
    public void setFieldValue(_Fields field, Object value) {
16033
      switch (field) {
16034
      case WAREHOUSE_ID:
16035
        if (value == null) {
16036
          unsetWarehouseId();
16037
        } else {
16038
          setWarehouseId((Long)value);
16039
        }
16040
        break;
16041
 
16042
      }
16043
    }
16044
 
16045
    public void setFieldValue(int fieldID, Object value) {
16046
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
16047
    }
16048
 
16049
    public Object getFieldValue(_Fields field) {
16050
      switch (field) {
16051
      case WAREHOUSE_ID:
16052
        return new Long(getWarehouseId());
16053
 
16054
      }
16055
      throw new IllegalStateException();
16056
    }
16057
 
16058
    public Object getFieldValue(int fieldId) {
16059
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
16060
    }
16061
 
16062
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
16063
    public boolean isSet(_Fields field) {
16064
      switch (field) {
16065
      case WAREHOUSE_ID:
16066
        return isSetWarehouseId();
16067
      }
16068
      throw new IllegalStateException();
16069
    }
16070
 
16071
    public boolean isSet(int fieldID) {
16072
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
16073
    }
16074
 
16075
    @Override
16076
    public boolean equals(Object that) {
16077
      if (that == null)
16078
        return false;
16079
      if (that instanceof batchOrders_args)
16080
        return this.equals((batchOrders_args)that);
16081
      return false;
16082
    }
16083
 
16084
    public boolean equals(batchOrders_args that) {
16085
      if (that == null)
16086
        return false;
16087
 
16088
      boolean this_present_warehouseId = true;
16089
      boolean that_present_warehouseId = true;
16090
      if (this_present_warehouseId || that_present_warehouseId) {
16091
        if (!(this_present_warehouseId && that_present_warehouseId))
16092
          return false;
16093
        if (this.warehouseId != that.warehouseId)
16094
          return false;
16095
      }
16096
 
16097
      return true;
16098
    }
16099
 
16100
    @Override
16101
    public int hashCode() {
16102
      return 0;
16103
    }
16104
 
16105
    public int compareTo(batchOrders_args other) {
16106
      if (!getClass().equals(other.getClass())) {
16107
        return getClass().getName().compareTo(other.getClass().getName());
16108
      }
16109
 
16110
      int lastComparison = 0;
16111
      batchOrders_args typedOther = (batchOrders_args)other;
16112
 
16113
      lastComparison = Boolean.valueOf(isSetWarehouseId()).compareTo(isSetWarehouseId());
16114
      if (lastComparison != 0) {
16115
        return lastComparison;
16116
      }
16117
      lastComparison = TBaseHelper.compareTo(warehouseId, typedOther.warehouseId);
16118
      if (lastComparison != 0) {
16119
        return lastComparison;
16120
      }
16121
      return 0;
16122
    }
16123
 
16124
    public void read(TProtocol iprot) throws TException {
16125
      TField field;
16126
      iprot.readStructBegin();
16127
      while (true)
16128
      {
16129
        field = iprot.readFieldBegin();
16130
        if (field.type == TType.STOP) { 
16131
          break;
16132
        }
16133
        _Fields fieldId = _Fields.findByThriftId(field.id);
16134
        if (fieldId == null) {
16135
          TProtocolUtil.skip(iprot, field.type);
16136
        } else {
16137
          switch (fieldId) {
16138
            case WAREHOUSE_ID:
16139
              if (field.type == TType.I64) {
16140
                this.warehouseId = iprot.readI64();
16141
                setWarehouseIdIsSet(true);
16142
              } else { 
16143
                TProtocolUtil.skip(iprot, field.type);
16144
              }
16145
              break;
16146
          }
16147
          iprot.readFieldEnd();
16148
        }
16149
      }
16150
      iprot.readStructEnd();
16151
      validate();
16152
    }
16153
 
16154
    public void write(TProtocol oprot) throws TException {
16155
      validate();
16156
 
16157
      oprot.writeStructBegin(STRUCT_DESC);
16158
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
16159
      oprot.writeI64(this.warehouseId);
16160
      oprot.writeFieldEnd();
16161
      oprot.writeFieldStop();
16162
      oprot.writeStructEnd();
16163
    }
16164
 
16165
    @Override
16166
    public String toString() {
16167
      StringBuilder sb = new StringBuilder("batchOrders_args(");
16168
      boolean first = true;
16169
 
16170
      sb.append("warehouseId:");
16171
      sb.append(this.warehouseId);
16172
      first = false;
16173
      sb.append(")");
16174
      return sb.toString();
16175
    }
16176
 
16177
    public void validate() throws TException {
16178
      // check for required fields
16179
    }
16180
 
16181
  }
16182
 
16183
  public static class batchOrders_result implements TBase<batchOrders_result._Fields>, java.io.Serializable, Cloneable, Comparable<batchOrders_result>   {
16184
    private static final TStruct STRUCT_DESC = new TStruct("batchOrders_result");
16185
 
16186
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
16187
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
16188
 
16189
    private List<Order> success;
16190
    private TransactionServiceException ex;
16191
 
16192
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16193
    public enum _Fields implements TFieldIdEnum {
16194
      SUCCESS((short)0, "success"),
16195
      EX((short)1, "ex");
16196
 
16197
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
16198
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16199
 
16200
      static {
16201
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16202
          byId.put((int)field._thriftId, field);
16203
          byName.put(field.getFieldName(), field);
16204
        }
16205
      }
16206
 
16207
      /**
16208
       * Find the _Fields constant that matches fieldId, or null if its not found.
16209
       */
16210
      public static _Fields findByThriftId(int fieldId) {
16211
        return byId.get(fieldId);
16212
      }
16213
 
16214
      /**
16215
       * Find the _Fields constant that matches fieldId, throwing an exception
16216
       * if it is not found.
16217
       */
16218
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16219
        _Fields fields = findByThriftId(fieldId);
16220
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16221
        return fields;
16222
      }
16223
 
16224
      /**
16225
       * Find the _Fields constant that matches name, or null if its not found.
16226
       */
16227
      public static _Fields findByName(String name) {
16228
        return byName.get(name);
16229
      }
16230
 
16231
      private final short _thriftId;
16232
      private final String _fieldName;
16233
 
16234
      _Fields(short thriftId, String fieldName) {
16235
        _thriftId = thriftId;
16236
        _fieldName = fieldName;
16237
      }
16238
 
16239
      public short getThriftFieldId() {
16240
        return _thriftId;
16241
      }
16242
 
16243
      public String getFieldName() {
16244
        return _fieldName;
16245
      }
16246
    }
16247
 
16248
    // isset id assignments
16249
 
16250
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
16251
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
16252
          new ListMetaData(TType.LIST, 
16253
              new StructMetaData(TType.STRUCT, Order.class))));
16254
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
16255
          new FieldValueMetaData(TType.STRUCT)));
16256
    }});
16257
 
16258
    static {
16259
      FieldMetaData.addStructMetaDataMap(batchOrders_result.class, metaDataMap);
16260
    }
16261
 
16262
    public batchOrders_result() {
16263
    }
16264
 
16265
    public batchOrders_result(
16266
      List<Order> success,
16267
      TransactionServiceException ex)
16268
    {
16269
      this();
16270
      this.success = success;
16271
      this.ex = ex;
16272
    }
16273
 
16274
    /**
16275
     * Performs a deep copy on <i>other</i>.
16276
     */
16277
    public batchOrders_result(batchOrders_result other) {
16278
      if (other.isSetSuccess()) {
16279
        List<Order> __this__success = new ArrayList<Order>();
16280
        for (Order other_element : other.success) {
16281
          __this__success.add(new Order(other_element));
16282
        }
16283
        this.success = __this__success;
16284
      }
16285
      if (other.isSetEx()) {
16286
        this.ex = new TransactionServiceException(other.ex);
16287
      }
16288
    }
16289
 
16290
    public batchOrders_result deepCopy() {
16291
      return new batchOrders_result(this);
16292
    }
16293
 
16294
    @Deprecated
16295
    public batchOrders_result clone() {
16296
      return new batchOrders_result(this);
16297
    }
16298
 
16299
    public int getSuccessSize() {
16300
      return (this.success == null) ? 0 : this.success.size();
16301
    }
16302
 
16303
    public java.util.Iterator<Order> getSuccessIterator() {
16304
      return (this.success == null) ? null : this.success.iterator();
16305
    }
16306
 
16307
    public void addToSuccess(Order elem) {
16308
      if (this.success == null) {
16309
        this.success = new ArrayList<Order>();
16310
      }
16311
      this.success.add(elem);
16312
    }
16313
 
16314
    public List<Order> getSuccess() {
16315
      return this.success;
16316
    }
16317
 
16318
    public batchOrders_result setSuccess(List<Order> success) {
16319
      this.success = success;
16320
      return this;
16321
    }
16322
 
16323
    public void unsetSuccess() {
16324
      this.success = null;
16325
    }
16326
 
16327
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
16328
    public boolean isSetSuccess() {
16329
      return this.success != null;
16330
    }
16331
 
16332
    public void setSuccessIsSet(boolean value) {
16333
      if (!value) {
16334
        this.success = null;
16335
      }
16336
    }
16337
 
16338
    public TransactionServiceException getEx() {
16339
      return this.ex;
16340
    }
16341
 
16342
    public batchOrders_result setEx(TransactionServiceException ex) {
16343
      this.ex = ex;
16344
      return this;
16345
    }
16346
 
16347
    public void unsetEx() {
16348
      this.ex = null;
16349
    }
16350
 
16351
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
16352
    public boolean isSetEx() {
16353
      return this.ex != null;
16354
    }
16355
 
16356
    public void setExIsSet(boolean value) {
16357
      if (!value) {
16358
        this.ex = null;
16359
      }
16360
    }
16361
 
16362
    public void setFieldValue(_Fields field, Object value) {
16363
      switch (field) {
16364
      case SUCCESS:
16365
        if (value == null) {
16366
          unsetSuccess();
16367
        } else {
16368
          setSuccess((List<Order>)value);
16369
        }
16370
        break;
16371
 
16372
      case EX:
16373
        if (value == null) {
16374
          unsetEx();
16375
        } else {
16376
          setEx((TransactionServiceException)value);
16377
        }
16378
        break;
16379
 
16380
      }
16381
    }
16382
 
16383
    public void setFieldValue(int fieldID, Object value) {
16384
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
16385
    }
16386
 
16387
    public Object getFieldValue(_Fields field) {
16388
      switch (field) {
16389
      case SUCCESS:
16390
        return getSuccess();
16391
 
16392
      case EX:
16393
        return getEx();
16394
 
16395
      }
16396
      throw new IllegalStateException();
16397
    }
16398
 
16399
    public Object getFieldValue(int fieldId) {
16400
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
16401
    }
16402
 
16403
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
16404
    public boolean isSet(_Fields field) {
16405
      switch (field) {
16406
      case SUCCESS:
16407
        return isSetSuccess();
16408
      case EX:
16409
        return isSetEx();
16410
      }
16411
      throw new IllegalStateException();
16412
    }
16413
 
16414
    public boolean isSet(int fieldID) {
16415
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
16416
    }
16417
 
16418
    @Override
16419
    public boolean equals(Object that) {
16420
      if (that == null)
16421
        return false;
16422
      if (that instanceof batchOrders_result)
16423
        return this.equals((batchOrders_result)that);
16424
      return false;
16425
    }
16426
 
16427
    public boolean equals(batchOrders_result that) {
16428
      if (that == null)
16429
        return false;
16430
 
16431
      boolean this_present_success = true && this.isSetSuccess();
16432
      boolean that_present_success = true && that.isSetSuccess();
16433
      if (this_present_success || that_present_success) {
16434
        if (!(this_present_success && that_present_success))
16435
          return false;
16436
        if (!this.success.equals(that.success))
16437
          return false;
16438
      }
16439
 
16440
      boolean this_present_ex = true && this.isSetEx();
16441
      boolean that_present_ex = true && that.isSetEx();
16442
      if (this_present_ex || that_present_ex) {
16443
        if (!(this_present_ex && that_present_ex))
16444
          return false;
16445
        if (!this.ex.equals(that.ex))
16446
          return false;
16447
      }
16448
 
16449
      return true;
16450
    }
16451
 
16452
    @Override
16453
    public int hashCode() {
16454
      return 0;
16455
    }
16456
 
16457
    public int compareTo(batchOrders_result other) {
16458
      if (!getClass().equals(other.getClass())) {
16459
        return getClass().getName().compareTo(other.getClass().getName());
16460
      }
16461
 
16462
      int lastComparison = 0;
16463
      batchOrders_result typedOther = (batchOrders_result)other;
16464
 
16465
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
16466
      if (lastComparison != 0) {
16467
        return lastComparison;
16468
      }
16469
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
16470
      if (lastComparison != 0) {
16471
        return lastComparison;
16472
      }
16473
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
16474
      if (lastComparison != 0) {
16475
        return lastComparison;
16476
      }
16477
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
16478
      if (lastComparison != 0) {
16479
        return lastComparison;
16480
      }
16481
      return 0;
16482
    }
16483
 
16484
    public void read(TProtocol iprot) throws TException {
16485
      TField field;
16486
      iprot.readStructBegin();
16487
      while (true)
16488
      {
16489
        field = iprot.readFieldBegin();
16490
        if (field.type == TType.STOP) { 
16491
          break;
16492
        }
16493
        _Fields fieldId = _Fields.findByThriftId(field.id);
16494
        if (fieldId == null) {
16495
          TProtocolUtil.skip(iprot, field.type);
16496
        } else {
16497
          switch (fieldId) {
16498
            case SUCCESS:
16499
              if (field.type == TType.LIST) {
16500
                {
16501
                  TList _list36 = iprot.readListBegin();
16502
                  this.success = new ArrayList<Order>(_list36.size);
16503
                  for (int _i37 = 0; _i37 < _list36.size; ++_i37)
16504
                  {
16505
                    Order _elem38;
16506
                    _elem38 = new Order();
16507
                    _elem38.read(iprot);
16508
                    this.success.add(_elem38);
16509
                  }
16510
                  iprot.readListEnd();
16511
                }
16512
              } else { 
16513
                TProtocolUtil.skip(iprot, field.type);
16514
              }
16515
              break;
16516
            case EX:
16517
              if (field.type == TType.STRUCT) {
16518
                this.ex = new TransactionServiceException();
16519
                this.ex.read(iprot);
16520
              } else { 
16521
                TProtocolUtil.skip(iprot, field.type);
16522
              }
16523
              break;
16524
          }
16525
          iprot.readFieldEnd();
16526
        }
16527
      }
16528
      iprot.readStructEnd();
16529
      validate();
16530
    }
16531
 
16532
    public void write(TProtocol oprot) throws TException {
16533
      oprot.writeStructBegin(STRUCT_DESC);
16534
 
16535
      if (this.isSetSuccess()) {
16536
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
16537
        {
16538
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
16539
          for (Order _iter39 : this.success)
16540
          {
16541
            _iter39.write(oprot);
16542
          }
16543
          oprot.writeListEnd();
16544
        }
16545
        oprot.writeFieldEnd();
16546
      } else if (this.isSetEx()) {
16547
        oprot.writeFieldBegin(EX_FIELD_DESC);
16548
        this.ex.write(oprot);
16549
        oprot.writeFieldEnd();
16550
      }
16551
      oprot.writeFieldStop();
16552
      oprot.writeStructEnd();
16553
    }
16554
 
16555
    @Override
16556
    public String toString() {
16557
      StringBuilder sb = new StringBuilder("batchOrders_result(");
16558
      boolean first = true;
16559
 
16560
      sb.append("success:");
16561
      if (this.success == null) {
16562
        sb.append("null");
16563
      } else {
16564
        sb.append(this.success);
16565
      }
16566
      first = false;
16567
      if (!first) sb.append(", ");
16568
      sb.append("ex:");
16569
      if (this.ex == null) {
16570
        sb.append("null");
16571
      } else {
16572
        sb.append(this.ex);
16573
      }
16574
      first = false;
16575
      sb.append(")");
16576
      return sb.toString();
16577
    }
16578
 
16579
    public void validate() throws TException {
16580
      // check for required fields
16581
    }
16582
 
16583
  }
16584
 
1209 chandransh 16585
  public static class markOrderAsOutOfStock_args implements TBase<markOrderAsOutOfStock_args._Fields>, java.io.Serializable, Cloneable, Comparable<markOrderAsOutOfStock_args>   {
16586
    private static final TStruct STRUCT_DESC = new TStruct("markOrderAsOutOfStock_args");
16587
 
16588
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
16589
 
16590
    private long orderId;
16591
 
16592
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16593
    public enum _Fields implements TFieldIdEnum {
16594
      ORDER_ID((short)1, "orderId");
16595
 
16596
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
16597
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16598
 
16599
      static {
16600
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16601
          byId.put((int)field._thriftId, field);
16602
          byName.put(field.getFieldName(), field);
16603
        }
16604
      }
16605
 
16606
      /**
16607
       * Find the _Fields constant that matches fieldId, or null if its not found.
16608
       */
16609
      public static _Fields findByThriftId(int fieldId) {
16610
        return byId.get(fieldId);
16611
      }
16612
 
16613
      /**
16614
       * Find the _Fields constant that matches fieldId, throwing an exception
16615
       * if it is not found.
16616
       */
16617
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16618
        _Fields fields = findByThriftId(fieldId);
16619
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16620
        return fields;
16621
      }
16622
 
16623
      /**
16624
       * Find the _Fields constant that matches name, or null if its not found.
16625
       */
16626
      public static _Fields findByName(String name) {
16627
        return byName.get(name);
16628
      }
16629
 
16630
      private final short _thriftId;
16631
      private final String _fieldName;
16632
 
16633
      _Fields(short thriftId, String fieldName) {
16634
        _thriftId = thriftId;
16635
        _fieldName = fieldName;
16636
      }
16637
 
16638
      public short getThriftFieldId() {
16639
        return _thriftId;
16640
      }
16641
 
16642
      public String getFieldName() {
16643
        return _fieldName;
16644
      }
16645
    }
16646
 
16647
    // isset id assignments
16648
    private static final int __ORDERID_ISSET_ID = 0;
16649
    private BitSet __isset_bit_vector = new BitSet(1);
16650
 
16651
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
16652
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
16653
          new FieldValueMetaData(TType.I64)));
16654
    }});
16655
 
16656
    static {
16657
      FieldMetaData.addStructMetaDataMap(markOrderAsOutOfStock_args.class, metaDataMap);
16658
    }
16659
 
16660
    public markOrderAsOutOfStock_args() {
16661
    }
16662
 
16663
    public markOrderAsOutOfStock_args(
16664
      long orderId)
16665
    {
16666
      this();
16667
      this.orderId = orderId;
16668
      setOrderIdIsSet(true);
16669
    }
16670
 
16671
    /**
16672
     * Performs a deep copy on <i>other</i>.
16673
     */
16674
    public markOrderAsOutOfStock_args(markOrderAsOutOfStock_args other) {
16675
      __isset_bit_vector.clear();
16676
      __isset_bit_vector.or(other.__isset_bit_vector);
16677
      this.orderId = other.orderId;
16678
    }
16679
 
16680
    public markOrderAsOutOfStock_args deepCopy() {
16681
      return new markOrderAsOutOfStock_args(this);
16682
    }
16683
 
16684
    @Deprecated
16685
    public markOrderAsOutOfStock_args clone() {
16686
      return new markOrderAsOutOfStock_args(this);
16687
    }
16688
 
16689
    public long getOrderId() {
16690
      return this.orderId;
16691
    }
16692
 
16693
    public markOrderAsOutOfStock_args setOrderId(long orderId) {
16694
      this.orderId = orderId;
16695
      setOrderIdIsSet(true);
16696
      return this;
16697
    }
16698
 
16699
    public void unsetOrderId() {
16700
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
16701
    }
16702
 
16703
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
16704
    public boolean isSetOrderId() {
16705
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
16706
    }
16707
 
16708
    public void setOrderIdIsSet(boolean value) {
16709
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
16710
    }
16711
 
16712
    public void setFieldValue(_Fields field, Object value) {
16713
      switch (field) {
16714
      case ORDER_ID:
16715
        if (value == null) {
16716
          unsetOrderId();
16717
        } else {
16718
          setOrderId((Long)value);
16719
        }
16720
        break;
16721
 
16722
      }
16723
    }
16724
 
16725
    public void setFieldValue(int fieldID, Object value) {
16726
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
16727
    }
16728
 
16729
    public Object getFieldValue(_Fields field) {
16730
      switch (field) {
16731
      case ORDER_ID:
16732
        return new Long(getOrderId());
16733
 
16734
      }
16735
      throw new IllegalStateException();
16736
    }
16737
 
16738
    public Object getFieldValue(int fieldId) {
16739
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
16740
    }
16741
 
16742
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
16743
    public boolean isSet(_Fields field) {
16744
      switch (field) {
16745
      case ORDER_ID:
16746
        return isSetOrderId();
16747
      }
16748
      throw new IllegalStateException();
16749
    }
16750
 
16751
    public boolean isSet(int fieldID) {
16752
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
16753
    }
16754
 
16755
    @Override
16756
    public boolean equals(Object that) {
16757
      if (that == null)
16758
        return false;
16759
      if (that instanceof markOrderAsOutOfStock_args)
16760
        return this.equals((markOrderAsOutOfStock_args)that);
16761
      return false;
16762
    }
16763
 
16764
    public boolean equals(markOrderAsOutOfStock_args that) {
16765
      if (that == null)
16766
        return false;
16767
 
16768
      boolean this_present_orderId = true;
16769
      boolean that_present_orderId = true;
16770
      if (this_present_orderId || that_present_orderId) {
16771
        if (!(this_present_orderId && that_present_orderId))
16772
          return false;
16773
        if (this.orderId != that.orderId)
16774
          return false;
16775
      }
16776
 
16777
      return true;
16778
    }
16779
 
16780
    @Override
16781
    public int hashCode() {
16782
      return 0;
16783
    }
16784
 
16785
    public int compareTo(markOrderAsOutOfStock_args other) {
16786
      if (!getClass().equals(other.getClass())) {
16787
        return getClass().getName().compareTo(other.getClass().getName());
16788
      }
16789
 
16790
      int lastComparison = 0;
16791
      markOrderAsOutOfStock_args typedOther = (markOrderAsOutOfStock_args)other;
16792
 
16793
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
16794
      if (lastComparison != 0) {
16795
        return lastComparison;
16796
      }
16797
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
16798
      if (lastComparison != 0) {
16799
        return lastComparison;
16800
      }
16801
      return 0;
16802
    }
16803
 
16804
    public void read(TProtocol iprot) throws TException {
16805
      TField field;
16806
      iprot.readStructBegin();
16807
      while (true)
16808
      {
16809
        field = iprot.readFieldBegin();
16810
        if (field.type == TType.STOP) { 
16811
          break;
16812
        }
16813
        _Fields fieldId = _Fields.findByThriftId(field.id);
16814
        if (fieldId == null) {
16815
          TProtocolUtil.skip(iprot, field.type);
16816
        } else {
16817
          switch (fieldId) {
16818
            case ORDER_ID:
16819
              if (field.type == TType.I64) {
16820
                this.orderId = iprot.readI64();
16821
                setOrderIdIsSet(true);
16822
              } else { 
16823
                TProtocolUtil.skip(iprot, field.type);
16824
              }
16825
              break;
16826
          }
16827
          iprot.readFieldEnd();
16828
        }
16829
      }
16830
      iprot.readStructEnd();
16831
      validate();
16832
    }
16833
 
16834
    public void write(TProtocol oprot) throws TException {
16835
      validate();
16836
 
16837
      oprot.writeStructBegin(STRUCT_DESC);
16838
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
16839
      oprot.writeI64(this.orderId);
16840
      oprot.writeFieldEnd();
16841
      oprot.writeFieldStop();
16842
      oprot.writeStructEnd();
16843
    }
16844
 
16845
    @Override
16846
    public String toString() {
16847
      StringBuilder sb = new StringBuilder("markOrderAsOutOfStock_args(");
16848
      boolean first = true;
16849
 
16850
      sb.append("orderId:");
16851
      sb.append(this.orderId);
16852
      first = false;
16853
      sb.append(")");
16854
      return sb.toString();
16855
    }
16856
 
16857
    public void validate() throws TException {
16858
      // check for required fields
16859
    }
16860
 
16861
  }
16862
 
16863
  public static class markOrderAsOutOfStock_result implements TBase<markOrderAsOutOfStock_result._Fields>, java.io.Serializable, Cloneable, Comparable<markOrderAsOutOfStock_result>   {
16864
    private static final TStruct STRUCT_DESC = new TStruct("markOrderAsOutOfStock_result");
16865
 
16866
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
16867
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
16868
 
16869
    private boolean success;
16870
    private TransactionServiceException ex;
16871
 
16872
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16873
    public enum _Fields implements TFieldIdEnum {
16874
      SUCCESS((short)0, "success"),
16875
      EX((short)1, "ex");
16876
 
16877
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
16878
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16879
 
16880
      static {
16881
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16882
          byId.put((int)field._thriftId, field);
16883
          byName.put(field.getFieldName(), field);
16884
        }
16885
      }
16886
 
16887
      /**
16888
       * Find the _Fields constant that matches fieldId, or null if its not found.
16889
       */
16890
      public static _Fields findByThriftId(int fieldId) {
16891
        return byId.get(fieldId);
16892
      }
16893
 
16894
      /**
16895
       * Find the _Fields constant that matches fieldId, throwing an exception
16896
       * if it is not found.
16897
       */
16898
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16899
        _Fields fields = findByThriftId(fieldId);
16900
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16901
        return fields;
16902
      }
16903
 
16904
      /**
16905
       * Find the _Fields constant that matches name, or null if its not found.
16906
       */
16907
      public static _Fields findByName(String name) {
16908
        return byName.get(name);
16909
      }
16910
 
16911
      private final short _thriftId;
16912
      private final String _fieldName;
16913
 
16914
      _Fields(short thriftId, String fieldName) {
16915
        _thriftId = thriftId;
16916
        _fieldName = fieldName;
16917
      }
16918
 
16919
      public short getThriftFieldId() {
16920
        return _thriftId;
16921
      }
16922
 
16923
      public String getFieldName() {
16924
        return _fieldName;
16925
      }
16926
    }
16927
 
16928
    // isset id assignments
16929
    private static final int __SUCCESS_ISSET_ID = 0;
16930
    private BitSet __isset_bit_vector = new BitSet(1);
16931
 
16932
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
16933
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
16934
          new FieldValueMetaData(TType.BOOL)));
16935
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
16936
          new FieldValueMetaData(TType.STRUCT)));
16937
    }});
16938
 
16939
    static {
16940
      FieldMetaData.addStructMetaDataMap(markOrderAsOutOfStock_result.class, metaDataMap);
16941
    }
16942
 
16943
    public markOrderAsOutOfStock_result() {
16944
    }
16945
 
16946
    public markOrderAsOutOfStock_result(
16947
      boolean success,
16948
      TransactionServiceException ex)
16949
    {
16950
      this();
16951
      this.success = success;
16952
      setSuccessIsSet(true);
16953
      this.ex = ex;
16954
    }
16955
 
16956
    /**
16957
     * Performs a deep copy on <i>other</i>.
16958
     */
16959
    public markOrderAsOutOfStock_result(markOrderAsOutOfStock_result other) {
16960
      __isset_bit_vector.clear();
16961
      __isset_bit_vector.or(other.__isset_bit_vector);
16962
      this.success = other.success;
16963
      if (other.isSetEx()) {
16964
        this.ex = new TransactionServiceException(other.ex);
16965
      }
16966
    }
16967
 
16968
    public markOrderAsOutOfStock_result deepCopy() {
16969
      return new markOrderAsOutOfStock_result(this);
16970
    }
16971
 
16972
    @Deprecated
16973
    public markOrderAsOutOfStock_result clone() {
16974
      return new markOrderAsOutOfStock_result(this);
16975
    }
16976
 
16977
    public boolean isSuccess() {
16978
      return this.success;
16979
    }
16980
 
16981
    public markOrderAsOutOfStock_result setSuccess(boolean success) {
16982
      this.success = success;
16983
      setSuccessIsSet(true);
16984
      return this;
16985
    }
16986
 
16987
    public void unsetSuccess() {
16988
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
16989
    }
16990
 
16991
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
16992
    public boolean isSetSuccess() {
16993
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
16994
    }
16995
 
16996
    public void setSuccessIsSet(boolean value) {
16997
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
16998
    }
16999
 
17000
    public TransactionServiceException getEx() {
17001
      return this.ex;
17002
    }
17003
 
17004
    public markOrderAsOutOfStock_result setEx(TransactionServiceException ex) {
17005
      this.ex = ex;
17006
      return this;
17007
    }
17008
 
17009
    public void unsetEx() {
17010
      this.ex = null;
17011
    }
17012
 
17013
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
17014
    public boolean isSetEx() {
17015
      return this.ex != null;
17016
    }
17017
 
17018
    public void setExIsSet(boolean value) {
17019
      if (!value) {
17020
        this.ex = null;
17021
      }
17022
    }
17023
 
17024
    public void setFieldValue(_Fields field, Object value) {
17025
      switch (field) {
17026
      case SUCCESS:
17027
        if (value == null) {
17028
          unsetSuccess();
17029
        } else {
17030
          setSuccess((Boolean)value);
17031
        }
17032
        break;
17033
 
17034
      case EX:
17035
        if (value == null) {
17036
          unsetEx();
17037
        } else {
17038
          setEx((TransactionServiceException)value);
17039
        }
17040
        break;
17041
 
17042
      }
17043
    }
17044
 
17045
    public void setFieldValue(int fieldID, Object value) {
17046
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
17047
    }
17048
 
17049
    public Object getFieldValue(_Fields field) {
17050
      switch (field) {
17051
      case SUCCESS:
17052
        return new Boolean(isSuccess());
17053
 
17054
      case EX:
17055
        return getEx();
17056
 
17057
      }
17058
      throw new IllegalStateException();
17059
    }
17060
 
17061
    public Object getFieldValue(int fieldId) {
17062
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
17063
    }
17064
 
17065
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
17066
    public boolean isSet(_Fields field) {
17067
      switch (field) {
17068
      case SUCCESS:
17069
        return isSetSuccess();
17070
      case EX:
17071
        return isSetEx();
17072
      }
17073
      throw new IllegalStateException();
17074
    }
17075
 
17076
    public boolean isSet(int fieldID) {
17077
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
17078
    }
17079
 
17080
    @Override
17081
    public boolean equals(Object that) {
17082
      if (that == null)
17083
        return false;
17084
      if (that instanceof markOrderAsOutOfStock_result)
17085
        return this.equals((markOrderAsOutOfStock_result)that);
17086
      return false;
17087
    }
17088
 
17089
    public boolean equals(markOrderAsOutOfStock_result that) {
17090
      if (that == null)
17091
        return false;
17092
 
17093
      boolean this_present_success = true;
17094
      boolean that_present_success = true;
17095
      if (this_present_success || that_present_success) {
17096
        if (!(this_present_success && that_present_success))
17097
          return false;
17098
        if (this.success != that.success)
17099
          return false;
17100
      }
17101
 
17102
      boolean this_present_ex = true && this.isSetEx();
17103
      boolean that_present_ex = true && that.isSetEx();
17104
      if (this_present_ex || that_present_ex) {
17105
        if (!(this_present_ex && that_present_ex))
17106
          return false;
17107
        if (!this.ex.equals(that.ex))
17108
          return false;
17109
      }
17110
 
17111
      return true;
17112
    }
17113
 
17114
    @Override
17115
    public int hashCode() {
17116
      return 0;
17117
    }
17118
 
17119
    public int compareTo(markOrderAsOutOfStock_result other) {
17120
      if (!getClass().equals(other.getClass())) {
17121
        return getClass().getName().compareTo(other.getClass().getName());
17122
      }
17123
 
17124
      int lastComparison = 0;
17125
      markOrderAsOutOfStock_result typedOther = (markOrderAsOutOfStock_result)other;
17126
 
17127
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
17128
      if (lastComparison != 0) {
17129
        return lastComparison;
17130
      }
17131
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
17132
      if (lastComparison != 0) {
17133
        return lastComparison;
17134
      }
17135
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
17136
      if (lastComparison != 0) {
17137
        return lastComparison;
17138
      }
17139
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
17140
      if (lastComparison != 0) {
17141
        return lastComparison;
17142
      }
17143
      return 0;
17144
    }
17145
 
17146
    public void read(TProtocol iprot) throws TException {
17147
      TField field;
17148
      iprot.readStructBegin();
17149
      while (true)
17150
      {
17151
        field = iprot.readFieldBegin();
17152
        if (field.type == TType.STOP) { 
17153
          break;
17154
        }
17155
        _Fields fieldId = _Fields.findByThriftId(field.id);
17156
        if (fieldId == null) {
17157
          TProtocolUtil.skip(iprot, field.type);
17158
        } else {
17159
          switch (fieldId) {
17160
            case SUCCESS:
17161
              if (field.type == TType.BOOL) {
17162
                this.success = iprot.readBool();
17163
                setSuccessIsSet(true);
17164
              } else { 
17165
                TProtocolUtil.skip(iprot, field.type);
17166
              }
17167
              break;
17168
            case EX:
17169
              if (field.type == TType.STRUCT) {
17170
                this.ex = new TransactionServiceException();
17171
                this.ex.read(iprot);
17172
              } else { 
17173
                TProtocolUtil.skip(iprot, field.type);
17174
              }
17175
              break;
17176
          }
17177
          iprot.readFieldEnd();
17178
        }
17179
      }
17180
      iprot.readStructEnd();
17181
      validate();
17182
    }
17183
 
17184
    public void write(TProtocol oprot) throws TException {
17185
      oprot.writeStructBegin(STRUCT_DESC);
17186
 
17187
      if (this.isSetSuccess()) {
17188
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
17189
        oprot.writeBool(this.success);
17190
        oprot.writeFieldEnd();
17191
      } else if (this.isSetEx()) {
17192
        oprot.writeFieldBegin(EX_FIELD_DESC);
17193
        this.ex.write(oprot);
17194
        oprot.writeFieldEnd();
17195
      }
17196
      oprot.writeFieldStop();
17197
      oprot.writeStructEnd();
17198
    }
17199
 
17200
    @Override
17201
    public String toString() {
17202
      StringBuilder sb = new StringBuilder("markOrderAsOutOfStock_result(");
17203
      boolean first = true;
17204
 
17205
      sb.append("success:");
17206
      sb.append(this.success);
17207
      first = false;
17208
      if (!first) sb.append(", ");
17209
      sb.append("ex:");
17210
      if (this.ex == null) {
17211
        sb.append("null");
17212
      } else {
17213
        sb.append(this.ex);
17214
      }
17215
      first = false;
17216
      sb.append(")");
17217
      return sb.toString();
17218
    }
17219
 
17220
    public void validate() throws TException {
17221
      // check for required fields
17222
    }
17223
 
17224
  }
17225
 
758 chandransh 17226
  public static class markOrdersAsManifested_args implements TBase<markOrdersAsManifested_args._Fields>, java.io.Serializable, Cloneable, Comparable<markOrdersAsManifested_args>   {
17227
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsManifested_args");
17228
 
17229
    private static final TField WAREHOUSE_ID_FIELD_DESC = new TField("warehouseId", TType.I64, (short)1);
17230
    private static final TField PROVIDER_ID_FIELD_DESC = new TField("providerId", TType.I64, (short)2);
17231
 
17232
    private long warehouseId;
17233
    private long providerId;
17234
 
17235
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17236
    public enum _Fields implements TFieldIdEnum {
17237
      WAREHOUSE_ID((short)1, "warehouseId"),
17238
      PROVIDER_ID((short)2, "providerId");
17239
 
17240
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
17241
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17242
 
17243
      static {
17244
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17245
          byId.put((int)field._thriftId, field);
17246
          byName.put(field.getFieldName(), field);
17247
        }
17248
      }
17249
 
17250
      /**
17251
       * Find the _Fields constant that matches fieldId, or null if its not found.
17252
       */
17253
      public static _Fields findByThriftId(int fieldId) {
17254
        return byId.get(fieldId);
17255
      }
17256
 
17257
      /**
17258
       * Find the _Fields constant that matches fieldId, throwing an exception
17259
       * if it is not found.
17260
       */
17261
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17262
        _Fields fields = findByThriftId(fieldId);
17263
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17264
        return fields;
17265
      }
17266
 
17267
      /**
17268
       * Find the _Fields constant that matches name, or null if its not found.
17269
       */
17270
      public static _Fields findByName(String name) {
17271
        return byName.get(name);
17272
      }
17273
 
17274
      private final short _thriftId;
17275
      private final String _fieldName;
17276
 
17277
      _Fields(short thriftId, String fieldName) {
17278
        _thriftId = thriftId;
17279
        _fieldName = fieldName;
17280
      }
17281
 
17282
      public short getThriftFieldId() {
17283
        return _thriftId;
17284
      }
17285
 
17286
      public String getFieldName() {
17287
        return _fieldName;
17288
      }
17289
    }
17290
 
17291
    // isset id assignments
17292
    private static final int __WAREHOUSEID_ISSET_ID = 0;
17293
    private static final int __PROVIDERID_ISSET_ID = 1;
17294
    private BitSet __isset_bit_vector = new BitSet(2);
17295
 
17296
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
17297
      put(_Fields.WAREHOUSE_ID, new FieldMetaData("warehouseId", TFieldRequirementType.DEFAULT, 
17298
          new FieldValueMetaData(TType.I64)));
17299
      put(_Fields.PROVIDER_ID, new FieldMetaData("providerId", TFieldRequirementType.DEFAULT, 
17300
          new FieldValueMetaData(TType.I64)));
17301
    }});
17302
 
17303
    static {
17304
      FieldMetaData.addStructMetaDataMap(markOrdersAsManifested_args.class, metaDataMap);
17305
    }
17306
 
17307
    public markOrdersAsManifested_args() {
17308
    }
17309
 
17310
    public markOrdersAsManifested_args(
17311
      long warehouseId,
17312
      long providerId)
17313
    {
17314
      this();
17315
      this.warehouseId = warehouseId;
17316
      setWarehouseIdIsSet(true);
17317
      this.providerId = providerId;
17318
      setProviderIdIsSet(true);
17319
    }
17320
 
17321
    /**
17322
     * Performs a deep copy on <i>other</i>.
17323
     */
17324
    public markOrdersAsManifested_args(markOrdersAsManifested_args other) {
17325
      __isset_bit_vector.clear();
17326
      __isset_bit_vector.or(other.__isset_bit_vector);
17327
      this.warehouseId = other.warehouseId;
17328
      this.providerId = other.providerId;
17329
    }
17330
 
17331
    public markOrdersAsManifested_args deepCopy() {
17332
      return new markOrdersAsManifested_args(this);
17333
    }
17334
 
17335
    @Deprecated
17336
    public markOrdersAsManifested_args clone() {
17337
      return new markOrdersAsManifested_args(this);
17338
    }
17339
 
17340
    public long getWarehouseId() {
17341
      return this.warehouseId;
17342
    }
17343
 
17344
    public markOrdersAsManifested_args setWarehouseId(long warehouseId) {
17345
      this.warehouseId = warehouseId;
17346
      setWarehouseIdIsSet(true);
17347
      return this;
17348
    }
17349
 
17350
    public void unsetWarehouseId() {
17351
      __isset_bit_vector.clear(__WAREHOUSEID_ISSET_ID);
17352
    }
17353
 
17354
    /** Returns true if field warehouseId is set (has been asigned a value) and false otherwise */
17355
    public boolean isSetWarehouseId() {
17356
      return __isset_bit_vector.get(__WAREHOUSEID_ISSET_ID);
17357
    }
17358
 
17359
    public void setWarehouseIdIsSet(boolean value) {
17360
      __isset_bit_vector.set(__WAREHOUSEID_ISSET_ID, value);
17361
    }
17362
 
17363
    public long getProviderId() {
17364
      return this.providerId;
17365
    }
17366
 
17367
    public markOrdersAsManifested_args setProviderId(long providerId) {
17368
      this.providerId = providerId;
17369
      setProviderIdIsSet(true);
17370
      return this;
17371
    }
17372
 
17373
    public void unsetProviderId() {
17374
      __isset_bit_vector.clear(__PROVIDERID_ISSET_ID);
17375
    }
17376
 
17377
    /** Returns true if field providerId is set (has been asigned a value) and false otherwise */
17378
    public boolean isSetProviderId() {
17379
      return __isset_bit_vector.get(__PROVIDERID_ISSET_ID);
17380
    }
17381
 
17382
    public void setProviderIdIsSet(boolean value) {
17383
      __isset_bit_vector.set(__PROVIDERID_ISSET_ID, value);
17384
    }
17385
 
17386
    public void setFieldValue(_Fields field, Object value) {
17387
      switch (field) {
17388
      case WAREHOUSE_ID:
17389
        if (value == null) {
17390
          unsetWarehouseId();
17391
        } else {
17392
          setWarehouseId((Long)value);
17393
        }
17394
        break;
17395
 
17396
      case PROVIDER_ID:
17397
        if (value == null) {
17398
          unsetProviderId();
17399
        } else {
17400
          setProviderId((Long)value);
17401
        }
17402
        break;
17403
 
17404
      }
17405
    }
17406
 
17407
    public void setFieldValue(int fieldID, Object value) {
17408
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
17409
    }
17410
 
17411
    public Object getFieldValue(_Fields field) {
17412
      switch (field) {
17413
      case WAREHOUSE_ID:
17414
        return new Long(getWarehouseId());
17415
 
17416
      case PROVIDER_ID:
17417
        return new Long(getProviderId());
17418
 
17419
      }
17420
      throw new IllegalStateException();
17421
    }
17422
 
17423
    public Object getFieldValue(int fieldId) {
17424
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
17425
    }
17426
 
17427
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
17428
    public boolean isSet(_Fields field) {
17429
      switch (field) {
17430
      case WAREHOUSE_ID:
17431
        return isSetWarehouseId();
17432
      case PROVIDER_ID:
17433
        return isSetProviderId();
17434
      }
17435
      throw new IllegalStateException();
17436
    }
17437
 
17438
    public boolean isSet(int fieldID) {
17439
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
17440
    }
17441
 
17442
    @Override
17443
    public boolean equals(Object that) {
17444
      if (that == null)
17445
        return false;
17446
      if (that instanceof markOrdersAsManifested_args)
17447
        return this.equals((markOrdersAsManifested_args)that);
17448
      return false;
17449
    }
17450
 
17451
    public boolean equals(markOrdersAsManifested_args that) {
17452
      if (that == null)
17453
        return false;
17454
 
17455
      boolean this_present_warehouseId = true;
17456
      boolean that_present_warehouseId = true;
17457
      if (this_present_warehouseId || that_present_warehouseId) {
17458
        if (!(this_present_warehouseId && that_present_warehouseId))
17459
          return false;
17460
        if (this.warehouseId != that.warehouseId)
17461
          return false;
17462
      }
17463
 
17464
      boolean this_present_providerId = true;
17465
      boolean that_present_providerId = true;
17466
      if (this_present_providerId || that_present_providerId) {
17467
        if (!(this_present_providerId && that_present_providerId))
17468
          return false;
17469
        if (this.providerId != that.providerId)
17470
          return false;
17471
      }
17472
 
17473
      return true;
17474
    }
17475
 
17476
    @Override
17477
    public int hashCode() {
17478
      return 0;
17479
    }
17480
 
17481
    public int compareTo(markOrdersAsManifested_args other) {
17482
      if (!getClass().equals(other.getClass())) {
17483
        return getClass().getName().compareTo(other.getClass().getName());
17484
      }
17485
 
17486
      int lastComparison = 0;
17487
      markOrdersAsManifested_args typedOther = (markOrdersAsManifested_args)other;
17488
 
17489
      lastComparison = Boolean.valueOf(isSetWarehouseId()).compareTo(isSetWarehouseId());
17490
      if (lastComparison != 0) {
17491
        return lastComparison;
17492
      }
17493
      lastComparison = TBaseHelper.compareTo(warehouseId, typedOther.warehouseId);
17494
      if (lastComparison != 0) {
17495
        return lastComparison;
17496
      }
17497
      lastComparison = Boolean.valueOf(isSetProviderId()).compareTo(isSetProviderId());
17498
      if (lastComparison != 0) {
17499
        return lastComparison;
17500
      }
17501
      lastComparison = TBaseHelper.compareTo(providerId, typedOther.providerId);
17502
      if (lastComparison != 0) {
17503
        return lastComparison;
17504
      }
17505
      return 0;
17506
    }
17507
 
17508
    public void read(TProtocol iprot) throws TException {
17509
      TField field;
17510
      iprot.readStructBegin();
17511
      while (true)
17512
      {
17513
        field = iprot.readFieldBegin();
17514
        if (field.type == TType.STOP) { 
17515
          break;
17516
        }
17517
        _Fields fieldId = _Fields.findByThriftId(field.id);
17518
        if (fieldId == null) {
17519
          TProtocolUtil.skip(iprot, field.type);
17520
        } else {
17521
          switch (fieldId) {
17522
            case WAREHOUSE_ID:
17523
              if (field.type == TType.I64) {
17524
                this.warehouseId = iprot.readI64();
17525
                setWarehouseIdIsSet(true);
17526
              } else { 
17527
                TProtocolUtil.skip(iprot, field.type);
17528
              }
17529
              break;
17530
            case PROVIDER_ID:
17531
              if (field.type == TType.I64) {
17532
                this.providerId = iprot.readI64();
17533
                setProviderIdIsSet(true);
17534
              } else { 
17535
                TProtocolUtil.skip(iprot, field.type);
17536
              }
17537
              break;
17538
          }
17539
          iprot.readFieldEnd();
17540
        }
17541
      }
17542
      iprot.readStructEnd();
17543
      validate();
17544
    }
17545
 
17546
    public void write(TProtocol oprot) throws TException {
17547
      validate();
17548
 
17549
      oprot.writeStructBegin(STRUCT_DESC);
17550
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
17551
      oprot.writeI64(this.warehouseId);
17552
      oprot.writeFieldEnd();
17553
      oprot.writeFieldBegin(PROVIDER_ID_FIELD_DESC);
17554
      oprot.writeI64(this.providerId);
17555
      oprot.writeFieldEnd();
17556
      oprot.writeFieldStop();
17557
      oprot.writeStructEnd();
17558
    }
17559
 
17560
    @Override
17561
    public String toString() {
17562
      StringBuilder sb = new StringBuilder("markOrdersAsManifested_args(");
17563
      boolean first = true;
17564
 
17565
      sb.append("warehouseId:");
17566
      sb.append(this.warehouseId);
17567
      first = false;
17568
      if (!first) sb.append(", ");
17569
      sb.append("providerId:");
17570
      sb.append(this.providerId);
17571
      first = false;
17572
      sb.append(")");
17573
      return sb.toString();
17574
    }
17575
 
17576
    public void validate() throws TException {
17577
      // check for required fields
17578
    }
17579
 
17580
  }
17581
 
17582
  public static class markOrdersAsManifested_result implements TBase<markOrdersAsManifested_result._Fields>, java.io.Serializable, Cloneable, Comparable<markOrdersAsManifested_result>   {
17583
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsManifested_result");
17584
 
17585
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
17586
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
17587
 
17588
    private boolean success;
17589
    private TransactionServiceException ex;
17590
 
17591
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17592
    public enum _Fields implements TFieldIdEnum {
17593
      SUCCESS((short)0, "success"),
17594
      EX((short)1, "ex");
17595
 
17596
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
17597
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17598
 
17599
      static {
17600
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17601
          byId.put((int)field._thriftId, field);
17602
          byName.put(field.getFieldName(), field);
17603
        }
17604
      }
17605
 
17606
      /**
17607
       * Find the _Fields constant that matches fieldId, or null if its not found.
17608
       */
17609
      public static _Fields findByThriftId(int fieldId) {
17610
        return byId.get(fieldId);
17611
      }
17612
 
17613
      /**
17614
       * Find the _Fields constant that matches fieldId, throwing an exception
17615
       * if it is not found.
17616
       */
17617
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17618
        _Fields fields = findByThriftId(fieldId);
17619
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17620
        return fields;
17621
      }
17622
 
17623
      /**
17624
       * Find the _Fields constant that matches name, or null if its not found.
17625
       */
17626
      public static _Fields findByName(String name) {
17627
        return byName.get(name);
17628
      }
17629
 
17630
      private final short _thriftId;
17631
      private final String _fieldName;
17632
 
17633
      _Fields(short thriftId, String fieldName) {
17634
        _thriftId = thriftId;
17635
        _fieldName = fieldName;
17636
      }
17637
 
17638
      public short getThriftFieldId() {
17639
        return _thriftId;
17640
      }
17641
 
17642
      public String getFieldName() {
17643
        return _fieldName;
17644
      }
17645
    }
17646
 
17647
    // isset id assignments
17648
    private static final int __SUCCESS_ISSET_ID = 0;
17649
    private BitSet __isset_bit_vector = new BitSet(1);
17650
 
17651
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
17652
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
17653
          new FieldValueMetaData(TType.BOOL)));
17654
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
17655
          new FieldValueMetaData(TType.STRUCT)));
17656
    }});
17657
 
17658
    static {
17659
      FieldMetaData.addStructMetaDataMap(markOrdersAsManifested_result.class, metaDataMap);
17660
    }
17661
 
17662
    public markOrdersAsManifested_result() {
17663
    }
17664
 
17665
    public markOrdersAsManifested_result(
17666
      boolean success,
17667
      TransactionServiceException ex)
17668
    {
17669
      this();
17670
      this.success = success;
17671
      setSuccessIsSet(true);
17672
      this.ex = ex;
17673
    }
17674
 
17675
    /**
17676
     * Performs a deep copy on <i>other</i>.
17677
     */
17678
    public markOrdersAsManifested_result(markOrdersAsManifested_result other) {
17679
      __isset_bit_vector.clear();
17680
      __isset_bit_vector.or(other.__isset_bit_vector);
17681
      this.success = other.success;
17682
      if (other.isSetEx()) {
17683
        this.ex = new TransactionServiceException(other.ex);
17684
      }
17685
    }
17686
 
17687
    public markOrdersAsManifested_result deepCopy() {
17688
      return new markOrdersAsManifested_result(this);
17689
    }
17690
 
17691
    @Deprecated
17692
    public markOrdersAsManifested_result clone() {
17693
      return new markOrdersAsManifested_result(this);
17694
    }
17695
 
17696
    public boolean isSuccess() {
17697
      return this.success;
17698
    }
17699
 
17700
    public markOrdersAsManifested_result setSuccess(boolean success) {
17701
      this.success = success;
17702
      setSuccessIsSet(true);
17703
      return this;
17704
    }
17705
 
17706
    public void unsetSuccess() {
17707
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
17708
    }
17709
 
17710
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
17711
    public boolean isSetSuccess() {
17712
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
17713
    }
17714
 
17715
    public void setSuccessIsSet(boolean value) {
17716
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
17717
    }
17718
 
17719
    public TransactionServiceException getEx() {
17720
      return this.ex;
17721
    }
17722
 
17723
    public markOrdersAsManifested_result setEx(TransactionServiceException ex) {
17724
      this.ex = ex;
17725
      return this;
17726
    }
17727
 
17728
    public void unsetEx() {
17729
      this.ex = null;
17730
    }
17731
 
17732
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
17733
    public boolean isSetEx() {
17734
      return this.ex != null;
17735
    }
17736
 
17737
    public void setExIsSet(boolean value) {
17738
      if (!value) {
17739
        this.ex = null;
17740
      }
17741
    }
17742
 
17743
    public void setFieldValue(_Fields field, Object value) {
17744
      switch (field) {
17745
      case SUCCESS:
17746
        if (value == null) {
17747
          unsetSuccess();
17748
        } else {
17749
          setSuccess((Boolean)value);
17750
        }
17751
        break;
17752
 
17753
      case EX:
17754
        if (value == null) {
17755
          unsetEx();
17756
        } else {
17757
          setEx((TransactionServiceException)value);
17758
        }
17759
        break;
17760
 
17761
      }
17762
    }
17763
 
17764
    public void setFieldValue(int fieldID, Object value) {
17765
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
17766
    }
17767
 
17768
    public Object getFieldValue(_Fields field) {
17769
      switch (field) {
17770
      case SUCCESS:
17771
        return new Boolean(isSuccess());
17772
 
17773
      case EX:
17774
        return getEx();
17775
 
17776
      }
17777
      throw new IllegalStateException();
17778
    }
17779
 
17780
    public Object getFieldValue(int fieldId) {
17781
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
17782
    }
17783
 
17784
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
17785
    public boolean isSet(_Fields field) {
17786
      switch (field) {
17787
      case SUCCESS:
17788
        return isSetSuccess();
17789
      case EX:
17790
        return isSetEx();
17791
      }
17792
      throw new IllegalStateException();
17793
    }
17794
 
17795
    public boolean isSet(int fieldID) {
17796
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
17797
    }
17798
 
17799
    @Override
17800
    public boolean equals(Object that) {
17801
      if (that == null)
17802
        return false;
17803
      if (that instanceof markOrdersAsManifested_result)
17804
        return this.equals((markOrdersAsManifested_result)that);
17805
      return false;
17806
    }
17807
 
17808
    public boolean equals(markOrdersAsManifested_result that) {
17809
      if (that == null)
17810
        return false;
17811
 
17812
      boolean this_present_success = true;
17813
      boolean that_present_success = true;
17814
      if (this_present_success || that_present_success) {
17815
        if (!(this_present_success && that_present_success))
17816
          return false;
17817
        if (this.success != that.success)
17818
          return false;
17819
      }
17820
 
17821
      boolean this_present_ex = true && this.isSetEx();
17822
      boolean that_present_ex = true && that.isSetEx();
17823
      if (this_present_ex || that_present_ex) {
17824
        if (!(this_present_ex && that_present_ex))
17825
          return false;
17826
        if (!this.ex.equals(that.ex))
17827
          return false;
17828
      }
17829
 
17830
      return true;
17831
    }
17832
 
17833
    @Override
17834
    public int hashCode() {
17835
      return 0;
17836
    }
17837
 
17838
    public int compareTo(markOrdersAsManifested_result other) {
17839
      if (!getClass().equals(other.getClass())) {
17840
        return getClass().getName().compareTo(other.getClass().getName());
17841
      }
17842
 
17843
      int lastComparison = 0;
17844
      markOrdersAsManifested_result typedOther = (markOrdersAsManifested_result)other;
17845
 
17846
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
17847
      if (lastComparison != 0) {
17848
        return lastComparison;
17849
      }
17850
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
17851
      if (lastComparison != 0) {
17852
        return lastComparison;
17853
      }
17854
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
17855
      if (lastComparison != 0) {
17856
        return lastComparison;
17857
      }
17858
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
17859
      if (lastComparison != 0) {
17860
        return lastComparison;
17861
      }
17862
      return 0;
17863
    }
17864
 
17865
    public void read(TProtocol iprot) throws TException {
17866
      TField field;
17867
      iprot.readStructBegin();
17868
      while (true)
17869
      {
17870
        field = iprot.readFieldBegin();
17871
        if (field.type == TType.STOP) { 
17872
          break;
17873
        }
17874
        _Fields fieldId = _Fields.findByThriftId(field.id);
17875
        if (fieldId == null) {
17876
          TProtocolUtil.skip(iprot, field.type);
17877
        } else {
17878
          switch (fieldId) {
17879
            case SUCCESS:
17880
              if (field.type == TType.BOOL) {
17881
                this.success = iprot.readBool();
17882
                setSuccessIsSet(true);
17883
              } else { 
17884
                TProtocolUtil.skip(iprot, field.type);
17885
              }
17886
              break;
17887
            case EX:
17888
              if (field.type == TType.STRUCT) {
17889
                this.ex = new TransactionServiceException();
17890
                this.ex.read(iprot);
17891
              } else { 
17892
                TProtocolUtil.skip(iprot, field.type);
17893
              }
17894
              break;
17895
          }
17896
          iprot.readFieldEnd();
17897
        }
17898
      }
17899
      iprot.readStructEnd();
17900
      validate();
17901
    }
17902
 
17903
    public void write(TProtocol oprot) throws TException {
17904
      oprot.writeStructBegin(STRUCT_DESC);
17905
 
17906
      if (this.isSetSuccess()) {
17907
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
17908
        oprot.writeBool(this.success);
17909
        oprot.writeFieldEnd();
17910
      } else if (this.isSetEx()) {
17911
        oprot.writeFieldBegin(EX_FIELD_DESC);
17912
        this.ex.write(oprot);
17913
        oprot.writeFieldEnd();
17914
      }
17915
      oprot.writeFieldStop();
17916
      oprot.writeStructEnd();
17917
    }
17918
 
17919
    @Override
17920
    public String toString() {
17921
      StringBuilder sb = new StringBuilder("markOrdersAsManifested_result(");
17922
      boolean first = true;
17923
 
17924
      sb.append("success:");
17925
      sb.append(this.success);
17926
      first = false;
17927
      if (!first) sb.append(", ");
17928
      sb.append("ex:");
17929
      if (this.ex == null) {
17930
        sb.append("null");
17931
      } else {
17932
        sb.append(this.ex);
17933
      }
17934
      first = false;
17935
      sb.append(")");
17936
      return sb.toString();
17937
    }
17938
 
17939
    public void validate() throws TException {
17940
      // check for required fields
17941
    }
17942
 
17943
  }
17944
 
1114 chandransh 17945
  public static class markOrdersAsPickedUp_args implements TBase<markOrdersAsPickedUp_args._Fields>, java.io.Serializable, Cloneable   {
17946
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsPickedUp_args");
17947
 
17948
    private static final TField PROVIDER_ID_FIELD_DESC = new TField("providerId", TType.I64, (short)1);
17949
    private static final TField PICKUP_DETAILS_FIELD_DESC = new TField("pickupDetails", TType.MAP, (short)2);
17950
 
17951
    private long providerId;
1245 chandransh 17952
    private Map<String,String> pickupDetails;
1114 chandransh 17953
 
17954
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17955
    public enum _Fields implements TFieldIdEnum {
17956
      PROVIDER_ID((short)1, "providerId"),
17957
      PICKUP_DETAILS((short)2, "pickupDetails");
17958
 
17959
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
17960
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17961
 
17962
      static {
17963
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17964
          byId.put((int)field._thriftId, field);
17965
          byName.put(field.getFieldName(), field);
17966
        }
17967
      }
17968
 
17969
      /**
17970
       * Find the _Fields constant that matches fieldId, or null if its not found.
17971
       */
17972
      public static _Fields findByThriftId(int fieldId) {
17973
        return byId.get(fieldId);
17974
      }
17975
 
17976
      /**
17977
       * Find the _Fields constant that matches fieldId, throwing an exception
17978
       * if it is not found.
17979
       */
17980
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17981
        _Fields fields = findByThriftId(fieldId);
17982
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17983
        return fields;
17984
      }
17985
 
17986
      /**
17987
       * Find the _Fields constant that matches name, or null if its not found.
17988
       */
17989
      public static _Fields findByName(String name) {
17990
        return byName.get(name);
17991
      }
17992
 
17993
      private final short _thriftId;
17994
      private final String _fieldName;
17995
 
17996
      _Fields(short thriftId, String fieldName) {
17997
        _thriftId = thriftId;
17998
        _fieldName = fieldName;
17999
      }
18000
 
18001
      public short getThriftFieldId() {
18002
        return _thriftId;
18003
      }
18004
 
18005
      public String getFieldName() {
18006
        return _fieldName;
18007
      }
18008
    }
18009
 
18010
    // isset id assignments
18011
    private static final int __PROVIDERID_ISSET_ID = 0;
18012
    private BitSet __isset_bit_vector = new BitSet(1);
18013
 
18014
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
18015
      put(_Fields.PROVIDER_ID, new FieldMetaData("providerId", TFieldRequirementType.DEFAULT, 
18016
          new FieldValueMetaData(TType.I64)));
18017
      put(_Fields.PICKUP_DETAILS, new FieldMetaData("pickupDetails", TFieldRequirementType.DEFAULT, 
18018
          new MapMetaData(TType.MAP, 
18019
              new FieldValueMetaData(TType.STRING), 
1245 chandransh 18020
              new FieldValueMetaData(TType.STRING))));
1114 chandransh 18021
    }});
18022
 
18023
    static {
18024
      FieldMetaData.addStructMetaDataMap(markOrdersAsPickedUp_args.class, metaDataMap);
18025
    }
18026
 
18027
    public markOrdersAsPickedUp_args() {
18028
    }
18029
 
18030
    public markOrdersAsPickedUp_args(
18031
      long providerId,
1245 chandransh 18032
      Map<String,String> pickupDetails)
1114 chandransh 18033
    {
18034
      this();
18035
      this.providerId = providerId;
18036
      setProviderIdIsSet(true);
18037
      this.pickupDetails = pickupDetails;
18038
    }
18039
 
18040
    /**
18041
     * Performs a deep copy on <i>other</i>.
18042
     */
18043
    public markOrdersAsPickedUp_args(markOrdersAsPickedUp_args other) {
18044
      __isset_bit_vector.clear();
18045
      __isset_bit_vector.or(other.__isset_bit_vector);
18046
      this.providerId = other.providerId;
18047
      if (other.isSetPickupDetails()) {
1245 chandransh 18048
        Map<String,String> __this__pickupDetails = new HashMap<String,String>();
18049
        for (Map.Entry<String, String> other_element : other.pickupDetails.entrySet()) {
1114 chandransh 18050
 
18051
          String other_element_key = other_element.getKey();
1245 chandransh 18052
          String other_element_value = other_element.getValue();
1114 chandransh 18053
 
18054
          String __this__pickupDetails_copy_key = other_element_key;
18055
 
1245 chandransh 18056
          String __this__pickupDetails_copy_value = other_element_value;
1114 chandransh 18057
 
18058
          __this__pickupDetails.put(__this__pickupDetails_copy_key, __this__pickupDetails_copy_value);
18059
        }
18060
        this.pickupDetails = __this__pickupDetails;
18061
      }
18062
    }
18063
 
18064
    public markOrdersAsPickedUp_args deepCopy() {
18065
      return new markOrdersAsPickedUp_args(this);
18066
    }
18067
 
18068
    @Deprecated
18069
    public markOrdersAsPickedUp_args clone() {
18070
      return new markOrdersAsPickedUp_args(this);
18071
    }
18072
 
18073
    public long getProviderId() {
18074
      return this.providerId;
18075
    }
18076
 
18077
    public markOrdersAsPickedUp_args setProviderId(long providerId) {
18078
      this.providerId = providerId;
18079
      setProviderIdIsSet(true);
18080
      return this;
18081
    }
18082
 
18083
    public void unsetProviderId() {
18084
      __isset_bit_vector.clear(__PROVIDERID_ISSET_ID);
18085
    }
18086
 
18087
    /** Returns true if field providerId is set (has been asigned a value) and false otherwise */
18088
    public boolean isSetProviderId() {
18089
      return __isset_bit_vector.get(__PROVIDERID_ISSET_ID);
18090
    }
18091
 
18092
    public void setProviderIdIsSet(boolean value) {
18093
      __isset_bit_vector.set(__PROVIDERID_ISSET_ID, value);
18094
    }
18095
 
18096
    public int getPickupDetailsSize() {
18097
      return (this.pickupDetails == null) ? 0 : this.pickupDetails.size();
18098
    }
18099
 
1245 chandransh 18100
    public void putToPickupDetails(String key, String val) {
1114 chandransh 18101
      if (this.pickupDetails == null) {
1245 chandransh 18102
        this.pickupDetails = new HashMap<String,String>();
1114 chandransh 18103
      }
18104
      this.pickupDetails.put(key, val);
18105
    }
18106
 
1245 chandransh 18107
    public Map<String,String> getPickupDetails() {
1114 chandransh 18108
      return this.pickupDetails;
18109
    }
18110
 
1245 chandransh 18111
    public markOrdersAsPickedUp_args setPickupDetails(Map<String,String> pickupDetails) {
1114 chandransh 18112
      this.pickupDetails = pickupDetails;
18113
      return this;
18114
    }
18115
 
18116
    public void unsetPickupDetails() {
18117
      this.pickupDetails = null;
18118
    }
18119
 
18120
    /** Returns true if field pickupDetails is set (has been asigned a value) and false otherwise */
18121
    public boolean isSetPickupDetails() {
18122
      return this.pickupDetails != null;
18123
    }
18124
 
18125
    public void setPickupDetailsIsSet(boolean value) {
18126
      if (!value) {
18127
        this.pickupDetails = null;
18128
      }
18129
    }
18130
 
18131
    public void setFieldValue(_Fields field, Object value) {
18132
      switch (field) {
18133
      case PROVIDER_ID:
18134
        if (value == null) {
18135
          unsetProviderId();
18136
        } else {
18137
          setProviderId((Long)value);
18138
        }
18139
        break;
18140
 
18141
      case PICKUP_DETAILS:
18142
        if (value == null) {
18143
          unsetPickupDetails();
18144
        } else {
1245 chandransh 18145
          setPickupDetails((Map<String,String>)value);
1114 chandransh 18146
        }
18147
        break;
18148
 
18149
      }
18150
    }
18151
 
18152
    public void setFieldValue(int fieldID, Object value) {
18153
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
18154
    }
18155
 
18156
    public Object getFieldValue(_Fields field) {
18157
      switch (field) {
18158
      case PROVIDER_ID:
18159
        return new Long(getProviderId());
18160
 
18161
      case PICKUP_DETAILS:
18162
        return getPickupDetails();
18163
 
18164
      }
18165
      throw new IllegalStateException();
18166
    }
18167
 
18168
    public Object getFieldValue(int fieldId) {
18169
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
18170
    }
18171
 
18172
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
18173
    public boolean isSet(_Fields field) {
18174
      switch (field) {
18175
      case PROVIDER_ID:
18176
        return isSetProviderId();
18177
      case PICKUP_DETAILS:
18178
        return isSetPickupDetails();
18179
      }
18180
      throw new IllegalStateException();
18181
    }
18182
 
18183
    public boolean isSet(int fieldID) {
18184
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
18185
    }
18186
 
18187
    @Override
18188
    public boolean equals(Object that) {
18189
      if (that == null)
18190
        return false;
18191
      if (that instanceof markOrdersAsPickedUp_args)
18192
        return this.equals((markOrdersAsPickedUp_args)that);
18193
      return false;
18194
    }
18195
 
18196
    public boolean equals(markOrdersAsPickedUp_args that) {
18197
      if (that == null)
18198
        return false;
18199
 
18200
      boolean this_present_providerId = true;
18201
      boolean that_present_providerId = true;
18202
      if (this_present_providerId || that_present_providerId) {
18203
        if (!(this_present_providerId && that_present_providerId))
18204
          return false;
18205
        if (this.providerId != that.providerId)
18206
          return false;
18207
      }
18208
 
18209
      boolean this_present_pickupDetails = true && this.isSetPickupDetails();
18210
      boolean that_present_pickupDetails = true && that.isSetPickupDetails();
18211
      if (this_present_pickupDetails || that_present_pickupDetails) {
18212
        if (!(this_present_pickupDetails && that_present_pickupDetails))
18213
          return false;
18214
        if (!this.pickupDetails.equals(that.pickupDetails))
18215
          return false;
18216
      }
18217
 
18218
      return true;
18219
    }
18220
 
18221
    @Override
18222
    public int hashCode() {
18223
      return 0;
18224
    }
18225
 
18226
    public void read(TProtocol iprot) throws TException {
18227
      TField field;
18228
      iprot.readStructBegin();
18229
      while (true)
18230
      {
18231
        field = iprot.readFieldBegin();
18232
        if (field.type == TType.STOP) { 
18233
          break;
18234
        }
18235
        _Fields fieldId = _Fields.findByThriftId(field.id);
18236
        if (fieldId == null) {
18237
          TProtocolUtil.skip(iprot, field.type);
18238
        } else {
18239
          switch (fieldId) {
18240
            case PROVIDER_ID:
18241
              if (field.type == TType.I64) {
18242
                this.providerId = iprot.readI64();
18243
                setProviderIdIsSet(true);
18244
              } else { 
18245
                TProtocolUtil.skip(iprot, field.type);
18246
              }
18247
              break;
18248
            case PICKUP_DETAILS:
18249
              if (field.type == TType.MAP) {
18250
                {
1221 chandransh 18251
                  TMap _map40 = iprot.readMapBegin();
1245 chandransh 18252
                  this.pickupDetails = new HashMap<String,String>(2*_map40.size);
1221 chandransh 18253
                  for (int _i41 = 0; _i41 < _map40.size; ++_i41)
1114 chandransh 18254
                  {
1221 chandransh 18255
                    String _key42;
1245 chandransh 18256
                    String _val43;
1221 chandransh 18257
                    _key42 = iprot.readString();
1245 chandransh 18258
                    _val43 = iprot.readString();
1221 chandransh 18259
                    this.pickupDetails.put(_key42, _val43);
1114 chandransh 18260
                  }
18261
                  iprot.readMapEnd();
18262
                }
18263
              } else { 
18264
                TProtocolUtil.skip(iprot, field.type);
18265
              }
18266
              break;
18267
          }
18268
          iprot.readFieldEnd();
18269
        }
18270
      }
18271
      iprot.readStructEnd();
18272
      validate();
18273
    }
18274
 
18275
    public void write(TProtocol oprot) throws TException {
18276
      validate();
18277
 
18278
      oprot.writeStructBegin(STRUCT_DESC);
18279
      oprot.writeFieldBegin(PROVIDER_ID_FIELD_DESC);
18280
      oprot.writeI64(this.providerId);
18281
      oprot.writeFieldEnd();
18282
      if (this.pickupDetails != null) {
18283
        oprot.writeFieldBegin(PICKUP_DETAILS_FIELD_DESC);
18284
        {
1245 chandransh 18285
          oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.pickupDetails.size()));
18286
          for (Map.Entry<String, String> _iter44 : this.pickupDetails.entrySet())
1114 chandransh 18287
          {
1221 chandransh 18288
            oprot.writeString(_iter44.getKey());
1245 chandransh 18289
            oprot.writeString(_iter44.getValue());
1114 chandransh 18290
          }
18291
          oprot.writeMapEnd();
18292
        }
18293
        oprot.writeFieldEnd();
18294
      }
18295
      oprot.writeFieldStop();
18296
      oprot.writeStructEnd();
18297
    }
18298
 
18299
    @Override
18300
    public String toString() {
18301
      StringBuilder sb = new StringBuilder("markOrdersAsPickedUp_args(");
18302
      boolean first = true;
18303
 
18304
      sb.append("providerId:");
18305
      sb.append(this.providerId);
18306
      first = false;
18307
      if (!first) sb.append(", ");
18308
      sb.append("pickupDetails:");
18309
      if (this.pickupDetails == null) {
18310
        sb.append("null");
18311
      } else {
18312
        sb.append(this.pickupDetails);
18313
      }
18314
      first = false;
18315
      sb.append(")");
18316
      return sb.toString();
18317
    }
18318
 
18319
    public void validate() throws TException {
18320
      // check for required fields
18321
    }
18322
 
18323
  }
18324
 
18325
  public static class markOrdersAsPickedUp_result implements TBase<markOrdersAsPickedUp_result._Fields>, java.io.Serializable, Cloneable, Comparable<markOrdersAsPickedUp_result>   {
18326
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsPickedUp_result");
18327
 
18328
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
18329
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
18330
 
18331
    private List<Order> success;
18332
    private TransactionServiceException ex;
18333
 
18334
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18335
    public enum _Fields implements TFieldIdEnum {
18336
      SUCCESS((short)0, "success"),
18337
      EX((short)1, "ex");
18338
 
18339
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
18340
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18341
 
18342
      static {
18343
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18344
          byId.put((int)field._thriftId, field);
18345
          byName.put(field.getFieldName(), field);
18346
        }
18347
      }
18348
 
18349
      /**
18350
       * Find the _Fields constant that matches fieldId, or null if its not found.
18351
       */
18352
      public static _Fields findByThriftId(int fieldId) {
18353
        return byId.get(fieldId);
18354
      }
18355
 
18356
      /**
18357
       * Find the _Fields constant that matches fieldId, throwing an exception
18358
       * if it is not found.
18359
       */
18360
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18361
        _Fields fields = findByThriftId(fieldId);
18362
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18363
        return fields;
18364
      }
18365
 
18366
      /**
18367
       * Find the _Fields constant that matches name, or null if its not found.
18368
       */
18369
      public static _Fields findByName(String name) {
18370
        return byName.get(name);
18371
      }
18372
 
18373
      private final short _thriftId;
18374
      private final String _fieldName;
18375
 
18376
      _Fields(short thriftId, String fieldName) {
18377
        _thriftId = thriftId;
18378
        _fieldName = fieldName;
18379
      }
18380
 
18381
      public short getThriftFieldId() {
18382
        return _thriftId;
18383
      }
18384
 
18385
      public String getFieldName() {
18386
        return _fieldName;
18387
      }
18388
    }
18389
 
18390
    // isset id assignments
18391
 
18392
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
18393
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
18394
          new ListMetaData(TType.LIST, 
18395
              new StructMetaData(TType.STRUCT, Order.class))));
18396
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
18397
          new FieldValueMetaData(TType.STRUCT)));
18398
    }});
18399
 
18400
    static {
18401
      FieldMetaData.addStructMetaDataMap(markOrdersAsPickedUp_result.class, metaDataMap);
18402
    }
18403
 
18404
    public markOrdersAsPickedUp_result() {
18405
    }
18406
 
18407
    public markOrdersAsPickedUp_result(
18408
      List<Order> success,
18409
      TransactionServiceException ex)
18410
    {
18411
      this();
18412
      this.success = success;
18413
      this.ex = ex;
18414
    }
18415
 
18416
    /**
18417
     * Performs a deep copy on <i>other</i>.
18418
     */
18419
    public markOrdersAsPickedUp_result(markOrdersAsPickedUp_result other) {
18420
      if (other.isSetSuccess()) {
18421
        List<Order> __this__success = new ArrayList<Order>();
18422
        for (Order other_element : other.success) {
18423
          __this__success.add(new Order(other_element));
18424
        }
18425
        this.success = __this__success;
18426
      }
18427
      if (other.isSetEx()) {
18428
        this.ex = new TransactionServiceException(other.ex);
18429
      }
18430
    }
18431
 
18432
    public markOrdersAsPickedUp_result deepCopy() {
18433
      return new markOrdersAsPickedUp_result(this);
18434
    }
18435
 
18436
    @Deprecated
18437
    public markOrdersAsPickedUp_result clone() {
18438
      return new markOrdersAsPickedUp_result(this);
18439
    }
18440
 
18441
    public int getSuccessSize() {
18442
      return (this.success == null) ? 0 : this.success.size();
18443
    }
18444
 
18445
    public java.util.Iterator<Order> getSuccessIterator() {
18446
      return (this.success == null) ? null : this.success.iterator();
18447
    }
18448
 
18449
    public void addToSuccess(Order elem) {
18450
      if (this.success == null) {
18451
        this.success = new ArrayList<Order>();
18452
      }
18453
      this.success.add(elem);
18454
    }
18455
 
18456
    public List<Order> getSuccess() {
18457
      return this.success;
18458
    }
18459
 
18460
    public markOrdersAsPickedUp_result setSuccess(List<Order> success) {
18461
      this.success = success;
18462
      return this;
18463
    }
18464
 
18465
    public void unsetSuccess() {
18466
      this.success = null;
18467
    }
18468
 
18469
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
18470
    public boolean isSetSuccess() {
18471
      return this.success != null;
18472
    }
18473
 
18474
    public void setSuccessIsSet(boolean value) {
18475
      if (!value) {
18476
        this.success = null;
18477
      }
18478
    }
18479
 
18480
    public TransactionServiceException getEx() {
18481
      return this.ex;
18482
    }
18483
 
18484
    public markOrdersAsPickedUp_result setEx(TransactionServiceException ex) {
18485
      this.ex = ex;
18486
      return this;
18487
    }
18488
 
18489
    public void unsetEx() {
18490
      this.ex = null;
18491
    }
18492
 
18493
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
18494
    public boolean isSetEx() {
18495
      return this.ex != null;
18496
    }
18497
 
18498
    public void setExIsSet(boolean value) {
18499
      if (!value) {
18500
        this.ex = null;
18501
      }
18502
    }
18503
 
18504
    public void setFieldValue(_Fields field, Object value) {
18505
      switch (field) {
18506
      case SUCCESS:
18507
        if (value == null) {
18508
          unsetSuccess();
18509
        } else {
18510
          setSuccess((List<Order>)value);
18511
        }
18512
        break;
18513
 
18514
      case EX:
18515
        if (value == null) {
18516
          unsetEx();
18517
        } else {
18518
          setEx((TransactionServiceException)value);
18519
        }
18520
        break;
18521
 
18522
      }
18523
    }
18524
 
18525
    public void setFieldValue(int fieldID, Object value) {
18526
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
18527
    }
18528
 
18529
    public Object getFieldValue(_Fields field) {
18530
      switch (field) {
18531
      case SUCCESS:
18532
        return getSuccess();
18533
 
18534
      case EX:
18535
        return getEx();
18536
 
18537
      }
18538
      throw new IllegalStateException();
18539
    }
18540
 
18541
    public Object getFieldValue(int fieldId) {
18542
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
18543
    }
18544
 
18545
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
18546
    public boolean isSet(_Fields field) {
18547
      switch (field) {
18548
      case SUCCESS:
18549
        return isSetSuccess();
18550
      case EX:
18551
        return isSetEx();
18552
      }
18553
      throw new IllegalStateException();
18554
    }
18555
 
18556
    public boolean isSet(int fieldID) {
18557
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
18558
    }
18559
 
18560
    @Override
18561
    public boolean equals(Object that) {
18562
      if (that == null)
18563
        return false;
18564
      if (that instanceof markOrdersAsPickedUp_result)
18565
        return this.equals((markOrdersAsPickedUp_result)that);
18566
      return false;
18567
    }
18568
 
18569
    public boolean equals(markOrdersAsPickedUp_result that) {
18570
      if (that == null)
18571
        return false;
18572
 
18573
      boolean this_present_success = true && this.isSetSuccess();
18574
      boolean that_present_success = true && that.isSetSuccess();
18575
      if (this_present_success || that_present_success) {
18576
        if (!(this_present_success && that_present_success))
18577
          return false;
18578
        if (!this.success.equals(that.success))
18579
          return false;
18580
      }
18581
 
18582
      boolean this_present_ex = true && this.isSetEx();
18583
      boolean that_present_ex = true && that.isSetEx();
18584
      if (this_present_ex || that_present_ex) {
18585
        if (!(this_present_ex && that_present_ex))
18586
          return false;
18587
        if (!this.ex.equals(that.ex))
18588
          return false;
18589
      }
18590
 
18591
      return true;
18592
    }
18593
 
18594
    @Override
18595
    public int hashCode() {
18596
      return 0;
18597
    }
18598
 
18599
    public int compareTo(markOrdersAsPickedUp_result other) {
18600
      if (!getClass().equals(other.getClass())) {
18601
        return getClass().getName().compareTo(other.getClass().getName());
18602
      }
18603
 
18604
      int lastComparison = 0;
18605
      markOrdersAsPickedUp_result typedOther = (markOrdersAsPickedUp_result)other;
18606
 
18607
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
18608
      if (lastComparison != 0) {
18609
        return lastComparison;
18610
      }
18611
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
18612
      if (lastComparison != 0) {
18613
        return lastComparison;
18614
      }
18615
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
18616
      if (lastComparison != 0) {
18617
        return lastComparison;
18618
      }
18619
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
18620
      if (lastComparison != 0) {
18621
        return lastComparison;
18622
      }
18623
      return 0;
18624
    }
18625
 
18626
    public void read(TProtocol iprot) throws TException {
18627
      TField field;
18628
      iprot.readStructBegin();
18629
      while (true)
18630
      {
18631
        field = iprot.readFieldBegin();
18632
        if (field.type == TType.STOP) { 
18633
          break;
18634
        }
18635
        _Fields fieldId = _Fields.findByThriftId(field.id);
18636
        if (fieldId == null) {
18637
          TProtocolUtil.skip(iprot, field.type);
18638
        } else {
18639
          switch (fieldId) {
18640
            case SUCCESS:
18641
              if (field.type == TType.LIST) {
18642
                {
1221 chandransh 18643
                  TList _list45 = iprot.readListBegin();
18644
                  this.success = new ArrayList<Order>(_list45.size);
18645
                  for (int _i46 = 0; _i46 < _list45.size; ++_i46)
1114 chandransh 18646
                  {
1221 chandransh 18647
                    Order _elem47;
18648
                    _elem47 = new Order();
18649
                    _elem47.read(iprot);
18650
                    this.success.add(_elem47);
1114 chandransh 18651
                  }
18652
                  iprot.readListEnd();
18653
                }
18654
              } else { 
18655
                TProtocolUtil.skip(iprot, field.type);
18656
              }
18657
              break;
18658
            case EX:
18659
              if (field.type == TType.STRUCT) {
18660
                this.ex = new TransactionServiceException();
18661
                this.ex.read(iprot);
18662
              } else { 
18663
                TProtocolUtil.skip(iprot, field.type);
18664
              }
18665
              break;
18666
          }
18667
          iprot.readFieldEnd();
18668
        }
18669
      }
18670
      iprot.readStructEnd();
18671
      validate();
18672
    }
18673
 
18674
    public void write(TProtocol oprot) throws TException {
18675
      oprot.writeStructBegin(STRUCT_DESC);
18676
 
18677
      if (this.isSetSuccess()) {
18678
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
18679
        {
18680
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
1221 chandransh 18681
          for (Order _iter48 : this.success)
1114 chandransh 18682
          {
1221 chandransh 18683
            _iter48.write(oprot);
1114 chandransh 18684
          }
18685
          oprot.writeListEnd();
18686
        }
18687
        oprot.writeFieldEnd();
18688
      } else if (this.isSetEx()) {
18689
        oprot.writeFieldBegin(EX_FIELD_DESC);
18690
        this.ex.write(oprot);
18691
        oprot.writeFieldEnd();
18692
      }
18693
      oprot.writeFieldStop();
18694
      oprot.writeStructEnd();
18695
    }
18696
 
18697
    @Override
18698
    public String toString() {
18699
      StringBuilder sb = new StringBuilder("markOrdersAsPickedUp_result(");
18700
      boolean first = true;
18701
 
18702
      sb.append("success:");
18703
      if (this.success == null) {
18704
        sb.append("null");
18705
      } else {
18706
        sb.append(this.success);
18707
      }
18708
      first = false;
18709
      if (!first) sb.append(", ");
18710
      sb.append("ex:");
18711
      if (this.ex == null) {
18712
        sb.append("null");
18713
      } else {
18714
        sb.append(this.ex);
18715
      }
18716
      first = false;
18717
      sb.append(")");
18718
      return sb.toString();
18719
    }
18720
 
18721
    public void validate() throws TException {
18722
      // check for required fields
18723
    }
18724
 
18725
  }
18726
 
1133 chandransh 18727
  public static class markOrdersAsDelivered_args implements TBase<markOrdersAsDelivered_args._Fields>, java.io.Serializable, Cloneable   {
18728
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsDelivered_args");
18729
 
18730
    private static final TField PROVIDER_ID_FIELD_DESC = new TField("providerId", TType.I64, (short)1);
18731
    private static final TField DELIVERED_ORDERS_FIELD_DESC = new TField("deliveredOrders", TType.MAP, (short)2);
18732
 
18733
    private long providerId;
18734
    private Map<String,String> deliveredOrders;
18735
 
18736
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18737
    public enum _Fields implements TFieldIdEnum {
18738
      PROVIDER_ID((short)1, "providerId"),
18739
      DELIVERED_ORDERS((short)2, "deliveredOrders");
18740
 
18741
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
18742
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18743
 
18744
      static {
18745
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18746
          byId.put((int)field._thriftId, field);
18747
          byName.put(field.getFieldName(), field);
18748
        }
18749
      }
18750
 
18751
      /**
18752
       * Find the _Fields constant that matches fieldId, or null if its not found.
18753
       */
18754
      public static _Fields findByThriftId(int fieldId) {
18755
        return byId.get(fieldId);
18756
      }
18757
 
18758
      /**
18759
       * Find the _Fields constant that matches fieldId, throwing an exception
18760
       * if it is not found.
18761
       */
18762
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18763
        _Fields fields = findByThriftId(fieldId);
18764
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18765
        return fields;
18766
      }
18767
 
18768
      /**
18769
       * Find the _Fields constant that matches name, or null if its not found.
18770
       */
18771
      public static _Fields findByName(String name) {
18772
        return byName.get(name);
18773
      }
18774
 
18775
      private final short _thriftId;
18776
      private final String _fieldName;
18777
 
18778
      _Fields(short thriftId, String fieldName) {
18779
        _thriftId = thriftId;
18780
        _fieldName = fieldName;
18781
      }
18782
 
18783
      public short getThriftFieldId() {
18784
        return _thriftId;
18785
      }
18786
 
18787
      public String getFieldName() {
18788
        return _fieldName;
18789
      }
18790
    }
18791
 
18792
    // isset id assignments
18793
    private static final int __PROVIDERID_ISSET_ID = 0;
18794
    private BitSet __isset_bit_vector = new BitSet(1);
18795
 
18796
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
18797
      put(_Fields.PROVIDER_ID, new FieldMetaData("providerId", TFieldRequirementType.DEFAULT, 
18798
          new FieldValueMetaData(TType.I64)));
18799
      put(_Fields.DELIVERED_ORDERS, new FieldMetaData("deliveredOrders", TFieldRequirementType.DEFAULT, 
18800
          new MapMetaData(TType.MAP, 
18801
              new FieldValueMetaData(TType.STRING), 
18802
              new FieldValueMetaData(TType.STRING))));
18803
    }});
18804
 
18805
    static {
18806
      FieldMetaData.addStructMetaDataMap(markOrdersAsDelivered_args.class, metaDataMap);
18807
    }
18808
 
18809
    public markOrdersAsDelivered_args() {
18810
    }
18811
 
18812
    public markOrdersAsDelivered_args(
18813
      long providerId,
18814
      Map<String,String> deliveredOrders)
18815
    {
18816
      this();
18817
      this.providerId = providerId;
18818
      setProviderIdIsSet(true);
18819
      this.deliveredOrders = deliveredOrders;
18820
    }
18821
 
18822
    /**
18823
     * Performs a deep copy on <i>other</i>.
18824
     */
18825
    public markOrdersAsDelivered_args(markOrdersAsDelivered_args other) {
18826
      __isset_bit_vector.clear();
18827
      __isset_bit_vector.or(other.__isset_bit_vector);
18828
      this.providerId = other.providerId;
18829
      if (other.isSetDeliveredOrders()) {
18830
        Map<String,String> __this__deliveredOrders = new HashMap<String,String>();
18831
        for (Map.Entry<String, String> other_element : other.deliveredOrders.entrySet()) {
18832
 
18833
          String other_element_key = other_element.getKey();
18834
          String other_element_value = other_element.getValue();
18835
 
18836
          String __this__deliveredOrders_copy_key = other_element_key;
18837
 
18838
          String __this__deliveredOrders_copy_value = other_element_value;
18839
 
18840
          __this__deliveredOrders.put(__this__deliveredOrders_copy_key, __this__deliveredOrders_copy_value);
18841
        }
18842
        this.deliveredOrders = __this__deliveredOrders;
18843
      }
18844
    }
18845
 
18846
    public markOrdersAsDelivered_args deepCopy() {
18847
      return new markOrdersAsDelivered_args(this);
18848
    }
18849
 
18850
    @Deprecated
18851
    public markOrdersAsDelivered_args clone() {
18852
      return new markOrdersAsDelivered_args(this);
18853
    }
18854
 
18855
    public long getProviderId() {
18856
      return this.providerId;
18857
    }
18858
 
18859
    public markOrdersAsDelivered_args setProviderId(long providerId) {
18860
      this.providerId = providerId;
18861
      setProviderIdIsSet(true);
18862
      return this;
18863
    }
18864
 
18865
    public void unsetProviderId() {
18866
      __isset_bit_vector.clear(__PROVIDERID_ISSET_ID);
18867
    }
18868
 
18869
    /** Returns true if field providerId is set (has been asigned a value) and false otherwise */
18870
    public boolean isSetProviderId() {
18871
      return __isset_bit_vector.get(__PROVIDERID_ISSET_ID);
18872
    }
18873
 
18874
    public void setProviderIdIsSet(boolean value) {
18875
      __isset_bit_vector.set(__PROVIDERID_ISSET_ID, value);
18876
    }
18877
 
18878
    public int getDeliveredOrdersSize() {
18879
      return (this.deliveredOrders == null) ? 0 : this.deliveredOrders.size();
18880
    }
18881
 
18882
    public void putToDeliveredOrders(String key, String val) {
18883
      if (this.deliveredOrders == null) {
18884
        this.deliveredOrders = new HashMap<String,String>();
18885
      }
18886
      this.deliveredOrders.put(key, val);
18887
    }
18888
 
18889
    public Map<String,String> getDeliveredOrders() {
18890
      return this.deliveredOrders;
18891
    }
18892
 
18893
    public markOrdersAsDelivered_args setDeliveredOrders(Map<String,String> deliveredOrders) {
18894
      this.deliveredOrders = deliveredOrders;
18895
      return this;
18896
    }
18897
 
18898
    public void unsetDeliveredOrders() {
18899
      this.deliveredOrders = null;
18900
    }
18901
 
18902
    /** Returns true if field deliveredOrders is set (has been asigned a value) and false otherwise */
18903
    public boolean isSetDeliveredOrders() {
18904
      return this.deliveredOrders != null;
18905
    }
18906
 
18907
    public void setDeliveredOrdersIsSet(boolean value) {
18908
      if (!value) {
18909
        this.deliveredOrders = null;
18910
      }
18911
    }
18912
 
18913
    public void setFieldValue(_Fields field, Object value) {
18914
      switch (field) {
18915
      case PROVIDER_ID:
18916
        if (value == null) {
18917
          unsetProviderId();
18918
        } else {
18919
          setProviderId((Long)value);
18920
        }
18921
        break;
18922
 
18923
      case DELIVERED_ORDERS:
18924
        if (value == null) {
18925
          unsetDeliveredOrders();
18926
        } else {
18927
          setDeliveredOrders((Map<String,String>)value);
18928
        }
18929
        break;
18930
 
18931
      }
18932
    }
18933
 
18934
    public void setFieldValue(int fieldID, Object value) {
18935
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
18936
    }
18937
 
18938
    public Object getFieldValue(_Fields field) {
18939
      switch (field) {
18940
      case PROVIDER_ID:
18941
        return new Long(getProviderId());
18942
 
18943
      case DELIVERED_ORDERS:
18944
        return getDeliveredOrders();
18945
 
18946
      }
18947
      throw new IllegalStateException();
18948
    }
18949
 
18950
    public Object getFieldValue(int fieldId) {
18951
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
18952
    }
18953
 
18954
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
18955
    public boolean isSet(_Fields field) {
18956
      switch (field) {
18957
      case PROVIDER_ID:
18958
        return isSetProviderId();
18959
      case DELIVERED_ORDERS:
18960
        return isSetDeliveredOrders();
18961
      }
18962
      throw new IllegalStateException();
18963
    }
18964
 
18965
    public boolean isSet(int fieldID) {
18966
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
18967
    }
18968
 
18969
    @Override
18970
    public boolean equals(Object that) {
18971
      if (that == null)
18972
        return false;
18973
      if (that instanceof markOrdersAsDelivered_args)
18974
        return this.equals((markOrdersAsDelivered_args)that);
18975
      return false;
18976
    }
18977
 
18978
    public boolean equals(markOrdersAsDelivered_args that) {
18979
      if (that == null)
18980
        return false;
18981
 
18982
      boolean this_present_providerId = true;
18983
      boolean that_present_providerId = true;
18984
      if (this_present_providerId || that_present_providerId) {
18985
        if (!(this_present_providerId && that_present_providerId))
18986
          return false;
18987
        if (this.providerId != that.providerId)
18988
          return false;
18989
      }
18990
 
18991
      boolean this_present_deliveredOrders = true && this.isSetDeliveredOrders();
18992
      boolean that_present_deliveredOrders = true && that.isSetDeliveredOrders();
18993
      if (this_present_deliveredOrders || that_present_deliveredOrders) {
18994
        if (!(this_present_deliveredOrders && that_present_deliveredOrders))
18995
          return false;
18996
        if (!this.deliveredOrders.equals(that.deliveredOrders))
18997
          return false;
18998
      }
18999
 
19000
      return true;
19001
    }
19002
 
19003
    @Override
19004
    public int hashCode() {
19005
      return 0;
19006
    }
19007
 
19008
    public void read(TProtocol iprot) throws TException {
19009
      TField field;
19010
      iprot.readStructBegin();
19011
      while (true)
19012
      {
19013
        field = iprot.readFieldBegin();
19014
        if (field.type == TType.STOP) { 
19015
          break;
19016
        }
19017
        _Fields fieldId = _Fields.findByThriftId(field.id);
19018
        if (fieldId == null) {
19019
          TProtocolUtil.skip(iprot, field.type);
19020
        } else {
19021
          switch (fieldId) {
19022
            case PROVIDER_ID:
19023
              if (field.type == TType.I64) {
19024
                this.providerId = iprot.readI64();
19025
                setProviderIdIsSet(true);
19026
              } else { 
19027
                TProtocolUtil.skip(iprot, field.type);
19028
              }
19029
              break;
19030
            case DELIVERED_ORDERS:
19031
              if (field.type == TType.MAP) {
19032
                {
1221 chandransh 19033
                  TMap _map49 = iprot.readMapBegin();
19034
                  this.deliveredOrders = new HashMap<String,String>(2*_map49.size);
19035
                  for (int _i50 = 0; _i50 < _map49.size; ++_i50)
1133 chandransh 19036
                  {
1221 chandransh 19037
                    String _key51;
19038
                    String _val52;
19039
                    _key51 = iprot.readString();
19040
                    _val52 = iprot.readString();
19041
                    this.deliveredOrders.put(_key51, _val52);
1133 chandransh 19042
                  }
19043
                  iprot.readMapEnd();
19044
                }
19045
              } else { 
19046
                TProtocolUtil.skip(iprot, field.type);
19047
              }
19048
              break;
19049
          }
19050
          iprot.readFieldEnd();
19051
        }
19052
      }
19053
      iprot.readStructEnd();
19054
      validate();
19055
    }
19056
 
19057
    public void write(TProtocol oprot) throws TException {
19058
      validate();
19059
 
19060
      oprot.writeStructBegin(STRUCT_DESC);
19061
      oprot.writeFieldBegin(PROVIDER_ID_FIELD_DESC);
19062
      oprot.writeI64(this.providerId);
19063
      oprot.writeFieldEnd();
19064
      if (this.deliveredOrders != null) {
19065
        oprot.writeFieldBegin(DELIVERED_ORDERS_FIELD_DESC);
19066
        {
19067
          oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.deliveredOrders.size()));
1221 chandransh 19068
          for (Map.Entry<String, String> _iter53 : this.deliveredOrders.entrySet())
1133 chandransh 19069
          {
1221 chandransh 19070
            oprot.writeString(_iter53.getKey());
19071
            oprot.writeString(_iter53.getValue());
1133 chandransh 19072
          }
19073
          oprot.writeMapEnd();
19074
        }
19075
        oprot.writeFieldEnd();
19076
      }
19077
      oprot.writeFieldStop();
19078
      oprot.writeStructEnd();
19079
    }
19080
 
19081
    @Override
19082
    public String toString() {
19083
      StringBuilder sb = new StringBuilder("markOrdersAsDelivered_args(");
19084
      boolean first = true;
19085
 
19086
      sb.append("providerId:");
19087
      sb.append(this.providerId);
19088
      first = false;
19089
      if (!first) sb.append(", ");
19090
      sb.append("deliveredOrders:");
19091
      if (this.deliveredOrders == null) {
19092
        sb.append("null");
19093
      } else {
19094
        sb.append(this.deliveredOrders);
19095
      }
19096
      first = false;
19097
      sb.append(")");
19098
      return sb.toString();
19099
    }
19100
 
19101
    public void validate() throws TException {
19102
      // check for required fields
19103
    }
19104
 
19105
  }
19106
 
19107
  public static class markOrdersAsDelivered_result implements TBase<markOrdersAsDelivered_result._Fields>, java.io.Serializable, Cloneable, Comparable<markOrdersAsDelivered_result>   {
19108
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsDelivered_result");
19109
 
19110
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
19111
 
19112
    private TransactionServiceException ex;
19113
 
19114
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19115
    public enum _Fields implements TFieldIdEnum {
19116
      EX((short)1, "ex");
19117
 
19118
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
19119
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19120
 
19121
      static {
19122
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19123
          byId.put((int)field._thriftId, field);
19124
          byName.put(field.getFieldName(), field);
19125
        }
19126
      }
19127
 
19128
      /**
19129
       * Find the _Fields constant that matches fieldId, or null if its not found.
19130
       */
19131
      public static _Fields findByThriftId(int fieldId) {
19132
        return byId.get(fieldId);
19133
      }
19134
 
19135
      /**
19136
       * Find the _Fields constant that matches fieldId, throwing an exception
19137
       * if it is not found.
19138
       */
19139
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19140
        _Fields fields = findByThriftId(fieldId);
19141
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19142
        return fields;
19143
      }
19144
 
19145
      /**
19146
       * Find the _Fields constant that matches name, or null if its not found.
19147
       */
19148
      public static _Fields findByName(String name) {
19149
        return byName.get(name);
19150
      }
19151
 
19152
      private final short _thriftId;
19153
      private final String _fieldName;
19154
 
19155
      _Fields(short thriftId, String fieldName) {
19156
        _thriftId = thriftId;
19157
        _fieldName = fieldName;
19158
      }
19159
 
19160
      public short getThriftFieldId() {
19161
        return _thriftId;
19162
      }
19163
 
19164
      public String getFieldName() {
19165
        return _fieldName;
19166
      }
19167
    }
19168
 
19169
    // isset id assignments
19170
 
19171
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
19172
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
19173
          new FieldValueMetaData(TType.STRUCT)));
19174
    }});
19175
 
19176
    static {
19177
      FieldMetaData.addStructMetaDataMap(markOrdersAsDelivered_result.class, metaDataMap);
19178
    }
19179
 
19180
    public markOrdersAsDelivered_result() {
19181
    }
19182
 
19183
    public markOrdersAsDelivered_result(
19184
      TransactionServiceException ex)
19185
    {
19186
      this();
19187
      this.ex = ex;
19188
    }
19189
 
19190
    /**
19191
     * Performs a deep copy on <i>other</i>.
19192
     */
19193
    public markOrdersAsDelivered_result(markOrdersAsDelivered_result other) {
19194
      if (other.isSetEx()) {
19195
        this.ex = new TransactionServiceException(other.ex);
19196
      }
19197
    }
19198
 
19199
    public markOrdersAsDelivered_result deepCopy() {
19200
      return new markOrdersAsDelivered_result(this);
19201
    }
19202
 
19203
    @Deprecated
19204
    public markOrdersAsDelivered_result clone() {
19205
      return new markOrdersAsDelivered_result(this);
19206
    }
19207
 
19208
    public TransactionServiceException getEx() {
19209
      return this.ex;
19210
    }
19211
 
19212
    public markOrdersAsDelivered_result setEx(TransactionServiceException ex) {
19213
      this.ex = ex;
19214
      return this;
19215
    }
19216
 
19217
    public void unsetEx() {
19218
      this.ex = null;
19219
    }
19220
 
19221
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
19222
    public boolean isSetEx() {
19223
      return this.ex != null;
19224
    }
19225
 
19226
    public void setExIsSet(boolean value) {
19227
      if (!value) {
19228
        this.ex = null;
19229
      }
19230
    }
19231
 
19232
    public void setFieldValue(_Fields field, Object value) {
19233
      switch (field) {
19234
      case EX:
19235
        if (value == null) {
19236
          unsetEx();
19237
        } else {
19238
          setEx((TransactionServiceException)value);
19239
        }
19240
        break;
19241
 
19242
      }
19243
    }
19244
 
19245
    public void setFieldValue(int fieldID, Object value) {
19246
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
19247
    }
19248
 
19249
    public Object getFieldValue(_Fields field) {
19250
      switch (field) {
19251
      case EX:
19252
        return getEx();
19253
 
19254
      }
19255
      throw new IllegalStateException();
19256
    }
19257
 
19258
    public Object getFieldValue(int fieldId) {
19259
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
19260
    }
19261
 
19262
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
19263
    public boolean isSet(_Fields field) {
19264
      switch (field) {
19265
      case EX:
19266
        return isSetEx();
19267
      }
19268
      throw new IllegalStateException();
19269
    }
19270
 
19271
    public boolean isSet(int fieldID) {
19272
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
19273
    }
19274
 
19275
    @Override
19276
    public boolean equals(Object that) {
19277
      if (that == null)
19278
        return false;
19279
      if (that instanceof markOrdersAsDelivered_result)
19280
        return this.equals((markOrdersAsDelivered_result)that);
19281
      return false;
19282
    }
19283
 
19284
    public boolean equals(markOrdersAsDelivered_result that) {
19285
      if (that == null)
19286
        return false;
19287
 
19288
      boolean this_present_ex = true && this.isSetEx();
19289
      boolean that_present_ex = true && that.isSetEx();
19290
      if (this_present_ex || that_present_ex) {
19291
        if (!(this_present_ex && that_present_ex))
19292
          return false;
19293
        if (!this.ex.equals(that.ex))
19294
          return false;
19295
      }
19296
 
19297
      return true;
19298
    }
19299
 
19300
    @Override
19301
    public int hashCode() {
19302
      return 0;
19303
    }
19304
 
19305
    public int compareTo(markOrdersAsDelivered_result other) {
19306
      if (!getClass().equals(other.getClass())) {
19307
        return getClass().getName().compareTo(other.getClass().getName());
19308
      }
19309
 
19310
      int lastComparison = 0;
19311
      markOrdersAsDelivered_result typedOther = (markOrdersAsDelivered_result)other;
19312
 
19313
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
19314
      if (lastComparison != 0) {
19315
        return lastComparison;
19316
      }
19317
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
19318
      if (lastComparison != 0) {
19319
        return lastComparison;
19320
      }
19321
      return 0;
19322
    }
19323
 
19324
    public void read(TProtocol iprot) throws TException {
19325
      TField field;
19326
      iprot.readStructBegin();
19327
      while (true)
19328
      {
19329
        field = iprot.readFieldBegin();
19330
        if (field.type == TType.STOP) { 
19331
          break;
19332
        }
19333
        _Fields fieldId = _Fields.findByThriftId(field.id);
19334
        if (fieldId == null) {
19335
          TProtocolUtil.skip(iprot, field.type);
19336
        } else {
19337
          switch (fieldId) {
19338
            case EX:
19339
              if (field.type == TType.STRUCT) {
19340
                this.ex = new TransactionServiceException();
19341
                this.ex.read(iprot);
19342
              } else { 
19343
                TProtocolUtil.skip(iprot, field.type);
19344
              }
19345
              break;
19346
          }
19347
          iprot.readFieldEnd();
19348
        }
19349
      }
19350
      iprot.readStructEnd();
19351
      validate();
19352
    }
19353
 
19354
    public void write(TProtocol oprot) throws TException {
19355
      oprot.writeStructBegin(STRUCT_DESC);
19356
 
19357
      if (this.isSetEx()) {
19358
        oprot.writeFieldBegin(EX_FIELD_DESC);
19359
        this.ex.write(oprot);
19360
        oprot.writeFieldEnd();
19361
      }
19362
      oprot.writeFieldStop();
19363
      oprot.writeStructEnd();
19364
    }
19365
 
19366
    @Override
19367
    public String toString() {
19368
      StringBuilder sb = new StringBuilder("markOrdersAsDelivered_result(");
19369
      boolean first = true;
19370
 
19371
      sb.append("ex:");
19372
      if (this.ex == null) {
19373
        sb.append("null");
19374
      } else {
19375
        sb.append(this.ex);
19376
      }
19377
      first = false;
19378
      sb.append(")");
19379
      return sb.toString();
19380
    }
19381
 
19382
    public void validate() throws TException {
19383
      // check for required fields
19384
    }
19385
 
19386
  }
19387
 
19388
  public static class markOrdersAsFailed_args implements TBase<markOrdersAsFailed_args._Fields>, java.io.Serializable, Cloneable   {
19389
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsFailed_args");
19390
 
19391
    private static final TField PROVIDER_ID_FIELD_DESC = new TField("providerId", TType.I64, (short)1);
19392
    private static final TField RETURNED_ORDERS_FIELD_DESC = new TField("returnedOrders", TType.MAP, (short)2);
19393
 
19394
    private long providerId;
19395
    private Map<String,String> returnedOrders;
19396
 
19397
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19398
    public enum _Fields implements TFieldIdEnum {
19399
      PROVIDER_ID((short)1, "providerId"),
19400
      RETURNED_ORDERS((short)2, "returnedOrders");
19401
 
19402
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
19403
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19404
 
19405
      static {
19406
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19407
          byId.put((int)field._thriftId, field);
19408
          byName.put(field.getFieldName(), field);
19409
        }
19410
      }
19411
 
19412
      /**
19413
       * Find the _Fields constant that matches fieldId, or null if its not found.
19414
       */
19415
      public static _Fields findByThriftId(int fieldId) {
19416
        return byId.get(fieldId);
19417
      }
19418
 
19419
      /**
19420
       * Find the _Fields constant that matches fieldId, throwing an exception
19421
       * if it is not found.
19422
       */
19423
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19424
        _Fields fields = findByThriftId(fieldId);
19425
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19426
        return fields;
19427
      }
19428
 
19429
      /**
19430
       * Find the _Fields constant that matches name, or null if its not found.
19431
       */
19432
      public static _Fields findByName(String name) {
19433
        return byName.get(name);
19434
      }
19435
 
19436
      private final short _thriftId;
19437
      private final String _fieldName;
19438
 
19439
      _Fields(short thriftId, String fieldName) {
19440
        _thriftId = thriftId;
19441
        _fieldName = fieldName;
19442
      }
19443
 
19444
      public short getThriftFieldId() {
19445
        return _thriftId;
19446
      }
19447
 
19448
      public String getFieldName() {
19449
        return _fieldName;
19450
      }
19451
    }
19452
 
19453
    // isset id assignments
19454
    private static final int __PROVIDERID_ISSET_ID = 0;
19455
    private BitSet __isset_bit_vector = new BitSet(1);
19456
 
19457
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
19458
      put(_Fields.PROVIDER_ID, new FieldMetaData("providerId", TFieldRequirementType.DEFAULT, 
19459
          new FieldValueMetaData(TType.I64)));
19460
      put(_Fields.RETURNED_ORDERS, new FieldMetaData("returnedOrders", TFieldRequirementType.DEFAULT, 
19461
          new MapMetaData(TType.MAP, 
19462
              new FieldValueMetaData(TType.STRING), 
19463
              new FieldValueMetaData(TType.STRING))));
19464
    }});
19465
 
19466
    static {
19467
      FieldMetaData.addStructMetaDataMap(markOrdersAsFailed_args.class, metaDataMap);
19468
    }
19469
 
19470
    public markOrdersAsFailed_args() {
19471
    }
19472
 
19473
    public markOrdersAsFailed_args(
19474
      long providerId,
19475
      Map<String,String> returnedOrders)
19476
    {
19477
      this();
19478
      this.providerId = providerId;
19479
      setProviderIdIsSet(true);
19480
      this.returnedOrders = returnedOrders;
19481
    }
19482
 
19483
    /**
19484
     * Performs a deep copy on <i>other</i>.
19485
     */
19486
    public markOrdersAsFailed_args(markOrdersAsFailed_args other) {
19487
      __isset_bit_vector.clear();
19488
      __isset_bit_vector.or(other.__isset_bit_vector);
19489
      this.providerId = other.providerId;
19490
      if (other.isSetReturnedOrders()) {
19491
        Map<String,String> __this__returnedOrders = new HashMap<String,String>();
19492
        for (Map.Entry<String, String> other_element : other.returnedOrders.entrySet()) {
19493
 
19494
          String other_element_key = other_element.getKey();
19495
          String other_element_value = other_element.getValue();
19496
 
19497
          String __this__returnedOrders_copy_key = other_element_key;
19498
 
19499
          String __this__returnedOrders_copy_value = other_element_value;
19500
 
19501
          __this__returnedOrders.put(__this__returnedOrders_copy_key, __this__returnedOrders_copy_value);
19502
        }
19503
        this.returnedOrders = __this__returnedOrders;
19504
      }
19505
    }
19506
 
19507
    public markOrdersAsFailed_args deepCopy() {
19508
      return new markOrdersAsFailed_args(this);
19509
    }
19510
 
19511
    @Deprecated
19512
    public markOrdersAsFailed_args clone() {
19513
      return new markOrdersAsFailed_args(this);
19514
    }
19515
 
19516
    public long getProviderId() {
19517
      return this.providerId;
19518
    }
19519
 
19520
    public markOrdersAsFailed_args setProviderId(long providerId) {
19521
      this.providerId = providerId;
19522
      setProviderIdIsSet(true);
19523
      return this;
19524
    }
19525
 
19526
    public void unsetProviderId() {
19527
      __isset_bit_vector.clear(__PROVIDERID_ISSET_ID);
19528
    }
19529
 
19530
    /** Returns true if field providerId is set (has been asigned a value) and false otherwise */
19531
    public boolean isSetProviderId() {
19532
      return __isset_bit_vector.get(__PROVIDERID_ISSET_ID);
19533
    }
19534
 
19535
    public void setProviderIdIsSet(boolean value) {
19536
      __isset_bit_vector.set(__PROVIDERID_ISSET_ID, value);
19537
    }
19538
 
19539
    public int getReturnedOrdersSize() {
19540
      return (this.returnedOrders == null) ? 0 : this.returnedOrders.size();
19541
    }
19542
 
19543
    public void putToReturnedOrders(String key, String val) {
19544
      if (this.returnedOrders == null) {
19545
        this.returnedOrders = new HashMap<String,String>();
19546
      }
19547
      this.returnedOrders.put(key, val);
19548
    }
19549
 
19550
    public Map<String,String> getReturnedOrders() {
19551
      return this.returnedOrders;
19552
    }
19553
 
19554
    public markOrdersAsFailed_args setReturnedOrders(Map<String,String> returnedOrders) {
19555
      this.returnedOrders = returnedOrders;
19556
      return this;
19557
    }
19558
 
19559
    public void unsetReturnedOrders() {
19560
      this.returnedOrders = null;
19561
    }
19562
 
19563
    /** Returns true if field returnedOrders is set (has been asigned a value) and false otherwise */
19564
    public boolean isSetReturnedOrders() {
19565
      return this.returnedOrders != null;
19566
    }
19567
 
19568
    public void setReturnedOrdersIsSet(boolean value) {
19569
      if (!value) {
19570
        this.returnedOrders = null;
19571
      }
19572
    }
19573
 
19574
    public void setFieldValue(_Fields field, Object value) {
19575
      switch (field) {
19576
      case PROVIDER_ID:
19577
        if (value == null) {
19578
          unsetProviderId();
19579
        } else {
19580
          setProviderId((Long)value);
19581
        }
19582
        break;
19583
 
19584
      case RETURNED_ORDERS:
19585
        if (value == null) {
19586
          unsetReturnedOrders();
19587
        } else {
19588
          setReturnedOrders((Map<String,String>)value);
19589
        }
19590
        break;
19591
 
19592
      }
19593
    }
19594
 
19595
    public void setFieldValue(int fieldID, Object value) {
19596
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
19597
    }
19598
 
19599
    public Object getFieldValue(_Fields field) {
19600
      switch (field) {
19601
      case PROVIDER_ID:
19602
        return new Long(getProviderId());
19603
 
19604
      case RETURNED_ORDERS:
19605
        return getReturnedOrders();
19606
 
19607
      }
19608
      throw new IllegalStateException();
19609
    }
19610
 
19611
    public Object getFieldValue(int fieldId) {
19612
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
19613
    }
19614
 
19615
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
19616
    public boolean isSet(_Fields field) {
19617
      switch (field) {
19618
      case PROVIDER_ID:
19619
        return isSetProviderId();
19620
      case RETURNED_ORDERS:
19621
        return isSetReturnedOrders();
19622
      }
19623
      throw new IllegalStateException();
19624
    }
19625
 
19626
    public boolean isSet(int fieldID) {
19627
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
19628
    }
19629
 
19630
    @Override
19631
    public boolean equals(Object that) {
19632
      if (that == null)
19633
        return false;
19634
      if (that instanceof markOrdersAsFailed_args)
19635
        return this.equals((markOrdersAsFailed_args)that);
19636
      return false;
19637
    }
19638
 
19639
    public boolean equals(markOrdersAsFailed_args that) {
19640
      if (that == null)
19641
        return false;
19642
 
19643
      boolean this_present_providerId = true;
19644
      boolean that_present_providerId = true;
19645
      if (this_present_providerId || that_present_providerId) {
19646
        if (!(this_present_providerId && that_present_providerId))
19647
          return false;
19648
        if (this.providerId != that.providerId)
19649
          return false;
19650
      }
19651
 
19652
      boolean this_present_returnedOrders = true && this.isSetReturnedOrders();
19653
      boolean that_present_returnedOrders = true && that.isSetReturnedOrders();
19654
      if (this_present_returnedOrders || that_present_returnedOrders) {
19655
        if (!(this_present_returnedOrders && that_present_returnedOrders))
19656
          return false;
19657
        if (!this.returnedOrders.equals(that.returnedOrders))
19658
          return false;
19659
      }
19660
 
19661
      return true;
19662
    }
19663
 
19664
    @Override
19665
    public int hashCode() {
19666
      return 0;
19667
    }
19668
 
19669
    public void read(TProtocol iprot) throws TException {
19670
      TField field;
19671
      iprot.readStructBegin();
19672
      while (true)
19673
      {
19674
        field = iprot.readFieldBegin();
19675
        if (field.type == TType.STOP) { 
19676
          break;
19677
        }
19678
        _Fields fieldId = _Fields.findByThriftId(field.id);
19679
        if (fieldId == null) {
19680
          TProtocolUtil.skip(iprot, field.type);
19681
        } else {
19682
          switch (fieldId) {
19683
            case PROVIDER_ID:
19684
              if (field.type == TType.I64) {
19685
                this.providerId = iprot.readI64();
19686
                setProviderIdIsSet(true);
19687
              } else { 
19688
                TProtocolUtil.skip(iprot, field.type);
19689
              }
19690
              break;
19691
            case RETURNED_ORDERS:
19692
              if (field.type == TType.MAP) {
19693
                {
1221 chandransh 19694
                  TMap _map54 = iprot.readMapBegin();
19695
                  this.returnedOrders = new HashMap<String,String>(2*_map54.size);
19696
                  for (int _i55 = 0; _i55 < _map54.size; ++_i55)
1133 chandransh 19697
                  {
1221 chandransh 19698
                    String _key56;
19699
                    String _val57;
19700
                    _key56 = iprot.readString();
19701
                    _val57 = iprot.readString();
19702
                    this.returnedOrders.put(_key56, _val57);
1133 chandransh 19703
                  }
19704
                  iprot.readMapEnd();
19705
                }
19706
              } else { 
19707
                TProtocolUtil.skip(iprot, field.type);
19708
              }
19709
              break;
19710
          }
19711
          iprot.readFieldEnd();
19712
        }
19713
      }
19714
      iprot.readStructEnd();
19715
      validate();
19716
    }
19717
 
19718
    public void write(TProtocol oprot) throws TException {
19719
      validate();
19720
 
19721
      oprot.writeStructBegin(STRUCT_DESC);
19722
      oprot.writeFieldBegin(PROVIDER_ID_FIELD_DESC);
19723
      oprot.writeI64(this.providerId);
19724
      oprot.writeFieldEnd();
19725
      if (this.returnedOrders != null) {
19726
        oprot.writeFieldBegin(RETURNED_ORDERS_FIELD_DESC);
19727
        {
19728
          oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.returnedOrders.size()));
1221 chandransh 19729
          for (Map.Entry<String, String> _iter58 : this.returnedOrders.entrySet())
1133 chandransh 19730
          {
1221 chandransh 19731
            oprot.writeString(_iter58.getKey());
19732
            oprot.writeString(_iter58.getValue());
1133 chandransh 19733
          }
19734
          oprot.writeMapEnd();
19735
        }
19736
        oprot.writeFieldEnd();
19737
      }
19738
      oprot.writeFieldStop();
19739
      oprot.writeStructEnd();
19740
    }
19741
 
19742
    @Override
19743
    public String toString() {
19744
      StringBuilder sb = new StringBuilder("markOrdersAsFailed_args(");
19745
      boolean first = true;
19746
 
19747
      sb.append("providerId:");
19748
      sb.append(this.providerId);
19749
      first = false;
19750
      if (!first) sb.append(", ");
19751
      sb.append("returnedOrders:");
19752
      if (this.returnedOrders == null) {
19753
        sb.append("null");
19754
      } else {
19755
        sb.append(this.returnedOrders);
19756
      }
19757
      first = false;
19758
      sb.append(")");
19759
      return sb.toString();
19760
    }
19761
 
19762
    public void validate() throws TException {
19763
      // check for required fields
19764
    }
19765
 
19766
  }
19767
 
19768
  public static class markOrdersAsFailed_result implements TBase<markOrdersAsFailed_result._Fields>, java.io.Serializable, Cloneable, Comparable<markOrdersAsFailed_result>   {
19769
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsFailed_result");
19770
 
19771
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
19772
 
19773
    private TransactionServiceException ex;
19774
 
19775
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19776
    public enum _Fields implements TFieldIdEnum {
19777
      EX((short)1, "ex");
19778
 
19779
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
19780
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19781
 
19782
      static {
19783
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19784
          byId.put((int)field._thriftId, field);
19785
          byName.put(field.getFieldName(), field);
19786
        }
19787
      }
19788
 
19789
      /**
19790
       * Find the _Fields constant that matches fieldId, or null if its not found.
19791
       */
19792
      public static _Fields findByThriftId(int fieldId) {
19793
        return byId.get(fieldId);
19794
      }
19795
 
19796
      /**
19797
       * Find the _Fields constant that matches fieldId, throwing an exception
19798
       * if it is not found.
19799
       */
19800
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19801
        _Fields fields = findByThriftId(fieldId);
19802
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19803
        return fields;
19804
      }
19805
 
19806
      /**
19807
       * Find the _Fields constant that matches name, or null if its not found.
19808
       */
19809
      public static _Fields findByName(String name) {
19810
        return byName.get(name);
19811
      }
19812
 
19813
      private final short _thriftId;
19814
      private final String _fieldName;
19815
 
19816
      _Fields(short thriftId, String fieldName) {
19817
        _thriftId = thriftId;
19818
        _fieldName = fieldName;
19819
      }
19820
 
19821
      public short getThriftFieldId() {
19822
        return _thriftId;
19823
      }
19824
 
19825
      public String getFieldName() {
19826
        return _fieldName;
19827
      }
19828
    }
19829
 
19830
    // isset id assignments
19831
 
19832
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
19833
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
19834
          new FieldValueMetaData(TType.STRUCT)));
19835
    }});
19836
 
19837
    static {
19838
      FieldMetaData.addStructMetaDataMap(markOrdersAsFailed_result.class, metaDataMap);
19839
    }
19840
 
19841
    public markOrdersAsFailed_result() {
19842
    }
19843
 
19844
    public markOrdersAsFailed_result(
19845
      TransactionServiceException ex)
19846
    {
19847
      this();
19848
      this.ex = ex;
19849
    }
19850
 
19851
    /**
19852
     * Performs a deep copy on <i>other</i>.
19853
     */
19854
    public markOrdersAsFailed_result(markOrdersAsFailed_result other) {
19855
      if (other.isSetEx()) {
19856
        this.ex = new TransactionServiceException(other.ex);
19857
      }
19858
    }
19859
 
19860
    public markOrdersAsFailed_result deepCopy() {
19861
      return new markOrdersAsFailed_result(this);
19862
    }
19863
 
19864
    @Deprecated
19865
    public markOrdersAsFailed_result clone() {
19866
      return new markOrdersAsFailed_result(this);
19867
    }
19868
 
19869
    public TransactionServiceException getEx() {
19870
      return this.ex;
19871
    }
19872
 
19873
    public markOrdersAsFailed_result setEx(TransactionServiceException ex) {
19874
      this.ex = ex;
19875
      return this;
19876
    }
19877
 
19878
    public void unsetEx() {
19879
      this.ex = null;
19880
    }
19881
 
19882
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
19883
    public boolean isSetEx() {
19884
      return this.ex != null;
19885
    }
19886
 
19887
    public void setExIsSet(boolean value) {
19888
      if (!value) {
19889
        this.ex = null;
19890
      }
19891
    }
19892
 
19893
    public void setFieldValue(_Fields field, Object value) {
19894
      switch (field) {
19895
      case EX:
19896
        if (value == null) {
19897
          unsetEx();
19898
        } else {
19899
          setEx((TransactionServiceException)value);
19900
        }
19901
        break;
19902
 
19903
      }
19904
    }
19905
 
19906
    public void setFieldValue(int fieldID, Object value) {
19907
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
19908
    }
19909
 
19910
    public Object getFieldValue(_Fields field) {
19911
      switch (field) {
19912
      case EX:
19913
        return getEx();
19914
 
19915
      }
19916
      throw new IllegalStateException();
19917
    }
19918
 
19919
    public Object getFieldValue(int fieldId) {
19920
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
19921
    }
19922
 
19923
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
19924
    public boolean isSet(_Fields field) {
19925
      switch (field) {
19926
      case EX:
19927
        return isSetEx();
19928
      }
19929
      throw new IllegalStateException();
19930
    }
19931
 
19932
    public boolean isSet(int fieldID) {
19933
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
19934
    }
19935
 
19936
    @Override
19937
    public boolean equals(Object that) {
19938
      if (that == null)
19939
        return false;
19940
      if (that instanceof markOrdersAsFailed_result)
19941
        return this.equals((markOrdersAsFailed_result)that);
19942
      return false;
19943
    }
19944
 
19945
    public boolean equals(markOrdersAsFailed_result that) {
19946
      if (that == null)
19947
        return false;
19948
 
19949
      boolean this_present_ex = true && this.isSetEx();
19950
      boolean that_present_ex = true && that.isSetEx();
19951
      if (this_present_ex || that_present_ex) {
19952
        if (!(this_present_ex && that_present_ex))
19953
          return false;
19954
        if (!this.ex.equals(that.ex))
19955
          return false;
19956
      }
19957
 
19958
      return true;
19959
    }
19960
 
19961
    @Override
19962
    public int hashCode() {
19963
      return 0;
19964
    }
19965
 
19966
    public int compareTo(markOrdersAsFailed_result other) {
19967
      if (!getClass().equals(other.getClass())) {
19968
        return getClass().getName().compareTo(other.getClass().getName());
19969
      }
19970
 
19971
      int lastComparison = 0;
19972
      markOrdersAsFailed_result typedOther = (markOrdersAsFailed_result)other;
19973
 
19974
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
19975
      if (lastComparison != 0) {
19976
        return lastComparison;
19977
      }
19978
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
19979
      if (lastComparison != 0) {
19980
        return lastComparison;
19981
      }
19982
      return 0;
19983
    }
19984
 
19985
    public void read(TProtocol iprot) throws TException {
19986
      TField field;
19987
      iprot.readStructBegin();
19988
      while (true)
19989
      {
19990
        field = iprot.readFieldBegin();
19991
        if (field.type == TType.STOP) { 
19992
          break;
19993
        }
19994
        _Fields fieldId = _Fields.findByThriftId(field.id);
19995
        if (fieldId == null) {
19996
          TProtocolUtil.skip(iprot, field.type);
19997
        } else {
19998
          switch (fieldId) {
19999
            case EX:
20000
              if (field.type == TType.STRUCT) {
20001
                this.ex = new TransactionServiceException();
20002
                this.ex.read(iprot);
20003
              } else { 
20004
                TProtocolUtil.skip(iprot, field.type);
20005
              }
20006
              break;
20007
          }
20008
          iprot.readFieldEnd();
20009
        }
20010
      }
20011
      iprot.readStructEnd();
20012
      validate();
20013
    }
20014
 
20015
    public void write(TProtocol oprot) throws TException {
20016
      oprot.writeStructBegin(STRUCT_DESC);
20017
 
20018
      if (this.isSetEx()) {
20019
        oprot.writeFieldBegin(EX_FIELD_DESC);
20020
        this.ex.write(oprot);
20021
        oprot.writeFieldEnd();
20022
      }
20023
      oprot.writeFieldStop();
20024
      oprot.writeStructEnd();
20025
    }
20026
 
20027
    @Override
20028
    public String toString() {
20029
      StringBuilder sb = new StringBuilder("markOrdersAsFailed_result(");
20030
      boolean first = true;
20031
 
20032
      sb.append("ex:");
20033
      if (this.ex == null) {
20034
        sb.append("null");
20035
      } else {
20036
        sb.append(this.ex);
20037
      }
20038
      first = false;
20039
      sb.append(")");
20040
      return sb.toString();
20041
    }
20042
 
20043
    public void validate() throws TException {
20044
      // check for required fields
20045
    }
20046
 
20047
  }
20048
 
1245 chandransh 20049
  public static class updateNonDeliveryReason_args implements TBase<updateNonDeliveryReason_args._Fields>, java.io.Serializable, Cloneable   {
20050
    private static final TStruct STRUCT_DESC = new TStruct("updateNonDeliveryReason_args");
20051
 
20052
    private static final TField PROVIDER_ID_FIELD_DESC = new TField("providerId", TType.I64, (short)1);
20053
    private static final TField UNDELIVERED_ORDERS_FIELD_DESC = new TField("undeliveredOrders", TType.MAP, (short)2);
20054
 
20055
    private long providerId;
20056
    private Map<String,String> undeliveredOrders;
20057
 
20058
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
20059
    public enum _Fields implements TFieldIdEnum {
20060
      PROVIDER_ID((short)1, "providerId"),
20061
      UNDELIVERED_ORDERS((short)2, "undeliveredOrders");
20062
 
20063
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
20064
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
20065
 
20066
      static {
20067
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
20068
          byId.put((int)field._thriftId, field);
20069
          byName.put(field.getFieldName(), field);
20070
        }
20071
      }
20072
 
20073
      /**
20074
       * Find the _Fields constant that matches fieldId, or null if its not found.
20075
       */
20076
      public static _Fields findByThriftId(int fieldId) {
20077
        return byId.get(fieldId);
20078
      }
20079
 
20080
      /**
20081
       * Find the _Fields constant that matches fieldId, throwing an exception
20082
       * if it is not found.
20083
       */
20084
      public static _Fields findByThriftIdOrThrow(int fieldId) {
20085
        _Fields fields = findByThriftId(fieldId);
20086
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
20087
        return fields;
20088
      }
20089
 
20090
      /**
20091
       * Find the _Fields constant that matches name, or null if its not found.
20092
       */
20093
      public static _Fields findByName(String name) {
20094
        return byName.get(name);
20095
      }
20096
 
20097
      private final short _thriftId;
20098
      private final String _fieldName;
20099
 
20100
      _Fields(short thriftId, String fieldName) {
20101
        _thriftId = thriftId;
20102
        _fieldName = fieldName;
20103
      }
20104
 
20105
      public short getThriftFieldId() {
20106
        return _thriftId;
20107
      }
20108
 
20109
      public String getFieldName() {
20110
        return _fieldName;
20111
      }
20112
    }
20113
 
20114
    // isset id assignments
20115
    private static final int __PROVIDERID_ISSET_ID = 0;
20116
    private BitSet __isset_bit_vector = new BitSet(1);
20117
 
20118
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
20119
      put(_Fields.PROVIDER_ID, new FieldMetaData("providerId", TFieldRequirementType.DEFAULT, 
20120
          new FieldValueMetaData(TType.I64)));
20121
      put(_Fields.UNDELIVERED_ORDERS, new FieldMetaData("undeliveredOrders", TFieldRequirementType.DEFAULT, 
20122
          new MapMetaData(TType.MAP, 
20123
              new FieldValueMetaData(TType.STRING), 
20124
              new FieldValueMetaData(TType.STRING))));
20125
    }});
20126
 
20127
    static {
20128
      FieldMetaData.addStructMetaDataMap(updateNonDeliveryReason_args.class, metaDataMap);
20129
    }
20130
 
20131
    public updateNonDeliveryReason_args() {
20132
    }
20133
 
20134
    public updateNonDeliveryReason_args(
20135
      long providerId,
20136
      Map<String,String> undeliveredOrders)
20137
    {
20138
      this();
20139
      this.providerId = providerId;
20140
      setProviderIdIsSet(true);
20141
      this.undeliveredOrders = undeliveredOrders;
20142
    }
20143
 
20144
    /**
20145
     * Performs a deep copy on <i>other</i>.
20146
     */
20147
    public updateNonDeliveryReason_args(updateNonDeliveryReason_args other) {
20148
      __isset_bit_vector.clear();
20149
      __isset_bit_vector.or(other.__isset_bit_vector);
20150
      this.providerId = other.providerId;
20151
      if (other.isSetUndeliveredOrders()) {
20152
        Map<String,String> __this__undeliveredOrders = new HashMap<String,String>();
20153
        for (Map.Entry<String, String> other_element : other.undeliveredOrders.entrySet()) {
20154
 
20155
          String other_element_key = other_element.getKey();
20156
          String other_element_value = other_element.getValue();
20157
 
20158
          String __this__undeliveredOrders_copy_key = other_element_key;
20159
 
20160
          String __this__undeliveredOrders_copy_value = other_element_value;
20161
 
20162
          __this__undeliveredOrders.put(__this__undeliveredOrders_copy_key, __this__undeliveredOrders_copy_value);
20163
        }
20164
        this.undeliveredOrders = __this__undeliveredOrders;
20165
      }
20166
    }
20167
 
20168
    public updateNonDeliveryReason_args deepCopy() {
20169
      return new updateNonDeliveryReason_args(this);
20170
    }
20171
 
20172
    @Deprecated
20173
    public updateNonDeliveryReason_args clone() {
20174
      return new updateNonDeliveryReason_args(this);
20175
    }
20176
 
20177
    public long getProviderId() {
20178
      return this.providerId;
20179
    }
20180
 
20181
    public updateNonDeliveryReason_args setProviderId(long providerId) {
20182
      this.providerId = providerId;
20183
      setProviderIdIsSet(true);
20184
      return this;
20185
    }
20186
 
20187
    public void unsetProviderId() {
20188
      __isset_bit_vector.clear(__PROVIDERID_ISSET_ID);
20189
    }
20190
 
20191
    /** Returns true if field providerId is set (has been asigned a value) and false otherwise */
20192
    public boolean isSetProviderId() {
20193
      return __isset_bit_vector.get(__PROVIDERID_ISSET_ID);
20194
    }
20195
 
20196
    public void setProviderIdIsSet(boolean value) {
20197
      __isset_bit_vector.set(__PROVIDERID_ISSET_ID, value);
20198
    }
20199
 
20200
    public int getUndeliveredOrdersSize() {
20201
      return (this.undeliveredOrders == null) ? 0 : this.undeliveredOrders.size();
20202
    }
20203
 
20204
    public void putToUndeliveredOrders(String key, String val) {
20205
      if (this.undeliveredOrders == null) {
20206
        this.undeliveredOrders = new HashMap<String,String>();
20207
      }
20208
      this.undeliveredOrders.put(key, val);
20209
    }
20210
 
20211
    public Map<String,String> getUndeliveredOrders() {
20212
      return this.undeliveredOrders;
20213
    }
20214
 
20215
    public updateNonDeliveryReason_args setUndeliveredOrders(Map<String,String> undeliveredOrders) {
20216
      this.undeliveredOrders = undeliveredOrders;
20217
      return this;
20218
    }
20219
 
20220
    public void unsetUndeliveredOrders() {
20221
      this.undeliveredOrders = null;
20222
    }
20223
 
20224
    /** Returns true if field undeliveredOrders is set (has been asigned a value) and false otherwise */
20225
    public boolean isSetUndeliveredOrders() {
20226
      return this.undeliveredOrders != null;
20227
    }
20228
 
20229
    public void setUndeliveredOrdersIsSet(boolean value) {
20230
      if (!value) {
20231
        this.undeliveredOrders = null;
20232
      }
20233
    }
20234
 
20235
    public void setFieldValue(_Fields field, Object value) {
20236
      switch (field) {
20237
      case PROVIDER_ID:
20238
        if (value == null) {
20239
          unsetProviderId();
20240
        } else {
20241
          setProviderId((Long)value);
20242
        }
20243
        break;
20244
 
20245
      case UNDELIVERED_ORDERS:
20246
        if (value == null) {
20247
          unsetUndeliveredOrders();
20248
        } else {
20249
          setUndeliveredOrders((Map<String,String>)value);
20250
        }
20251
        break;
20252
 
20253
      }
20254
    }
20255
 
20256
    public void setFieldValue(int fieldID, Object value) {
20257
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
20258
    }
20259
 
20260
    public Object getFieldValue(_Fields field) {
20261
      switch (field) {
20262
      case PROVIDER_ID:
20263
        return new Long(getProviderId());
20264
 
20265
      case UNDELIVERED_ORDERS:
20266
        return getUndeliveredOrders();
20267
 
20268
      }
20269
      throw new IllegalStateException();
20270
    }
20271
 
20272
    public Object getFieldValue(int fieldId) {
20273
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
20274
    }
20275
 
20276
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
20277
    public boolean isSet(_Fields field) {
20278
      switch (field) {
20279
      case PROVIDER_ID:
20280
        return isSetProviderId();
20281
      case UNDELIVERED_ORDERS:
20282
        return isSetUndeliveredOrders();
20283
      }
20284
      throw new IllegalStateException();
20285
    }
20286
 
20287
    public boolean isSet(int fieldID) {
20288
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
20289
    }
20290
 
20291
    @Override
20292
    public boolean equals(Object that) {
20293
      if (that == null)
20294
        return false;
20295
      if (that instanceof updateNonDeliveryReason_args)
20296
        return this.equals((updateNonDeliveryReason_args)that);
20297
      return false;
20298
    }
20299
 
20300
    public boolean equals(updateNonDeliveryReason_args that) {
20301
      if (that == null)
20302
        return false;
20303
 
20304
      boolean this_present_providerId = true;
20305
      boolean that_present_providerId = true;
20306
      if (this_present_providerId || that_present_providerId) {
20307
        if (!(this_present_providerId && that_present_providerId))
20308
          return false;
20309
        if (this.providerId != that.providerId)
20310
          return false;
20311
      }
20312
 
20313
      boolean this_present_undeliveredOrders = true && this.isSetUndeliveredOrders();
20314
      boolean that_present_undeliveredOrders = true && that.isSetUndeliveredOrders();
20315
      if (this_present_undeliveredOrders || that_present_undeliveredOrders) {
20316
        if (!(this_present_undeliveredOrders && that_present_undeliveredOrders))
20317
          return false;
20318
        if (!this.undeliveredOrders.equals(that.undeliveredOrders))
20319
          return false;
20320
      }
20321
 
20322
      return true;
20323
    }
20324
 
20325
    @Override
20326
    public int hashCode() {
20327
      return 0;
20328
    }
20329
 
20330
    public void read(TProtocol iprot) throws TException {
20331
      TField field;
20332
      iprot.readStructBegin();
20333
      while (true)
20334
      {
20335
        field = iprot.readFieldBegin();
20336
        if (field.type == TType.STOP) { 
20337
          break;
20338
        }
20339
        _Fields fieldId = _Fields.findByThriftId(field.id);
20340
        if (fieldId == null) {
20341
          TProtocolUtil.skip(iprot, field.type);
20342
        } else {
20343
          switch (fieldId) {
20344
            case PROVIDER_ID:
20345
              if (field.type == TType.I64) {
20346
                this.providerId = iprot.readI64();
20347
                setProviderIdIsSet(true);
20348
              } else { 
20349
                TProtocolUtil.skip(iprot, field.type);
20350
              }
20351
              break;
20352
            case UNDELIVERED_ORDERS:
20353
              if (field.type == TType.MAP) {
20354
                {
20355
                  TMap _map59 = iprot.readMapBegin();
20356
                  this.undeliveredOrders = new HashMap<String,String>(2*_map59.size);
20357
                  for (int _i60 = 0; _i60 < _map59.size; ++_i60)
20358
                  {
20359
                    String _key61;
20360
                    String _val62;
20361
                    _key61 = iprot.readString();
20362
                    _val62 = iprot.readString();
20363
                    this.undeliveredOrders.put(_key61, _val62);
20364
                  }
20365
                  iprot.readMapEnd();
20366
                }
20367
              } else { 
20368
                TProtocolUtil.skip(iprot, field.type);
20369
              }
20370
              break;
20371
          }
20372
          iprot.readFieldEnd();
20373
        }
20374
      }
20375
      iprot.readStructEnd();
20376
      validate();
20377
    }
20378
 
20379
    public void write(TProtocol oprot) throws TException {
20380
      validate();
20381
 
20382
      oprot.writeStructBegin(STRUCT_DESC);
20383
      oprot.writeFieldBegin(PROVIDER_ID_FIELD_DESC);
20384
      oprot.writeI64(this.providerId);
20385
      oprot.writeFieldEnd();
20386
      if (this.undeliveredOrders != null) {
20387
        oprot.writeFieldBegin(UNDELIVERED_ORDERS_FIELD_DESC);
20388
        {
20389
          oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.undeliveredOrders.size()));
20390
          for (Map.Entry<String, String> _iter63 : this.undeliveredOrders.entrySet())
20391
          {
20392
            oprot.writeString(_iter63.getKey());
20393
            oprot.writeString(_iter63.getValue());
20394
          }
20395
          oprot.writeMapEnd();
20396
        }
20397
        oprot.writeFieldEnd();
20398
      }
20399
      oprot.writeFieldStop();
20400
      oprot.writeStructEnd();
20401
    }
20402
 
20403
    @Override
20404
    public String toString() {
20405
      StringBuilder sb = new StringBuilder("updateNonDeliveryReason_args(");
20406
      boolean first = true;
20407
 
20408
      sb.append("providerId:");
20409
      sb.append(this.providerId);
20410
      first = false;
20411
      if (!first) sb.append(", ");
20412
      sb.append("undeliveredOrders:");
20413
      if (this.undeliveredOrders == null) {
20414
        sb.append("null");
20415
      } else {
20416
        sb.append(this.undeliveredOrders);
20417
      }
20418
      first = false;
20419
      sb.append(")");
20420
      return sb.toString();
20421
    }
20422
 
20423
    public void validate() throws TException {
20424
      // check for required fields
20425
    }
20426
 
20427
  }
20428
 
20429
  public static class updateNonDeliveryReason_result implements TBase<updateNonDeliveryReason_result._Fields>, java.io.Serializable, Cloneable, Comparable<updateNonDeliveryReason_result>   {
20430
    private static final TStruct STRUCT_DESC = new TStruct("updateNonDeliveryReason_result");
20431
 
20432
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
20433
 
20434
    private TransactionServiceException ex;
20435
 
20436
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
20437
    public enum _Fields implements TFieldIdEnum {
20438
      EX((short)1, "ex");
20439
 
20440
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
20441
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
20442
 
20443
      static {
20444
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
20445
          byId.put((int)field._thriftId, field);
20446
          byName.put(field.getFieldName(), field);
20447
        }
20448
      }
20449
 
20450
      /**
20451
       * Find the _Fields constant that matches fieldId, or null if its not found.
20452
       */
20453
      public static _Fields findByThriftId(int fieldId) {
20454
        return byId.get(fieldId);
20455
      }
20456
 
20457
      /**
20458
       * Find the _Fields constant that matches fieldId, throwing an exception
20459
       * if it is not found.
20460
       */
20461
      public static _Fields findByThriftIdOrThrow(int fieldId) {
20462
        _Fields fields = findByThriftId(fieldId);
20463
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
20464
        return fields;
20465
      }
20466
 
20467
      /**
20468
       * Find the _Fields constant that matches name, or null if its not found.
20469
       */
20470
      public static _Fields findByName(String name) {
20471
        return byName.get(name);
20472
      }
20473
 
20474
      private final short _thriftId;
20475
      private final String _fieldName;
20476
 
20477
      _Fields(short thriftId, String fieldName) {
20478
        _thriftId = thriftId;
20479
        _fieldName = fieldName;
20480
      }
20481
 
20482
      public short getThriftFieldId() {
20483
        return _thriftId;
20484
      }
20485
 
20486
      public String getFieldName() {
20487
        return _fieldName;
20488
      }
20489
    }
20490
 
20491
    // isset id assignments
20492
 
20493
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
20494
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
20495
          new FieldValueMetaData(TType.STRUCT)));
20496
    }});
20497
 
20498
    static {
20499
      FieldMetaData.addStructMetaDataMap(updateNonDeliveryReason_result.class, metaDataMap);
20500
    }
20501
 
20502
    public updateNonDeliveryReason_result() {
20503
    }
20504
 
20505
    public updateNonDeliveryReason_result(
20506
      TransactionServiceException ex)
20507
    {
20508
      this();
20509
      this.ex = ex;
20510
    }
20511
 
20512
    /**
20513
     * Performs a deep copy on <i>other</i>.
20514
     */
20515
    public updateNonDeliveryReason_result(updateNonDeliveryReason_result other) {
20516
      if (other.isSetEx()) {
20517
        this.ex = new TransactionServiceException(other.ex);
20518
      }
20519
    }
20520
 
20521
    public updateNonDeliveryReason_result deepCopy() {
20522
      return new updateNonDeliveryReason_result(this);
20523
    }
20524
 
20525
    @Deprecated
20526
    public updateNonDeliveryReason_result clone() {
20527
      return new updateNonDeliveryReason_result(this);
20528
    }
20529
 
20530
    public TransactionServiceException getEx() {
20531
      return this.ex;
20532
    }
20533
 
20534
    public updateNonDeliveryReason_result setEx(TransactionServiceException ex) {
20535
      this.ex = ex;
20536
      return this;
20537
    }
20538
 
20539
    public void unsetEx() {
20540
      this.ex = null;
20541
    }
20542
 
20543
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
20544
    public boolean isSetEx() {
20545
      return this.ex != null;
20546
    }
20547
 
20548
    public void setExIsSet(boolean value) {
20549
      if (!value) {
20550
        this.ex = null;
20551
      }
20552
    }
20553
 
20554
    public void setFieldValue(_Fields field, Object value) {
20555
      switch (field) {
20556
      case EX:
20557
        if (value == null) {
20558
          unsetEx();
20559
        } else {
20560
          setEx((TransactionServiceException)value);
20561
        }
20562
        break;
20563
 
20564
      }
20565
    }
20566
 
20567
    public void setFieldValue(int fieldID, Object value) {
20568
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
20569
    }
20570
 
20571
    public Object getFieldValue(_Fields field) {
20572
      switch (field) {
20573
      case EX:
20574
        return getEx();
20575
 
20576
      }
20577
      throw new IllegalStateException();
20578
    }
20579
 
20580
    public Object getFieldValue(int fieldId) {
20581
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
20582
    }
20583
 
20584
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
20585
    public boolean isSet(_Fields field) {
20586
      switch (field) {
20587
      case EX:
20588
        return isSetEx();
20589
      }
20590
      throw new IllegalStateException();
20591
    }
20592
 
20593
    public boolean isSet(int fieldID) {
20594
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
20595
    }
20596
 
20597
    @Override
20598
    public boolean equals(Object that) {
20599
      if (that == null)
20600
        return false;
20601
      if (that instanceof updateNonDeliveryReason_result)
20602
        return this.equals((updateNonDeliveryReason_result)that);
20603
      return false;
20604
    }
20605
 
20606
    public boolean equals(updateNonDeliveryReason_result that) {
20607
      if (that == null)
20608
        return false;
20609
 
20610
      boolean this_present_ex = true && this.isSetEx();
20611
      boolean that_present_ex = true && that.isSetEx();
20612
      if (this_present_ex || that_present_ex) {
20613
        if (!(this_present_ex && that_present_ex))
20614
          return false;
20615
        if (!this.ex.equals(that.ex))
20616
          return false;
20617
      }
20618
 
20619
      return true;
20620
    }
20621
 
20622
    @Override
20623
    public int hashCode() {
20624
      return 0;
20625
    }
20626
 
20627
    public int compareTo(updateNonDeliveryReason_result other) {
20628
      if (!getClass().equals(other.getClass())) {
20629
        return getClass().getName().compareTo(other.getClass().getName());
20630
      }
20631
 
20632
      int lastComparison = 0;
20633
      updateNonDeliveryReason_result typedOther = (updateNonDeliveryReason_result)other;
20634
 
20635
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
20636
      if (lastComparison != 0) {
20637
        return lastComparison;
20638
      }
20639
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
20640
      if (lastComparison != 0) {
20641
        return lastComparison;
20642
      }
20643
      return 0;
20644
    }
20645
 
20646
    public void read(TProtocol iprot) throws TException {
20647
      TField field;
20648
      iprot.readStructBegin();
20649
      while (true)
20650
      {
20651
        field = iprot.readFieldBegin();
20652
        if (field.type == TType.STOP) { 
20653
          break;
20654
        }
20655
        _Fields fieldId = _Fields.findByThriftId(field.id);
20656
        if (fieldId == null) {
20657
          TProtocolUtil.skip(iprot, field.type);
20658
        } else {
20659
          switch (fieldId) {
20660
            case EX:
20661
              if (field.type == TType.STRUCT) {
20662
                this.ex = new TransactionServiceException();
20663
                this.ex.read(iprot);
20664
              } else { 
20665
                TProtocolUtil.skip(iprot, field.type);
20666
              }
20667
              break;
20668
          }
20669
          iprot.readFieldEnd();
20670
        }
20671
      }
20672
      iprot.readStructEnd();
20673
      validate();
20674
    }
20675
 
20676
    public void write(TProtocol oprot) throws TException {
20677
      oprot.writeStructBegin(STRUCT_DESC);
20678
 
20679
      if (this.isSetEx()) {
20680
        oprot.writeFieldBegin(EX_FIELD_DESC);
20681
        this.ex.write(oprot);
20682
        oprot.writeFieldEnd();
20683
      }
20684
      oprot.writeFieldStop();
20685
      oprot.writeStructEnd();
20686
    }
20687
 
20688
    @Override
20689
    public String toString() {
20690
      StringBuilder sb = new StringBuilder("updateNonDeliveryReason_result(");
20691
      boolean first = true;
20692
 
20693
      sb.append("ex:");
20694
      if (this.ex == null) {
20695
        sb.append("null");
20696
      } else {
20697
        sb.append(this.ex);
20698
      }
20699
      first = false;
20700
      sb.append(")");
20701
      return sb.toString();
20702
    }
20703
 
20704
    public void validate() throws TException {
20705
      // check for required fields
20706
    }
20707
 
20708
  }
20709
 
305 ashish 20710
  public static class getAlerts_args implements TBase<getAlerts_args._Fields>, java.io.Serializable, Cloneable, Comparable<getAlerts_args>   {
20711
    private static final TStruct STRUCT_DESC = new TStruct("getAlerts_args");
20712
 
483 rajveer 20713
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
305 ashish 20714
    private static final TField VALID_FIELD_DESC = new TField("valid", TType.BOOL, (short)2);
20715
 
483 rajveer 20716
    private long orderId;
305 ashish 20717
    private boolean valid;
20718
 
20719
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
20720
    public enum _Fields implements TFieldIdEnum {
483 rajveer 20721
      ORDER_ID((short)1, "orderId"),
305 ashish 20722
      VALID((short)2, "valid");
20723
 
20724
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
20725
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
20726
 
20727
      static {
20728
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
20729
          byId.put((int)field._thriftId, field);
20730
          byName.put(field.getFieldName(), field);
20731
        }
20732
      }
20733
 
20734
      /**
20735
       * Find the _Fields constant that matches fieldId, or null if its not found.
20736
       */
20737
      public static _Fields findByThriftId(int fieldId) {
20738
        return byId.get(fieldId);
20739
      }
20740
 
20741
      /**
20742
       * Find the _Fields constant that matches fieldId, throwing an exception
20743
       * if it is not found.
20744
       */
20745
      public static _Fields findByThriftIdOrThrow(int fieldId) {
20746
        _Fields fields = findByThriftId(fieldId);
20747
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
20748
        return fields;
20749
      }
20750
 
20751
      /**
20752
       * Find the _Fields constant that matches name, or null if its not found.
20753
       */
20754
      public static _Fields findByName(String name) {
20755
        return byName.get(name);
20756
      }
20757
 
20758
      private final short _thriftId;
20759
      private final String _fieldName;
20760
 
20761
      _Fields(short thriftId, String fieldName) {
20762
        _thriftId = thriftId;
20763
        _fieldName = fieldName;
20764
      }
20765
 
20766
      public short getThriftFieldId() {
20767
        return _thriftId;
20768
      }
20769
 
20770
      public String getFieldName() {
20771
        return _fieldName;
20772
      }
20773
    }
20774
 
20775
    // isset id assignments
483 rajveer 20776
    private static final int __ORDERID_ISSET_ID = 0;
305 ashish 20777
    private static final int __VALID_ISSET_ID = 1;
20778
    private BitSet __isset_bit_vector = new BitSet(2);
20779
 
20780
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 20781
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
305 ashish 20782
          new FieldValueMetaData(TType.I64)));
20783
      put(_Fields.VALID, new FieldMetaData("valid", TFieldRequirementType.DEFAULT, 
20784
          new FieldValueMetaData(TType.BOOL)));
20785
    }});
20786
 
20787
    static {
20788
      FieldMetaData.addStructMetaDataMap(getAlerts_args.class, metaDataMap);
20789
    }
20790
 
20791
    public getAlerts_args() {
20792
    }
20793
 
20794
    public getAlerts_args(
483 rajveer 20795
      long orderId,
305 ashish 20796
      boolean valid)
20797
    {
20798
      this();
483 rajveer 20799
      this.orderId = orderId;
20800
      setOrderIdIsSet(true);
305 ashish 20801
      this.valid = valid;
20802
      setValidIsSet(true);
20803
    }
20804
 
20805
    /**
20806
     * Performs a deep copy on <i>other</i>.
20807
     */
20808
    public getAlerts_args(getAlerts_args other) {
20809
      __isset_bit_vector.clear();
20810
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 20811
      this.orderId = other.orderId;
305 ashish 20812
      this.valid = other.valid;
20813
    }
20814
 
20815
    public getAlerts_args deepCopy() {
20816
      return new getAlerts_args(this);
20817
    }
20818
 
20819
    @Deprecated
20820
    public getAlerts_args clone() {
20821
      return new getAlerts_args(this);
20822
    }
20823
 
483 rajveer 20824
    public long getOrderId() {
20825
      return this.orderId;
305 ashish 20826
    }
20827
 
483 rajveer 20828
    public getAlerts_args setOrderId(long orderId) {
20829
      this.orderId = orderId;
20830
      setOrderIdIsSet(true);
305 ashish 20831
      return this;
20832
    }
20833
 
483 rajveer 20834
    public void unsetOrderId() {
20835
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
305 ashish 20836
    }
20837
 
483 rajveer 20838
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
20839
    public boolean isSetOrderId() {
20840
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
305 ashish 20841
    }
20842
 
483 rajveer 20843
    public void setOrderIdIsSet(boolean value) {
20844
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
305 ashish 20845
    }
20846
 
20847
    public boolean isValid() {
20848
      return this.valid;
20849
    }
20850
 
20851
    public getAlerts_args setValid(boolean valid) {
20852
      this.valid = valid;
20853
      setValidIsSet(true);
20854
      return this;
20855
    }
20856
 
20857
    public void unsetValid() {
20858
      __isset_bit_vector.clear(__VALID_ISSET_ID);
20859
    }
20860
 
20861
    /** Returns true if field valid is set (has been asigned a value) and false otherwise */
20862
    public boolean isSetValid() {
20863
      return __isset_bit_vector.get(__VALID_ISSET_ID);
20864
    }
20865
 
20866
    public void setValidIsSet(boolean value) {
20867
      __isset_bit_vector.set(__VALID_ISSET_ID, value);
20868
    }
20869
 
20870
    public void setFieldValue(_Fields field, Object value) {
20871
      switch (field) {
483 rajveer 20872
      case ORDER_ID:
305 ashish 20873
        if (value == null) {
483 rajveer 20874
          unsetOrderId();
305 ashish 20875
        } else {
483 rajveer 20876
          setOrderId((Long)value);
305 ashish 20877
        }
20878
        break;
20879
 
20880
      case VALID:
20881
        if (value == null) {
20882
          unsetValid();
20883
        } else {
20884
          setValid((Boolean)value);
20885
        }
20886
        break;
20887
 
20888
      }
20889
    }
20890
 
20891
    public void setFieldValue(int fieldID, Object value) {
20892
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
20893
    }
20894
 
20895
    public Object getFieldValue(_Fields field) {
20896
      switch (field) {
483 rajveer 20897
      case ORDER_ID:
20898
        return new Long(getOrderId());
305 ashish 20899
 
20900
      case VALID:
20901
        return new Boolean(isValid());
20902
 
20903
      }
20904
      throw new IllegalStateException();
20905
    }
20906
 
20907
    public Object getFieldValue(int fieldId) {
20908
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
20909
    }
20910
 
20911
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
20912
    public boolean isSet(_Fields field) {
20913
      switch (field) {
483 rajveer 20914
      case ORDER_ID:
20915
        return isSetOrderId();
305 ashish 20916
      case VALID:
20917
        return isSetValid();
20918
      }
20919
      throw new IllegalStateException();
20920
    }
20921
 
20922
    public boolean isSet(int fieldID) {
20923
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
20924
    }
20925
 
20926
    @Override
20927
    public boolean equals(Object that) {
20928
      if (that == null)
20929
        return false;
20930
      if (that instanceof getAlerts_args)
20931
        return this.equals((getAlerts_args)that);
20932
      return false;
20933
    }
20934
 
20935
    public boolean equals(getAlerts_args that) {
20936
      if (that == null)
20937
        return false;
20938
 
483 rajveer 20939
      boolean this_present_orderId = true;
20940
      boolean that_present_orderId = true;
20941
      if (this_present_orderId || that_present_orderId) {
20942
        if (!(this_present_orderId && that_present_orderId))
305 ashish 20943
          return false;
483 rajveer 20944
        if (this.orderId != that.orderId)
305 ashish 20945
          return false;
20946
      }
20947
 
20948
      boolean this_present_valid = true;
20949
      boolean that_present_valid = true;
20950
      if (this_present_valid || that_present_valid) {
20951
        if (!(this_present_valid && that_present_valid))
20952
          return false;
20953
        if (this.valid != that.valid)
20954
          return false;
20955
      }
20956
 
20957
      return true;
20958
    }
20959
 
20960
    @Override
20961
    public int hashCode() {
20962
      return 0;
20963
    }
20964
 
20965
    public int compareTo(getAlerts_args other) {
20966
      if (!getClass().equals(other.getClass())) {
20967
        return getClass().getName().compareTo(other.getClass().getName());
20968
      }
20969
 
20970
      int lastComparison = 0;
20971
      getAlerts_args typedOther = (getAlerts_args)other;
20972
 
483 rajveer 20973
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
305 ashish 20974
      if (lastComparison != 0) {
20975
        return lastComparison;
20976
      }
483 rajveer 20977
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
305 ashish 20978
      if (lastComparison != 0) {
20979
        return lastComparison;
20980
      }
20981
      lastComparison = Boolean.valueOf(isSetValid()).compareTo(isSetValid());
20982
      if (lastComparison != 0) {
20983
        return lastComparison;
20984
      }
20985
      lastComparison = TBaseHelper.compareTo(valid, typedOther.valid);
20986
      if (lastComparison != 0) {
20987
        return lastComparison;
20988
      }
20989
      return 0;
20990
    }
20991
 
20992
    public void read(TProtocol iprot) throws TException {
20993
      TField field;
20994
      iprot.readStructBegin();
20995
      while (true)
20996
      {
20997
        field = iprot.readFieldBegin();
20998
        if (field.type == TType.STOP) { 
20999
          break;
21000
        }
21001
        _Fields fieldId = _Fields.findByThriftId(field.id);
21002
        if (fieldId == null) {
21003
          TProtocolUtil.skip(iprot, field.type);
21004
        } else {
21005
          switch (fieldId) {
483 rajveer 21006
            case ORDER_ID:
305 ashish 21007
              if (field.type == TType.I64) {
483 rajveer 21008
                this.orderId = iprot.readI64();
21009
                setOrderIdIsSet(true);
305 ashish 21010
              } else { 
21011
                TProtocolUtil.skip(iprot, field.type);
21012
              }
21013
              break;
21014
            case VALID:
21015
              if (field.type == TType.BOOL) {
21016
                this.valid = iprot.readBool();
21017
                setValidIsSet(true);
21018
              } else { 
21019
                TProtocolUtil.skip(iprot, field.type);
21020
              }
21021
              break;
21022
          }
21023
          iprot.readFieldEnd();
21024
        }
21025
      }
21026
      iprot.readStructEnd();
21027
      validate();
21028
    }
21029
 
21030
    public void write(TProtocol oprot) throws TException {
21031
      validate();
21032
 
21033
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 21034
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
21035
      oprot.writeI64(this.orderId);
305 ashish 21036
      oprot.writeFieldEnd();
21037
      oprot.writeFieldBegin(VALID_FIELD_DESC);
21038
      oprot.writeBool(this.valid);
21039
      oprot.writeFieldEnd();
21040
      oprot.writeFieldStop();
21041
      oprot.writeStructEnd();
21042
    }
21043
 
21044
    @Override
21045
    public String toString() {
21046
      StringBuilder sb = new StringBuilder("getAlerts_args(");
21047
      boolean first = true;
21048
 
483 rajveer 21049
      sb.append("orderId:");
21050
      sb.append(this.orderId);
305 ashish 21051
      first = false;
21052
      if (!first) sb.append(", ");
21053
      sb.append("valid:");
21054
      sb.append(this.valid);
21055
      first = false;
21056
      sb.append(")");
21057
      return sb.toString();
21058
    }
21059
 
21060
    public void validate() throws TException {
21061
      // check for required fields
21062
    }
21063
 
21064
  }
21065
 
21066
  public static class getAlerts_result implements TBase<getAlerts_result._Fields>, java.io.Serializable, Cloneable, Comparable<getAlerts_result>   {
21067
    private static final TStruct STRUCT_DESC = new TStruct("getAlerts_result");
21068
 
21069
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
21070
 
21071
    private List<Alert> success;
21072
 
21073
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
21074
    public enum _Fields implements TFieldIdEnum {
21075
      SUCCESS((short)0, "success");
21076
 
21077
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
21078
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
21079
 
21080
      static {
21081
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
21082
          byId.put((int)field._thriftId, field);
21083
          byName.put(field.getFieldName(), field);
21084
        }
21085
      }
21086
 
21087
      /**
21088
       * Find the _Fields constant that matches fieldId, or null if its not found.
21089
       */
21090
      public static _Fields findByThriftId(int fieldId) {
21091
        return byId.get(fieldId);
21092
      }
21093
 
21094
      /**
21095
       * Find the _Fields constant that matches fieldId, throwing an exception
21096
       * if it is not found.
21097
       */
21098
      public static _Fields findByThriftIdOrThrow(int fieldId) {
21099
        _Fields fields = findByThriftId(fieldId);
21100
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
21101
        return fields;
21102
      }
21103
 
21104
      /**
21105
       * Find the _Fields constant that matches name, or null if its not found.
21106
       */
21107
      public static _Fields findByName(String name) {
21108
        return byName.get(name);
21109
      }
21110
 
21111
      private final short _thriftId;
21112
      private final String _fieldName;
21113
 
21114
      _Fields(short thriftId, String fieldName) {
21115
        _thriftId = thriftId;
21116
        _fieldName = fieldName;
21117
      }
21118
 
21119
      public short getThriftFieldId() {
21120
        return _thriftId;
21121
      }
21122
 
21123
      public String getFieldName() {
21124
        return _fieldName;
21125
      }
21126
    }
21127
 
21128
    // isset id assignments
21129
 
21130
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
21131
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
21132
          new ListMetaData(TType.LIST, 
21133
              new StructMetaData(TType.STRUCT, Alert.class))));
21134
    }});
21135
 
21136
    static {
21137
      FieldMetaData.addStructMetaDataMap(getAlerts_result.class, metaDataMap);
21138
    }
21139
 
21140
    public getAlerts_result() {
21141
    }
21142
 
21143
    public getAlerts_result(
21144
      List<Alert> success)
21145
    {
21146
      this();
21147
      this.success = success;
21148
    }
21149
 
21150
    /**
21151
     * Performs a deep copy on <i>other</i>.
21152
     */
21153
    public getAlerts_result(getAlerts_result other) {
21154
      if (other.isSetSuccess()) {
21155
        List<Alert> __this__success = new ArrayList<Alert>();
21156
        for (Alert other_element : other.success) {
21157
          __this__success.add(new Alert(other_element));
21158
        }
21159
        this.success = __this__success;
21160
      }
21161
    }
21162
 
21163
    public getAlerts_result deepCopy() {
21164
      return new getAlerts_result(this);
21165
    }
21166
 
21167
    @Deprecated
21168
    public getAlerts_result clone() {
21169
      return new getAlerts_result(this);
21170
    }
21171
 
21172
    public int getSuccessSize() {
21173
      return (this.success == null) ? 0 : this.success.size();
21174
    }
21175
 
21176
    public java.util.Iterator<Alert> getSuccessIterator() {
21177
      return (this.success == null) ? null : this.success.iterator();
21178
    }
21179
 
21180
    public void addToSuccess(Alert elem) {
21181
      if (this.success == null) {
21182
        this.success = new ArrayList<Alert>();
21183
      }
21184
      this.success.add(elem);
21185
    }
21186
 
21187
    public List<Alert> getSuccess() {
21188
      return this.success;
21189
    }
21190
 
21191
    public getAlerts_result setSuccess(List<Alert> success) {
21192
      this.success = success;
21193
      return this;
21194
    }
21195
 
21196
    public void unsetSuccess() {
21197
      this.success = null;
21198
    }
21199
 
21200
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
21201
    public boolean isSetSuccess() {
21202
      return this.success != null;
21203
    }
21204
 
21205
    public void setSuccessIsSet(boolean value) {
21206
      if (!value) {
21207
        this.success = null;
21208
      }
21209
    }
21210
 
21211
    public void setFieldValue(_Fields field, Object value) {
21212
      switch (field) {
21213
      case SUCCESS:
21214
        if (value == null) {
21215
          unsetSuccess();
21216
        } else {
21217
          setSuccess((List<Alert>)value);
21218
        }
21219
        break;
21220
 
21221
      }
21222
    }
21223
 
21224
    public void setFieldValue(int fieldID, Object value) {
21225
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
21226
    }
21227
 
21228
    public Object getFieldValue(_Fields field) {
21229
      switch (field) {
21230
      case SUCCESS:
21231
        return getSuccess();
21232
 
21233
      }
21234
      throw new IllegalStateException();
21235
    }
21236
 
21237
    public Object getFieldValue(int fieldId) {
21238
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
21239
    }
21240
 
21241
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
21242
    public boolean isSet(_Fields field) {
21243
      switch (field) {
21244
      case SUCCESS:
21245
        return isSetSuccess();
21246
      }
21247
      throw new IllegalStateException();
21248
    }
21249
 
21250
    public boolean isSet(int fieldID) {
21251
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
21252
    }
21253
 
21254
    @Override
21255
    public boolean equals(Object that) {
21256
      if (that == null)
21257
        return false;
21258
      if (that instanceof getAlerts_result)
21259
        return this.equals((getAlerts_result)that);
21260
      return false;
21261
    }
21262
 
21263
    public boolean equals(getAlerts_result that) {
21264
      if (that == null)
21265
        return false;
21266
 
21267
      boolean this_present_success = true && this.isSetSuccess();
21268
      boolean that_present_success = true && that.isSetSuccess();
21269
      if (this_present_success || that_present_success) {
21270
        if (!(this_present_success && that_present_success))
21271
          return false;
21272
        if (!this.success.equals(that.success))
21273
          return false;
21274
      }
21275
 
21276
      return true;
21277
    }
21278
 
21279
    @Override
21280
    public int hashCode() {
21281
      return 0;
21282
    }
21283
 
21284
    public int compareTo(getAlerts_result other) {
21285
      if (!getClass().equals(other.getClass())) {
21286
        return getClass().getName().compareTo(other.getClass().getName());
21287
      }
21288
 
21289
      int lastComparison = 0;
21290
      getAlerts_result typedOther = (getAlerts_result)other;
21291
 
21292
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
21293
      if (lastComparison != 0) {
21294
        return lastComparison;
21295
      }
21296
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
21297
      if (lastComparison != 0) {
21298
        return lastComparison;
21299
      }
21300
      return 0;
21301
    }
21302
 
21303
    public void read(TProtocol iprot) throws TException {
21304
      TField field;
21305
      iprot.readStructBegin();
21306
      while (true)
21307
      {
21308
        field = iprot.readFieldBegin();
21309
        if (field.type == TType.STOP) { 
21310
          break;
21311
        }
21312
        _Fields fieldId = _Fields.findByThriftId(field.id);
21313
        if (fieldId == null) {
21314
          TProtocolUtil.skip(iprot, field.type);
21315
        } else {
21316
          switch (fieldId) {
21317
            case SUCCESS:
21318
              if (field.type == TType.LIST) {
21319
                {
1245 chandransh 21320
                  TList _list64 = iprot.readListBegin();
21321
                  this.success = new ArrayList<Alert>(_list64.size);
21322
                  for (int _i65 = 0; _i65 < _list64.size; ++_i65)
305 ashish 21323
                  {
1245 chandransh 21324
                    Alert _elem66;
21325
                    _elem66 = new Alert();
21326
                    _elem66.read(iprot);
21327
                    this.success.add(_elem66);
305 ashish 21328
                  }
21329
                  iprot.readListEnd();
21330
                }
21331
              } else { 
21332
                TProtocolUtil.skip(iprot, field.type);
21333
              }
21334
              break;
21335
          }
21336
          iprot.readFieldEnd();
21337
        }
21338
      }
21339
      iprot.readStructEnd();
21340
      validate();
21341
    }
21342
 
21343
    public void write(TProtocol oprot) throws TException {
21344
      oprot.writeStructBegin(STRUCT_DESC);
21345
 
21346
      if (this.isSetSuccess()) {
21347
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
21348
        {
21349
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
1245 chandransh 21350
          for (Alert _iter67 : this.success)
305 ashish 21351
          {
1245 chandransh 21352
            _iter67.write(oprot);
305 ashish 21353
          }
21354
          oprot.writeListEnd();
21355
        }
21356
        oprot.writeFieldEnd();
21357
      }
21358
      oprot.writeFieldStop();
21359
      oprot.writeStructEnd();
21360
    }
21361
 
21362
    @Override
21363
    public String toString() {
21364
      StringBuilder sb = new StringBuilder("getAlerts_result(");
21365
      boolean first = true;
21366
 
21367
      sb.append("success:");
21368
      if (this.success == null) {
21369
        sb.append("null");
21370
      } else {
21371
        sb.append(this.success);
21372
      }
21373
      first = false;
21374
      sb.append(")");
21375
      return sb.toString();
21376
    }
21377
 
21378
    public void validate() throws TException {
21379
      // check for required fields
21380
    }
21381
 
21382
  }
21383
 
21384
  public static class setAlert_args implements TBase<setAlert_args._Fields>, java.io.Serializable, Cloneable, Comparable<setAlert_args>   {
21385
    private static final TStruct STRUCT_DESC = new TStruct("setAlert_args");
21386
 
483 rajveer 21387
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
305 ashish 21388
    private static final TField UNSET_FIELD_DESC = new TField("unset", TType.BOOL, (short)2);
21389
    private static final TField TYPE_FIELD_DESC = new TField("type", TType.I64, (short)3);
21390
    private static final TField COMMENT_FIELD_DESC = new TField("comment", TType.STRING, (short)4);
21391
 
483 rajveer 21392
    private long orderId;
305 ashish 21393
    private boolean unset;
21394
    private long type;
21395
    private String comment;
21396
 
21397
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
21398
    public enum _Fields implements TFieldIdEnum {
483 rajveer 21399
      ORDER_ID((short)1, "orderId"),
305 ashish 21400
      UNSET((short)2, "unset"),
21401
      TYPE((short)3, "type"),
21402
      COMMENT((short)4, "comment");
21403
 
21404
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
21405
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
21406
 
21407
      static {
21408
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
21409
          byId.put((int)field._thriftId, field);
21410
          byName.put(field.getFieldName(), field);
21411
        }
21412
      }
21413
 
21414
      /**
21415
       * Find the _Fields constant that matches fieldId, or null if its not found.
21416
       */
21417
      public static _Fields findByThriftId(int fieldId) {
21418
        return byId.get(fieldId);
21419
      }
21420
 
21421
      /**
21422
       * Find the _Fields constant that matches fieldId, throwing an exception
21423
       * if it is not found.
21424
       */
21425
      public static _Fields findByThriftIdOrThrow(int fieldId) {
21426
        _Fields fields = findByThriftId(fieldId);
21427
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
21428
        return fields;
21429
      }
21430
 
21431
      /**
21432
       * Find the _Fields constant that matches name, or null if its not found.
21433
       */
21434
      public static _Fields findByName(String name) {
21435
        return byName.get(name);
21436
      }
21437
 
21438
      private final short _thriftId;
21439
      private final String _fieldName;
21440
 
21441
      _Fields(short thriftId, String fieldName) {
21442
        _thriftId = thriftId;
21443
        _fieldName = fieldName;
21444
      }
21445
 
21446
      public short getThriftFieldId() {
21447
        return _thriftId;
21448
      }
21449
 
21450
      public String getFieldName() {
21451
        return _fieldName;
21452
      }
21453
    }
21454
 
21455
    // isset id assignments
483 rajveer 21456
    private static final int __ORDERID_ISSET_ID = 0;
305 ashish 21457
    private static final int __UNSET_ISSET_ID = 1;
21458
    private static final int __TYPE_ISSET_ID = 2;
21459
    private BitSet __isset_bit_vector = new BitSet(3);
21460
 
21461
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 21462
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
305 ashish 21463
          new FieldValueMetaData(TType.I64)));
21464
      put(_Fields.UNSET, new FieldMetaData("unset", TFieldRequirementType.DEFAULT, 
21465
          new FieldValueMetaData(TType.BOOL)));
21466
      put(_Fields.TYPE, new FieldMetaData("type", TFieldRequirementType.DEFAULT, 
21467
          new FieldValueMetaData(TType.I64)));
21468
      put(_Fields.COMMENT, new FieldMetaData("comment", TFieldRequirementType.DEFAULT, 
21469
          new FieldValueMetaData(TType.STRING)));
21470
    }});
21471
 
21472
    static {
21473
      FieldMetaData.addStructMetaDataMap(setAlert_args.class, metaDataMap);
21474
    }
21475
 
21476
    public setAlert_args() {
21477
    }
21478
 
21479
    public setAlert_args(
483 rajveer 21480
      long orderId,
305 ashish 21481
      boolean unset,
21482
      long type,
21483
      String comment)
21484
    {
21485
      this();
483 rajveer 21486
      this.orderId = orderId;
21487
      setOrderIdIsSet(true);
305 ashish 21488
      this.unset = unset;
21489
      setUnsetIsSet(true);
21490
      this.type = type;
21491
      setTypeIsSet(true);
21492
      this.comment = comment;
21493
    }
21494
 
21495
    /**
21496
     * Performs a deep copy on <i>other</i>.
21497
     */
21498
    public setAlert_args(setAlert_args other) {
21499
      __isset_bit_vector.clear();
21500
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 21501
      this.orderId = other.orderId;
305 ashish 21502
      this.unset = other.unset;
21503
      this.type = other.type;
21504
      if (other.isSetComment()) {
21505
        this.comment = other.comment;
21506
      }
21507
    }
21508
 
21509
    public setAlert_args deepCopy() {
21510
      return new setAlert_args(this);
21511
    }
21512
 
21513
    @Deprecated
21514
    public setAlert_args clone() {
21515
      return new setAlert_args(this);
21516
    }
21517
 
483 rajveer 21518
    public long getOrderId() {
21519
      return this.orderId;
305 ashish 21520
    }
21521
 
483 rajveer 21522
    public setAlert_args setOrderId(long orderId) {
21523
      this.orderId = orderId;
21524
      setOrderIdIsSet(true);
305 ashish 21525
      return this;
21526
    }
21527
 
483 rajveer 21528
    public void unsetOrderId() {
21529
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
305 ashish 21530
    }
21531
 
483 rajveer 21532
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
21533
    public boolean isSetOrderId() {
21534
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
305 ashish 21535
    }
21536
 
483 rajveer 21537
    public void setOrderIdIsSet(boolean value) {
21538
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
305 ashish 21539
    }
21540
 
21541
    public boolean isUnset() {
21542
      return this.unset;
21543
    }
21544
 
21545
    public setAlert_args setUnset(boolean unset) {
21546
      this.unset = unset;
21547
      setUnsetIsSet(true);
21548
      return this;
21549
    }
21550
 
21551
    public void unsetUnset() {
21552
      __isset_bit_vector.clear(__UNSET_ISSET_ID);
21553
    }
21554
 
21555
    /** Returns true if field unset is set (has been asigned a value) and false otherwise */
21556
    public boolean isSetUnset() {
21557
      return __isset_bit_vector.get(__UNSET_ISSET_ID);
21558
    }
21559
 
21560
    public void setUnsetIsSet(boolean value) {
21561
      __isset_bit_vector.set(__UNSET_ISSET_ID, value);
21562
    }
21563
 
21564
    public long getType() {
21565
      return this.type;
21566
    }
21567
 
21568
    public setAlert_args setType(long type) {
21569
      this.type = type;
21570
      setTypeIsSet(true);
21571
      return this;
21572
    }
21573
 
21574
    public void unsetType() {
21575
      __isset_bit_vector.clear(__TYPE_ISSET_ID);
21576
    }
21577
 
21578
    /** Returns true if field type is set (has been asigned a value) and false otherwise */
21579
    public boolean isSetType() {
21580
      return __isset_bit_vector.get(__TYPE_ISSET_ID);
21581
    }
21582
 
21583
    public void setTypeIsSet(boolean value) {
21584
      __isset_bit_vector.set(__TYPE_ISSET_ID, value);
21585
    }
21586
 
21587
    public String getComment() {
21588
      return this.comment;
21589
    }
21590
 
21591
    public setAlert_args setComment(String comment) {
21592
      this.comment = comment;
21593
      return this;
21594
    }
21595
 
21596
    public void unsetComment() {
21597
      this.comment = null;
21598
    }
21599
 
21600
    /** Returns true if field comment is set (has been asigned a value) and false otherwise */
21601
    public boolean isSetComment() {
21602
      return this.comment != null;
21603
    }
21604
 
21605
    public void setCommentIsSet(boolean value) {
21606
      if (!value) {
21607
        this.comment = null;
21608
      }
21609
    }
21610
 
21611
    public void setFieldValue(_Fields field, Object value) {
21612
      switch (field) {
483 rajveer 21613
      case ORDER_ID:
305 ashish 21614
        if (value == null) {
483 rajveer 21615
          unsetOrderId();
305 ashish 21616
        } else {
483 rajveer 21617
          setOrderId((Long)value);
305 ashish 21618
        }
21619
        break;
21620
 
21621
      case UNSET:
21622
        if (value == null) {
21623
          unsetUnset();
21624
        } else {
21625
          setUnset((Boolean)value);
21626
        }
21627
        break;
21628
 
21629
      case TYPE:
21630
        if (value == null) {
21631
          unsetType();
21632
        } else {
21633
          setType((Long)value);
21634
        }
21635
        break;
21636
 
21637
      case COMMENT:
21638
        if (value == null) {
21639
          unsetComment();
21640
        } else {
21641
          setComment((String)value);
21642
        }
21643
        break;
21644
 
21645
      }
21646
    }
21647
 
21648
    public void setFieldValue(int fieldID, Object value) {
21649
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
21650
    }
21651
 
21652
    public Object getFieldValue(_Fields field) {
21653
      switch (field) {
483 rajveer 21654
      case ORDER_ID:
21655
        return new Long(getOrderId());
305 ashish 21656
 
21657
      case UNSET:
21658
        return new Boolean(isUnset());
21659
 
21660
      case TYPE:
21661
        return new Long(getType());
21662
 
21663
      case COMMENT:
21664
        return getComment();
21665
 
21666
      }
21667
      throw new IllegalStateException();
21668
    }
21669
 
21670
    public Object getFieldValue(int fieldId) {
21671
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
21672
    }
21673
 
21674
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
21675
    public boolean isSet(_Fields field) {
21676
      switch (field) {
483 rajveer 21677
      case ORDER_ID:
21678
        return isSetOrderId();
305 ashish 21679
      case UNSET:
21680
        return isSetUnset();
21681
      case TYPE:
21682
        return isSetType();
21683
      case COMMENT:
21684
        return isSetComment();
21685
      }
21686
      throw new IllegalStateException();
21687
    }
21688
 
21689
    public boolean isSet(int fieldID) {
21690
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
21691
    }
21692
 
21693
    @Override
21694
    public boolean equals(Object that) {
21695
      if (that == null)
21696
        return false;
21697
      if (that instanceof setAlert_args)
21698
        return this.equals((setAlert_args)that);
21699
      return false;
21700
    }
21701
 
21702
    public boolean equals(setAlert_args that) {
21703
      if (that == null)
21704
        return false;
21705
 
483 rajveer 21706
      boolean this_present_orderId = true;
21707
      boolean that_present_orderId = true;
21708
      if (this_present_orderId || that_present_orderId) {
21709
        if (!(this_present_orderId && that_present_orderId))
305 ashish 21710
          return false;
483 rajveer 21711
        if (this.orderId != that.orderId)
305 ashish 21712
          return false;
21713
      }
21714
 
21715
      boolean this_present_unset = true;
21716
      boolean that_present_unset = true;
21717
      if (this_present_unset || that_present_unset) {
21718
        if (!(this_present_unset && that_present_unset))
21719
          return false;
21720
        if (this.unset != that.unset)
21721
          return false;
21722
      }
21723
 
21724
      boolean this_present_type = true;
21725
      boolean that_present_type = true;
21726
      if (this_present_type || that_present_type) {
21727
        if (!(this_present_type && that_present_type))
21728
          return false;
21729
        if (this.type != that.type)
21730
          return false;
21731
      }
21732
 
21733
      boolean this_present_comment = true && this.isSetComment();
21734
      boolean that_present_comment = true && that.isSetComment();
21735
      if (this_present_comment || that_present_comment) {
21736
        if (!(this_present_comment && that_present_comment))
21737
          return false;
21738
        if (!this.comment.equals(that.comment))
21739
          return false;
21740
      }
21741
 
21742
      return true;
21743
    }
21744
 
21745
    @Override
21746
    public int hashCode() {
21747
      return 0;
21748
    }
21749
 
21750
    public int compareTo(setAlert_args other) {
21751
      if (!getClass().equals(other.getClass())) {
21752
        return getClass().getName().compareTo(other.getClass().getName());
21753
      }
21754
 
21755
      int lastComparison = 0;
21756
      setAlert_args typedOther = (setAlert_args)other;
21757
 
483 rajveer 21758
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
305 ashish 21759
      if (lastComparison != 0) {
21760
        return lastComparison;
21761
      }
483 rajveer 21762
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
305 ashish 21763
      if (lastComparison != 0) {
21764
        return lastComparison;
21765
      }
21766
      lastComparison = Boolean.valueOf(isSetUnset()).compareTo(isSetUnset());
21767
      if (lastComparison != 0) {
21768
        return lastComparison;
21769
      }
21770
      lastComparison = TBaseHelper.compareTo(unset, typedOther.unset);
21771
      if (lastComparison != 0) {
21772
        return lastComparison;
21773
      }
21774
      lastComparison = Boolean.valueOf(isSetType()).compareTo(isSetType());
21775
      if (lastComparison != 0) {
21776
        return lastComparison;
21777
      }
21778
      lastComparison = TBaseHelper.compareTo(type, typedOther.type);
21779
      if (lastComparison != 0) {
21780
        return lastComparison;
21781
      }
21782
      lastComparison = Boolean.valueOf(isSetComment()).compareTo(isSetComment());
21783
      if (lastComparison != 0) {
21784
        return lastComparison;
21785
      }
21786
      lastComparison = TBaseHelper.compareTo(comment, typedOther.comment);
21787
      if (lastComparison != 0) {
21788
        return lastComparison;
21789
      }
21790
      return 0;
21791
    }
21792
 
21793
    public void read(TProtocol iprot) throws TException {
21794
      TField field;
21795
      iprot.readStructBegin();
21796
      while (true)
21797
      {
21798
        field = iprot.readFieldBegin();
21799
        if (field.type == TType.STOP) { 
21800
          break;
21801
        }
21802
        _Fields fieldId = _Fields.findByThriftId(field.id);
21803
        if (fieldId == null) {
21804
          TProtocolUtil.skip(iprot, field.type);
21805
        } else {
21806
          switch (fieldId) {
483 rajveer 21807
            case ORDER_ID:
305 ashish 21808
              if (field.type == TType.I64) {
483 rajveer 21809
                this.orderId = iprot.readI64();
21810
                setOrderIdIsSet(true);
305 ashish 21811
              } else { 
21812
                TProtocolUtil.skip(iprot, field.type);
21813
              }
21814
              break;
21815
            case UNSET:
21816
              if (field.type == TType.BOOL) {
21817
                this.unset = iprot.readBool();
21818
                setUnsetIsSet(true);
21819
              } else { 
21820
                TProtocolUtil.skip(iprot, field.type);
21821
              }
21822
              break;
21823
            case TYPE:
21824
              if (field.type == TType.I64) {
21825
                this.type = iprot.readI64();
21826
                setTypeIsSet(true);
21827
              } else { 
21828
                TProtocolUtil.skip(iprot, field.type);
21829
              }
21830
              break;
21831
            case COMMENT:
21832
              if (field.type == TType.STRING) {
21833
                this.comment = iprot.readString();
21834
              } else { 
21835
                TProtocolUtil.skip(iprot, field.type);
21836
              }
21837
              break;
21838
          }
21839
          iprot.readFieldEnd();
21840
        }
21841
      }
21842
      iprot.readStructEnd();
21843
      validate();
21844
    }
21845
 
21846
    public void write(TProtocol oprot) throws TException {
21847
      validate();
21848
 
21849
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 21850
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
21851
      oprot.writeI64(this.orderId);
305 ashish 21852
      oprot.writeFieldEnd();
21853
      oprot.writeFieldBegin(UNSET_FIELD_DESC);
21854
      oprot.writeBool(this.unset);
21855
      oprot.writeFieldEnd();
21856
      oprot.writeFieldBegin(TYPE_FIELD_DESC);
21857
      oprot.writeI64(this.type);
21858
      oprot.writeFieldEnd();
21859
      if (this.comment != null) {
21860
        oprot.writeFieldBegin(COMMENT_FIELD_DESC);
21861
        oprot.writeString(this.comment);
21862
        oprot.writeFieldEnd();
21863
      }
21864
      oprot.writeFieldStop();
21865
      oprot.writeStructEnd();
21866
    }
21867
 
21868
    @Override
21869
    public String toString() {
21870
      StringBuilder sb = new StringBuilder("setAlert_args(");
21871
      boolean first = true;
21872
 
483 rajveer 21873
      sb.append("orderId:");
21874
      sb.append(this.orderId);
305 ashish 21875
      first = false;
21876
      if (!first) sb.append(", ");
21877
      sb.append("unset:");
21878
      sb.append(this.unset);
21879
      first = false;
21880
      if (!first) sb.append(", ");
21881
      sb.append("type:");
21882
      sb.append(this.type);
21883
      first = false;
21884
      if (!first) sb.append(", ");
21885
      sb.append("comment:");
21886
      if (this.comment == null) {
21887
        sb.append("null");
21888
      } else {
21889
        sb.append(this.comment);
21890
      }
21891
      first = false;
21892
      sb.append(")");
21893
      return sb.toString();
21894
    }
21895
 
21896
    public void validate() throws TException {
21897
      // check for required fields
21898
    }
21899
 
21900
  }
21901
 
21902
  public static class setAlert_result implements TBase<setAlert_result._Fields>, java.io.Serializable, Cloneable, Comparable<setAlert_result>   {
21903
    private static final TStruct STRUCT_DESC = new TStruct("setAlert_result");
21904
 
21905
 
21906
 
21907
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
21908
    public enum _Fields implements TFieldIdEnum {
21909
;
21910
 
21911
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
21912
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
21913
 
21914
      static {
21915
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
21916
          byId.put((int)field._thriftId, field);
21917
          byName.put(field.getFieldName(), field);
21918
        }
21919
      }
21920
 
21921
      /**
21922
       * Find the _Fields constant that matches fieldId, or null if its not found.
21923
       */
21924
      public static _Fields findByThriftId(int fieldId) {
21925
        return byId.get(fieldId);
21926
      }
21927
 
21928
      /**
21929
       * Find the _Fields constant that matches fieldId, throwing an exception
21930
       * if it is not found.
21931
       */
21932
      public static _Fields findByThriftIdOrThrow(int fieldId) {
21933
        _Fields fields = findByThriftId(fieldId);
21934
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
21935
        return fields;
21936
      }
21937
 
21938
      /**
21939
       * Find the _Fields constant that matches name, or null if its not found.
21940
       */
21941
      public static _Fields findByName(String name) {
21942
        return byName.get(name);
21943
      }
21944
 
21945
      private final short _thriftId;
21946
      private final String _fieldName;
21947
 
21948
      _Fields(short thriftId, String fieldName) {
21949
        _thriftId = thriftId;
21950
        _fieldName = fieldName;
21951
      }
21952
 
21953
      public short getThriftFieldId() {
21954
        return _thriftId;
21955
      }
21956
 
21957
      public String getFieldName() {
21958
        return _fieldName;
21959
      }
21960
    }
21961
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
21962
    }});
21963
 
21964
    static {
21965
      FieldMetaData.addStructMetaDataMap(setAlert_result.class, metaDataMap);
21966
    }
21967
 
21968
    public setAlert_result() {
21969
    }
21970
 
21971
    /**
21972
     * Performs a deep copy on <i>other</i>.
21973
     */
21974
    public setAlert_result(setAlert_result other) {
21975
    }
21976
 
21977
    public setAlert_result deepCopy() {
21978
      return new setAlert_result(this);
21979
    }
21980
 
21981
    @Deprecated
21982
    public setAlert_result clone() {
21983
      return new setAlert_result(this);
21984
    }
21985
 
21986
    public void setFieldValue(_Fields field, Object value) {
21987
      switch (field) {
21988
      }
21989
    }
21990
 
21991
    public void setFieldValue(int fieldID, Object value) {
21992
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
21993
    }
21994
 
21995
    public Object getFieldValue(_Fields field) {
21996
      switch (field) {
21997
      }
21998
      throw new IllegalStateException();
21999
    }
22000
 
22001
    public Object getFieldValue(int fieldId) {
22002
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
22003
    }
22004
 
22005
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
22006
    public boolean isSet(_Fields field) {
22007
      switch (field) {
22008
      }
22009
      throw new IllegalStateException();
22010
    }
22011
 
22012
    public boolean isSet(int fieldID) {
22013
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
22014
    }
22015
 
22016
    @Override
22017
    public boolean equals(Object that) {
22018
      if (that == null)
22019
        return false;
22020
      if (that instanceof setAlert_result)
22021
        return this.equals((setAlert_result)that);
22022
      return false;
22023
    }
22024
 
22025
    public boolean equals(setAlert_result that) {
22026
      if (that == null)
22027
        return false;
22028
 
22029
      return true;
22030
    }
22031
 
22032
    @Override
22033
    public int hashCode() {
22034
      return 0;
22035
    }
22036
 
22037
    public int compareTo(setAlert_result other) {
22038
      if (!getClass().equals(other.getClass())) {
22039
        return getClass().getName().compareTo(other.getClass().getName());
22040
      }
22041
 
22042
      int lastComparison = 0;
22043
      setAlert_result typedOther = (setAlert_result)other;
22044
 
22045
      return 0;
22046
    }
22047
 
22048
    public void read(TProtocol iprot) throws TException {
22049
      TField field;
22050
      iprot.readStructBegin();
22051
      while (true)
22052
      {
22053
        field = iprot.readFieldBegin();
22054
        if (field.type == TType.STOP) { 
22055
          break;
22056
        }
22057
        _Fields fieldId = _Fields.findByThriftId(field.id);
22058
        if (fieldId == null) {
22059
          TProtocolUtil.skip(iprot, field.type);
22060
        } else {
22061
          switch (fieldId) {
22062
          }
22063
          iprot.readFieldEnd();
22064
        }
22065
      }
22066
      iprot.readStructEnd();
22067
      validate();
22068
    }
22069
 
22070
    public void write(TProtocol oprot) throws TException {
22071
      oprot.writeStructBegin(STRUCT_DESC);
22072
 
22073
      oprot.writeFieldStop();
22074
      oprot.writeStructEnd();
22075
    }
22076
 
22077
    @Override
22078
    public String toString() {
22079
      StringBuilder sb = new StringBuilder("setAlert_result(");
22080
      boolean first = true;
22081
 
22082
      sb.append(")");
22083
      return sb.toString();
22084
    }
22085
 
22086
    public void validate() throws TException {
22087
      // check for required fields
22088
    }
22089
 
22090
  }
22091
 
68 ashish 22092
}