Subversion Repositories SmartDukaan

Rev

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

Rev Author Line No. Line
68 ashish 1
/**
2
 * Autogenerated by Thrift
3
 *
4
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
 */
6
package in.shop2020.model.v1.order;
7
 
8
import java.util.List;
9
import java.util.ArrayList;
10
import java.util.Map;
11
import java.util.HashMap;
12
import java.util.EnumMap;
13
import java.util.Set;
14
import java.util.HashSet;
15
import java.util.EnumSet;
16
import java.util.Collections;
17
import java.util.BitSet;
18
import java.util.Arrays;
19
import org.slf4j.Logger;
20
import org.slf4j.LoggerFactory;
21
 
22
import org.apache.thrift.*;
23
import org.apache.thrift.meta_data.*;
24
import org.apache.thrift.protocol.*;
25
 
26
public class TransactionService {
27
 
28
  public interface Iface {
29
 
764 rajveer 30
    /**
31
     * For closing the open session in sqlalchemy
32
     */
33
    public void closeSession() throws TException;
34
 
132 ashish 35
    public long createTransaction(Transaction transaction) throws TransactionServiceException, TException;
68 ashish 36
 
37
    public Transaction getTransaction(long id) throws TransactionServiceException, TException;
38
 
132 ashish 39
    public List<Transaction> getTransactionsForCustomer(long customerId, long from_date, long to_date, TransactionStatus status) throws TransactionServiceException, TException;
68 ashish 40
 
132 ashish 41
    public List<Transaction> getTransactionsForShoppingCartId(long shoppingCartId) throws TransactionServiceException, TException;
42
 
68 ashish 43
    public TransactionStatus getTransactionStatus(long transactionId) throws TransactionServiceException, TException;
44
 
45
    public boolean changeTransactionStatus(long transactionId, TransactionStatus status, String description) throws TransactionServiceException, TException;
46
 
1398 varun.gupt 47
    public boolean enqueueTransactionInfoEmail(long transactionId) throws TransactionServiceException, TException;
1382 varun.gupt 48
 
483 rajveer 49
    public List<Order> getAllOrders(OrderStatus status, long from_date, long to_date, long warehouse_id) throws TransactionServiceException, TException;
68 ashish 50
 
1133 chandransh 51
    /**
52
     * Returns orders within a range of their billing dates
53
     * 
54
     * @param status
55
     * @param start_billing_date
56
     * @param end_billing_date
57
     * @param warehouse_id
58
     */
1022 varun.gupt 59
    public List<Order> getOrdersByBillingDate(OrderStatus status, long start_billing_date, long end_billing_date, long warehouse_id) throws TransactionServiceException, TException;
60
 
1382 varun.gupt 61
    /**
62
     * Returns order ids for orders which can be returned
63
     * 
64
     * @param customer_id
65
     * @param limit
66
     */
67
    public List<Long> getReturnableOrdersForCustomer(long customer_id, long limit) throws TransactionServiceException, TException;
68
 
69
    /**
70
     * Returns order ids for orders which can be cancelled
71
     * 
72
     * @param customer_id
73
     * @param limit
74
     */
75
    public List<Long> getCancellableOrdersForCustomer(long customer_id, long limit) throws TransactionServiceException, TException;
76
 
483 rajveer 77
    public boolean changeOrderStatus(long orderId, OrderStatus status, String description) throws TransactionServiceException, TException;
68 ashish 78
 
1148 chandransh 79
    /**
80
     * Add billing details such as the bill number and the biller to the Order.
81
     * 
82
     * @param orderId
83
     * @param invoice_number
84
     * @param billed_by
85
     */
86
    public boolean addBillingDetails(long orderId, String invoice_number, String billed_by) throws TransactionServiceException, TException;
495 rajveer 87
 
1148 chandransh 88
    /**
89
     * Adds jacket number to the order. Return false if it doesn't find the order with the given ID.
90
     * 
91
     * @param orderId
92
     * @param jacketNumber
93
     */
94
    public boolean addJacketNumber(long orderId, long jacketNumber) throws TransactionServiceException, TException;
95
 
923 rajveer 96
    public boolean acceptOrder(long orderId) throws TransactionServiceException, TException;
97
 
98
    public boolean billOrder(long orderId) throws TransactionServiceException, TException;
99
 
1529 ankur.sing 100
    /**
101
     * Returns list of orders for given transaction Id. Also filters based on customer Id so that
102
     * only user who owns the transaction can view its order details.
103
     * 
104
     * @param transactionId
105
     * @param customerId
106
     */
107
    public List<Order> getOrdersForTransaction(long transactionId, long customerId) throws TransactionServiceException, TException;
68 ashish 108
 
483 rajveer 109
    public List<Order> getOrdersForCustomer(long customerId, long from_date, long to_date, OrderStatus status) throws TransactionServiceException, TException;
68 ashish 110
 
483 rajveer 111
    public long createOrder(Order order) throws TransactionServiceException, TException;
68 ashish 112
 
483 rajveer 113
    public Order getOrder(long id) throws TransactionServiceException, TException;
68 ashish 114
 
483 rajveer 115
    public List<LineItem> getLineItemsForOrder(long orderId) throws TransactionServiceException, TException;
68 ashish 116
 
758 chandransh 117
    /**
1529 ankur.sing 118
     * Returns an order for the order Id. Also checks if the order belongs to the customer whose Id is passed.
119
     * Throws exception if either order Id is invalid or order does not below to the customer whose Id is passed.
120
     * 
121
     * @param orderId
122
     * @param customerId
123
     */
124
    public Order getOrderForCustomer(long orderId, long customerId) throws TransactionServiceException, TException;
125
 
126
    /**
1221 chandransh 127
     * Create a batch of all the pending orders for the given warehouse.
128
     * The returned list is orderd by created_timestamp.
129
     * If there are no pending orders, an empty list is returned.
130
     * 
131
     * @param warehouseId
132
     */
133
    public List<Order> batchOrders(long warehouseId) throws TransactionServiceException, TException;
134
 
135
    /**
1209 chandransh 136
     * Mark the given order as out of stock. Throws an exception if the order with the given Id couldn't be found.
137
     * 
138
     * @param orderId
139
     */
140
    public boolean markOrderAsOutOfStock(long orderId) throws TransactionServiceException, TException;
141
 
142
    /**
758 chandransh 143
     * Marks all BILLED orders for a warehouse and a provider as SHIPPED_FROM_WH
144
     * 
145
     * @param warehouseId
146
     * @param providerId
147
     */
148
    public boolean markOrdersAsManifested(long warehouseId, long providerId) throws TransactionServiceException, TException;
149
 
1114 chandransh 150
    /**
151
     * Marks all SHIPPED_FROM_WH orders of the previous day for a provider as SHIPPED_TO_LOGISTICS.
152
     * Returns a list of orders that were shipped from warehouse but did not appear in the pick-up report.
153
     * Raises an exception if we encounter report for an AWB number that we did not ship.
154
     * 
155
     * @param providerId
156
     * @param pickupDetails
157
     */
1245 chandransh 158
    public List<Order> markOrdersAsPickedUp(long providerId, Map<String,String> pickupDetails) throws TransactionServiceException, TException;
1114 chandransh 159
 
1133 chandransh 160
    /**
161
     * Marks all orders with AWBs in the given map as delivered. Also sets the delivery timestamp and
162
     * the name of the receiver.
163
     * Raises an exception if we encounter report for an AWB number that we did not ship.
164
     * 
165
     * @param providerId
166
     * @param deliveredOrders
167
     */
168
    public void markOrdersAsDelivered(long providerId, Map<String,String> deliveredOrders) throws TransactionServiceException, TException;
169
 
170
    /**
171
     * Mark all orders with AWBs in the given map as failed. Also sets the delivery timestamp.
172
     * Raises an exception if we encounter report for an AWB number that we did not ship.
173
     * 
174
     * @param providerId
175
     * @param returnedOrders
176
     */
177
    public void markOrdersAsFailed(long providerId, Map<String,String> returnedOrders) throws TransactionServiceException, TException;
178
 
1245 chandransh 179
    /**
180
     * Update the status description of orders whose AWB numbers are keys of the Map.
181
     * 
182
     * @param providerId
183
     * @param undeliveredOrders
184
     */
185
    public void updateNonDeliveryReason(long providerId, Map<String,String> undeliveredOrders) throws TransactionServiceException, TException;
186
 
1406 ankur.sing 187
    /**
188
     * Returns the list of orders whose delivery time has passed but have not been
189
     * delivered yet for the given provider and warehouse. To get a complete list of
190
     * undelivered orders, pass them as -1.
191
     * Returns an empty list if no such orders exist.
192
     * 
193
     * @param providerId
194
     * @param warehouseId
195
     */
196
    public List<Order> getUndeliveredOrders(long providerId, long warehouseId) throws TException;
197
 
483 rajveer 198
    public List<Alert> getAlerts(long orderId, boolean valid) throws TException;
68 ashish 199
 
483 rajveer 200
    public void setAlert(long orderId, boolean unset, long type, String comment) throws TException;
68 ashish 201
 
202
  }
203
 
204
  public static class Client implements Iface {
205
    public Client(TProtocol prot)
206
    {
207
      this(prot, prot);
208
    }
209
 
210
    public Client(TProtocol iprot, TProtocol oprot)
211
    {
212
      iprot_ = iprot;
213
      oprot_ = oprot;
214
    }
215
 
216
    protected TProtocol iprot_;
217
    protected TProtocol oprot_;
218
 
219
    protected int seqid_;
220
 
221
    public TProtocol getInputProtocol()
222
    {
223
      return this.iprot_;
224
    }
225
 
226
    public TProtocol getOutputProtocol()
227
    {
228
      return this.oprot_;
229
    }
230
 
764 rajveer 231
    public void closeSession() throws TException
232
    {
233
      send_closeSession();
234
      recv_closeSession();
235
    }
236
 
237
    public void send_closeSession() throws TException
238
    {
239
      oprot_.writeMessageBegin(new TMessage("closeSession", TMessageType.CALL, seqid_));
240
      closeSession_args args = new closeSession_args();
241
      args.write(oprot_);
242
      oprot_.writeMessageEnd();
243
      oprot_.getTransport().flush();
244
    }
245
 
246
    public void recv_closeSession() throws TException
247
    {
248
      TMessage msg = iprot_.readMessageBegin();
249
      if (msg.type == TMessageType.EXCEPTION) {
250
        TApplicationException x = TApplicationException.read(iprot_);
251
        iprot_.readMessageEnd();
252
        throw x;
253
      }
254
      closeSession_result result = new closeSession_result();
255
      result.read(iprot_);
256
      iprot_.readMessageEnd();
257
      return;
258
    }
259
 
132 ashish 260
    public long createTransaction(Transaction transaction) throws TransactionServiceException, TException
68 ashish 261
    {
262
      send_createTransaction(transaction);
132 ashish 263
      return recv_createTransaction();
68 ashish 264
    }
265
 
266
    public void send_createTransaction(Transaction transaction) throws TException
267
    {
268
      oprot_.writeMessageBegin(new TMessage("createTransaction", TMessageType.CALL, seqid_));
269
      createTransaction_args args = new createTransaction_args();
270
      args.transaction = transaction;
271
      args.write(oprot_);
272
      oprot_.writeMessageEnd();
273
      oprot_.getTransport().flush();
274
    }
275
 
132 ashish 276
    public long recv_createTransaction() throws TransactionServiceException, TException
68 ashish 277
    {
278
      TMessage msg = iprot_.readMessageBegin();
279
      if (msg.type == TMessageType.EXCEPTION) {
280
        TApplicationException x = TApplicationException.read(iprot_);
281
        iprot_.readMessageEnd();
282
        throw x;
283
      }
284
      createTransaction_result result = new createTransaction_result();
285
      result.read(iprot_);
286
      iprot_.readMessageEnd();
132 ashish 287
      if (result.isSetSuccess()) {
288
        return result.success;
289
      }
68 ashish 290
      if (result.ex != null) {
291
        throw result.ex;
292
      }
132 ashish 293
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "createTransaction failed: unknown result");
68 ashish 294
    }
295
 
296
    public Transaction getTransaction(long id) throws TransactionServiceException, TException
297
    {
298
      send_getTransaction(id);
299
      return recv_getTransaction();
300
    }
301
 
302
    public void send_getTransaction(long id) throws TException
303
    {
304
      oprot_.writeMessageBegin(new TMessage("getTransaction", TMessageType.CALL, seqid_));
305
      getTransaction_args args = new getTransaction_args();
306
      args.id = id;
307
      args.write(oprot_);
308
      oprot_.writeMessageEnd();
309
      oprot_.getTransport().flush();
310
    }
311
 
312
    public Transaction recv_getTransaction() throws TransactionServiceException, TException
313
    {
314
      TMessage msg = iprot_.readMessageBegin();
315
      if (msg.type == TMessageType.EXCEPTION) {
316
        TApplicationException x = TApplicationException.read(iprot_);
317
        iprot_.readMessageEnd();
318
        throw x;
319
      }
320
      getTransaction_result result = new getTransaction_result();
321
      result.read(iprot_);
322
      iprot_.readMessageEnd();
323
      if (result.isSetSuccess()) {
324
        return result.success;
325
      }
326
      if (result.ex != null) {
327
        throw result.ex;
328
      }
329
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getTransaction failed: unknown result");
330
    }
331
 
132 ashish 332
    public List<Transaction> getTransactionsForCustomer(long customerId, long from_date, long to_date, TransactionStatus status) throws TransactionServiceException, TException
68 ashish 333
    {
132 ashish 334
      send_getTransactionsForCustomer(customerId, from_date, to_date, status);
68 ashish 335
      return recv_getTransactionsForCustomer();
336
    }
337
 
132 ashish 338
    public void send_getTransactionsForCustomer(long customerId, long from_date, long to_date, TransactionStatus status) throws TException
68 ashish 339
    {
340
      oprot_.writeMessageBegin(new TMessage("getTransactionsForCustomer", TMessageType.CALL, seqid_));
341
      getTransactionsForCustomer_args args = new getTransactionsForCustomer_args();
342
      args.customerId = customerId;
132 ashish 343
      args.from_date = from_date;
344
      args.to_date = to_date;
68 ashish 345
      args.status = status;
346
      args.write(oprot_);
347
      oprot_.writeMessageEnd();
348
      oprot_.getTransport().flush();
349
    }
350
 
351
    public List<Transaction> recv_getTransactionsForCustomer() throws TransactionServiceException, TException
352
    {
353
      TMessage msg = iprot_.readMessageBegin();
354
      if (msg.type == TMessageType.EXCEPTION) {
355
        TApplicationException x = TApplicationException.read(iprot_);
356
        iprot_.readMessageEnd();
357
        throw x;
358
      }
359
      getTransactionsForCustomer_result result = new getTransactionsForCustomer_result();
360
      result.read(iprot_);
361
      iprot_.readMessageEnd();
362
      if (result.isSetSuccess()) {
363
        return result.success;
364
      }
365
      if (result.ex != null) {
366
        throw result.ex;
367
      }
368
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getTransactionsForCustomer failed: unknown result");
369
    }
370
 
132 ashish 371
    public List<Transaction> getTransactionsForShoppingCartId(long shoppingCartId) throws TransactionServiceException, TException
372
    {
373
      send_getTransactionsForShoppingCartId(shoppingCartId);
374
      return recv_getTransactionsForShoppingCartId();
375
    }
376
 
377
    public void send_getTransactionsForShoppingCartId(long shoppingCartId) throws TException
378
    {
379
      oprot_.writeMessageBegin(new TMessage("getTransactionsForShoppingCartId", TMessageType.CALL, seqid_));
380
      getTransactionsForShoppingCartId_args args = new getTransactionsForShoppingCartId_args();
381
      args.shoppingCartId = shoppingCartId;
382
      args.write(oprot_);
383
      oprot_.writeMessageEnd();
384
      oprot_.getTransport().flush();
385
    }
386
 
387
    public List<Transaction> recv_getTransactionsForShoppingCartId() throws TransactionServiceException, TException
388
    {
389
      TMessage msg = iprot_.readMessageBegin();
390
      if (msg.type == TMessageType.EXCEPTION) {
391
        TApplicationException x = TApplicationException.read(iprot_);
392
        iprot_.readMessageEnd();
393
        throw x;
394
      }
395
      getTransactionsForShoppingCartId_result result = new getTransactionsForShoppingCartId_result();
396
      result.read(iprot_);
397
      iprot_.readMessageEnd();
398
      if (result.isSetSuccess()) {
399
        return result.success;
400
      }
401
      if (result.ex != null) {
402
        throw result.ex;
403
      }
404
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getTransactionsForShoppingCartId failed: unknown result");
405
    }
406
 
68 ashish 407
    public TransactionStatus getTransactionStatus(long transactionId) throws TransactionServiceException, TException
408
    {
409
      send_getTransactionStatus(transactionId);
410
      return recv_getTransactionStatus();
411
    }
412
 
413
    public void send_getTransactionStatus(long transactionId) throws TException
414
    {
415
      oprot_.writeMessageBegin(new TMessage("getTransactionStatus", TMessageType.CALL, seqid_));
416
      getTransactionStatus_args args = new getTransactionStatus_args();
417
      args.transactionId = transactionId;
418
      args.write(oprot_);
419
      oprot_.writeMessageEnd();
420
      oprot_.getTransport().flush();
421
    }
422
 
423
    public TransactionStatus recv_getTransactionStatus() throws TransactionServiceException, TException
424
    {
425
      TMessage msg = iprot_.readMessageBegin();
426
      if (msg.type == TMessageType.EXCEPTION) {
427
        TApplicationException x = TApplicationException.read(iprot_);
428
        iprot_.readMessageEnd();
429
        throw x;
430
      }
431
      getTransactionStatus_result result = new getTransactionStatus_result();
432
      result.read(iprot_);
433
      iprot_.readMessageEnd();
434
      if (result.isSetSuccess()) {
435
        return result.success;
436
      }
437
      if (result.ex != null) {
438
        throw result.ex;
439
      }
440
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getTransactionStatus failed: unknown result");
441
    }
442
 
443
    public boolean changeTransactionStatus(long transactionId, TransactionStatus status, String description) throws TransactionServiceException, TException
444
    {
445
      send_changeTransactionStatus(transactionId, status, description);
446
      return recv_changeTransactionStatus();
447
    }
448
 
449
    public void send_changeTransactionStatus(long transactionId, TransactionStatus status, String description) throws TException
450
    {
451
      oprot_.writeMessageBegin(new TMessage("changeTransactionStatus", TMessageType.CALL, seqid_));
452
      changeTransactionStatus_args args = new changeTransactionStatus_args();
453
      args.transactionId = transactionId;
454
      args.status = status;
455
      args.description = description;
456
      args.write(oprot_);
457
      oprot_.writeMessageEnd();
458
      oprot_.getTransport().flush();
459
    }
460
 
461
    public boolean recv_changeTransactionStatus() throws TransactionServiceException, TException
462
    {
463
      TMessage msg = iprot_.readMessageBegin();
464
      if (msg.type == TMessageType.EXCEPTION) {
465
        TApplicationException x = TApplicationException.read(iprot_);
466
        iprot_.readMessageEnd();
467
        throw x;
468
      }
469
      changeTransactionStatus_result result = new changeTransactionStatus_result();
470
      result.read(iprot_);
471
      iprot_.readMessageEnd();
472
      if (result.isSetSuccess()) {
473
        return result.success;
474
      }
475
      if (result.ex != null) {
476
        throw result.ex;
477
      }
478
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "changeTransactionStatus failed: unknown result");
479
    }
480
 
1398 varun.gupt 481
    public boolean enqueueTransactionInfoEmail(long transactionId) throws TransactionServiceException, TException
1382 varun.gupt 482
    {
1398 varun.gupt 483
      send_enqueueTransactionInfoEmail(transactionId);
484
      return recv_enqueueTransactionInfoEmail();
1382 varun.gupt 485
    }
486
 
1398 varun.gupt 487
    public void send_enqueueTransactionInfoEmail(long transactionId) throws TException
1382 varun.gupt 488
    {
1398 varun.gupt 489
      oprot_.writeMessageBegin(new TMessage("enqueueTransactionInfoEmail", TMessageType.CALL, seqid_));
490
      enqueueTransactionInfoEmail_args args = new enqueueTransactionInfoEmail_args();
1382 varun.gupt 491
      args.transactionId = transactionId;
492
      args.write(oprot_);
493
      oprot_.writeMessageEnd();
494
      oprot_.getTransport().flush();
495
    }
496
 
1398 varun.gupt 497
    public boolean recv_enqueueTransactionInfoEmail() throws TransactionServiceException, TException
1382 varun.gupt 498
    {
499
      TMessage msg = iprot_.readMessageBegin();
500
      if (msg.type == TMessageType.EXCEPTION) {
501
        TApplicationException x = TApplicationException.read(iprot_);
502
        iprot_.readMessageEnd();
503
        throw x;
504
      }
1398 varun.gupt 505
      enqueueTransactionInfoEmail_result result = new enqueueTransactionInfoEmail_result();
1382 varun.gupt 506
      result.read(iprot_);
507
      iprot_.readMessageEnd();
508
      if (result.isSetSuccess()) {
509
        return result.success;
510
      }
511
      if (result.ex != null) {
512
        throw result.ex;
513
      }
1398 varun.gupt 514
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "enqueueTransactionInfoEmail failed: unknown result");
1382 varun.gupt 515
    }
516
 
483 rajveer 517
    public List<Order> getAllOrders(OrderStatus status, long from_date, long to_date, long warehouse_id) throws TransactionServiceException, TException
68 ashish 518
    {
483 rajveer 519
      send_getAllOrders(status, from_date, to_date, warehouse_id);
520
      return recv_getAllOrders();
68 ashish 521
    }
522
 
483 rajveer 523
    public void send_getAllOrders(OrderStatus status, long from_date, long to_date, long warehouse_id) throws TException
68 ashish 524
    {
483 rajveer 525
      oprot_.writeMessageBegin(new TMessage("getAllOrders", TMessageType.CALL, seqid_));
526
      getAllOrders_args args = new getAllOrders_args();
527
      args.status = status;
528
      args.from_date = from_date;
529
      args.to_date = to_date;
530
      args.warehouse_id = warehouse_id;
68 ashish 531
      args.write(oprot_);
532
      oprot_.writeMessageEnd();
533
      oprot_.getTransport().flush();
534
    }
535
 
483 rajveer 536
    public List<Order> recv_getAllOrders() throws TransactionServiceException, TException
68 ashish 537
    {
538
      TMessage msg = iprot_.readMessageBegin();
539
      if (msg.type == TMessageType.EXCEPTION) {
540
        TApplicationException x = TApplicationException.read(iprot_);
541
        iprot_.readMessageEnd();
542
        throw x;
543
      }
483 rajveer 544
      getAllOrders_result result = new getAllOrders_result();
68 ashish 545
      result.read(iprot_);
546
      iprot_.readMessageEnd();
547
      if (result.isSetSuccess()) {
548
        return result.success;
549
      }
550
      if (result.ex != null) {
551
        throw result.ex;
552
      }
483 rajveer 553
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getAllOrders failed: unknown result");
68 ashish 554
    }
555
 
1022 varun.gupt 556
    public List<Order> getOrdersByBillingDate(OrderStatus status, long start_billing_date, long end_billing_date, long warehouse_id) throws TransactionServiceException, TException
557
    {
558
      send_getOrdersByBillingDate(status, start_billing_date, end_billing_date, warehouse_id);
559
      return recv_getOrdersByBillingDate();
560
    }
561
 
562
    public void send_getOrdersByBillingDate(OrderStatus status, long start_billing_date, long end_billing_date, long warehouse_id) throws TException
563
    {
564
      oprot_.writeMessageBegin(new TMessage("getOrdersByBillingDate", TMessageType.CALL, seqid_));
565
      getOrdersByBillingDate_args args = new getOrdersByBillingDate_args();
566
      args.status = status;
567
      args.start_billing_date = start_billing_date;
568
      args.end_billing_date = end_billing_date;
569
      args.warehouse_id = warehouse_id;
570
      args.write(oprot_);
571
      oprot_.writeMessageEnd();
572
      oprot_.getTransport().flush();
573
    }
574
 
575
    public List<Order> recv_getOrdersByBillingDate() throws TransactionServiceException, TException
576
    {
577
      TMessage msg = iprot_.readMessageBegin();
578
      if (msg.type == TMessageType.EXCEPTION) {
579
        TApplicationException x = TApplicationException.read(iprot_);
580
        iprot_.readMessageEnd();
581
        throw x;
582
      }
583
      getOrdersByBillingDate_result result = new getOrdersByBillingDate_result();
584
      result.read(iprot_);
585
      iprot_.readMessageEnd();
586
      if (result.isSetSuccess()) {
587
        return result.success;
588
      }
589
      if (result.ex != null) {
590
        throw result.ex;
591
      }
592
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getOrdersByBillingDate failed: unknown result");
593
    }
594
 
1382 varun.gupt 595
    public List<Long> getReturnableOrdersForCustomer(long customer_id, long limit) throws TransactionServiceException, TException
596
    {
597
      send_getReturnableOrdersForCustomer(customer_id, limit);
598
      return recv_getReturnableOrdersForCustomer();
599
    }
600
 
601
    public void send_getReturnableOrdersForCustomer(long customer_id, long limit) throws TException
602
    {
603
      oprot_.writeMessageBegin(new TMessage("getReturnableOrdersForCustomer", TMessageType.CALL, seqid_));
604
      getReturnableOrdersForCustomer_args args = new getReturnableOrdersForCustomer_args();
605
      args.customer_id = customer_id;
606
      args.limit = limit;
607
      args.write(oprot_);
608
      oprot_.writeMessageEnd();
609
      oprot_.getTransport().flush();
610
    }
611
 
612
    public List<Long> recv_getReturnableOrdersForCustomer() throws TransactionServiceException, TException
613
    {
614
      TMessage msg = iprot_.readMessageBegin();
615
      if (msg.type == TMessageType.EXCEPTION) {
616
        TApplicationException x = TApplicationException.read(iprot_);
617
        iprot_.readMessageEnd();
618
        throw x;
619
      }
620
      getReturnableOrdersForCustomer_result result = new getReturnableOrdersForCustomer_result();
621
      result.read(iprot_);
622
      iprot_.readMessageEnd();
623
      if (result.isSetSuccess()) {
624
        return result.success;
625
      }
626
      if (result.ex != null) {
627
        throw result.ex;
628
      }
629
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getReturnableOrdersForCustomer failed: unknown result");
630
    }
631
 
632
    public List<Long> getCancellableOrdersForCustomer(long customer_id, long limit) throws TransactionServiceException, TException
633
    {
634
      send_getCancellableOrdersForCustomer(customer_id, limit);
635
      return recv_getCancellableOrdersForCustomer();
636
    }
637
 
638
    public void send_getCancellableOrdersForCustomer(long customer_id, long limit) throws TException
639
    {
640
      oprot_.writeMessageBegin(new TMessage("getCancellableOrdersForCustomer", TMessageType.CALL, seqid_));
641
      getCancellableOrdersForCustomer_args args = new getCancellableOrdersForCustomer_args();
642
      args.customer_id = customer_id;
643
      args.limit = limit;
644
      args.write(oprot_);
645
      oprot_.writeMessageEnd();
646
      oprot_.getTransport().flush();
647
    }
648
 
649
    public List<Long> recv_getCancellableOrdersForCustomer() throws TransactionServiceException, TException
650
    {
651
      TMessage msg = iprot_.readMessageBegin();
652
      if (msg.type == TMessageType.EXCEPTION) {
653
        TApplicationException x = TApplicationException.read(iprot_);
654
        iprot_.readMessageEnd();
655
        throw x;
656
      }
657
      getCancellableOrdersForCustomer_result result = new getCancellableOrdersForCustomer_result();
658
      result.read(iprot_);
659
      iprot_.readMessageEnd();
660
      if (result.isSetSuccess()) {
661
        return result.success;
662
      }
663
      if (result.ex != null) {
664
        throw result.ex;
665
      }
666
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getCancellableOrdersForCustomer failed: unknown result");
667
    }
668
 
483 rajveer 669
    public boolean changeOrderStatus(long orderId, OrderStatus status, String description) throws TransactionServiceException, TException
68 ashish 670
    {
483 rajveer 671
      send_changeOrderStatus(orderId, status, description);
672
      return recv_changeOrderStatus();
68 ashish 673
    }
674
 
483 rajveer 675
    public void send_changeOrderStatus(long orderId, OrderStatus status, String description) throws TException
68 ashish 676
    {
483 rajveer 677
      oprot_.writeMessageBegin(new TMessage("changeOrderStatus", TMessageType.CALL, seqid_));
678
      changeOrderStatus_args args = new changeOrderStatus_args();
679
      args.orderId = orderId;
680
      args.status = status;
681
      args.description = description;
68 ashish 682
      args.write(oprot_);
683
      oprot_.writeMessageEnd();
684
      oprot_.getTransport().flush();
685
    }
686
 
483 rajveer 687
    public boolean recv_changeOrderStatus() throws TransactionServiceException, TException
68 ashish 688
    {
689
      TMessage msg = iprot_.readMessageBegin();
690
      if (msg.type == TMessageType.EXCEPTION) {
691
        TApplicationException x = TApplicationException.read(iprot_);
692
        iprot_.readMessageEnd();
693
        throw x;
694
      }
483 rajveer 695
      changeOrderStatus_result result = new changeOrderStatus_result();
68 ashish 696
      result.read(iprot_);
697
      iprot_.readMessageEnd();
698
      if (result.isSetSuccess()) {
699
        return result.success;
700
      }
701
      if (result.ex != null) {
702
        throw result.ex;
703
      }
483 rajveer 704
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "changeOrderStatus failed: unknown result");
68 ashish 705
    }
706
 
1148 chandransh 707
    public boolean addBillingDetails(long orderId, String invoice_number, String billed_by) throws TransactionServiceException, TException
495 rajveer 708
    {
1148 chandransh 709
      send_addBillingDetails(orderId, invoice_number, billed_by);
495 rajveer 710
      return recv_addBillingDetails();
711
    }
712
 
1148 chandransh 713
    public void send_addBillingDetails(long orderId, String invoice_number, String billed_by) throws TException
495 rajveer 714
    {
715
      oprot_.writeMessageBegin(new TMessage("addBillingDetails", TMessageType.CALL, seqid_));
716
      addBillingDetails_args args = new addBillingDetails_args();
717
      args.orderId = orderId;
718
      args.invoice_number = invoice_number;
719
      args.billed_by = billed_by;
720
      args.write(oprot_);
721
      oprot_.writeMessageEnd();
722
      oprot_.getTransport().flush();
723
    }
724
 
725
    public boolean recv_addBillingDetails() throws TransactionServiceException, TException
726
    {
727
      TMessage msg = iprot_.readMessageBegin();
728
      if (msg.type == TMessageType.EXCEPTION) {
729
        TApplicationException x = TApplicationException.read(iprot_);
730
        iprot_.readMessageEnd();
731
        throw x;
732
      }
733
      addBillingDetails_result result = new addBillingDetails_result();
734
      result.read(iprot_);
735
      iprot_.readMessageEnd();
736
      if (result.isSetSuccess()) {
737
        return result.success;
738
      }
739
      if (result.ex != null) {
740
        throw result.ex;
741
      }
742
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "addBillingDetails failed: unknown result");
743
    }
744
 
1148 chandransh 745
    public boolean addJacketNumber(long orderId, long jacketNumber) throws TransactionServiceException, TException
746
    {
747
      send_addJacketNumber(orderId, jacketNumber);
748
      return recv_addJacketNumber();
749
    }
750
 
751
    public void send_addJacketNumber(long orderId, long jacketNumber) throws TException
752
    {
753
      oprot_.writeMessageBegin(new TMessage("addJacketNumber", TMessageType.CALL, seqid_));
754
      addJacketNumber_args args = new addJacketNumber_args();
755
      args.orderId = orderId;
756
      args.jacketNumber = jacketNumber;
757
      args.write(oprot_);
758
      oprot_.writeMessageEnd();
759
      oprot_.getTransport().flush();
760
    }
761
 
762
    public boolean recv_addJacketNumber() throws TransactionServiceException, TException
763
    {
764
      TMessage msg = iprot_.readMessageBegin();
765
      if (msg.type == TMessageType.EXCEPTION) {
766
        TApplicationException x = TApplicationException.read(iprot_);
767
        iprot_.readMessageEnd();
768
        throw x;
769
      }
770
      addJacketNumber_result result = new addJacketNumber_result();
771
      result.read(iprot_);
772
      iprot_.readMessageEnd();
773
      if (result.isSetSuccess()) {
774
        return result.success;
775
      }
776
      if (result.ex != null) {
777
        throw result.ex;
778
      }
779
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "addJacketNumber failed: unknown result");
780
    }
781
 
923 rajveer 782
    public boolean acceptOrder(long orderId) throws TransactionServiceException, TException
783
    {
784
      send_acceptOrder(orderId);
785
      return recv_acceptOrder();
786
    }
787
 
788
    public void send_acceptOrder(long orderId) throws TException
789
    {
790
      oprot_.writeMessageBegin(new TMessage("acceptOrder", TMessageType.CALL, seqid_));
791
      acceptOrder_args args = new acceptOrder_args();
792
      args.orderId = orderId;
793
      args.write(oprot_);
794
      oprot_.writeMessageEnd();
795
      oprot_.getTransport().flush();
796
    }
797
 
798
    public boolean recv_acceptOrder() throws TransactionServiceException, TException
799
    {
800
      TMessage msg = iprot_.readMessageBegin();
801
      if (msg.type == TMessageType.EXCEPTION) {
802
        TApplicationException x = TApplicationException.read(iprot_);
803
        iprot_.readMessageEnd();
804
        throw x;
805
      }
806
      acceptOrder_result result = new acceptOrder_result();
807
      result.read(iprot_);
808
      iprot_.readMessageEnd();
809
      if (result.isSetSuccess()) {
810
        return result.success;
811
      }
812
      if (result.ex != null) {
813
        throw result.ex;
814
      }
815
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "acceptOrder failed: unknown result");
816
    }
817
 
818
    public boolean billOrder(long orderId) throws TransactionServiceException, TException
819
    {
820
      send_billOrder(orderId);
821
      return recv_billOrder();
822
    }
823
 
824
    public void send_billOrder(long orderId) throws TException
825
    {
826
      oprot_.writeMessageBegin(new TMessage("billOrder", TMessageType.CALL, seqid_));
827
      billOrder_args args = new billOrder_args();
828
      args.orderId = orderId;
829
      args.write(oprot_);
830
      oprot_.writeMessageEnd();
831
      oprot_.getTransport().flush();
832
    }
833
 
834
    public boolean recv_billOrder() throws TransactionServiceException, TException
835
    {
836
      TMessage msg = iprot_.readMessageBegin();
837
      if (msg.type == TMessageType.EXCEPTION) {
838
        TApplicationException x = TApplicationException.read(iprot_);
839
        iprot_.readMessageEnd();
840
        throw x;
841
      }
842
      billOrder_result result = new billOrder_result();
843
      result.read(iprot_);
844
      iprot_.readMessageEnd();
845
      if (result.isSetSuccess()) {
846
        return result.success;
847
      }
848
      if (result.ex != null) {
849
        throw result.ex;
850
      }
851
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "billOrder failed: unknown result");
852
    }
853
 
1529 ankur.sing 854
    public List<Order> getOrdersForTransaction(long transactionId, long customerId) throws TransactionServiceException, TException
68 ashish 855
    {
1529 ankur.sing 856
      send_getOrdersForTransaction(transactionId, customerId);
483 rajveer 857
      return recv_getOrdersForTransaction();
68 ashish 858
    }
859
 
1529 ankur.sing 860
    public void send_getOrdersForTransaction(long transactionId, long customerId) throws TException
68 ashish 861
    {
483 rajveer 862
      oprot_.writeMessageBegin(new TMessage("getOrdersForTransaction", TMessageType.CALL, seqid_));
863
      getOrdersForTransaction_args args = new getOrdersForTransaction_args();
68 ashish 864
      args.transactionId = transactionId;
1529 ankur.sing 865
      args.customerId = customerId;
68 ashish 866
      args.write(oprot_);
867
      oprot_.writeMessageEnd();
868
      oprot_.getTransport().flush();
869
    }
870
 
483 rajveer 871
    public List<Order> recv_getOrdersForTransaction() throws TransactionServiceException, TException
68 ashish 872
    {
873
      TMessage msg = iprot_.readMessageBegin();
874
      if (msg.type == TMessageType.EXCEPTION) {
875
        TApplicationException x = TApplicationException.read(iprot_);
876
        iprot_.readMessageEnd();
877
        throw x;
878
      }
483 rajveer 879
      getOrdersForTransaction_result result = new getOrdersForTransaction_result();
68 ashish 880
      result.read(iprot_);
881
      iprot_.readMessageEnd();
882
      if (result.isSetSuccess()) {
883
        return result.success;
884
      }
885
      if (result.ex != null) {
886
        throw result.ex;
887
      }
483 rajveer 888
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getOrdersForTransaction failed: unknown result");
68 ashish 889
    }
890
 
483 rajveer 891
    public List<Order> getOrdersForCustomer(long customerId, long from_date, long to_date, OrderStatus status) throws TransactionServiceException, TException
68 ashish 892
    {
483 rajveer 893
      send_getOrdersForCustomer(customerId, from_date, to_date, status);
894
      return recv_getOrdersForCustomer();
68 ashish 895
    }
896
 
483 rajveer 897
    public void send_getOrdersForCustomer(long customerId, long from_date, long to_date, OrderStatus status) throws TException
68 ashish 898
    {
483 rajveer 899
      oprot_.writeMessageBegin(new TMessage("getOrdersForCustomer", TMessageType.CALL, seqid_));
900
      getOrdersForCustomer_args args = new getOrdersForCustomer_args();
901
      args.customerId = customerId;
902
      args.from_date = from_date;
903
      args.to_date = to_date;
904
      args.status = status;
68 ashish 905
      args.write(oprot_);
906
      oprot_.writeMessageEnd();
907
      oprot_.getTransport().flush();
908
    }
909
 
483 rajveer 910
    public List<Order> recv_getOrdersForCustomer() throws TransactionServiceException, TException
68 ashish 911
    {
912
      TMessage msg = iprot_.readMessageBegin();
913
      if (msg.type == TMessageType.EXCEPTION) {
914
        TApplicationException x = TApplicationException.read(iprot_);
915
        iprot_.readMessageEnd();
916
        throw x;
917
      }
483 rajveer 918
      getOrdersForCustomer_result result = new getOrdersForCustomer_result();
68 ashish 919
      result.read(iprot_);
920
      iprot_.readMessageEnd();
921
      if (result.isSetSuccess()) {
922
        return result.success;
923
      }
924
      if (result.ex != null) {
925
        throw result.ex;
926
      }
483 rajveer 927
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getOrdersForCustomer failed: unknown result");
68 ashish 928
    }
929
 
483 rajveer 930
    public long createOrder(Order order) throws TransactionServiceException, TException
68 ashish 931
    {
483 rajveer 932
      send_createOrder(order);
933
      return recv_createOrder();
68 ashish 934
    }
935
 
483 rajveer 936
    public void send_createOrder(Order order) throws TException
68 ashish 937
    {
483 rajveer 938
      oprot_.writeMessageBegin(new TMessage("createOrder", TMessageType.CALL, seqid_));
939
      createOrder_args args = new createOrder_args();
940
      args.order = order;
68 ashish 941
      args.write(oprot_);
942
      oprot_.writeMessageEnd();
943
      oprot_.getTransport().flush();
944
    }
945
 
483 rajveer 946
    public long recv_createOrder() throws TransactionServiceException, TException
68 ashish 947
    {
948
      TMessage msg = iprot_.readMessageBegin();
949
      if (msg.type == TMessageType.EXCEPTION) {
950
        TApplicationException x = TApplicationException.read(iprot_);
951
        iprot_.readMessageEnd();
952
        throw x;
953
      }
483 rajveer 954
      createOrder_result result = new createOrder_result();
68 ashish 955
      result.read(iprot_);
956
      iprot_.readMessageEnd();
957
      if (result.isSetSuccess()) {
958
        return result.success;
959
      }
960
      if (result.ex != null) {
961
        throw result.ex;
962
      }
483 rajveer 963
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "createOrder failed: unknown result");
68 ashish 964
    }
965
 
483 rajveer 966
    public Order getOrder(long id) throws TransactionServiceException, TException
68 ashish 967
    {
483 rajveer 968
      send_getOrder(id);
969
      return recv_getOrder();
68 ashish 970
    }
971
 
483 rajveer 972
    public void send_getOrder(long id) throws TException
68 ashish 973
    {
483 rajveer 974
      oprot_.writeMessageBegin(new TMessage("getOrder", TMessageType.CALL, seqid_));
975
      getOrder_args args = new getOrder_args();
976
      args.id = id;
68 ashish 977
      args.write(oprot_);
978
      oprot_.writeMessageEnd();
979
      oprot_.getTransport().flush();
980
    }
981
 
483 rajveer 982
    public Order recv_getOrder() throws TransactionServiceException, TException
68 ashish 983
    {
984
      TMessage msg = iprot_.readMessageBegin();
985
      if (msg.type == TMessageType.EXCEPTION) {
986
        TApplicationException x = TApplicationException.read(iprot_);
987
        iprot_.readMessageEnd();
988
        throw x;
989
      }
483 rajveer 990
      getOrder_result result = new getOrder_result();
68 ashish 991
      result.read(iprot_);
992
      iprot_.readMessageEnd();
993
      if (result.isSetSuccess()) {
994
        return result.success;
995
      }
996
      if (result.ex != null) {
997
        throw result.ex;
998
      }
483 rajveer 999
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getOrder failed: unknown result");
68 ashish 1000
    }
1001
 
483 rajveer 1002
    public List<LineItem> getLineItemsForOrder(long orderId) throws TransactionServiceException, TException
68 ashish 1003
    {
483 rajveer 1004
      send_getLineItemsForOrder(orderId);
1005
      return recv_getLineItemsForOrder();
68 ashish 1006
    }
1007
 
483 rajveer 1008
    public void send_getLineItemsForOrder(long orderId) throws TException
68 ashish 1009
    {
483 rajveer 1010
      oprot_.writeMessageBegin(new TMessage("getLineItemsForOrder", TMessageType.CALL, seqid_));
1011
      getLineItemsForOrder_args args = new getLineItemsForOrder_args();
1012
      args.orderId = orderId;
68 ashish 1013
      args.write(oprot_);
1014
      oprot_.writeMessageEnd();
1015
      oprot_.getTransport().flush();
1016
    }
1017
 
483 rajveer 1018
    public List<LineItem> recv_getLineItemsForOrder() throws TransactionServiceException, TException
68 ashish 1019
    {
1020
      TMessage msg = iprot_.readMessageBegin();
1021
      if (msg.type == TMessageType.EXCEPTION) {
1022
        TApplicationException x = TApplicationException.read(iprot_);
1023
        iprot_.readMessageEnd();
1024
        throw x;
1025
      }
483 rajveer 1026
      getLineItemsForOrder_result result = new getLineItemsForOrder_result();
68 ashish 1027
      result.read(iprot_);
1028
      iprot_.readMessageEnd();
1029
      if (result.isSetSuccess()) {
1030
        return result.success;
1031
      }
1032
      if (result.ex != null) {
1033
        throw result.ex;
1034
      }
483 rajveer 1035
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getLineItemsForOrder failed: unknown result");
68 ashish 1036
    }
1037
 
1529 ankur.sing 1038
    public Order getOrderForCustomer(long orderId, long customerId) throws TransactionServiceException, TException
1039
    {
1040
      send_getOrderForCustomer(orderId, customerId);
1041
      return recv_getOrderForCustomer();
1042
    }
1043
 
1044
    public void send_getOrderForCustomer(long orderId, long customerId) throws TException
1045
    {
1046
      oprot_.writeMessageBegin(new TMessage("getOrderForCustomer", TMessageType.CALL, seqid_));
1047
      getOrderForCustomer_args args = new getOrderForCustomer_args();
1048
      args.orderId = orderId;
1049
      args.customerId = customerId;
1050
      args.write(oprot_);
1051
      oprot_.writeMessageEnd();
1052
      oprot_.getTransport().flush();
1053
    }
1054
 
1055
    public Order recv_getOrderForCustomer() throws TransactionServiceException, TException
1056
    {
1057
      TMessage msg = iprot_.readMessageBegin();
1058
      if (msg.type == TMessageType.EXCEPTION) {
1059
        TApplicationException x = TApplicationException.read(iprot_);
1060
        iprot_.readMessageEnd();
1061
        throw x;
1062
      }
1063
      getOrderForCustomer_result result = new getOrderForCustomer_result();
1064
      result.read(iprot_);
1065
      iprot_.readMessageEnd();
1066
      if (result.isSetSuccess()) {
1067
        return result.success;
1068
      }
1069
      if (result.ex != null) {
1070
        throw result.ex;
1071
      }
1072
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getOrderForCustomer failed: unknown result");
1073
    }
1074
 
1221 chandransh 1075
    public List<Order> batchOrders(long warehouseId) throws TransactionServiceException, TException
1076
    {
1077
      send_batchOrders(warehouseId);
1078
      return recv_batchOrders();
1079
    }
1080
 
1081
    public void send_batchOrders(long warehouseId) throws TException
1082
    {
1083
      oprot_.writeMessageBegin(new TMessage("batchOrders", TMessageType.CALL, seqid_));
1084
      batchOrders_args args = new batchOrders_args();
1085
      args.warehouseId = warehouseId;
1086
      args.write(oprot_);
1087
      oprot_.writeMessageEnd();
1088
      oprot_.getTransport().flush();
1089
    }
1090
 
1091
    public List<Order> recv_batchOrders() throws TransactionServiceException, TException
1092
    {
1093
      TMessage msg = iprot_.readMessageBegin();
1094
      if (msg.type == TMessageType.EXCEPTION) {
1095
        TApplicationException x = TApplicationException.read(iprot_);
1096
        iprot_.readMessageEnd();
1097
        throw x;
1098
      }
1099
      batchOrders_result result = new batchOrders_result();
1100
      result.read(iprot_);
1101
      iprot_.readMessageEnd();
1102
      if (result.isSetSuccess()) {
1103
        return result.success;
1104
      }
1105
      if (result.ex != null) {
1106
        throw result.ex;
1107
      }
1108
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "batchOrders failed: unknown result");
1109
    }
1110
 
1209 chandransh 1111
    public boolean markOrderAsOutOfStock(long orderId) throws TransactionServiceException, TException
1112
    {
1113
      send_markOrderAsOutOfStock(orderId);
1114
      return recv_markOrderAsOutOfStock();
1115
    }
1116
 
1117
    public void send_markOrderAsOutOfStock(long orderId) throws TException
1118
    {
1119
      oprot_.writeMessageBegin(new TMessage("markOrderAsOutOfStock", TMessageType.CALL, seqid_));
1120
      markOrderAsOutOfStock_args args = new markOrderAsOutOfStock_args();
1121
      args.orderId = orderId;
1122
      args.write(oprot_);
1123
      oprot_.writeMessageEnd();
1124
      oprot_.getTransport().flush();
1125
    }
1126
 
1127
    public boolean recv_markOrderAsOutOfStock() throws TransactionServiceException, TException
1128
    {
1129
      TMessage msg = iprot_.readMessageBegin();
1130
      if (msg.type == TMessageType.EXCEPTION) {
1131
        TApplicationException x = TApplicationException.read(iprot_);
1132
        iprot_.readMessageEnd();
1133
        throw x;
1134
      }
1135
      markOrderAsOutOfStock_result result = new markOrderAsOutOfStock_result();
1136
      result.read(iprot_);
1137
      iprot_.readMessageEnd();
1138
      if (result.isSetSuccess()) {
1139
        return result.success;
1140
      }
1141
      if (result.ex != null) {
1142
        throw result.ex;
1143
      }
1144
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "markOrderAsOutOfStock failed: unknown result");
1145
    }
1146
 
758 chandransh 1147
    public boolean markOrdersAsManifested(long warehouseId, long providerId) throws TransactionServiceException, TException
1148
    {
1149
      send_markOrdersAsManifested(warehouseId, providerId);
1150
      return recv_markOrdersAsManifested();
1151
    }
1152
 
1153
    public void send_markOrdersAsManifested(long warehouseId, long providerId) throws TException
1154
    {
1155
      oprot_.writeMessageBegin(new TMessage("markOrdersAsManifested", TMessageType.CALL, seqid_));
1156
      markOrdersAsManifested_args args = new markOrdersAsManifested_args();
1157
      args.warehouseId = warehouseId;
1158
      args.providerId = providerId;
1159
      args.write(oprot_);
1160
      oprot_.writeMessageEnd();
1161
      oprot_.getTransport().flush();
1162
    }
1163
 
1164
    public boolean recv_markOrdersAsManifested() throws TransactionServiceException, TException
1165
    {
1166
      TMessage msg = iprot_.readMessageBegin();
1167
      if (msg.type == TMessageType.EXCEPTION) {
1168
        TApplicationException x = TApplicationException.read(iprot_);
1169
        iprot_.readMessageEnd();
1170
        throw x;
1171
      }
1172
      markOrdersAsManifested_result result = new markOrdersAsManifested_result();
1173
      result.read(iprot_);
1174
      iprot_.readMessageEnd();
1175
      if (result.isSetSuccess()) {
1176
        return result.success;
1177
      }
1178
      if (result.ex != null) {
1179
        throw result.ex;
1180
      }
1181
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "markOrdersAsManifested failed: unknown result");
1182
    }
1183
 
1245 chandransh 1184
    public List<Order> markOrdersAsPickedUp(long providerId, Map<String,String> pickupDetails) throws TransactionServiceException, TException
1114 chandransh 1185
    {
1186
      send_markOrdersAsPickedUp(providerId, pickupDetails);
1187
      return recv_markOrdersAsPickedUp();
1188
    }
1189
 
1245 chandransh 1190
    public void send_markOrdersAsPickedUp(long providerId, Map<String,String> pickupDetails) throws TException
1114 chandransh 1191
    {
1192
      oprot_.writeMessageBegin(new TMessage("markOrdersAsPickedUp", TMessageType.CALL, seqid_));
1193
      markOrdersAsPickedUp_args args = new markOrdersAsPickedUp_args();
1194
      args.providerId = providerId;
1195
      args.pickupDetails = pickupDetails;
1196
      args.write(oprot_);
1197
      oprot_.writeMessageEnd();
1198
      oprot_.getTransport().flush();
1199
    }
1200
 
1201
    public List<Order> recv_markOrdersAsPickedUp() throws TransactionServiceException, TException
1202
    {
1203
      TMessage msg = iprot_.readMessageBegin();
1204
      if (msg.type == TMessageType.EXCEPTION) {
1205
        TApplicationException x = TApplicationException.read(iprot_);
1206
        iprot_.readMessageEnd();
1207
        throw x;
1208
      }
1209
      markOrdersAsPickedUp_result result = new markOrdersAsPickedUp_result();
1210
      result.read(iprot_);
1211
      iprot_.readMessageEnd();
1212
      if (result.isSetSuccess()) {
1213
        return result.success;
1214
      }
1215
      if (result.ex != null) {
1216
        throw result.ex;
1217
      }
1218
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "markOrdersAsPickedUp failed: unknown result");
1219
    }
1220
 
1133 chandransh 1221
    public void markOrdersAsDelivered(long providerId, Map<String,String> deliveredOrders) throws TransactionServiceException, TException
1222
    {
1223
      send_markOrdersAsDelivered(providerId, deliveredOrders);
1224
      recv_markOrdersAsDelivered();
1225
    }
1226
 
1227
    public void send_markOrdersAsDelivered(long providerId, Map<String,String> deliveredOrders) throws TException
1228
    {
1229
      oprot_.writeMessageBegin(new TMessage("markOrdersAsDelivered", TMessageType.CALL, seqid_));
1230
      markOrdersAsDelivered_args args = new markOrdersAsDelivered_args();
1231
      args.providerId = providerId;
1232
      args.deliveredOrders = deliveredOrders;
1233
      args.write(oprot_);
1234
      oprot_.writeMessageEnd();
1235
      oprot_.getTransport().flush();
1236
    }
1237
 
1238
    public void recv_markOrdersAsDelivered() throws TransactionServiceException, TException
1239
    {
1240
      TMessage msg = iprot_.readMessageBegin();
1241
      if (msg.type == TMessageType.EXCEPTION) {
1242
        TApplicationException x = TApplicationException.read(iprot_);
1243
        iprot_.readMessageEnd();
1244
        throw x;
1245
      }
1246
      markOrdersAsDelivered_result result = new markOrdersAsDelivered_result();
1247
      result.read(iprot_);
1248
      iprot_.readMessageEnd();
1249
      if (result.ex != null) {
1250
        throw result.ex;
1251
      }
1252
      return;
1253
    }
1254
 
1255
    public void markOrdersAsFailed(long providerId, Map<String,String> returnedOrders) throws TransactionServiceException, TException
1256
    {
1257
      send_markOrdersAsFailed(providerId, returnedOrders);
1258
      recv_markOrdersAsFailed();
1259
    }
1260
 
1261
    public void send_markOrdersAsFailed(long providerId, Map<String,String> returnedOrders) throws TException
1262
    {
1263
      oprot_.writeMessageBegin(new TMessage("markOrdersAsFailed", TMessageType.CALL, seqid_));
1264
      markOrdersAsFailed_args args = new markOrdersAsFailed_args();
1265
      args.providerId = providerId;
1266
      args.returnedOrders = returnedOrders;
1267
      args.write(oprot_);
1268
      oprot_.writeMessageEnd();
1269
      oprot_.getTransport().flush();
1270
    }
1271
 
1272
    public void recv_markOrdersAsFailed() throws TransactionServiceException, TException
1273
    {
1274
      TMessage msg = iprot_.readMessageBegin();
1275
      if (msg.type == TMessageType.EXCEPTION) {
1276
        TApplicationException x = TApplicationException.read(iprot_);
1277
        iprot_.readMessageEnd();
1278
        throw x;
1279
      }
1280
      markOrdersAsFailed_result result = new markOrdersAsFailed_result();
1281
      result.read(iprot_);
1282
      iprot_.readMessageEnd();
1283
      if (result.ex != null) {
1284
        throw result.ex;
1285
      }
1286
      return;
1287
    }
1288
 
1245 chandransh 1289
    public void updateNonDeliveryReason(long providerId, Map<String,String> undeliveredOrders) throws TransactionServiceException, TException
1290
    {
1291
      send_updateNonDeliveryReason(providerId, undeliveredOrders);
1292
      recv_updateNonDeliveryReason();
1293
    }
1294
 
1295
    public void send_updateNonDeliveryReason(long providerId, Map<String,String> undeliveredOrders) throws TException
1296
    {
1297
      oprot_.writeMessageBegin(new TMessage("updateNonDeliveryReason", TMessageType.CALL, seqid_));
1298
      updateNonDeliveryReason_args args = new updateNonDeliveryReason_args();
1299
      args.providerId = providerId;
1300
      args.undeliveredOrders = undeliveredOrders;
1301
      args.write(oprot_);
1302
      oprot_.writeMessageEnd();
1303
      oprot_.getTransport().flush();
1304
    }
1305
 
1306
    public void recv_updateNonDeliveryReason() throws TransactionServiceException, TException
1307
    {
1308
      TMessage msg = iprot_.readMessageBegin();
1309
      if (msg.type == TMessageType.EXCEPTION) {
1310
        TApplicationException x = TApplicationException.read(iprot_);
1311
        iprot_.readMessageEnd();
1312
        throw x;
1313
      }
1314
      updateNonDeliveryReason_result result = new updateNonDeliveryReason_result();
1315
      result.read(iprot_);
1316
      iprot_.readMessageEnd();
1317
      if (result.ex != null) {
1318
        throw result.ex;
1319
      }
1320
      return;
1321
    }
1322
 
1406 ankur.sing 1323
    public List<Order> getUndeliveredOrders(long providerId, long warehouseId) throws TException
1324
    {
1325
      send_getUndeliveredOrders(providerId, warehouseId);
1326
      return recv_getUndeliveredOrders();
1327
    }
1328
 
1329
    public void send_getUndeliveredOrders(long providerId, long warehouseId) throws TException
1330
    {
1331
      oprot_.writeMessageBegin(new TMessage("getUndeliveredOrders", TMessageType.CALL, seqid_));
1332
      getUndeliveredOrders_args args = new getUndeliveredOrders_args();
1333
      args.providerId = providerId;
1334
      args.warehouseId = warehouseId;
1335
      args.write(oprot_);
1336
      oprot_.writeMessageEnd();
1337
      oprot_.getTransport().flush();
1338
    }
1339
 
1340
    public List<Order> recv_getUndeliveredOrders() throws TException
1341
    {
1342
      TMessage msg = iprot_.readMessageBegin();
1343
      if (msg.type == TMessageType.EXCEPTION) {
1344
        TApplicationException x = TApplicationException.read(iprot_);
1345
        iprot_.readMessageEnd();
1346
        throw x;
1347
      }
1348
      getUndeliveredOrders_result result = new getUndeliveredOrders_result();
1349
      result.read(iprot_);
1350
      iprot_.readMessageEnd();
1351
      if (result.isSetSuccess()) {
1352
        return result.success;
1353
      }
1354
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getUndeliveredOrders failed: unknown result");
1355
    }
1356
 
483 rajveer 1357
    public List<Alert> getAlerts(long orderId, boolean valid) throws TException
68 ashish 1358
    {
483 rajveer 1359
      send_getAlerts(orderId, valid);
305 ashish 1360
      return recv_getAlerts();
1361
    }
1362
 
483 rajveer 1363
    public void send_getAlerts(long orderId, boolean valid) throws TException
305 ashish 1364
    {
1365
      oprot_.writeMessageBegin(new TMessage("getAlerts", TMessageType.CALL, seqid_));
1366
      getAlerts_args args = new getAlerts_args();
483 rajveer 1367
      args.orderId = orderId;
305 ashish 1368
      args.valid = valid;
1369
      args.write(oprot_);
1370
      oprot_.writeMessageEnd();
1371
      oprot_.getTransport().flush();
1372
    }
1373
 
1374
    public List<Alert> recv_getAlerts() throws TException
1375
    {
1376
      TMessage msg = iprot_.readMessageBegin();
1377
      if (msg.type == TMessageType.EXCEPTION) {
1378
        TApplicationException x = TApplicationException.read(iprot_);
1379
        iprot_.readMessageEnd();
1380
        throw x;
1381
      }
1382
      getAlerts_result result = new getAlerts_result();
1383
      result.read(iprot_);
1384
      iprot_.readMessageEnd();
1385
      if (result.isSetSuccess()) {
1386
        return result.success;
1387
      }
1388
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getAlerts failed: unknown result");
1389
    }
1390
 
483 rajveer 1391
    public void setAlert(long orderId, boolean unset, long type, String comment) throws TException
305 ashish 1392
    {
483 rajveer 1393
      send_setAlert(orderId, unset, type, comment);
305 ashish 1394
      recv_setAlert();
1395
    }
1396
 
483 rajveer 1397
    public void send_setAlert(long orderId, boolean unset, long type, String comment) throws TException
305 ashish 1398
    {
1399
      oprot_.writeMessageBegin(new TMessage("setAlert", TMessageType.CALL, seqid_));
1400
      setAlert_args args = new setAlert_args();
483 rajveer 1401
      args.orderId = orderId;
305 ashish 1402
      args.unset = unset;
1403
      args.type = type;
1404
      args.comment = comment;
1405
      args.write(oprot_);
1406
      oprot_.writeMessageEnd();
1407
      oprot_.getTransport().flush();
1408
    }
1409
 
1410
    public void recv_setAlert() throws TException
1411
    {
1412
      TMessage msg = iprot_.readMessageBegin();
1413
      if (msg.type == TMessageType.EXCEPTION) {
1414
        TApplicationException x = TApplicationException.read(iprot_);
1415
        iprot_.readMessageEnd();
1416
        throw x;
1417
      }
1418
      setAlert_result result = new setAlert_result();
1419
      result.read(iprot_);
1420
      iprot_.readMessageEnd();
1421
      return;
1422
    }
1423
 
68 ashish 1424
  }
1425
  public static class Processor implements TProcessor {
1426
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
1427
    public Processor(Iface iface)
1428
    {
1429
      iface_ = iface;
764 rajveer 1430
      processMap_.put("closeSession", new closeSession());
68 ashish 1431
      processMap_.put("createTransaction", new createTransaction());
1432
      processMap_.put("getTransaction", new getTransaction());
1433
      processMap_.put("getTransactionsForCustomer", new getTransactionsForCustomer());
132 ashish 1434
      processMap_.put("getTransactionsForShoppingCartId", new getTransactionsForShoppingCartId());
68 ashish 1435
      processMap_.put("getTransactionStatus", new getTransactionStatus());
1436
      processMap_.put("changeTransactionStatus", new changeTransactionStatus());
1398 varun.gupt 1437
      processMap_.put("enqueueTransactionInfoEmail", new enqueueTransactionInfoEmail());
483 rajveer 1438
      processMap_.put("getAllOrders", new getAllOrders());
1022 varun.gupt 1439
      processMap_.put("getOrdersByBillingDate", new getOrdersByBillingDate());
1382 varun.gupt 1440
      processMap_.put("getReturnableOrdersForCustomer", new getReturnableOrdersForCustomer());
1441
      processMap_.put("getCancellableOrdersForCustomer", new getCancellableOrdersForCustomer());
483 rajveer 1442
      processMap_.put("changeOrderStatus", new changeOrderStatus());
495 rajveer 1443
      processMap_.put("addBillingDetails", new addBillingDetails());
1148 chandransh 1444
      processMap_.put("addJacketNumber", new addJacketNumber());
923 rajveer 1445
      processMap_.put("acceptOrder", new acceptOrder());
1446
      processMap_.put("billOrder", new billOrder());
483 rajveer 1447
      processMap_.put("getOrdersForTransaction", new getOrdersForTransaction());
1448
      processMap_.put("getOrdersForCustomer", new getOrdersForCustomer());
1449
      processMap_.put("createOrder", new createOrder());
1450
      processMap_.put("getOrder", new getOrder());
1451
      processMap_.put("getLineItemsForOrder", new getLineItemsForOrder());
1529 ankur.sing 1452
      processMap_.put("getOrderForCustomer", new getOrderForCustomer());
1221 chandransh 1453
      processMap_.put("batchOrders", new batchOrders());
1209 chandransh 1454
      processMap_.put("markOrderAsOutOfStock", new markOrderAsOutOfStock());
758 chandransh 1455
      processMap_.put("markOrdersAsManifested", new markOrdersAsManifested());
1114 chandransh 1456
      processMap_.put("markOrdersAsPickedUp", new markOrdersAsPickedUp());
1133 chandransh 1457
      processMap_.put("markOrdersAsDelivered", new markOrdersAsDelivered());
1458
      processMap_.put("markOrdersAsFailed", new markOrdersAsFailed());
1245 chandransh 1459
      processMap_.put("updateNonDeliveryReason", new updateNonDeliveryReason());
1406 ankur.sing 1460
      processMap_.put("getUndeliveredOrders", new getUndeliveredOrders());
305 ashish 1461
      processMap_.put("getAlerts", new getAlerts());
1462
      processMap_.put("setAlert", new setAlert());
68 ashish 1463
    }
1464
 
1465
    protected static interface ProcessFunction {
1466
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException;
1467
    }
1468
 
1469
    private Iface iface_;
1470
    protected final HashMap<String,ProcessFunction> processMap_ = new HashMap<String,ProcessFunction>();
1471
 
1472
    public boolean process(TProtocol iprot, TProtocol oprot) throws TException
1473
    {
1474
      TMessage msg = iprot.readMessageBegin();
1475
      ProcessFunction fn = processMap_.get(msg.name);
1476
      if (fn == null) {
1477
        TProtocolUtil.skip(iprot, TType.STRUCT);
1478
        iprot.readMessageEnd();
1479
        TApplicationException x = new TApplicationException(TApplicationException.UNKNOWN_METHOD, "Invalid method name: '"+msg.name+"'");
1480
        oprot.writeMessageBegin(new TMessage(msg.name, TMessageType.EXCEPTION, msg.seqid));
1481
        x.write(oprot);
1482
        oprot.writeMessageEnd();
1483
        oprot.getTransport().flush();
1484
        return true;
1485
      }
1486
      fn.process(msg.seqid, iprot, oprot);
1487
      return true;
1488
    }
1489
 
764 rajveer 1490
    private class closeSession implements ProcessFunction {
1491
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1492
      {
1493
        closeSession_args args = new closeSession_args();
1494
        args.read(iprot);
1495
        iprot.readMessageEnd();
1496
        closeSession_result result = new closeSession_result();
1497
        iface_.closeSession();
1498
        oprot.writeMessageBegin(new TMessage("closeSession", TMessageType.REPLY, seqid));
1499
        result.write(oprot);
1500
        oprot.writeMessageEnd();
1501
        oprot.getTransport().flush();
1502
      }
1503
 
1504
    }
1505
 
68 ashish 1506
    private class createTransaction implements ProcessFunction {
1507
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1508
      {
1509
        createTransaction_args args = new createTransaction_args();
1510
        args.read(iprot);
1511
        iprot.readMessageEnd();
1512
        createTransaction_result result = new createTransaction_result();
1513
        try {
132 ashish 1514
          result.success = iface_.createTransaction(args.transaction);
1515
          result.setSuccessIsSet(true);
68 ashish 1516
        } catch (TransactionServiceException ex) {
1517
          result.ex = ex;
1518
        } catch (Throwable th) {
1519
          LOGGER.error("Internal error processing createTransaction", th);
1520
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing createTransaction");
1521
          oprot.writeMessageBegin(new TMessage("createTransaction", TMessageType.EXCEPTION, seqid));
1522
          x.write(oprot);
1523
          oprot.writeMessageEnd();
1524
          oprot.getTransport().flush();
1525
          return;
1526
        }
1527
        oprot.writeMessageBegin(new TMessage("createTransaction", TMessageType.REPLY, seqid));
1528
        result.write(oprot);
1529
        oprot.writeMessageEnd();
1530
        oprot.getTransport().flush();
1531
      }
1532
 
1533
    }
1534
 
1535
    private class getTransaction implements ProcessFunction {
1536
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1537
      {
1538
        getTransaction_args args = new getTransaction_args();
1539
        args.read(iprot);
1540
        iprot.readMessageEnd();
1541
        getTransaction_result result = new getTransaction_result();
1542
        try {
1543
          result.success = iface_.getTransaction(args.id);
1544
        } catch (TransactionServiceException ex) {
1545
          result.ex = ex;
1546
        } catch (Throwable th) {
1547
          LOGGER.error("Internal error processing getTransaction", th);
1548
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getTransaction");
1549
          oprot.writeMessageBegin(new TMessage("getTransaction", TMessageType.EXCEPTION, seqid));
1550
          x.write(oprot);
1551
          oprot.writeMessageEnd();
1552
          oprot.getTransport().flush();
1553
          return;
1554
        }
1555
        oprot.writeMessageBegin(new TMessage("getTransaction", TMessageType.REPLY, seqid));
1556
        result.write(oprot);
1557
        oprot.writeMessageEnd();
1558
        oprot.getTransport().flush();
1559
      }
1560
 
1561
    }
1562
 
1563
    private class getTransactionsForCustomer implements ProcessFunction {
1564
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1565
      {
1566
        getTransactionsForCustomer_args args = new getTransactionsForCustomer_args();
1567
        args.read(iprot);
1568
        iprot.readMessageEnd();
1569
        getTransactionsForCustomer_result result = new getTransactionsForCustomer_result();
1570
        try {
132 ashish 1571
          result.success = iface_.getTransactionsForCustomer(args.customerId, args.from_date, args.to_date, args.status);
68 ashish 1572
        } catch (TransactionServiceException ex) {
1573
          result.ex = ex;
1574
        } catch (Throwable th) {
1575
          LOGGER.error("Internal error processing getTransactionsForCustomer", th);
1576
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getTransactionsForCustomer");
1577
          oprot.writeMessageBegin(new TMessage("getTransactionsForCustomer", TMessageType.EXCEPTION, seqid));
1578
          x.write(oprot);
1579
          oprot.writeMessageEnd();
1580
          oprot.getTransport().flush();
1581
          return;
1582
        }
1583
        oprot.writeMessageBegin(new TMessage("getTransactionsForCustomer", TMessageType.REPLY, seqid));
1584
        result.write(oprot);
1585
        oprot.writeMessageEnd();
1586
        oprot.getTransport().flush();
1587
      }
1588
 
1589
    }
1590
 
132 ashish 1591
    private class getTransactionsForShoppingCartId implements ProcessFunction {
1592
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1593
      {
1594
        getTransactionsForShoppingCartId_args args = new getTransactionsForShoppingCartId_args();
1595
        args.read(iprot);
1596
        iprot.readMessageEnd();
1597
        getTransactionsForShoppingCartId_result result = new getTransactionsForShoppingCartId_result();
1598
        try {
1599
          result.success = iface_.getTransactionsForShoppingCartId(args.shoppingCartId);
1600
        } catch (TransactionServiceException ex) {
1601
          result.ex = ex;
1602
        } catch (Throwable th) {
1603
          LOGGER.error("Internal error processing getTransactionsForShoppingCartId", th);
1604
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getTransactionsForShoppingCartId");
1605
          oprot.writeMessageBegin(new TMessage("getTransactionsForShoppingCartId", TMessageType.EXCEPTION, seqid));
1606
          x.write(oprot);
1607
          oprot.writeMessageEnd();
1608
          oprot.getTransport().flush();
1609
          return;
1610
        }
1611
        oprot.writeMessageBegin(new TMessage("getTransactionsForShoppingCartId", TMessageType.REPLY, seqid));
1612
        result.write(oprot);
1613
        oprot.writeMessageEnd();
1614
        oprot.getTransport().flush();
1615
      }
1616
 
1617
    }
1618
 
68 ashish 1619
    private class getTransactionStatus implements ProcessFunction {
1620
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1621
      {
1622
        getTransactionStatus_args args = new getTransactionStatus_args();
1623
        args.read(iprot);
1624
        iprot.readMessageEnd();
1625
        getTransactionStatus_result result = new getTransactionStatus_result();
1626
        try {
1627
          result.success = iface_.getTransactionStatus(args.transactionId);
1628
        } catch (TransactionServiceException ex) {
1629
          result.ex = ex;
1630
        } catch (Throwable th) {
1631
          LOGGER.error("Internal error processing getTransactionStatus", th);
1632
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getTransactionStatus");
1633
          oprot.writeMessageBegin(new TMessage("getTransactionStatus", TMessageType.EXCEPTION, seqid));
1634
          x.write(oprot);
1635
          oprot.writeMessageEnd();
1636
          oprot.getTransport().flush();
1637
          return;
1638
        }
1639
        oprot.writeMessageBegin(new TMessage("getTransactionStatus", TMessageType.REPLY, seqid));
1640
        result.write(oprot);
1641
        oprot.writeMessageEnd();
1642
        oprot.getTransport().flush();
1643
      }
1644
 
1645
    }
1646
 
1647
    private class changeTransactionStatus implements ProcessFunction {
1648
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1649
      {
1650
        changeTransactionStatus_args args = new changeTransactionStatus_args();
1651
        args.read(iprot);
1652
        iprot.readMessageEnd();
1653
        changeTransactionStatus_result result = new changeTransactionStatus_result();
1654
        try {
1655
          result.success = iface_.changeTransactionStatus(args.transactionId, args.status, args.description);
1656
          result.setSuccessIsSet(true);
1657
        } catch (TransactionServiceException ex) {
1658
          result.ex = ex;
1659
        } catch (Throwable th) {
1660
          LOGGER.error("Internal error processing changeTransactionStatus", th);
1661
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing changeTransactionStatus");
1662
          oprot.writeMessageBegin(new TMessage("changeTransactionStatus", TMessageType.EXCEPTION, seqid));
1663
          x.write(oprot);
1664
          oprot.writeMessageEnd();
1665
          oprot.getTransport().flush();
1666
          return;
1667
        }
1668
        oprot.writeMessageBegin(new TMessage("changeTransactionStatus", TMessageType.REPLY, seqid));
1669
        result.write(oprot);
1670
        oprot.writeMessageEnd();
1671
        oprot.getTransport().flush();
1672
      }
1673
 
1674
    }
1675
 
1398 varun.gupt 1676
    private class enqueueTransactionInfoEmail implements ProcessFunction {
1382 varun.gupt 1677
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1678
      {
1398 varun.gupt 1679
        enqueueTransactionInfoEmail_args args = new enqueueTransactionInfoEmail_args();
1382 varun.gupt 1680
        args.read(iprot);
1681
        iprot.readMessageEnd();
1398 varun.gupt 1682
        enqueueTransactionInfoEmail_result result = new enqueueTransactionInfoEmail_result();
1382 varun.gupt 1683
        try {
1398 varun.gupt 1684
          result.success = iface_.enqueueTransactionInfoEmail(args.transactionId);
1382 varun.gupt 1685
          result.setSuccessIsSet(true);
1686
        } catch (TransactionServiceException ex) {
1687
          result.ex = ex;
1688
        } catch (Throwable th) {
1398 varun.gupt 1689
          LOGGER.error("Internal error processing enqueueTransactionInfoEmail", th);
1690
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing enqueueTransactionInfoEmail");
1691
          oprot.writeMessageBegin(new TMessage("enqueueTransactionInfoEmail", TMessageType.EXCEPTION, seqid));
1382 varun.gupt 1692
          x.write(oprot);
1693
          oprot.writeMessageEnd();
1694
          oprot.getTransport().flush();
1695
          return;
1696
        }
1398 varun.gupt 1697
        oprot.writeMessageBegin(new TMessage("enqueueTransactionInfoEmail", TMessageType.REPLY, seqid));
1382 varun.gupt 1698
        result.write(oprot);
1699
        oprot.writeMessageEnd();
1700
        oprot.getTransport().flush();
1701
      }
1702
 
1703
    }
1704
 
483 rajveer 1705
    private class getAllOrders implements ProcessFunction {
68 ashish 1706
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1707
      {
483 rajveer 1708
        getAllOrders_args args = new getAllOrders_args();
68 ashish 1709
        args.read(iprot);
1710
        iprot.readMessageEnd();
483 rajveer 1711
        getAllOrders_result result = new getAllOrders_result();
68 ashish 1712
        try {
483 rajveer 1713
          result.success = iface_.getAllOrders(args.status, args.from_date, args.to_date, args.warehouse_id);
68 ashish 1714
        } catch (TransactionServiceException ex) {
1715
          result.ex = ex;
1716
        } catch (Throwable th) {
483 rajveer 1717
          LOGGER.error("Internal error processing getAllOrders", th);
1718
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getAllOrders");
1719
          oprot.writeMessageBegin(new TMessage("getAllOrders", TMessageType.EXCEPTION, seqid));
68 ashish 1720
          x.write(oprot);
1721
          oprot.writeMessageEnd();
1722
          oprot.getTransport().flush();
1723
          return;
1724
        }
483 rajveer 1725
        oprot.writeMessageBegin(new TMessage("getAllOrders", TMessageType.REPLY, seqid));
68 ashish 1726
        result.write(oprot);
1727
        oprot.writeMessageEnd();
1728
        oprot.getTransport().flush();
1729
      }
1730
 
1731
    }
1732
 
1022 varun.gupt 1733
    private class getOrdersByBillingDate implements ProcessFunction {
1734
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1735
      {
1736
        getOrdersByBillingDate_args args = new getOrdersByBillingDate_args();
1737
        args.read(iprot);
1738
        iprot.readMessageEnd();
1739
        getOrdersByBillingDate_result result = new getOrdersByBillingDate_result();
1740
        try {
1741
          result.success = iface_.getOrdersByBillingDate(args.status, args.start_billing_date, args.end_billing_date, args.warehouse_id);
1742
        } catch (TransactionServiceException ex) {
1743
          result.ex = ex;
1744
        } catch (Throwable th) {
1745
          LOGGER.error("Internal error processing getOrdersByBillingDate", th);
1746
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getOrdersByBillingDate");
1747
          oprot.writeMessageBegin(new TMessage("getOrdersByBillingDate", TMessageType.EXCEPTION, seqid));
1748
          x.write(oprot);
1749
          oprot.writeMessageEnd();
1750
          oprot.getTransport().flush();
1751
          return;
1752
        }
1753
        oprot.writeMessageBegin(new TMessage("getOrdersByBillingDate", TMessageType.REPLY, seqid));
1754
        result.write(oprot);
1755
        oprot.writeMessageEnd();
1756
        oprot.getTransport().flush();
1757
      }
1758
 
1759
    }
1760
 
1382 varun.gupt 1761
    private class getReturnableOrdersForCustomer implements ProcessFunction {
1762
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1763
      {
1764
        getReturnableOrdersForCustomer_args args = new getReturnableOrdersForCustomer_args();
1765
        args.read(iprot);
1766
        iprot.readMessageEnd();
1767
        getReturnableOrdersForCustomer_result result = new getReturnableOrdersForCustomer_result();
1768
        try {
1769
          result.success = iface_.getReturnableOrdersForCustomer(args.customer_id, args.limit);
1770
        } catch (TransactionServiceException ex) {
1771
          result.ex = ex;
1772
        } catch (Throwable th) {
1773
          LOGGER.error("Internal error processing getReturnableOrdersForCustomer", th);
1774
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getReturnableOrdersForCustomer");
1775
          oprot.writeMessageBegin(new TMessage("getReturnableOrdersForCustomer", TMessageType.EXCEPTION, seqid));
1776
          x.write(oprot);
1777
          oprot.writeMessageEnd();
1778
          oprot.getTransport().flush();
1779
          return;
1780
        }
1781
        oprot.writeMessageBegin(new TMessage("getReturnableOrdersForCustomer", TMessageType.REPLY, seqid));
1782
        result.write(oprot);
1783
        oprot.writeMessageEnd();
1784
        oprot.getTransport().flush();
1785
      }
1786
 
1787
    }
1788
 
1789
    private class getCancellableOrdersForCustomer implements ProcessFunction {
1790
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1791
      {
1792
        getCancellableOrdersForCustomer_args args = new getCancellableOrdersForCustomer_args();
1793
        args.read(iprot);
1794
        iprot.readMessageEnd();
1795
        getCancellableOrdersForCustomer_result result = new getCancellableOrdersForCustomer_result();
1796
        try {
1797
          result.success = iface_.getCancellableOrdersForCustomer(args.customer_id, args.limit);
1798
        } catch (TransactionServiceException ex) {
1799
          result.ex = ex;
1800
        } catch (Throwable th) {
1801
          LOGGER.error("Internal error processing getCancellableOrdersForCustomer", th);
1802
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getCancellableOrdersForCustomer");
1803
          oprot.writeMessageBegin(new TMessage("getCancellableOrdersForCustomer", TMessageType.EXCEPTION, seqid));
1804
          x.write(oprot);
1805
          oprot.writeMessageEnd();
1806
          oprot.getTransport().flush();
1807
          return;
1808
        }
1809
        oprot.writeMessageBegin(new TMessage("getCancellableOrdersForCustomer", TMessageType.REPLY, seqid));
1810
        result.write(oprot);
1811
        oprot.writeMessageEnd();
1812
        oprot.getTransport().flush();
1813
      }
1814
 
1815
    }
1816
 
483 rajveer 1817
    private class changeOrderStatus implements ProcessFunction {
68 ashish 1818
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1819
      {
483 rajveer 1820
        changeOrderStatus_args args = new changeOrderStatus_args();
68 ashish 1821
        args.read(iprot);
1822
        iprot.readMessageEnd();
483 rajveer 1823
        changeOrderStatus_result result = new changeOrderStatus_result();
68 ashish 1824
        try {
483 rajveer 1825
          result.success = iface_.changeOrderStatus(args.orderId, args.status, args.description);
68 ashish 1826
          result.setSuccessIsSet(true);
1827
        } catch (TransactionServiceException ex) {
1828
          result.ex = ex;
1829
        } catch (Throwable th) {
483 rajveer 1830
          LOGGER.error("Internal error processing changeOrderStatus", th);
1831
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing changeOrderStatus");
1832
          oprot.writeMessageBegin(new TMessage("changeOrderStatus", TMessageType.EXCEPTION, seqid));
68 ashish 1833
          x.write(oprot);
1834
          oprot.writeMessageEnd();
1835
          oprot.getTransport().flush();
1836
          return;
1837
        }
483 rajveer 1838
        oprot.writeMessageBegin(new TMessage("changeOrderStatus", TMessageType.REPLY, seqid));
68 ashish 1839
        result.write(oprot);
1840
        oprot.writeMessageEnd();
1841
        oprot.getTransport().flush();
1842
      }
1843
 
1844
    }
1845
 
495 rajveer 1846
    private class addBillingDetails implements ProcessFunction {
1847
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1848
      {
1849
        addBillingDetails_args args = new addBillingDetails_args();
1850
        args.read(iprot);
1851
        iprot.readMessageEnd();
1852
        addBillingDetails_result result = new addBillingDetails_result();
1853
        try {
1148 chandransh 1854
          result.success = iface_.addBillingDetails(args.orderId, args.invoice_number, args.billed_by);
495 rajveer 1855
          result.setSuccessIsSet(true);
1856
        } catch (TransactionServiceException ex) {
1857
          result.ex = ex;
1858
        } catch (Throwable th) {
1859
          LOGGER.error("Internal error processing addBillingDetails", th);
1860
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing addBillingDetails");
1861
          oprot.writeMessageBegin(new TMessage("addBillingDetails", TMessageType.EXCEPTION, seqid));
1862
          x.write(oprot);
1863
          oprot.writeMessageEnd();
1864
          oprot.getTransport().flush();
1865
          return;
1866
        }
1867
        oprot.writeMessageBegin(new TMessage("addBillingDetails", TMessageType.REPLY, seqid));
1868
        result.write(oprot);
1869
        oprot.writeMessageEnd();
1870
        oprot.getTransport().flush();
1871
      }
1872
 
1873
    }
1874
 
1148 chandransh 1875
    private class addJacketNumber implements ProcessFunction {
1876
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1877
      {
1878
        addJacketNumber_args args = new addJacketNumber_args();
1879
        args.read(iprot);
1880
        iprot.readMessageEnd();
1881
        addJacketNumber_result result = new addJacketNumber_result();
1882
        try {
1883
          result.success = iface_.addJacketNumber(args.orderId, args.jacketNumber);
1884
          result.setSuccessIsSet(true);
1885
        } catch (TransactionServiceException ex) {
1886
          result.ex = ex;
1887
        } catch (Throwable th) {
1888
          LOGGER.error("Internal error processing addJacketNumber", th);
1889
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing addJacketNumber");
1890
          oprot.writeMessageBegin(new TMessage("addJacketNumber", TMessageType.EXCEPTION, seqid));
1891
          x.write(oprot);
1892
          oprot.writeMessageEnd();
1893
          oprot.getTransport().flush();
1894
          return;
1895
        }
1896
        oprot.writeMessageBegin(new TMessage("addJacketNumber", TMessageType.REPLY, seqid));
1897
        result.write(oprot);
1898
        oprot.writeMessageEnd();
1899
        oprot.getTransport().flush();
1900
      }
1901
 
1902
    }
1903
 
923 rajveer 1904
    private class acceptOrder implements ProcessFunction {
1905
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1906
      {
1907
        acceptOrder_args args = new acceptOrder_args();
1908
        args.read(iprot);
1909
        iprot.readMessageEnd();
1910
        acceptOrder_result result = new acceptOrder_result();
1911
        try {
1912
          result.success = iface_.acceptOrder(args.orderId);
1913
          result.setSuccessIsSet(true);
1914
        } catch (TransactionServiceException ex) {
1915
          result.ex = ex;
1916
        } catch (Throwable th) {
1917
          LOGGER.error("Internal error processing acceptOrder", th);
1918
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing acceptOrder");
1919
          oprot.writeMessageBegin(new TMessage("acceptOrder", TMessageType.EXCEPTION, seqid));
1920
          x.write(oprot);
1921
          oprot.writeMessageEnd();
1922
          oprot.getTransport().flush();
1923
          return;
1924
        }
1925
        oprot.writeMessageBegin(new TMessage("acceptOrder", TMessageType.REPLY, seqid));
1926
        result.write(oprot);
1927
        oprot.writeMessageEnd();
1928
        oprot.getTransport().flush();
1929
      }
1930
 
1931
    }
1932
 
1933
    private class billOrder implements ProcessFunction {
1934
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1935
      {
1936
        billOrder_args args = new billOrder_args();
1937
        args.read(iprot);
1938
        iprot.readMessageEnd();
1939
        billOrder_result result = new billOrder_result();
1940
        try {
1941
          result.success = iface_.billOrder(args.orderId);
1942
          result.setSuccessIsSet(true);
1943
        } catch (TransactionServiceException ex) {
1944
          result.ex = ex;
1945
        } catch (Throwable th) {
1946
          LOGGER.error("Internal error processing billOrder", th);
1947
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing billOrder");
1948
          oprot.writeMessageBegin(new TMessage("billOrder", TMessageType.EXCEPTION, seqid));
1949
          x.write(oprot);
1950
          oprot.writeMessageEnd();
1951
          oprot.getTransport().flush();
1952
          return;
1953
        }
1954
        oprot.writeMessageBegin(new TMessage("billOrder", TMessageType.REPLY, seqid));
1955
        result.write(oprot);
1956
        oprot.writeMessageEnd();
1957
        oprot.getTransport().flush();
1958
      }
1959
 
1960
    }
1961
 
483 rajveer 1962
    private class getOrdersForTransaction implements ProcessFunction {
68 ashish 1963
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1964
      {
483 rajveer 1965
        getOrdersForTransaction_args args = new getOrdersForTransaction_args();
68 ashish 1966
        args.read(iprot);
1967
        iprot.readMessageEnd();
483 rajveer 1968
        getOrdersForTransaction_result result = new getOrdersForTransaction_result();
68 ashish 1969
        try {
1529 ankur.sing 1970
          result.success = iface_.getOrdersForTransaction(args.transactionId, args.customerId);
68 ashish 1971
        } catch (TransactionServiceException ex) {
1972
          result.ex = ex;
1973
        } catch (Throwable th) {
483 rajveer 1974
          LOGGER.error("Internal error processing getOrdersForTransaction", th);
1975
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getOrdersForTransaction");
1976
          oprot.writeMessageBegin(new TMessage("getOrdersForTransaction", TMessageType.EXCEPTION, seqid));
68 ashish 1977
          x.write(oprot);
1978
          oprot.writeMessageEnd();
1979
          oprot.getTransport().flush();
1980
          return;
1981
        }
483 rajveer 1982
        oprot.writeMessageBegin(new TMessage("getOrdersForTransaction", TMessageType.REPLY, seqid));
68 ashish 1983
        result.write(oprot);
1984
        oprot.writeMessageEnd();
1985
        oprot.getTransport().flush();
1986
      }
1987
 
1988
    }
1989
 
483 rajveer 1990
    private class getOrdersForCustomer implements ProcessFunction {
68 ashish 1991
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1992
      {
483 rajveer 1993
        getOrdersForCustomer_args args = new getOrdersForCustomer_args();
68 ashish 1994
        args.read(iprot);
1995
        iprot.readMessageEnd();
483 rajveer 1996
        getOrdersForCustomer_result result = new getOrdersForCustomer_result();
68 ashish 1997
        try {
483 rajveer 1998
          result.success = iface_.getOrdersForCustomer(args.customerId, args.from_date, args.to_date, args.status);
68 ashish 1999
        } catch (TransactionServiceException ex) {
2000
          result.ex = ex;
2001
        } catch (Throwable th) {
483 rajveer 2002
          LOGGER.error("Internal error processing getOrdersForCustomer", th);
2003
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getOrdersForCustomer");
2004
          oprot.writeMessageBegin(new TMessage("getOrdersForCustomer", TMessageType.EXCEPTION, seqid));
68 ashish 2005
          x.write(oprot);
2006
          oprot.writeMessageEnd();
2007
          oprot.getTransport().flush();
2008
          return;
2009
        }
483 rajveer 2010
        oprot.writeMessageBegin(new TMessage("getOrdersForCustomer", TMessageType.REPLY, seqid));
68 ashish 2011
        result.write(oprot);
2012
        oprot.writeMessageEnd();
2013
        oprot.getTransport().flush();
2014
      }
2015
 
2016
    }
2017
 
483 rajveer 2018
    private class createOrder implements ProcessFunction {
68 ashish 2019
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2020
      {
483 rajveer 2021
        createOrder_args args = new createOrder_args();
68 ashish 2022
        args.read(iprot);
2023
        iprot.readMessageEnd();
483 rajveer 2024
        createOrder_result result = new createOrder_result();
68 ashish 2025
        try {
483 rajveer 2026
          result.success = iface_.createOrder(args.order);
68 ashish 2027
          result.setSuccessIsSet(true);
2028
        } catch (TransactionServiceException ex) {
2029
          result.ex = ex;
2030
        } catch (Throwable th) {
483 rajveer 2031
          LOGGER.error("Internal error processing createOrder", th);
2032
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing createOrder");
2033
          oprot.writeMessageBegin(new TMessage("createOrder", TMessageType.EXCEPTION, seqid));
68 ashish 2034
          x.write(oprot);
2035
          oprot.writeMessageEnd();
2036
          oprot.getTransport().flush();
2037
          return;
2038
        }
483 rajveer 2039
        oprot.writeMessageBegin(new TMessage("createOrder", TMessageType.REPLY, seqid));
68 ashish 2040
        result.write(oprot);
2041
        oprot.writeMessageEnd();
2042
        oprot.getTransport().flush();
2043
      }
2044
 
2045
    }
2046
 
483 rajveer 2047
    private class getOrder implements ProcessFunction {
68 ashish 2048
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2049
      {
483 rajveer 2050
        getOrder_args args = new getOrder_args();
68 ashish 2051
        args.read(iprot);
2052
        iprot.readMessageEnd();
483 rajveer 2053
        getOrder_result result = new getOrder_result();
68 ashish 2054
        try {
483 rajveer 2055
          result.success = iface_.getOrder(args.id);
68 ashish 2056
        } catch (TransactionServiceException ex) {
2057
          result.ex = ex;
2058
        } catch (Throwable th) {
483 rajveer 2059
          LOGGER.error("Internal error processing getOrder", th);
2060
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getOrder");
2061
          oprot.writeMessageBegin(new TMessage("getOrder", TMessageType.EXCEPTION, seqid));
68 ashish 2062
          x.write(oprot);
2063
          oprot.writeMessageEnd();
2064
          oprot.getTransport().flush();
2065
          return;
2066
        }
483 rajveer 2067
        oprot.writeMessageBegin(new TMessage("getOrder", TMessageType.REPLY, seqid));
68 ashish 2068
        result.write(oprot);
2069
        oprot.writeMessageEnd();
2070
        oprot.getTransport().flush();
2071
      }
2072
 
2073
    }
2074
 
483 rajveer 2075
    private class getLineItemsForOrder implements ProcessFunction {
68 ashish 2076
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2077
      {
483 rajveer 2078
        getLineItemsForOrder_args args = new getLineItemsForOrder_args();
68 ashish 2079
        args.read(iprot);
2080
        iprot.readMessageEnd();
483 rajveer 2081
        getLineItemsForOrder_result result = new getLineItemsForOrder_result();
68 ashish 2082
        try {
483 rajveer 2083
          result.success = iface_.getLineItemsForOrder(args.orderId);
68 ashish 2084
        } catch (TransactionServiceException ex) {
2085
          result.ex = ex;
2086
        } catch (Throwable th) {
483 rajveer 2087
          LOGGER.error("Internal error processing getLineItemsForOrder", th);
2088
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getLineItemsForOrder");
2089
          oprot.writeMessageBegin(new TMessage("getLineItemsForOrder", TMessageType.EXCEPTION, seqid));
68 ashish 2090
          x.write(oprot);
2091
          oprot.writeMessageEnd();
2092
          oprot.getTransport().flush();
2093
          return;
2094
        }
483 rajveer 2095
        oprot.writeMessageBegin(new TMessage("getLineItemsForOrder", TMessageType.REPLY, seqid));
68 ashish 2096
        result.write(oprot);
2097
        oprot.writeMessageEnd();
2098
        oprot.getTransport().flush();
2099
      }
2100
 
2101
    }
2102
 
1529 ankur.sing 2103
    private class getOrderForCustomer implements ProcessFunction {
2104
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2105
      {
2106
        getOrderForCustomer_args args = new getOrderForCustomer_args();
2107
        args.read(iprot);
2108
        iprot.readMessageEnd();
2109
        getOrderForCustomer_result result = new getOrderForCustomer_result();
2110
        try {
2111
          result.success = iface_.getOrderForCustomer(args.orderId, args.customerId);
2112
        } catch (TransactionServiceException ex) {
2113
          result.ex = ex;
2114
        } catch (Throwable th) {
2115
          LOGGER.error("Internal error processing getOrderForCustomer", th);
2116
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getOrderForCustomer");
2117
          oprot.writeMessageBegin(new TMessage("getOrderForCustomer", TMessageType.EXCEPTION, seqid));
2118
          x.write(oprot);
2119
          oprot.writeMessageEnd();
2120
          oprot.getTransport().flush();
2121
          return;
2122
        }
2123
        oprot.writeMessageBegin(new TMessage("getOrderForCustomer", TMessageType.REPLY, seqid));
2124
        result.write(oprot);
2125
        oprot.writeMessageEnd();
2126
        oprot.getTransport().flush();
2127
      }
2128
 
2129
    }
2130
 
1221 chandransh 2131
    private class batchOrders implements ProcessFunction {
2132
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2133
      {
2134
        batchOrders_args args = new batchOrders_args();
2135
        args.read(iprot);
2136
        iprot.readMessageEnd();
2137
        batchOrders_result result = new batchOrders_result();
2138
        try {
2139
          result.success = iface_.batchOrders(args.warehouseId);
2140
        } catch (TransactionServiceException ex) {
2141
          result.ex = ex;
2142
        } catch (Throwable th) {
2143
          LOGGER.error("Internal error processing batchOrders", th);
2144
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing batchOrders");
2145
          oprot.writeMessageBegin(new TMessage("batchOrders", TMessageType.EXCEPTION, seqid));
2146
          x.write(oprot);
2147
          oprot.writeMessageEnd();
2148
          oprot.getTransport().flush();
2149
          return;
2150
        }
2151
        oprot.writeMessageBegin(new TMessage("batchOrders", TMessageType.REPLY, seqid));
2152
        result.write(oprot);
2153
        oprot.writeMessageEnd();
2154
        oprot.getTransport().flush();
2155
      }
2156
 
2157
    }
2158
 
1209 chandransh 2159
    private class markOrderAsOutOfStock implements ProcessFunction {
2160
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2161
      {
2162
        markOrderAsOutOfStock_args args = new markOrderAsOutOfStock_args();
2163
        args.read(iprot);
2164
        iprot.readMessageEnd();
2165
        markOrderAsOutOfStock_result result = new markOrderAsOutOfStock_result();
2166
        try {
2167
          result.success = iface_.markOrderAsOutOfStock(args.orderId);
2168
          result.setSuccessIsSet(true);
2169
        } catch (TransactionServiceException ex) {
2170
          result.ex = ex;
2171
        } catch (Throwable th) {
2172
          LOGGER.error("Internal error processing markOrderAsOutOfStock", th);
2173
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing markOrderAsOutOfStock");
2174
          oprot.writeMessageBegin(new TMessage("markOrderAsOutOfStock", TMessageType.EXCEPTION, seqid));
2175
          x.write(oprot);
2176
          oprot.writeMessageEnd();
2177
          oprot.getTransport().flush();
2178
          return;
2179
        }
2180
        oprot.writeMessageBegin(new TMessage("markOrderAsOutOfStock", TMessageType.REPLY, seqid));
2181
        result.write(oprot);
2182
        oprot.writeMessageEnd();
2183
        oprot.getTransport().flush();
2184
      }
2185
 
2186
    }
2187
 
758 chandransh 2188
    private class markOrdersAsManifested implements ProcessFunction {
2189
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2190
      {
2191
        markOrdersAsManifested_args args = new markOrdersAsManifested_args();
2192
        args.read(iprot);
2193
        iprot.readMessageEnd();
2194
        markOrdersAsManifested_result result = new markOrdersAsManifested_result();
2195
        try {
2196
          result.success = iface_.markOrdersAsManifested(args.warehouseId, args.providerId);
2197
          result.setSuccessIsSet(true);
2198
        } catch (TransactionServiceException ex) {
2199
          result.ex = ex;
2200
        } catch (Throwable th) {
2201
          LOGGER.error("Internal error processing markOrdersAsManifested", th);
2202
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing markOrdersAsManifested");
2203
          oprot.writeMessageBegin(new TMessage("markOrdersAsManifested", TMessageType.EXCEPTION, seqid));
2204
          x.write(oprot);
2205
          oprot.writeMessageEnd();
2206
          oprot.getTransport().flush();
2207
          return;
2208
        }
2209
        oprot.writeMessageBegin(new TMessage("markOrdersAsManifested", TMessageType.REPLY, seqid));
2210
        result.write(oprot);
2211
        oprot.writeMessageEnd();
2212
        oprot.getTransport().flush();
2213
      }
2214
 
2215
    }
2216
 
1114 chandransh 2217
    private class markOrdersAsPickedUp implements ProcessFunction {
2218
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2219
      {
2220
        markOrdersAsPickedUp_args args = new markOrdersAsPickedUp_args();
2221
        args.read(iprot);
2222
        iprot.readMessageEnd();
2223
        markOrdersAsPickedUp_result result = new markOrdersAsPickedUp_result();
2224
        try {
2225
          result.success = iface_.markOrdersAsPickedUp(args.providerId, args.pickupDetails);
2226
        } catch (TransactionServiceException ex) {
2227
          result.ex = ex;
2228
        } catch (Throwable th) {
2229
          LOGGER.error("Internal error processing markOrdersAsPickedUp", th);
2230
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing markOrdersAsPickedUp");
2231
          oprot.writeMessageBegin(new TMessage("markOrdersAsPickedUp", TMessageType.EXCEPTION, seqid));
2232
          x.write(oprot);
2233
          oprot.writeMessageEnd();
2234
          oprot.getTransport().flush();
2235
          return;
2236
        }
2237
        oprot.writeMessageBegin(new TMessage("markOrdersAsPickedUp", TMessageType.REPLY, seqid));
2238
        result.write(oprot);
2239
        oprot.writeMessageEnd();
2240
        oprot.getTransport().flush();
2241
      }
2242
 
2243
    }
2244
 
1133 chandransh 2245
    private class markOrdersAsDelivered implements ProcessFunction {
2246
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2247
      {
2248
        markOrdersAsDelivered_args args = new markOrdersAsDelivered_args();
2249
        args.read(iprot);
2250
        iprot.readMessageEnd();
2251
        markOrdersAsDelivered_result result = new markOrdersAsDelivered_result();
2252
        try {
2253
          iface_.markOrdersAsDelivered(args.providerId, args.deliveredOrders);
2254
        } catch (TransactionServiceException ex) {
2255
          result.ex = ex;
2256
        } catch (Throwable th) {
2257
          LOGGER.error("Internal error processing markOrdersAsDelivered", th);
2258
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing markOrdersAsDelivered");
2259
          oprot.writeMessageBegin(new TMessage("markOrdersAsDelivered", TMessageType.EXCEPTION, seqid));
2260
          x.write(oprot);
2261
          oprot.writeMessageEnd();
2262
          oprot.getTransport().flush();
2263
          return;
2264
        }
2265
        oprot.writeMessageBegin(new TMessage("markOrdersAsDelivered", TMessageType.REPLY, seqid));
2266
        result.write(oprot);
2267
        oprot.writeMessageEnd();
2268
        oprot.getTransport().flush();
2269
      }
2270
 
2271
    }
2272
 
2273
    private class markOrdersAsFailed implements ProcessFunction {
2274
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2275
      {
2276
        markOrdersAsFailed_args args = new markOrdersAsFailed_args();
2277
        args.read(iprot);
2278
        iprot.readMessageEnd();
2279
        markOrdersAsFailed_result result = new markOrdersAsFailed_result();
2280
        try {
2281
          iface_.markOrdersAsFailed(args.providerId, args.returnedOrders);
2282
        } catch (TransactionServiceException ex) {
2283
          result.ex = ex;
2284
        } catch (Throwable th) {
2285
          LOGGER.error("Internal error processing markOrdersAsFailed", th);
2286
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing markOrdersAsFailed");
2287
          oprot.writeMessageBegin(new TMessage("markOrdersAsFailed", TMessageType.EXCEPTION, seqid));
2288
          x.write(oprot);
2289
          oprot.writeMessageEnd();
2290
          oprot.getTransport().flush();
2291
          return;
2292
        }
2293
        oprot.writeMessageBegin(new TMessage("markOrdersAsFailed", TMessageType.REPLY, seqid));
2294
        result.write(oprot);
2295
        oprot.writeMessageEnd();
2296
        oprot.getTransport().flush();
2297
      }
2298
 
2299
    }
2300
 
1245 chandransh 2301
    private class updateNonDeliveryReason implements ProcessFunction {
2302
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2303
      {
2304
        updateNonDeliveryReason_args args = new updateNonDeliveryReason_args();
2305
        args.read(iprot);
2306
        iprot.readMessageEnd();
2307
        updateNonDeliveryReason_result result = new updateNonDeliveryReason_result();
2308
        try {
2309
          iface_.updateNonDeliveryReason(args.providerId, args.undeliveredOrders);
2310
        } catch (TransactionServiceException ex) {
2311
          result.ex = ex;
2312
        } catch (Throwable th) {
2313
          LOGGER.error("Internal error processing updateNonDeliveryReason", th);
2314
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing updateNonDeliveryReason");
2315
          oprot.writeMessageBegin(new TMessage("updateNonDeliveryReason", TMessageType.EXCEPTION, seqid));
2316
          x.write(oprot);
2317
          oprot.writeMessageEnd();
2318
          oprot.getTransport().flush();
2319
          return;
2320
        }
2321
        oprot.writeMessageBegin(new TMessage("updateNonDeliveryReason", TMessageType.REPLY, seqid));
2322
        result.write(oprot);
2323
        oprot.writeMessageEnd();
2324
        oprot.getTransport().flush();
2325
      }
2326
 
2327
    }
2328
 
1406 ankur.sing 2329
    private class getUndeliveredOrders implements ProcessFunction {
2330
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2331
      {
2332
        getUndeliveredOrders_args args = new getUndeliveredOrders_args();
2333
        args.read(iprot);
2334
        iprot.readMessageEnd();
2335
        getUndeliveredOrders_result result = new getUndeliveredOrders_result();
2336
        result.success = iface_.getUndeliveredOrders(args.providerId, args.warehouseId);
2337
        oprot.writeMessageBegin(new TMessage("getUndeliveredOrders", TMessageType.REPLY, seqid));
2338
        result.write(oprot);
2339
        oprot.writeMessageEnd();
2340
        oprot.getTransport().flush();
2341
      }
2342
 
2343
    }
2344
 
305 ashish 2345
    private class getAlerts implements ProcessFunction {
2346
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2347
      {
2348
        getAlerts_args args = new getAlerts_args();
2349
        args.read(iprot);
2350
        iprot.readMessageEnd();
2351
        getAlerts_result result = new getAlerts_result();
483 rajveer 2352
        result.success = iface_.getAlerts(args.orderId, args.valid);
305 ashish 2353
        oprot.writeMessageBegin(new TMessage("getAlerts", TMessageType.REPLY, seqid));
2354
        result.write(oprot);
2355
        oprot.writeMessageEnd();
2356
        oprot.getTransport().flush();
2357
      }
2358
 
2359
    }
2360
 
2361
    private class setAlert implements ProcessFunction {
2362
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2363
      {
2364
        setAlert_args args = new setAlert_args();
2365
        args.read(iprot);
2366
        iprot.readMessageEnd();
2367
        setAlert_result result = new setAlert_result();
483 rajveer 2368
        iface_.setAlert(args.orderId, args.unset, args.type, args.comment);
305 ashish 2369
        oprot.writeMessageBegin(new TMessage("setAlert", TMessageType.REPLY, seqid));
2370
        result.write(oprot);
2371
        oprot.writeMessageEnd();
2372
        oprot.getTransport().flush();
2373
      }
2374
 
2375
    }
2376
 
68 ashish 2377
  }
2378
 
764 rajveer 2379
  public static class closeSession_args implements TBase<closeSession_args._Fields>, java.io.Serializable, Cloneable, Comparable<closeSession_args>   {
2380
    private static final TStruct STRUCT_DESC = new TStruct("closeSession_args");
2381
 
2382
 
2383
 
2384
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2385
    public enum _Fields implements TFieldIdEnum {
2386
;
2387
 
2388
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
2389
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2390
 
2391
      static {
2392
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2393
          byId.put((int)field._thriftId, field);
2394
          byName.put(field.getFieldName(), field);
2395
        }
2396
      }
2397
 
2398
      /**
2399
       * Find the _Fields constant that matches fieldId, or null if its not found.
2400
       */
2401
      public static _Fields findByThriftId(int fieldId) {
2402
        return byId.get(fieldId);
2403
      }
2404
 
2405
      /**
2406
       * Find the _Fields constant that matches fieldId, throwing an exception
2407
       * if it is not found.
2408
       */
2409
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2410
        _Fields fields = findByThriftId(fieldId);
2411
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2412
        return fields;
2413
      }
2414
 
2415
      /**
2416
       * Find the _Fields constant that matches name, or null if its not found.
2417
       */
2418
      public static _Fields findByName(String name) {
2419
        return byName.get(name);
2420
      }
2421
 
2422
      private final short _thriftId;
2423
      private final String _fieldName;
2424
 
2425
      _Fields(short thriftId, String fieldName) {
2426
        _thriftId = thriftId;
2427
        _fieldName = fieldName;
2428
      }
2429
 
2430
      public short getThriftFieldId() {
2431
        return _thriftId;
2432
      }
2433
 
2434
      public String getFieldName() {
2435
        return _fieldName;
2436
      }
2437
    }
2438
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
2439
    }});
2440
 
2441
    static {
2442
      FieldMetaData.addStructMetaDataMap(closeSession_args.class, metaDataMap);
2443
    }
2444
 
2445
    public closeSession_args() {
2446
    }
2447
 
2448
    /**
2449
     * Performs a deep copy on <i>other</i>.
2450
     */
2451
    public closeSession_args(closeSession_args other) {
2452
    }
2453
 
2454
    public closeSession_args deepCopy() {
2455
      return new closeSession_args(this);
2456
    }
2457
 
2458
    @Deprecated
2459
    public closeSession_args clone() {
2460
      return new closeSession_args(this);
2461
    }
2462
 
2463
    public void setFieldValue(_Fields field, Object value) {
2464
      switch (field) {
2465
      }
2466
    }
2467
 
2468
    public void setFieldValue(int fieldID, Object value) {
2469
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
2470
    }
2471
 
2472
    public Object getFieldValue(_Fields field) {
2473
      switch (field) {
2474
      }
2475
      throw new IllegalStateException();
2476
    }
2477
 
2478
    public Object getFieldValue(int fieldId) {
2479
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
2480
    }
2481
 
2482
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
2483
    public boolean isSet(_Fields field) {
2484
      switch (field) {
2485
      }
2486
      throw new IllegalStateException();
2487
    }
2488
 
2489
    public boolean isSet(int fieldID) {
2490
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
2491
    }
2492
 
2493
    @Override
2494
    public boolean equals(Object that) {
2495
      if (that == null)
2496
        return false;
2497
      if (that instanceof closeSession_args)
2498
        return this.equals((closeSession_args)that);
2499
      return false;
2500
    }
2501
 
2502
    public boolean equals(closeSession_args that) {
2503
      if (that == null)
2504
        return false;
2505
 
2506
      return true;
2507
    }
2508
 
2509
    @Override
2510
    public int hashCode() {
2511
      return 0;
2512
    }
2513
 
2514
    public int compareTo(closeSession_args other) {
2515
      if (!getClass().equals(other.getClass())) {
2516
        return getClass().getName().compareTo(other.getClass().getName());
2517
      }
2518
 
2519
      int lastComparison = 0;
2520
      closeSession_args typedOther = (closeSession_args)other;
2521
 
2522
      return 0;
2523
    }
2524
 
2525
    public void read(TProtocol iprot) throws TException {
2526
      TField field;
2527
      iprot.readStructBegin();
2528
      while (true)
2529
      {
2530
        field = iprot.readFieldBegin();
2531
        if (field.type == TType.STOP) { 
2532
          break;
2533
        }
2534
        _Fields fieldId = _Fields.findByThriftId(field.id);
2535
        if (fieldId == null) {
2536
          TProtocolUtil.skip(iprot, field.type);
2537
        } else {
2538
          switch (fieldId) {
2539
          }
2540
          iprot.readFieldEnd();
2541
        }
2542
      }
2543
      iprot.readStructEnd();
2544
      validate();
2545
    }
2546
 
2547
    public void write(TProtocol oprot) throws TException {
2548
      validate();
2549
 
2550
      oprot.writeStructBegin(STRUCT_DESC);
2551
      oprot.writeFieldStop();
2552
      oprot.writeStructEnd();
2553
    }
2554
 
2555
    @Override
2556
    public String toString() {
2557
      StringBuilder sb = new StringBuilder("closeSession_args(");
2558
      boolean first = true;
2559
 
2560
      sb.append(")");
2561
      return sb.toString();
2562
    }
2563
 
2564
    public void validate() throws TException {
2565
      // check for required fields
2566
    }
2567
 
2568
  }
2569
 
2570
  public static class closeSession_result implements TBase<closeSession_result._Fields>, java.io.Serializable, Cloneable, Comparable<closeSession_result>   {
2571
    private static final TStruct STRUCT_DESC = new TStruct("closeSession_result");
2572
 
2573
 
2574
 
2575
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2576
    public enum _Fields implements TFieldIdEnum {
2577
;
2578
 
2579
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
2580
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2581
 
2582
      static {
2583
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2584
          byId.put((int)field._thriftId, field);
2585
          byName.put(field.getFieldName(), field);
2586
        }
2587
      }
2588
 
2589
      /**
2590
       * Find the _Fields constant that matches fieldId, or null if its not found.
2591
       */
2592
      public static _Fields findByThriftId(int fieldId) {
2593
        return byId.get(fieldId);
2594
      }
2595
 
2596
      /**
2597
       * Find the _Fields constant that matches fieldId, throwing an exception
2598
       * if it is not found.
2599
       */
2600
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2601
        _Fields fields = findByThriftId(fieldId);
2602
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2603
        return fields;
2604
      }
2605
 
2606
      /**
2607
       * Find the _Fields constant that matches name, or null if its not found.
2608
       */
2609
      public static _Fields findByName(String name) {
2610
        return byName.get(name);
2611
      }
2612
 
2613
      private final short _thriftId;
2614
      private final String _fieldName;
2615
 
2616
      _Fields(short thriftId, String fieldName) {
2617
        _thriftId = thriftId;
2618
        _fieldName = fieldName;
2619
      }
2620
 
2621
      public short getThriftFieldId() {
2622
        return _thriftId;
2623
      }
2624
 
2625
      public String getFieldName() {
2626
        return _fieldName;
2627
      }
2628
    }
2629
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
2630
    }});
2631
 
2632
    static {
2633
      FieldMetaData.addStructMetaDataMap(closeSession_result.class, metaDataMap);
2634
    }
2635
 
2636
    public closeSession_result() {
2637
    }
2638
 
2639
    /**
2640
     * Performs a deep copy on <i>other</i>.
2641
     */
2642
    public closeSession_result(closeSession_result other) {
2643
    }
2644
 
2645
    public closeSession_result deepCopy() {
2646
      return new closeSession_result(this);
2647
    }
2648
 
2649
    @Deprecated
2650
    public closeSession_result clone() {
2651
      return new closeSession_result(this);
2652
    }
2653
 
2654
    public void setFieldValue(_Fields field, Object value) {
2655
      switch (field) {
2656
      }
2657
    }
2658
 
2659
    public void setFieldValue(int fieldID, Object value) {
2660
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
2661
    }
2662
 
2663
    public Object getFieldValue(_Fields field) {
2664
      switch (field) {
2665
      }
2666
      throw new IllegalStateException();
2667
    }
2668
 
2669
    public Object getFieldValue(int fieldId) {
2670
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
2671
    }
2672
 
2673
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
2674
    public boolean isSet(_Fields field) {
2675
      switch (field) {
2676
      }
2677
      throw new IllegalStateException();
2678
    }
2679
 
2680
    public boolean isSet(int fieldID) {
2681
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
2682
    }
2683
 
2684
    @Override
2685
    public boolean equals(Object that) {
2686
      if (that == null)
2687
        return false;
2688
      if (that instanceof closeSession_result)
2689
        return this.equals((closeSession_result)that);
2690
      return false;
2691
    }
2692
 
2693
    public boolean equals(closeSession_result that) {
2694
      if (that == null)
2695
        return false;
2696
 
2697
      return true;
2698
    }
2699
 
2700
    @Override
2701
    public int hashCode() {
2702
      return 0;
2703
    }
2704
 
2705
    public int compareTo(closeSession_result other) {
2706
      if (!getClass().equals(other.getClass())) {
2707
        return getClass().getName().compareTo(other.getClass().getName());
2708
      }
2709
 
2710
      int lastComparison = 0;
2711
      closeSession_result typedOther = (closeSession_result)other;
2712
 
2713
      return 0;
2714
    }
2715
 
2716
    public void read(TProtocol iprot) throws TException {
2717
      TField field;
2718
      iprot.readStructBegin();
2719
      while (true)
2720
      {
2721
        field = iprot.readFieldBegin();
2722
        if (field.type == TType.STOP) { 
2723
          break;
2724
        }
2725
        _Fields fieldId = _Fields.findByThriftId(field.id);
2726
        if (fieldId == null) {
2727
          TProtocolUtil.skip(iprot, field.type);
2728
        } else {
2729
          switch (fieldId) {
2730
          }
2731
          iprot.readFieldEnd();
2732
        }
2733
      }
2734
      iprot.readStructEnd();
2735
      validate();
2736
    }
2737
 
2738
    public void write(TProtocol oprot) throws TException {
2739
      oprot.writeStructBegin(STRUCT_DESC);
2740
 
2741
      oprot.writeFieldStop();
2742
      oprot.writeStructEnd();
2743
    }
2744
 
2745
    @Override
2746
    public String toString() {
2747
      StringBuilder sb = new StringBuilder("closeSession_result(");
2748
      boolean first = true;
2749
 
2750
      sb.append(")");
2751
      return sb.toString();
2752
    }
2753
 
2754
    public void validate() throws TException {
2755
      // check for required fields
2756
    }
2757
 
2758
  }
2759
 
684 chandransh 2760
  public static class createTransaction_args implements TBase<createTransaction_args._Fields>, java.io.Serializable, Cloneable, Comparable<createTransaction_args>   {
68 ashish 2761
    private static final TStruct STRUCT_DESC = new TStruct("createTransaction_args");
2762
 
2763
    private static final TField TRANSACTION_FIELD_DESC = new TField("transaction", TType.STRUCT, (short)1);
2764
 
2765
    private Transaction transaction;
2766
 
2767
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2768
    public enum _Fields implements TFieldIdEnum {
2769
      TRANSACTION((short)1, "transaction");
2770
 
2771
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
2772
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2773
 
2774
      static {
2775
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2776
          byId.put((int)field._thriftId, field);
2777
          byName.put(field.getFieldName(), field);
2778
        }
2779
      }
2780
 
2781
      /**
2782
       * Find the _Fields constant that matches fieldId, or null if its not found.
2783
       */
2784
      public static _Fields findByThriftId(int fieldId) {
2785
        return byId.get(fieldId);
2786
      }
2787
 
2788
      /**
2789
       * Find the _Fields constant that matches fieldId, throwing an exception
2790
       * if it is not found.
2791
       */
2792
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2793
        _Fields fields = findByThriftId(fieldId);
2794
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2795
        return fields;
2796
      }
2797
 
2798
      /**
2799
       * Find the _Fields constant that matches name, or null if its not found.
2800
       */
2801
      public static _Fields findByName(String name) {
2802
        return byName.get(name);
2803
      }
2804
 
2805
      private final short _thriftId;
2806
      private final String _fieldName;
2807
 
2808
      _Fields(short thriftId, String fieldName) {
2809
        _thriftId = thriftId;
2810
        _fieldName = fieldName;
2811
      }
2812
 
2813
      public short getThriftFieldId() {
2814
        return _thriftId;
2815
      }
2816
 
2817
      public String getFieldName() {
2818
        return _fieldName;
2819
      }
2820
    }
2821
 
2822
    // isset id assignments
2823
 
2824
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
2825
      put(_Fields.TRANSACTION, new FieldMetaData("transaction", TFieldRequirementType.DEFAULT, 
2826
          new StructMetaData(TType.STRUCT, Transaction.class)));
2827
    }});
2828
 
2829
    static {
2830
      FieldMetaData.addStructMetaDataMap(createTransaction_args.class, metaDataMap);
2831
    }
2832
 
2833
    public createTransaction_args() {
2834
    }
2835
 
2836
    public createTransaction_args(
2837
      Transaction transaction)
2838
    {
2839
      this();
2840
      this.transaction = transaction;
2841
    }
2842
 
2843
    /**
2844
     * Performs a deep copy on <i>other</i>.
2845
     */
2846
    public createTransaction_args(createTransaction_args other) {
2847
      if (other.isSetTransaction()) {
2848
        this.transaction = new Transaction(other.transaction);
2849
      }
2850
    }
2851
 
2852
    public createTransaction_args deepCopy() {
2853
      return new createTransaction_args(this);
2854
    }
2855
 
2856
    @Deprecated
2857
    public createTransaction_args clone() {
2858
      return new createTransaction_args(this);
2859
    }
2860
 
2861
    public Transaction getTransaction() {
2862
      return this.transaction;
2863
    }
2864
 
2865
    public createTransaction_args setTransaction(Transaction transaction) {
2866
      this.transaction = transaction;
2867
      return this;
2868
    }
2869
 
2870
    public void unsetTransaction() {
2871
      this.transaction = null;
2872
    }
2873
 
2874
    /** Returns true if field transaction is set (has been asigned a value) and false otherwise */
2875
    public boolean isSetTransaction() {
2876
      return this.transaction != null;
2877
    }
2878
 
2879
    public void setTransactionIsSet(boolean value) {
2880
      if (!value) {
2881
        this.transaction = null;
2882
      }
2883
    }
2884
 
2885
    public void setFieldValue(_Fields field, Object value) {
2886
      switch (field) {
2887
      case TRANSACTION:
2888
        if (value == null) {
2889
          unsetTransaction();
2890
        } else {
2891
          setTransaction((Transaction)value);
2892
        }
2893
        break;
2894
 
2895
      }
2896
    }
2897
 
2898
    public void setFieldValue(int fieldID, Object value) {
2899
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
2900
    }
2901
 
2902
    public Object getFieldValue(_Fields field) {
2903
      switch (field) {
2904
      case TRANSACTION:
2905
        return getTransaction();
2906
 
2907
      }
2908
      throw new IllegalStateException();
2909
    }
2910
 
2911
    public Object getFieldValue(int fieldId) {
2912
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
2913
    }
2914
 
2915
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
2916
    public boolean isSet(_Fields field) {
2917
      switch (field) {
2918
      case TRANSACTION:
2919
        return isSetTransaction();
2920
      }
2921
      throw new IllegalStateException();
2922
    }
2923
 
2924
    public boolean isSet(int fieldID) {
2925
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
2926
    }
2927
 
2928
    @Override
2929
    public boolean equals(Object that) {
2930
      if (that == null)
2931
        return false;
2932
      if (that instanceof createTransaction_args)
2933
        return this.equals((createTransaction_args)that);
2934
      return false;
2935
    }
2936
 
2937
    public boolean equals(createTransaction_args that) {
2938
      if (that == null)
2939
        return false;
2940
 
2941
      boolean this_present_transaction = true && this.isSetTransaction();
2942
      boolean that_present_transaction = true && that.isSetTransaction();
2943
      if (this_present_transaction || that_present_transaction) {
2944
        if (!(this_present_transaction && that_present_transaction))
2945
          return false;
2946
        if (!this.transaction.equals(that.transaction))
2947
          return false;
2948
      }
2949
 
2950
      return true;
2951
    }
2952
 
2953
    @Override
2954
    public int hashCode() {
2955
      return 0;
2956
    }
2957
 
684 chandransh 2958
    public int compareTo(createTransaction_args other) {
2959
      if (!getClass().equals(other.getClass())) {
2960
        return getClass().getName().compareTo(other.getClass().getName());
2961
      }
2962
 
2963
      int lastComparison = 0;
2964
      createTransaction_args typedOther = (createTransaction_args)other;
2965
 
2966
      lastComparison = Boolean.valueOf(isSetTransaction()).compareTo(isSetTransaction());
2967
      if (lastComparison != 0) {
2968
        return lastComparison;
2969
      }
2970
      lastComparison = TBaseHelper.compareTo(transaction, typedOther.transaction);
2971
      if (lastComparison != 0) {
2972
        return lastComparison;
2973
      }
2974
      return 0;
2975
    }
2976
 
68 ashish 2977
    public void read(TProtocol iprot) throws TException {
2978
      TField field;
2979
      iprot.readStructBegin();
2980
      while (true)
2981
      {
2982
        field = iprot.readFieldBegin();
2983
        if (field.type == TType.STOP) { 
2984
          break;
2985
        }
2986
        _Fields fieldId = _Fields.findByThriftId(field.id);
2987
        if (fieldId == null) {
2988
          TProtocolUtil.skip(iprot, field.type);
2989
        } else {
2990
          switch (fieldId) {
2991
            case TRANSACTION:
2992
              if (field.type == TType.STRUCT) {
2993
                this.transaction = new Transaction();
2994
                this.transaction.read(iprot);
2995
              } else { 
2996
                TProtocolUtil.skip(iprot, field.type);
2997
              }
2998
              break;
2999
          }
3000
          iprot.readFieldEnd();
3001
        }
3002
      }
3003
      iprot.readStructEnd();
3004
      validate();
3005
    }
3006
 
3007
    public void write(TProtocol oprot) throws TException {
3008
      validate();
3009
 
3010
      oprot.writeStructBegin(STRUCT_DESC);
3011
      if (this.transaction != null) {
3012
        oprot.writeFieldBegin(TRANSACTION_FIELD_DESC);
3013
        this.transaction.write(oprot);
3014
        oprot.writeFieldEnd();
3015
      }
3016
      oprot.writeFieldStop();
3017
      oprot.writeStructEnd();
3018
    }
3019
 
3020
    @Override
3021
    public String toString() {
3022
      StringBuilder sb = new StringBuilder("createTransaction_args(");
3023
      boolean first = true;
3024
 
3025
      sb.append("transaction:");
3026
      if (this.transaction == null) {
3027
        sb.append("null");
3028
      } else {
3029
        sb.append(this.transaction);
3030
      }
3031
      first = false;
3032
      sb.append(")");
3033
      return sb.toString();
3034
    }
3035
 
3036
    public void validate() throws TException {
3037
      // check for required fields
3038
    }
3039
 
3040
  }
3041
 
3042
  public static class createTransaction_result implements TBase<createTransaction_result._Fields>, java.io.Serializable, Cloneable, Comparable<createTransaction_result>   {
3043
    private static final TStruct STRUCT_DESC = new TStruct("createTransaction_result");
3044
 
132 ashish 3045
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
68 ashish 3046
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
3047
 
132 ashish 3048
    private long success;
68 ashish 3049
    private TransactionServiceException ex;
3050
 
3051
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3052
    public enum _Fields implements TFieldIdEnum {
132 ashish 3053
      SUCCESS((short)0, "success"),
68 ashish 3054
      EX((short)1, "ex");
3055
 
3056
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3057
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3058
 
3059
      static {
3060
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3061
          byId.put((int)field._thriftId, field);
3062
          byName.put(field.getFieldName(), field);
3063
        }
3064
      }
3065
 
3066
      /**
3067
       * Find the _Fields constant that matches fieldId, or null if its not found.
3068
       */
3069
      public static _Fields findByThriftId(int fieldId) {
3070
        return byId.get(fieldId);
3071
      }
3072
 
3073
      /**
3074
       * Find the _Fields constant that matches fieldId, throwing an exception
3075
       * if it is not found.
3076
       */
3077
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3078
        _Fields fields = findByThriftId(fieldId);
3079
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3080
        return fields;
3081
      }
3082
 
3083
      /**
3084
       * Find the _Fields constant that matches name, or null if its not found.
3085
       */
3086
      public static _Fields findByName(String name) {
3087
        return byName.get(name);
3088
      }
3089
 
3090
      private final short _thriftId;
3091
      private final String _fieldName;
3092
 
3093
      _Fields(short thriftId, String fieldName) {
3094
        _thriftId = thriftId;
3095
        _fieldName = fieldName;
3096
      }
3097
 
3098
      public short getThriftFieldId() {
3099
        return _thriftId;
3100
      }
3101
 
3102
      public String getFieldName() {
3103
        return _fieldName;
3104
      }
3105
    }
3106
 
3107
    // isset id assignments
132 ashish 3108
    private static final int __SUCCESS_ISSET_ID = 0;
3109
    private BitSet __isset_bit_vector = new BitSet(1);
68 ashish 3110
 
3111
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
132 ashish 3112
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
3113
          new FieldValueMetaData(TType.I64)));
68 ashish 3114
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
3115
          new FieldValueMetaData(TType.STRUCT)));
3116
    }});
3117
 
3118
    static {
3119
      FieldMetaData.addStructMetaDataMap(createTransaction_result.class, metaDataMap);
3120
    }
3121
 
3122
    public createTransaction_result() {
3123
    }
3124
 
3125
    public createTransaction_result(
132 ashish 3126
      long success,
68 ashish 3127
      TransactionServiceException ex)
3128
    {
3129
      this();
132 ashish 3130
      this.success = success;
3131
      setSuccessIsSet(true);
68 ashish 3132
      this.ex = ex;
3133
    }
3134
 
3135
    /**
3136
     * Performs a deep copy on <i>other</i>.
3137
     */
3138
    public createTransaction_result(createTransaction_result other) {
132 ashish 3139
      __isset_bit_vector.clear();
3140
      __isset_bit_vector.or(other.__isset_bit_vector);
3141
      this.success = other.success;
68 ashish 3142
      if (other.isSetEx()) {
3143
        this.ex = new TransactionServiceException(other.ex);
3144
      }
3145
    }
3146
 
3147
    public createTransaction_result deepCopy() {
3148
      return new createTransaction_result(this);
3149
    }
3150
 
3151
    @Deprecated
3152
    public createTransaction_result clone() {
3153
      return new createTransaction_result(this);
3154
    }
3155
 
132 ashish 3156
    public long getSuccess() {
3157
      return this.success;
3158
    }
3159
 
3160
    public createTransaction_result setSuccess(long success) {
3161
      this.success = success;
3162
      setSuccessIsSet(true);
3163
      return this;
3164
    }
3165
 
3166
    public void unsetSuccess() {
3167
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
3168
    }
3169
 
3170
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
3171
    public boolean isSetSuccess() {
3172
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
3173
    }
3174
 
3175
    public void setSuccessIsSet(boolean value) {
3176
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
3177
    }
3178
 
68 ashish 3179
    public TransactionServiceException getEx() {
3180
      return this.ex;
3181
    }
3182
 
3183
    public createTransaction_result setEx(TransactionServiceException ex) {
3184
      this.ex = ex;
3185
      return this;
3186
    }
3187
 
3188
    public void unsetEx() {
3189
      this.ex = null;
3190
    }
3191
 
3192
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
3193
    public boolean isSetEx() {
3194
      return this.ex != null;
3195
    }
3196
 
3197
    public void setExIsSet(boolean value) {
3198
      if (!value) {
3199
        this.ex = null;
3200
      }
3201
    }
3202
 
3203
    public void setFieldValue(_Fields field, Object value) {
3204
      switch (field) {
132 ashish 3205
      case SUCCESS:
3206
        if (value == null) {
3207
          unsetSuccess();
3208
        } else {
3209
          setSuccess((Long)value);
3210
        }
3211
        break;
3212
 
68 ashish 3213
      case EX:
3214
        if (value == null) {
3215
          unsetEx();
3216
        } else {
3217
          setEx((TransactionServiceException)value);
3218
        }
3219
        break;
3220
 
3221
      }
3222
    }
3223
 
3224
    public void setFieldValue(int fieldID, Object value) {
3225
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3226
    }
3227
 
3228
    public Object getFieldValue(_Fields field) {
3229
      switch (field) {
132 ashish 3230
      case SUCCESS:
3231
        return new Long(getSuccess());
3232
 
68 ashish 3233
      case EX:
3234
        return getEx();
3235
 
3236
      }
3237
      throw new IllegalStateException();
3238
    }
3239
 
3240
    public Object getFieldValue(int fieldId) {
3241
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3242
    }
3243
 
3244
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3245
    public boolean isSet(_Fields field) {
3246
      switch (field) {
132 ashish 3247
      case SUCCESS:
3248
        return isSetSuccess();
68 ashish 3249
      case EX:
3250
        return isSetEx();
3251
      }
3252
      throw new IllegalStateException();
3253
    }
3254
 
3255
    public boolean isSet(int fieldID) {
3256
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3257
    }
3258
 
3259
    @Override
3260
    public boolean equals(Object that) {
3261
      if (that == null)
3262
        return false;
3263
      if (that instanceof createTransaction_result)
3264
        return this.equals((createTransaction_result)that);
3265
      return false;
3266
    }
3267
 
3268
    public boolean equals(createTransaction_result that) {
3269
      if (that == null)
3270
        return false;
3271
 
132 ashish 3272
      boolean this_present_success = true;
3273
      boolean that_present_success = true;
3274
      if (this_present_success || that_present_success) {
3275
        if (!(this_present_success && that_present_success))
3276
          return false;
3277
        if (this.success != that.success)
3278
          return false;
3279
      }
3280
 
68 ashish 3281
      boolean this_present_ex = true && this.isSetEx();
3282
      boolean that_present_ex = true && that.isSetEx();
3283
      if (this_present_ex || that_present_ex) {
3284
        if (!(this_present_ex && that_present_ex))
3285
          return false;
3286
        if (!this.ex.equals(that.ex))
3287
          return false;
3288
      }
3289
 
3290
      return true;
3291
    }
3292
 
3293
    @Override
3294
    public int hashCode() {
3295
      return 0;
3296
    }
3297
 
3298
    public int compareTo(createTransaction_result other) {
3299
      if (!getClass().equals(other.getClass())) {
3300
        return getClass().getName().compareTo(other.getClass().getName());
3301
      }
3302
 
3303
      int lastComparison = 0;
3304
      createTransaction_result typedOther = (createTransaction_result)other;
3305
 
132 ashish 3306
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
3307
      if (lastComparison != 0) {
3308
        return lastComparison;
3309
      }
3310
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
3311
      if (lastComparison != 0) {
3312
        return lastComparison;
3313
      }
68 ashish 3314
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
3315
      if (lastComparison != 0) {
3316
        return lastComparison;
3317
      }
3318
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
3319
      if (lastComparison != 0) {
3320
        return lastComparison;
3321
      }
3322
      return 0;
3323
    }
3324
 
3325
    public void read(TProtocol iprot) throws TException {
3326
      TField field;
3327
      iprot.readStructBegin();
3328
      while (true)
3329
      {
3330
        field = iprot.readFieldBegin();
3331
        if (field.type == TType.STOP) { 
3332
          break;
3333
        }
3334
        _Fields fieldId = _Fields.findByThriftId(field.id);
3335
        if (fieldId == null) {
3336
          TProtocolUtil.skip(iprot, field.type);
3337
        } else {
3338
          switch (fieldId) {
132 ashish 3339
            case SUCCESS:
3340
              if (field.type == TType.I64) {
3341
                this.success = iprot.readI64();
3342
                setSuccessIsSet(true);
3343
              } else { 
3344
                TProtocolUtil.skip(iprot, field.type);
3345
              }
3346
              break;
68 ashish 3347
            case EX:
3348
              if (field.type == TType.STRUCT) {
3349
                this.ex = new TransactionServiceException();
3350
                this.ex.read(iprot);
3351
              } else { 
3352
                TProtocolUtil.skip(iprot, field.type);
3353
              }
3354
              break;
3355
          }
3356
          iprot.readFieldEnd();
3357
        }
3358
      }
3359
      iprot.readStructEnd();
3360
      validate();
3361
    }
3362
 
3363
    public void write(TProtocol oprot) throws TException {
3364
      oprot.writeStructBegin(STRUCT_DESC);
3365
 
132 ashish 3366
      if (this.isSetSuccess()) {
3367
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
3368
        oprot.writeI64(this.success);
3369
        oprot.writeFieldEnd();
3370
      } else if (this.isSetEx()) {
68 ashish 3371
        oprot.writeFieldBegin(EX_FIELD_DESC);
3372
        this.ex.write(oprot);
3373
        oprot.writeFieldEnd();
3374
      }
3375
      oprot.writeFieldStop();
3376
      oprot.writeStructEnd();
3377
    }
3378
 
3379
    @Override
3380
    public String toString() {
3381
      StringBuilder sb = new StringBuilder("createTransaction_result(");
3382
      boolean first = true;
3383
 
132 ashish 3384
      sb.append("success:");
3385
      sb.append(this.success);
3386
      first = false;
3387
      if (!first) sb.append(", ");
68 ashish 3388
      sb.append("ex:");
3389
      if (this.ex == null) {
3390
        sb.append("null");
3391
      } else {
3392
        sb.append(this.ex);
3393
      }
3394
      first = false;
3395
      sb.append(")");
3396
      return sb.toString();
3397
    }
3398
 
3399
    public void validate() throws TException {
3400
      // check for required fields
3401
    }
3402
 
3403
  }
3404
 
3405
  public static class getTransaction_args implements TBase<getTransaction_args._Fields>, java.io.Serializable, Cloneable, Comparable<getTransaction_args>   {
3406
    private static final TStruct STRUCT_DESC = new TStruct("getTransaction_args");
3407
 
3408
    private static final TField ID_FIELD_DESC = new TField("id", TType.I64, (short)1);
3409
 
3410
    private long id;
3411
 
3412
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3413
    public enum _Fields implements TFieldIdEnum {
3414
      ID((short)1, "id");
3415
 
3416
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3417
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3418
 
3419
      static {
3420
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3421
          byId.put((int)field._thriftId, field);
3422
          byName.put(field.getFieldName(), field);
3423
        }
3424
      }
3425
 
3426
      /**
3427
       * Find the _Fields constant that matches fieldId, or null if its not found.
3428
       */
3429
      public static _Fields findByThriftId(int fieldId) {
3430
        return byId.get(fieldId);
3431
      }
3432
 
3433
      /**
3434
       * Find the _Fields constant that matches fieldId, throwing an exception
3435
       * if it is not found.
3436
       */
3437
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3438
        _Fields fields = findByThriftId(fieldId);
3439
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3440
        return fields;
3441
      }
3442
 
3443
      /**
3444
       * Find the _Fields constant that matches name, or null if its not found.
3445
       */
3446
      public static _Fields findByName(String name) {
3447
        return byName.get(name);
3448
      }
3449
 
3450
      private final short _thriftId;
3451
      private final String _fieldName;
3452
 
3453
      _Fields(short thriftId, String fieldName) {
3454
        _thriftId = thriftId;
3455
        _fieldName = fieldName;
3456
      }
3457
 
3458
      public short getThriftFieldId() {
3459
        return _thriftId;
3460
      }
3461
 
3462
      public String getFieldName() {
3463
        return _fieldName;
3464
      }
3465
    }
3466
 
3467
    // isset id assignments
3468
    private static final int __ID_ISSET_ID = 0;
3469
    private BitSet __isset_bit_vector = new BitSet(1);
3470
 
3471
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3472
      put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, 
3473
          new FieldValueMetaData(TType.I64)));
3474
    }});
3475
 
3476
    static {
3477
      FieldMetaData.addStructMetaDataMap(getTransaction_args.class, metaDataMap);
3478
    }
3479
 
3480
    public getTransaction_args() {
3481
    }
3482
 
3483
    public getTransaction_args(
3484
      long id)
3485
    {
3486
      this();
3487
      this.id = id;
3488
      setIdIsSet(true);
3489
    }
3490
 
3491
    /**
3492
     * Performs a deep copy on <i>other</i>.
3493
     */
3494
    public getTransaction_args(getTransaction_args other) {
3495
      __isset_bit_vector.clear();
3496
      __isset_bit_vector.or(other.__isset_bit_vector);
3497
      this.id = other.id;
3498
    }
3499
 
3500
    public getTransaction_args deepCopy() {
3501
      return new getTransaction_args(this);
3502
    }
3503
 
3504
    @Deprecated
3505
    public getTransaction_args clone() {
3506
      return new getTransaction_args(this);
3507
    }
3508
 
3509
    public long getId() {
3510
      return this.id;
3511
    }
3512
 
3513
    public getTransaction_args setId(long id) {
3514
      this.id = id;
3515
      setIdIsSet(true);
3516
      return this;
3517
    }
3518
 
3519
    public void unsetId() {
3520
      __isset_bit_vector.clear(__ID_ISSET_ID);
3521
    }
3522
 
3523
    /** Returns true if field id is set (has been asigned a value) and false otherwise */
3524
    public boolean isSetId() {
3525
      return __isset_bit_vector.get(__ID_ISSET_ID);
3526
    }
3527
 
3528
    public void setIdIsSet(boolean value) {
3529
      __isset_bit_vector.set(__ID_ISSET_ID, value);
3530
    }
3531
 
3532
    public void setFieldValue(_Fields field, Object value) {
3533
      switch (field) {
3534
      case ID:
3535
        if (value == null) {
3536
          unsetId();
3537
        } else {
3538
          setId((Long)value);
3539
        }
3540
        break;
3541
 
3542
      }
3543
    }
3544
 
3545
    public void setFieldValue(int fieldID, Object value) {
3546
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3547
    }
3548
 
3549
    public Object getFieldValue(_Fields field) {
3550
      switch (field) {
3551
      case ID:
3552
        return new Long(getId());
3553
 
3554
      }
3555
      throw new IllegalStateException();
3556
    }
3557
 
3558
    public Object getFieldValue(int fieldId) {
3559
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3560
    }
3561
 
3562
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3563
    public boolean isSet(_Fields field) {
3564
      switch (field) {
3565
      case ID:
3566
        return isSetId();
3567
      }
3568
      throw new IllegalStateException();
3569
    }
3570
 
3571
    public boolean isSet(int fieldID) {
3572
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3573
    }
3574
 
3575
    @Override
3576
    public boolean equals(Object that) {
3577
      if (that == null)
3578
        return false;
3579
      if (that instanceof getTransaction_args)
3580
        return this.equals((getTransaction_args)that);
3581
      return false;
3582
    }
3583
 
3584
    public boolean equals(getTransaction_args that) {
3585
      if (that == null)
3586
        return false;
3587
 
3588
      boolean this_present_id = true;
3589
      boolean that_present_id = true;
3590
      if (this_present_id || that_present_id) {
3591
        if (!(this_present_id && that_present_id))
3592
          return false;
3593
        if (this.id != that.id)
3594
          return false;
3595
      }
3596
 
3597
      return true;
3598
    }
3599
 
3600
    @Override
3601
    public int hashCode() {
3602
      return 0;
3603
    }
3604
 
3605
    public int compareTo(getTransaction_args other) {
3606
      if (!getClass().equals(other.getClass())) {
3607
        return getClass().getName().compareTo(other.getClass().getName());
3608
      }
3609
 
3610
      int lastComparison = 0;
3611
      getTransaction_args typedOther = (getTransaction_args)other;
3612
 
3613
      lastComparison = Boolean.valueOf(isSetId()).compareTo(isSetId());
3614
      if (lastComparison != 0) {
3615
        return lastComparison;
3616
      }
3617
      lastComparison = TBaseHelper.compareTo(id, typedOther.id);
3618
      if (lastComparison != 0) {
3619
        return lastComparison;
3620
      }
3621
      return 0;
3622
    }
3623
 
3624
    public void read(TProtocol iprot) throws TException {
3625
      TField field;
3626
      iprot.readStructBegin();
3627
      while (true)
3628
      {
3629
        field = iprot.readFieldBegin();
3630
        if (field.type == TType.STOP) { 
3631
          break;
3632
        }
3633
        _Fields fieldId = _Fields.findByThriftId(field.id);
3634
        if (fieldId == null) {
3635
          TProtocolUtil.skip(iprot, field.type);
3636
        } else {
3637
          switch (fieldId) {
3638
            case ID:
3639
              if (field.type == TType.I64) {
3640
                this.id = iprot.readI64();
3641
                setIdIsSet(true);
3642
              } else { 
3643
                TProtocolUtil.skip(iprot, field.type);
3644
              }
3645
              break;
3646
          }
3647
          iprot.readFieldEnd();
3648
        }
3649
      }
3650
      iprot.readStructEnd();
3651
      validate();
3652
    }
3653
 
3654
    public void write(TProtocol oprot) throws TException {
3655
      validate();
3656
 
3657
      oprot.writeStructBegin(STRUCT_DESC);
3658
      oprot.writeFieldBegin(ID_FIELD_DESC);
3659
      oprot.writeI64(this.id);
3660
      oprot.writeFieldEnd();
3661
      oprot.writeFieldStop();
3662
      oprot.writeStructEnd();
3663
    }
3664
 
3665
    @Override
3666
    public String toString() {
3667
      StringBuilder sb = new StringBuilder("getTransaction_args(");
3668
      boolean first = true;
3669
 
3670
      sb.append("id:");
3671
      sb.append(this.id);
3672
      first = false;
3673
      sb.append(")");
3674
      return sb.toString();
3675
    }
3676
 
3677
    public void validate() throws TException {
3678
      // check for required fields
3679
    }
3680
 
3681
  }
3682
 
684 chandransh 3683
  public static class getTransaction_result implements TBase<getTransaction_result._Fields>, java.io.Serializable, Cloneable, Comparable<getTransaction_result>   {
68 ashish 3684
    private static final TStruct STRUCT_DESC = new TStruct("getTransaction_result");
3685
 
3686
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
3687
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
3688
 
3689
    private Transaction success;
3690
    private TransactionServiceException ex;
3691
 
3692
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3693
    public enum _Fields implements TFieldIdEnum {
3694
      SUCCESS((short)0, "success"),
3695
      EX((short)1, "ex");
3696
 
3697
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3698
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3699
 
3700
      static {
3701
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3702
          byId.put((int)field._thriftId, field);
3703
          byName.put(field.getFieldName(), field);
3704
        }
3705
      }
3706
 
3707
      /**
3708
       * Find the _Fields constant that matches fieldId, or null if its not found.
3709
       */
3710
      public static _Fields findByThriftId(int fieldId) {
3711
        return byId.get(fieldId);
3712
      }
3713
 
3714
      /**
3715
       * Find the _Fields constant that matches fieldId, throwing an exception
3716
       * if it is not found.
3717
       */
3718
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3719
        _Fields fields = findByThriftId(fieldId);
3720
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3721
        return fields;
3722
      }
3723
 
3724
      /**
3725
       * Find the _Fields constant that matches name, or null if its not found.
3726
       */
3727
      public static _Fields findByName(String name) {
3728
        return byName.get(name);
3729
      }
3730
 
3731
      private final short _thriftId;
3732
      private final String _fieldName;
3733
 
3734
      _Fields(short thriftId, String fieldName) {
3735
        _thriftId = thriftId;
3736
        _fieldName = fieldName;
3737
      }
3738
 
3739
      public short getThriftFieldId() {
3740
        return _thriftId;
3741
      }
3742
 
3743
      public String getFieldName() {
3744
        return _fieldName;
3745
      }
3746
    }
3747
 
3748
    // isset id assignments
3749
 
3750
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3751
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
3752
          new StructMetaData(TType.STRUCT, Transaction.class)));
3753
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
3754
          new FieldValueMetaData(TType.STRUCT)));
3755
    }});
3756
 
3757
    static {
3758
      FieldMetaData.addStructMetaDataMap(getTransaction_result.class, metaDataMap);
3759
    }
3760
 
3761
    public getTransaction_result() {
3762
    }
3763
 
3764
    public getTransaction_result(
3765
      Transaction success,
3766
      TransactionServiceException ex)
3767
    {
3768
      this();
3769
      this.success = success;
3770
      this.ex = ex;
3771
    }
3772
 
3773
    /**
3774
     * Performs a deep copy on <i>other</i>.
3775
     */
3776
    public getTransaction_result(getTransaction_result other) {
3777
      if (other.isSetSuccess()) {
3778
        this.success = new Transaction(other.success);
3779
      }
3780
      if (other.isSetEx()) {
3781
        this.ex = new TransactionServiceException(other.ex);
3782
      }
3783
    }
3784
 
3785
    public getTransaction_result deepCopy() {
3786
      return new getTransaction_result(this);
3787
    }
3788
 
3789
    @Deprecated
3790
    public getTransaction_result clone() {
3791
      return new getTransaction_result(this);
3792
    }
3793
 
3794
    public Transaction getSuccess() {
3795
      return this.success;
3796
    }
3797
 
3798
    public getTransaction_result setSuccess(Transaction success) {
3799
      this.success = success;
3800
      return this;
3801
    }
3802
 
3803
    public void unsetSuccess() {
3804
      this.success = null;
3805
    }
3806
 
3807
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
3808
    public boolean isSetSuccess() {
3809
      return this.success != null;
3810
    }
3811
 
3812
    public void setSuccessIsSet(boolean value) {
3813
      if (!value) {
3814
        this.success = null;
3815
      }
3816
    }
3817
 
3818
    public TransactionServiceException getEx() {
3819
      return this.ex;
3820
    }
3821
 
3822
    public getTransaction_result setEx(TransactionServiceException ex) {
3823
      this.ex = ex;
3824
      return this;
3825
    }
3826
 
3827
    public void unsetEx() {
3828
      this.ex = null;
3829
    }
3830
 
3831
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
3832
    public boolean isSetEx() {
3833
      return this.ex != null;
3834
    }
3835
 
3836
    public void setExIsSet(boolean value) {
3837
      if (!value) {
3838
        this.ex = null;
3839
      }
3840
    }
3841
 
3842
    public void setFieldValue(_Fields field, Object value) {
3843
      switch (field) {
3844
      case SUCCESS:
3845
        if (value == null) {
3846
          unsetSuccess();
3847
        } else {
3848
          setSuccess((Transaction)value);
3849
        }
3850
        break;
3851
 
3852
      case EX:
3853
        if (value == null) {
3854
          unsetEx();
3855
        } else {
3856
          setEx((TransactionServiceException)value);
3857
        }
3858
        break;
3859
 
3860
      }
3861
    }
3862
 
3863
    public void setFieldValue(int fieldID, Object value) {
3864
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3865
    }
3866
 
3867
    public Object getFieldValue(_Fields field) {
3868
      switch (field) {
3869
      case SUCCESS:
3870
        return getSuccess();
3871
 
3872
      case EX:
3873
        return getEx();
3874
 
3875
      }
3876
      throw new IllegalStateException();
3877
    }
3878
 
3879
    public Object getFieldValue(int fieldId) {
3880
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3881
    }
3882
 
3883
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3884
    public boolean isSet(_Fields field) {
3885
      switch (field) {
3886
      case SUCCESS:
3887
        return isSetSuccess();
3888
      case EX:
3889
        return isSetEx();
3890
      }
3891
      throw new IllegalStateException();
3892
    }
3893
 
3894
    public boolean isSet(int fieldID) {
3895
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3896
    }
3897
 
3898
    @Override
3899
    public boolean equals(Object that) {
3900
      if (that == null)
3901
        return false;
3902
      if (that instanceof getTransaction_result)
3903
        return this.equals((getTransaction_result)that);
3904
      return false;
3905
    }
3906
 
3907
    public boolean equals(getTransaction_result that) {
3908
      if (that == null)
3909
        return false;
3910
 
3911
      boolean this_present_success = true && this.isSetSuccess();
3912
      boolean that_present_success = true && that.isSetSuccess();
3913
      if (this_present_success || that_present_success) {
3914
        if (!(this_present_success && that_present_success))
3915
          return false;
3916
        if (!this.success.equals(that.success))
3917
          return false;
3918
      }
3919
 
3920
      boolean this_present_ex = true && this.isSetEx();
3921
      boolean that_present_ex = true && that.isSetEx();
3922
      if (this_present_ex || that_present_ex) {
3923
        if (!(this_present_ex && that_present_ex))
3924
          return false;
3925
        if (!this.ex.equals(that.ex))
3926
          return false;
3927
      }
3928
 
3929
      return true;
3930
    }
3931
 
3932
    @Override
3933
    public int hashCode() {
3934
      return 0;
3935
    }
3936
 
684 chandransh 3937
    public int compareTo(getTransaction_result other) {
3938
      if (!getClass().equals(other.getClass())) {
3939
        return getClass().getName().compareTo(other.getClass().getName());
3940
      }
3941
 
3942
      int lastComparison = 0;
3943
      getTransaction_result typedOther = (getTransaction_result)other;
3944
 
3945
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
3946
      if (lastComparison != 0) {
3947
        return lastComparison;
3948
      }
3949
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
3950
      if (lastComparison != 0) {
3951
        return lastComparison;
3952
      }
3953
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
3954
      if (lastComparison != 0) {
3955
        return lastComparison;
3956
      }
3957
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
3958
      if (lastComparison != 0) {
3959
        return lastComparison;
3960
      }
3961
      return 0;
3962
    }
3963
 
68 ashish 3964
    public void read(TProtocol iprot) throws TException {
3965
      TField field;
3966
      iprot.readStructBegin();
3967
      while (true)
3968
      {
3969
        field = iprot.readFieldBegin();
3970
        if (field.type == TType.STOP) { 
3971
          break;
3972
        }
3973
        _Fields fieldId = _Fields.findByThriftId(field.id);
3974
        if (fieldId == null) {
3975
          TProtocolUtil.skip(iprot, field.type);
3976
        } else {
3977
          switch (fieldId) {
3978
            case SUCCESS:
3979
              if (field.type == TType.STRUCT) {
3980
                this.success = new Transaction();
3981
                this.success.read(iprot);
3982
              } else { 
3983
                TProtocolUtil.skip(iprot, field.type);
3984
              }
3985
              break;
3986
            case EX:
3987
              if (field.type == TType.STRUCT) {
3988
                this.ex = new TransactionServiceException();
3989
                this.ex.read(iprot);
3990
              } else { 
3991
                TProtocolUtil.skip(iprot, field.type);
3992
              }
3993
              break;
3994
          }
3995
          iprot.readFieldEnd();
3996
        }
3997
      }
3998
      iprot.readStructEnd();
3999
      validate();
4000
    }
4001
 
4002
    public void write(TProtocol oprot) throws TException {
4003
      oprot.writeStructBegin(STRUCT_DESC);
4004
 
4005
      if (this.isSetSuccess()) {
4006
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
4007
        this.success.write(oprot);
4008
        oprot.writeFieldEnd();
4009
      } else if (this.isSetEx()) {
4010
        oprot.writeFieldBegin(EX_FIELD_DESC);
4011
        this.ex.write(oprot);
4012
        oprot.writeFieldEnd();
4013
      }
4014
      oprot.writeFieldStop();
4015
      oprot.writeStructEnd();
4016
    }
4017
 
4018
    @Override
4019
    public String toString() {
4020
      StringBuilder sb = new StringBuilder("getTransaction_result(");
4021
      boolean first = true;
4022
 
4023
      sb.append("success:");
4024
      if (this.success == null) {
4025
        sb.append("null");
4026
      } else {
4027
        sb.append(this.success);
4028
      }
4029
      first = false;
4030
      if (!first) sb.append(", ");
4031
      sb.append("ex:");
4032
      if (this.ex == null) {
4033
        sb.append("null");
4034
      } else {
4035
        sb.append(this.ex);
4036
      }
4037
      first = false;
4038
      sb.append(")");
4039
      return sb.toString();
4040
    }
4041
 
4042
    public void validate() throws TException {
4043
      // check for required fields
4044
    }
4045
 
4046
  }
4047
 
4048
  public static class getTransactionsForCustomer_args implements TBase<getTransactionsForCustomer_args._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionsForCustomer_args>   {
4049
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionsForCustomer_args");
4050
 
4051
    private static final TField CUSTOMER_ID_FIELD_DESC = new TField("customerId", TType.I64, (short)1);
132 ashish 4052
    private static final TField FROM_DATE_FIELD_DESC = new TField("from_date", TType.I64, (short)2);
4053
    private static final TField TO_DATE_FIELD_DESC = new TField("to_date", TType.I64, (short)3);
68 ashish 4054
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)4);
4055
 
4056
    private long customerId;
132 ashish 4057
    private long from_date;
4058
    private long to_date;
68 ashish 4059
    private TransactionStatus status;
4060
 
4061
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4062
    public enum _Fields implements TFieldIdEnum {
4063
      CUSTOMER_ID((short)1, "customerId"),
132 ashish 4064
      FROM_DATE((short)2, "from_date"),
4065
      TO_DATE((short)3, "to_date"),
68 ashish 4066
      /**
4067
       * 
4068
       * @see TransactionStatus
4069
       */
4070
      STATUS((short)4, "status");
4071
 
4072
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4073
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4074
 
4075
      static {
4076
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4077
          byId.put((int)field._thriftId, field);
4078
          byName.put(field.getFieldName(), field);
4079
        }
4080
      }
4081
 
4082
      /**
4083
       * Find the _Fields constant that matches fieldId, or null if its not found.
4084
       */
4085
      public static _Fields findByThriftId(int fieldId) {
4086
        return byId.get(fieldId);
4087
      }
4088
 
4089
      /**
4090
       * Find the _Fields constant that matches fieldId, throwing an exception
4091
       * if it is not found.
4092
       */
4093
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4094
        _Fields fields = findByThriftId(fieldId);
4095
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4096
        return fields;
4097
      }
4098
 
4099
      /**
4100
       * Find the _Fields constant that matches name, or null if its not found.
4101
       */
4102
      public static _Fields findByName(String name) {
4103
        return byName.get(name);
4104
      }
4105
 
4106
      private final short _thriftId;
4107
      private final String _fieldName;
4108
 
4109
      _Fields(short thriftId, String fieldName) {
4110
        _thriftId = thriftId;
4111
        _fieldName = fieldName;
4112
      }
4113
 
4114
      public short getThriftFieldId() {
4115
        return _thriftId;
4116
      }
4117
 
4118
      public String getFieldName() {
4119
        return _fieldName;
4120
      }
4121
    }
4122
 
4123
    // isset id assignments
4124
    private static final int __CUSTOMERID_ISSET_ID = 0;
132 ashish 4125
    private static final int __FROM_DATE_ISSET_ID = 1;
4126
    private static final int __TO_DATE_ISSET_ID = 2;
68 ashish 4127
    private BitSet __isset_bit_vector = new BitSet(3);
4128
 
4129
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
4130
      put(_Fields.CUSTOMER_ID, new FieldMetaData("customerId", TFieldRequirementType.DEFAULT, 
4131
          new FieldValueMetaData(TType.I64)));
132 ashish 4132
      put(_Fields.FROM_DATE, new FieldMetaData("from_date", TFieldRequirementType.DEFAULT, 
68 ashish 4133
          new FieldValueMetaData(TType.I64)));
132 ashish 4134
      put(_Fields.TO_DATE, new FieldMetaData("to_date", TFieldRequirementType.DEFAULT, 
68 ashish 4135
          new FieldValueMetaData(TType.I64)));
4136
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
4137
          new EnumMetaData(TType.ENUM, TransactionStatus.class)));
4138
    }});
4139
 
4140
    static {
4141
      FieldMetaData.addStructMetaDataMap(getTransactionsForCustomer_args.class, metaDataMap);
4142
    }
4143
 
4144
    public getTransactionsForCustomer_args() {
4145
    }
4146
 
4147
    public getTransactionsForCustomer_args(
4148
      long customerId,
132 ashish 4149
      long from_date,
4150
      long to_date,
68 ashish 4151
      TransactionStatus status)
4152
    {
4153
      this();
4154
      this.customerId = customerId;
4155
      setCustomerIdIsSet(true);
132 ashish 4156
      this.from_date = from_date;
4157
      setFrom_dateIsSet(true);
4158
      this.to_date = to_date;
4159
      setTo_dateIsSet(true);
68 ashish 4160
      this.status = status;
4161
    }
4162
 
4163
    /**
4164
     * Performs a deep copy on <i>other</i>.
4165
     */
4166
    public getTransactionsForCustomer_args(getTransactionsForCustomer_args other) {
4167
      __isset_bit_vector.clear();
4168
      __isset_bit_vector.or(other.__isset_bit_vector);
4169
      this.customerId = other.customerId;
132 ashish 4170
      this.from_date = other.from_date;
4171
      this.to_date = other.to_date;
68 ashish 4172
      if (other.isSetStatus()) {
4173
        this.status = other.status;
4174
      }
4175
    }
4176
 
4177
    public getTransactionsForCustomer_args deepCopy() {
4178
      return new getTransactionsForCustomer_args(this);
4179
    }
4180
 
4181
    @Deprecated
4182
    public getTransactionsForCustomer_args clone() {
4183
      return new getTransactionsForCustomer_args(this);
4184
    }
4185
 
4186
    public long getCustomerId() {
4187
      return this.customerId;
4188
    }
4189
 
4190
    public getTransactionsForCustomer_args setCustomerId(long customerId) {
4191
      this.customerId = customerId;
4192
      setCustomerIdIsSet(true);
4193
      return this;
4194
    }
4195
 
4196
    public void unsetCustomerId() {
4197
      __isset_bit_vector.clear(__CUSTOMERID_ISSET_ID);
4198
    }
4199
 
4200
    /** Returns true if field customerId is set (has been asigned a value) and false otherwise */
4201
    public boolean isSetCustomerId() {
4202
      return __isset_bit_vector.get(__CUSTOMERID_ISSET_ID);
4203
    }
4204
 
4205
    public void setCustomerIdIsSet(boolean value) {
4206
      __isset_bit_vector.set(__CUSTOMERID_ISSET_ID, value);
4207
    }
4208
 
132 ashish 4209
    public long getFrom_date() {
4210
      return this.from_date;
68 ashish 4211
    }
4212
 
132 ashish 4213
    public getTransactionsForCustomer_args setFrom_date(long from_date) {
4214
      this.from_date = from_date;
4215
      setFrom_dateIsSet(true);
68 ashish 4216
      return this;
4217
    }
4218
 
132 ashish 4219
    public void unsetFrom_date() {
4220
      __isset_bit_vector.clear(__FROM_DATE_ISSET_ID);
68 ashish 4221
    }
4222
 
132 ashish 4223
    /** Returns true if field from_date is set (has been asigned a value) and false otherwise */
4224
    public boolean isSetFrom_date() {
4225
      return __isset_bit_vector.get(__FROM_DATE_ISSET_ID);
68 ashish 4226
    }
4227
 
132 ashish 4228
    public void setFrom_dateIsSet(boolean value) {
4229
      __isset_bit_vector.set(__FROM_DATE_ISSET_ID, value);
68 ashish 4230
    }
4231
 
132 ashish 4232
    public long getTo_date() {
4233
      return this.to_date;
68 ashish 4234
    }
4235
 
132 ashish 4236
    public getTransactionsForCustomer_args setTo_date(long to_date) {
4237
      this.to_date = to_date;
4238
      setTo_dateIsSet(true);
68 ashish 4239
      return this;
4240
    }
4241
 
132 ashish 4242
    public void unsetTo_date() {
4243
      __isset_bit_vector.clear(__TO_DATE_ISSET_ID);
68 ashish 4244
    }
4245
 
132 ashish 4246
    /** Returns true if field to_date is set (has been asigned a value) and false otherwise */
4247
    public boolean isSetTo_date() {
4248
      return __isset_bit_vector.get(__TO_DATE_ISSET_ID);
68 ashish 4249
    }
4250
 
132 ashish 4251
    public void setTo_dateIsSet(boolean value) {
4252
      __isset_bit_vector.set(__TO_DATE_ISSET_ID, value);
68 ashish 4253
    }
4254
 
4255
    /**
4256
     * 
4257
     * @see TransactionStatus
4258
     */
4259
    public TransactionStatus getStatus() {
4260
      return this.status;
4261
    }
4262
 
4263
    /**
4264
     * 
4265
     * @see TransactionStatus
4266
     */
4267
    public getTransactionsForCustomer_args setStatus(TransactionStatus status) {
4268
      this.status = status;
4269
      return this;
4270
    }
4271
 
4272
    public void unsetStatus() {
4273
      this.status = null;
4274
    }
4275
 
4276
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
4277
    public boolean isSetStatus() {
4278
      return this.status != null;
4279
    }
4280
 
4281
    public void setStatusIsSet(boolean value) {
4282
      if (!value) {
4283
        this.status = null;
4284
      }
4285
    }
4286
 
4287
    public void setFieldValue(_Fields field, Object value) {
4288
      switch (field) {
4289
      case CUSTOMER_ID:
4290
        if (value == null) {
4291
          unsetCustomerId();
4292
        } else {
4293
          setCustomerId((Long)value);
4294
        }
4295
        break;
4296
 
132 ashish 4297
      case FROM_DATE:
68 ashish 4298
        if (value == null) {
132 ashish 4299
          unsetFrom_date();
68 ashish 4300
        } else {
132 ashish 4301
          setFrom_date((Long)value);
68 ashish 4302
        }
4303
        break;
4304
 
132 ashish 4305
      case TO_DATE:
68 ashish 4306
        if (value == null) {
132 ashish 4307
          unsetTo_date();
68 ashish 4308
        } else {
132 ashish 4309
          setTo_date((Long)value);
68 ashish 4310
        }
4311
        break;
4312
 
4313
      case STATUS:
4314
        if (value == null) {
4315
          unsetStatus();
4316
        } else {
4317
          setStatus((TransactionStatus)value);
4318
        }
4319
        break;
4320
 
4321
      }
4322
    }
4323
 
4324
    public void setFieldValue(int fieldID, Object value) {
4325
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4326
    }
4327
 
4328
    public Object getFieldValue(_Fields field) {
4329
      switch (field) {
4330
      case CUSTOMER_ID:
4331
        return new Long(getCustomerId());
4332
 
132 ashish 4333
      case FROM_DATE:
4334
        return new Long(getFrom_date());
68 ashish 4335
 
132 ashish 4336
      case TO_DATE:
4337
        return new Long(getTo_date());
68 ashish 4338
 
4339
      case STATUS:
4340
        return getStatus();
4341
 
4342
      }
4343
      throw new IllegalStateException();
4344
    }
4345
 
4346
    public Object getFieldValue(int fieldId) {
4347
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4348
    }
4349
 
4350
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4351
    public boolean isSet(_Fields field) {
4352
      switch (field) {
4353
      case CUSTOMER_ID:
4354
        return isSetCustomerId();
132 ashish 4355
      case FROM_DATE:
4356
        return isSetFrom_date();
4357
      case TO_DATE:
4358
        return isSetTo_date();
68 ashish 4359
      case STATUS:
4360
        return isSetStatus();
4361
      }
4362
      throw new IllegalStateException();
4363
    }
4364
 
4365
    public boolean isSet(int fieldID) {
4366
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4367
    }
4368
 
4369
    @Override
4370
    public boolean equals(Object that) {
4371
      if (that == null)
4372
        return false;
4373
      if (that instanceof getTransactionsForCustomer_args)
4374
        return this.equals((getTransactionsForCustomer_args)that);
4375
      return false;
4376
    }
4377
 
4378
    public boolean equals(getTransactionsForCustomer_args that) {
4379
      if (that == null)
4380
        return false;
4381
 
4382
      boolean this_present_customerId = true;
4383
      boolean that_present_customerId = true;
4384
      if (this_present_customerId || that_present_customerId) {
4385
        if (!(this_present_customerId && that_present_customerId))
4386
          return false;
4387
        if (this.customerId != that.customerId)
4388
          return false;
4389
      }
4390
 
132 ashish 4391
      boolean this_present_from_date = true;
4392
      boolean that_present_from_date = true;
4393
      if (this_present_from_date || that_present_from_date) {
4394
        if (!(this_present_from_date && that_present_from_date))
68 ashish 4395
          return false;
132 ashish 4396
        if (this.from_date != that.from_date)
68 ashish 4397
          return false;
4398
      }
4399
 
132 ashish 4400
      boolean this_present_to_date = true;
4401
      boolean that_present_to_date = true;
4402
      if (this_present_to_date || that_present_to_date) {
4403
        if (!(this_present_to_date && that_present_to_date))
68 ashish 4404
          return false;
132 ashish 4405
        if (this.to_date != that.to_date)
68 ashish 4406
          return false;
4407
      }
4408
 
4409
      boolean this_present_status = true && this.isSetStatus();
4410
      boolean that_present_status = true && that.isSetStatus();
4411
      if (this_present_status || that_present_status) {
4412
        if (!(this_present_status && that_present_status))
4413
          return false;
4414
        if (!this.status.equals(that.status))
4415
          return false;
4416
      }
4417
 
4418
      return true;
4419
    }
4420
 
4421
    @Override
4422
    public int hashCode() {
4423
      return 0;
4424
    }
4425
 
4426
    public int compareTo(getTransactionsForCustomer_args other) {
4427
      if (!getClass().equals(other.getClass())) {
4428
        return getClass().getName().compareTo(other.getClass().getName());
4429
      }
4430
 
4431
      int lastComparison = 0;
4432
      getTransactionsForCustomer_args typedOther = (getTransactionsForCustomer_args)other;
4433
 
4434
      lastComparison = Boolean.valueOf(isSetCustomerId()).compareTo(isSetCustomerId());
4435
      if (lastComparison != 0) {
4436
        return lastComparison;
4437
      }
4438
      lastComparison = TBaseHelper.compareTo(customerId, typedOther.customerId);
4439
      if (lastComparison != 0) {
4440
        return lastComparison;
4441
      }
132 ashish 4442
      lastComparison = Boolean.valueOf(isSetFrom_date()).compareTo(isSetFrom_date());
68 ashish 4443
      if (lastComparison != 0) {
4444
        return lastComparison;
4445
      }
132 ashish 4446
      lastComparison = TBaseHelper.compareTo(from_date, typedOther.from_date);
68 ashish 4447
      if (lastComparison != 0) {
4448
        return lastComparison;
4449
      }
132 ashish 4450
      lastComparison = Boolean.valueOf(isSetTo_date()).compareTo(isSetTo_date());
68 ashish 4451
      if (lastComparison != 0) {
4452
        return lastComparison;
4453
      }
132 ashish 4454
      lastComparison = TBaseHelper.compareTo(to_date, typedOther.to_date);
68 ashish 4455
      if (lastComparison != 0) {
4456
        return lastComparison;
4457
      }
4458
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
4459
      if (lastComparison != 0) {
4460
        return lastComparison;
4461
      }
4462
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
4463
      if (lastComparison != 0) {
4464
        return lastComparison;
4465
      }
4466
      return 0;
4467
    }
4468
 
4469
    public void read(TProtocol iprot) throws TException {
4470
      TField field;
4471
      iprot.readStructBegin();
4472
      while (true)
4473
      {
4474
        field = iprot.readFieldBegin();
4475
        if (field.type == TType.STOP) { 
4476
          break;
4477
        }
4478
        _Fields fieldId = _Fields.findByThriftId(field.id);
4479
        if (fieldId == null) {
4480
          TProtocolUtil.skip(iprot, field.type);
4481
        } else {
4482
          switch (fieldId) {
4483
            case CUSTOMER_ID:
4484
              if (field.type == TType.I64) {
4485
                this.customerId = iprot.readI64();
4486
                setCustomerIdIsSet(true);
4487
              } else { 
4488
                TProtocolUtil.skip(iprot, field.type);
4489
              }
4490
              break;
132 ashish 4491
            case FROM_DATE:
68 ashish 4492
              if (field.type == TType.I64) {
132 ashish 4493
                this.from_date = iprot.readI64();
4494
                setFrom_dateIsSet(true);
68 ashish 4495
              } else { 
4496
                TProtocolUtil.skip(iprot, field.type);
4497
              }
4498
              break;
132 ashish 4499
            case TO_DATE:
68 ashish 4500
              if (field.type == TType.I64) {
132 ashish 4501
                this.to_date = iprot.readI64();
4502
                setTo_dateIsSet(true);
68 ashish 4503
              } else { 
4504
                TProtocolUtil.skip(iprot, field.type);
4505
              }
4506
              break;
4507
            case STATUS:
4508
              if (field.type == TType.I32) {
4509
                this.status = TransactionStatus.findByValue(iprot.readI32());
4510
              } else { 
4511
                TProtocolUtil.skip(iprot, field.type);
4512
              }
4513
              break;
4514
          }
4515
          iprot.readFieldEnd();
4516
        }
4517
      }
4518
      iprot.readStructEnd();
4519
      validate();
4520
    }
4521
 
4522
    public void write(TProtocol oprot) throws TException {
4523
      validate();
4524
 
4525
      oprot.writeStructBegin(STRUCT_DESC);
4526
      oprot.writeFieldBegin(CUSTOMER_ID_FIELD_DESC);
4527
      oprot.writeI64(this.customerId);
4528
      oprot.writeFieldEnd();
132 ashish 4529
      oprot.writeFieldBegin(FROM_DATE_FIELD_DESC);
4530
      oprot.writeI64(this.from_date);
68 ashish 4531
      oprot.writeFieldEnd();
132 ashish 4532
      oprot.writeFieldBegin(TO_DATE_FIELD_DESC);
4533
      oprot.writeI64(this.to_date);
68 ashish 4534
      oprot.writeFieldEnd();
4535
      if (this.status != null) {
4536
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
4537
        oprot.writeI32(this.status.getValue());
4538
        oprot.writeFieldEnd();
4539
      }
4540
      oprot.writeFieldStop();
4541
      oprot.writeStructEnd();
4542
    }
4543
 
4544
    @Override
4545
    public String toString() {
4546
      StringBuilder sb = new StringBuilder("getTransactionsForCustomer_args(");
4547
      boolean first = true;
4548
 
4549
      sb.append("customerId:");
4550
      sb.append(this.customerId);
4551
      first = false;
4552
      if (!first) sb.append(", ");
132 ashish 4553
      sb.append("from_date:");
4554
      sb.append(this.from_date);
68 ashish 4555
      first = false;
4556
      if (!first) sb.append(", ");
132 ashish 4557
      sb.append("to_date:");
4558
      sb.append(this.to_date);
68 ashish 4559
      first = false;
4560
      if (!first) sb.append(", ");
4561
      sb.append("status:");
4562
      if (this.status == null) {
4563
        sb.append("null");
4564
      } else {
4565
        String status_name = status.name();
4566
        if (status_name != null) {
4567
          sb.append(status_name);
4568
          sb.append(" (");
4569
        }
4570
        sb.append(this.status);
4571
        if (status_name != null) {
4572
          sb.append(")");
4573
        }
4574
      }
4575
      first = false;
4576
      sb.append(")");
4577
      return sb.toString();
4578
    }
4579
 
4580
    public void validate() throws TException {
4581
      // check for required fields
4582
    }
4583
 
4584
  }
4585
 
684 chandransh 4586
  public static class getTransactionsForCustomer_result implements TBase<getTransactionsForCustomer_result._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionsForCustomer_result>   {
68 ashish 4587
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionsForCustomer_result");
4588
 
4589
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
4590
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
4591
 
4592
    private List<Transaction> success;
4593
    private TransactionServiceException ex;
4594
 
4595
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4596
    public enum _Fields implements TFieldIdEnum {
4597
      SUCCESS((short)0, "success"),
4598
      EX((short)1, "ex");
4599
 
4600
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4601
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4602
 
4603
      static {
4604
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4605
          byId.put((int)field._thriftId, field);
4606
          byName.put(field.getFieldName(), field);
4607
        }
4608
      }
4609
 
4610
      /**
4611
       * Find the _Fields constant that matches fieldId, or null if its not found.
4612
       */
4613
      public static _Fields findByThriftId(int fieldId) {
4614
        return byId.get(fieldId);
4615
      }
4616
 
4617
      /**
4618
       * Find the _Fields constant that matches fieldId, throwing an exception
4619
       * if it is not found.
4620
       */
4621
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4622
        _Fields fields = findByThriftId(fieldId);
4623
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4624
        return fields;
4625
      }
4626
 
4627
      /**
4628
       * Find the _Fields constant that matches name, or null if its not found.
4629
       */
4630
      public static _Fields findByName(String name) {
4631
        return byName.get(name);
4632
      }
4633
 
4634
      private final short _thriftId;
4635
      private final String _fieldName;
4636
 
4637
      _Fields(short thriftId, String fieldName) {
4638
        _thriftId = thriftId;
4639
        _fieldName = fieldName;
4640
      }
4641
 
4642
      public short getThriftFieldId() {
4643
        return _thriftId;
4644
      }
4645
 
4646
      public String getFieldName() {
4647
        return _fieldName;
4648
      }
4649
    }
4650
 
4651
    // isset id assignments
4652
 
4653
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
4654
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
4655
          new ListMetaData(TType.LIST, 
4656
              new StructMetaData(TType.STRUCT, Transaction.class))));
4657
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
4658
          new FieldValueMetaData(TType.STRUCT)));
4659
    }});
4660
 
4661
    static {
4662
      FieldMetaData.addStructMetaDataMap(getTransactionsForCustomer_result.class, metaDataMap);
4663
    }
4664
 
4665
    public getTransactionsForCustomer_result() {
4666
    }
4667
 
4668
    public getTransactionsForCustomer_result(
4669
      List<Transaction> success,
4670
      TransactionServiceException ex)
4671
    {
4672
      this();
4673
      this.success = success;
4674
      this.ex = ex;
4675
    }
4676
 
4677
    /**
4678
     * Performs a deep copy on <i>other</i>.
4679
     */
4680
    public getTransactionsForCustomer_result(getTransactionsForCustomer_result other) {
4681
      if (other.isSetSuccess()) {
4682
        List<Transaction> __this__success = new ArrayList<Transaction>();
4683
        for (Transaction other_element : other.success) {
4684
          __this__success.add(new Transaction(other_element));
4685
        }
4686
        this.success = __this__success;
4687
      }
4688
      if (other.isSetEx()) {
4689
        this.ex = new TransactionServiceException(other.ex);
4690
      }
4691
    }
4692
 
4693
    public getTransactionsForCustomer_result deepCopy() {
4694
      return new getTransactionsForCustomer_result(this);
4695
    }
4696
 
4697
    @Deprecated
4698
    public getTransactionsForCustomer_result clone() {
4699
      return new getTransactionsForCustomer_result(this);
4700
    }
4701
 
4702
    public int getSuccessSize() {
4703
      return (this.success == null) ? 0 : this.success.size();
4704
    }
4705
 
4706
    public java.util.Iterator<Transaction> getSuccessIterator() {
4707
      return (this.success == null) ? null : this.success.iterator();
4708
    }
4709
 
4710
    public void addToSuccess(Transaction elem) {
4711
      if (this.success == null) {
4712
        this.success = new ArrayList<Transaction>();
4713
      }
4714
      this.success.add(elem);
4715
    }
4716
 
4717
    public List<Transaction> getSuccess() {
4718
      return this.success;
4719
    }
4720
 
4721
    public getTransactionsForCustomer_result setSuccess(List<Transaction> success) {
4722
      this.success = success;
4723
      return this;
4724
    }
4725
 
4726
    public void unsetSuccess() {
4727
      this.success = null;
4728
    }
4729
 
4730
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
4731
    public boolean isSetSuccess() {
4732
      return this.success != null;
4733
    }
4734
 
4735
    public void setSuccessIsSet(boolean value) {
4736
      if (!value) {
4737
        this.success = null;
4738
      }
4739
    }
4740
 
4741
    public TransactionServiceException getEx() {
4742
      return this.ex;
4743
    }
4744
 
4745
    public getTransactionsForCustomer_result setEx(TransactionServiceException ex) {
4746
      this.ex = ex;
4747
      return this;
4748
    }
4749
 
4750
    public void unsetEx() {
4751
      this.ex = null;
4752
    }
4753
 
4754
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
4755
    public boolean isSetEx() {
4756
      return this.ex != null;
4757
    }
4758
 
4759
    public void setExIsSet(boolean value) {
4760
      if (!value) {
4761
        this.ex = null;
4762
      }
4763
    }
4764
 
4765
    public void setFieldValue(_Fields field, Object value) {
4766
      switch (field) {
4767
      case SUCCESS:
4768
        if (value == null) {
4769
          unsetSuccess();
4770
        } else {
4771
          setSuccess((List<Transaction>)value);
4772
        }
4773
        break;
4774
 
4775
      case EX:
4776
        if (value == null) {
4777
          unsetEx();
4778
        } else {
4779
          setEx((TransactionServiceException)value);
4780
        }
4781
        break;
4782
 
4783
      }
4784
    }
4785
 
4786
    public void setFieldValue(int fieldID, Object value) {
4787
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4788
    }
4789
 
4790
    public Object getFieldValue(_Fields field) {
4791
      switch (field) {
4792
      case SUCCESS:
4793
        return getSuccess();
4794
 
4795
      case EX:
4796
        return getEx();
4797
 
4798
      }
4799
      throw new IllegalStateException();
4800
    }
4801
 
4802
    public Object getFieldValue(int fieldId) {
4803
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4804
    }
4805
 
4806
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4807
    public boolean isSet(_Fields field) {
4808
      switch (field) {
4809
      case SUCCESS:
4810
        return isSetSuccess();
4811
      case EX:
4812
        return isSetEx();
4813
      }
4814
      throw new IllegalStateException();
4815
    }
4816
 
4817
    public boolean isSet(int fieldID) {
4818
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4819
    }
4820
 
4821
    @Override
4822
    public boolean equals(Object that) {
4823
      if (that == null)
4824
        return false;
4825
      if (that instanceof getTransactionsForCustomer_result)
4826
        return this.equals((getTransactionsForCustomer_result)that);
4827
      return false;
4828
    }
4829
 
4830
    public boolean equals(getTransactionsForCustomer_result that) {
4831
      if (that == null)
4832
        return false;
4833
 
4834
      boolean this_present_success = true && this.isSetSuccess();
4835
      boolean that_present_success = true && that.isSetSuccess();
4836
      if (this_present_success || that_present_success) {
4837
        if (!(this_present_success && that_present_success))
4838
          return false;
4839
        if (!this.success.equals(that.success))
4840
          return false;
4841
      }
4842
 
4843
      boolean this_present_ex = true && this.isSetEx();
4844
      boolean that_present_ex = true && that.isSetEx();
4845
      if (this_present_ex || that_present_ex) {
4846
        if (!(this_present_ex && that_present_ex))
4847
          return false;
4848
        if (!this.ex.equals(that.ex))
4849
          return false;
4850
      }
4851
 
4852
      return true;
4853
    }
4854
 
4855
    @Override
4856
    public int hashCode() {
4857
      return 0;
4858
    }
4859
 
684 chandransh 4860
    public int compareTo(getTransactionsForCustomer_result other) {
4861
      if (!getClass().equals(other.getClass())) {
4862
        return getClass().getName().compareTo(other.getClass().getName());
4863
      }
4864
 
4865
      int lastComparison = 0;
4866
      getTransactionsForCustomer_result typedOther = (getTransactionsForCustomer_result)other;
4867
 
4868
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
4869
      if (lastComparison != 0) {
4870
        return lastComparison;
4871
      }
4872
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
4873
      if (lastComparison != 0) {
4874
        return lastComparison;
4875
      }
4876
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
4877
      if (lastComparison != 0) {
4878
        return lastComparison;
4879
      }
4880
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
4881
      if (lastComparison != 0) {
4882
        return lastComparison;
4883
      }
4884
      return 0;
4885
    }
4886
 
68 ashish 4887
    public void read(TProtocol iprot) throws TException {
4888
      TField field;
4889
      iprot.readStructBegin();
4890
      while (true)
4891
      {
4892
        field = iprot.readFieldBegin();
4893
        if (field.type == TType.STOP) { 
4894
          break;
4895
        }
4896
        _Fields fieldId = _Fields.findByThriftId(field.id);
4897
        if (fieldId == null) {
4898
          TProtocolUtil.skip(iprot, field.type);
4899
        } else {
4900
          switch (fieldId) {
4901
            case SUCCESS:
4902
              if (field.type == TType.LIST) {
4903
                {
684 chandransh 4904
                  TList _list8 = iprot.readListBegin();
4905
                  this.success = new ArrayList<Transaction>(_list8.size);
4906
                  for (int _i9 = 0; _i9 < _list8.size; ++_i9)
68 ashish 4907
                  {
684 chandransh 4908
                    Transaction _elem10;
4909
                    _elem10 = new Transaction();
4910
                    _elem10.read(iprot);
4911
                    this.success.add(_elem10);
68 ashish 4912
                  }
4913
                  iprot.readListEnd();
4914
                }
4915
              } else { 
4916
                TProtocolUtil.skip(iprot, field.type);
4917
              }
4918
              break;
4919
            case EX:
4920
              if (field.type == TType.STRUCT) {
4921
                this.ex = new TransactionServiceException();
4922
                this.ex.read(iprot);
4923
              } else { 
4924
                TProtocolUtil.skip(iprot, field.type);
4925
              }
4926
              break;
4927
          }
4928
          iprot.readFieldEnd();
4929
        }
4930
      }
4931
      iprot.readStructEnd();
4932
      validate();
4933
    }
4934
 
4935
    public void write(TProtocol oprot) throws TException {
4936
      oprot.writeStructBegin(STRUCT_DESC);
4937
 
4938
      if (this.isSetSuccess()) {
4939
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
4940
        {
4941
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
684 chandransh 4942
          for (Transaction _iter11 : this.success)
68 ashish 4943
          {
684 chandransh 4944
            _iter11.write(oprot);
68 ashish 4945
          }
4946
          oprot.writeListEnd();
4947
        }
4948
        oprot.writeFieldEnd();
4949
      } else if (this.isSetEx()) {
4950
        oprot.writeFieldBegin(EX_FIELD_DESC);
4951
        this.ex.write(oprot);
4952
        oprot.writeFieldEnd();
4953
      }
4954
      oprot.writeFieldStop();
4955
      oprot.writeStructEnd();
4956
    }
4957
 
4958
    @Override
4959
    public String toString() {
4960
      StringBuilder sb = new StringBuilder("getTransactionsForCustomer_result(");
4961
      boolean first = true;
4962
 
4963
      sb.append("success:");
4964
      if (this.success == null) {
4965
        sb.append("null");
4966
      } else {
4967
        sb.append(this.success);
4968
      }
4969
      first = false;
4970
      if (!first) sb.append(", ");
4971
      sb.append("ex:");
4972
      if (this.ex == null) {
4973
        sb.append("null");
4974
      } else {
4975
        sb.append(this.ex);
4976
      }
4977
      first = false;
4978
      sb.append(")");
4979
      return sb.toString();
4980
    }
4981
 
4982
    public void validate() throws TException {
4983
      // check for required fields
4984
    }
4985
 
4986
  }
4987
 
132 ashish 4988
  public static class getTransactionsForShoppingCartId_args implements TBase<getTransactionsForShoppingCartId_args._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionsForShoppingCartId_args>   {
4989
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionsForShoppingCartId_args");
4990
 
4991
    private static final TField SHOPPING_CART_ID_FIELD_DESC = new TField("shoppingCartId", TType.I64, (short)1);
4992
 
4993
    private long shoppingCartId;
4994
 
4995
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4996
    public enum _Fields implements TFieldIdEnum {
4997
      SHOPPING_CART_ID((short)1, "shoppingCartId");
4998
 
4999
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5000
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5001
 
5002
      static {
5003
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5004
          byId.put((int)field._thriftId, field);
5005
          byName.put(field.getFieldName(), field);
5006
        }
5007
      }
5008
 
5009
      /**
5010
       * Find the _Fields constant that matches fieldId, or null if its not found.
5011
       */
5012
      public static _Fields findByThriftId(int fieldId) {
5013
        return byId.get(fieldId);
5014
      }
5015
 
5016
      /**
5017
       * Find the _Fields constant that matches fieldId, throwing an exception
5018
       * if it is not found.
5019
       */
5020
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5021
        _Fields fields = findByThriftId(fieldId);
5022
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5023
        return fields;
5024
      }
5025
 
5026
      /**
5027
       * Find the _Fields constant that matches name, or null if its not found.
5028
       */
5029
      public static _Fields findByName(String name) {
5030
        return byName.get(name);
5031
      }
5032
 
5033
      private final short _thriftId;
5034
      private final String _fieldName;
5035
 
5036
      _Fields(short thriftId, String fieldName) {
5037
        _thriftId = thriftId;
5038
        _fieldName = fieldName;
5039
      }
5040
 
5041
      public short getThriftFieldId() {
5042
        return _thriftId;
5043
      }
5044
 
5045
      public String getFieldName() {
5046
        return _fieldName;
5047
      }
5048
    }
5049
 
5050
    // isset id assignments
5051
    private static final int __SHOPPINGCARTID_ISSET_ID = 0;
5052
    private BitSet __isset_bit_vector = new BitSet(1);
5053
 
5054
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
5055
      put(_Fields.SHOPPING_CART_ID, new FieldMetaData("shoppingCartId", TFieldRequirementType.DEFAULT, 
5056
          new FieldValueMetaData(TType.I64)));
5057
    }});
5058
 
5059
    static {
5060
      FieldMetaData.addStructMetaDataMap(getTransactionsForShoppingCartId_args.class, metaDataMap);
5061
    }
5062
 
5063
    public getTransactionsForShoppingCartId_args() {
5064
    }
5065
 
5066
    public getTransactionsForShoppingCartId_args(
5067
      long shoppingCartId)
5068
    {
5069
      this();
5070
      this.shoppingCartId = shoppingCartId;
5071
      setShoppingCartIdIsSet(true);
5072
    }
5073
 
5074
    /**
5075
     * Performs a deep copy on <i>other</i>.
5076
     */
5077
    public getTransactionsForShoppingCartId_args(getTransactionsForShoppingCartId_args other) {
5078
      __isset_bit_vector.clear();
5079
      __isset_bit_vector.or(other.__isset_bit_vector);
5080
      this.shoppingCartId = other.shoppingCartId;
5081
    }
5082
 
5083
    public getTransactionsForShoppingCartId_args deepCopy() {
5084
      return new getTransactionsForShoppingCartId_args(this);
5085
    }
5086
 
5087
    @Deprecated
5088
    public getTransactionsForShoppingCartId_args clone() {
5089
      return new getTransactionsForShoppingCartId_args(this);
5090
    }
5091
 
5092
    public long getShoppingCartId() {
5093
      return this.shoppingCartId;
5094
    }
5095
 
5096
    public getTransactionsForShoppingCartId_args setShoppingCartId(long shoppingCartId) {
5097
      this.shoppingCartId = shoppingCartId;
5098
      setShoppingCartIdIsSet(true);
5099
      return this;
5100
    }
5101
 
5102
    public void unsetShoppingCartId() {
5103
      __isset_bit_vector.clear(__SHOPPINGCARTID_ISSET_ID);
5104
    }
5105
 
5106
    /** Returns true if field shoppingCartId is set (has been asigned a value) and false otherwise */
5107
    public boolean isSetShoppingCartId() {
5108
      return __isset_bit_vector.get(__SHOPPINGCARTID_ISSET_ID);
5109
    }
5110
 
5111
    public void setShoppingCartIdIsSet(boolean value) {
5112
      __isset_bit_vector.set(__SHOPPINGCARTID_ISSET_ID, value);
5113
    }
5114
 
5115
    public void setFieldValue(_Fields field, Object value) {
5116
      switch (field) {
5117
      case SHOPPING_CART_ID:
5118
        if (value == null) {
5119
          unsetShoppingCartId();
5120
        } else {
5121
          setShoppingCartId((Long)value);
5122
        }
5123
        break;
5124
 
5125
      }
5126
    }
5127
 
5128
    public void setFieldValue(int fieldID, Object value) {
5129
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5130
    }
5131
 
5132
    public Object getFieldValue(_Fields field) {
5133
      switch (field) {
5134
      case SHOPPING_CART_ID:
5135
        return new Long(getShoppingCartId());
5136
 
5137
      }
5138
      throw new IllegalStateException();
5139
    }
5140
 
5141
    public Object getFieldValue(int fieldId) {
5142
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5143
    }
5144
 
5145
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5146
    public boolean isSet(_Fields field) {
5147
      switch (field) {
5148
      case SHOPPING_CART_ID:
5149
        return isSetShoppingCartId();
5150
      }
5151
      throw new IllegalStateException();
5152
    }
5153
 
5154
    public boolean isSet(int fieldID) {
5155
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5156
    }
5157
 
5158
    @Override
5159
    public boolean equals(Object that) {
5160
      if (that == null)
5161
        return false;
5162
      if (that instanceof getTransactionsForShoppingCartId_args)
5163
        return this.equals((getTransactionsForShoppingCartId_args)that);
5164
      return false;
5165
    }
5166
 
5167
    public boolean equals(getTransactionsForShoppingCartId_args that) {
5168
      if (that == null)
5169
        return false;
5170
 
5171
      boolean this_present_shoppingCartId = true;
5172
      boolean that_present_shoppingCartId = true;
5173
      if (this_present_shoppingCartId || that_present_shoppingCartId) {
5174
        if (!(this_present_shoppingCartId && that_present_shoppingCartId))
5175
          return false;
5176
        if (this.shoppingCartId != that.shoppingCartId)
5177
          return false;
5178
      }
5179
 
5180
      return true;
5181
    }
5182
 
5183
    @Override
5184
    public int hashCode() {
5185
      return 0;
5186
    }
5187
 
5188
    public int compareTo(getTransactionsForShoppingCartId_args other) {
5189
      if (!getClass().equals(other.getClass())) {
5190
        return getClass().getName().compareTo(other.getClass().getName());
5191
      }
5192
 
5193
      int lastComparison = 0;
5194
      getTransactionsForShoppingCartId_args typedOther = (getTransactionsForShoppingCartId_args)other;
5195
 
5196
      lastComparison = Boolean.valueOf(isSetShoppingCartId()).compareTo(isSetShoppingCartId());
5197
      if (lastComparison != 0) {
5198
        return lastComparison;
5199
      }
5200
      lastComparison = TBaseHelper.compareTo(shoppingCartId, typedOther.shoppingCartId);
5201
      if (lastComparison != 0) {
5202
        return lastComparison;
5203
      }
5204
      return 0;
5205
    }
5206
 
5207
    public void read(TProtocol iprot) throws TException {
5208
      TField field;
5209
      iprot.readStructBegin();
5210
      while (true)
5211
      {
5212
        field = iprot.readFieldBegin();
5213
        if (field.type == TType.STOP) { 
5214
          break;
5215
        }
5216
        _Fields fieldId = _Fields.findByThriftId(field.id);
5217
        if (fieldId == null) {
5218
          TProtocolUtil.skip(iprot, field.type);
5219
        } else {
5220
          switch (fieldId) {
5221
            case SHOPPING_CART_ID:
5222
              if (field.type == TType.I64) {
5223
                this.shoppingCartId = iprot.readI64();
5224
                setShoppingCartIdIsSet(true);
5225
              } else { 
5226
                TProtocolUtil.skip(iprot, field.type);
5227
              }
5228
              break;
5229
          }
5230
          iprot.readFieldEnd();
5231
        }
5232
      }
5233
      iprot.readStructEnd();
5234
      validate();
5235
    }
5236
 
5237
    public void write(TProtocol oprot) throws TException {
5238
      validate();
5239
 
5240
      oprot.writeStructBegin(STRUCT_DESC);
5241
      oprot.writeFieldBegin(SHOPPING_CART_ID_FIELD_DESC);
5242
      oprot.writeI64(this.shoppingCartId);
5243
      oprot.writeFieldEnd();
5244
      oprot.writeFieldStop();
5245
      oprot.writeStructEnd();
5246
    }
5247
 
5248
    @Override
5249
    public String toString() {
5250
      StringBuilder sb = new StringBuilder("getTransactionsForShoppingCartId_args(");
5251
      boolean first = true;
5252
 
5253
      sb.append("shoppingCartId:");
5254
      sb.append(this.shoppingCartId);
5255
      first = false;
5256
      sb.append(")");
5257
      return sb.toString();
5258
    }
5259
 
5260
    public void validate() throws TException {
5261
      // check for required fields
5262
    }
5263
 
5264
  }
5265
 
684 chandransh 5266
  public static class getTransactionsForShoppingCartId_result implements TBase<getTransactionsForShoppingCartId_result._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionsForShoppingCartId_result>   {
132 ashish 5267
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionsForShoppingCartId_result");
5268
 
5269
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
5270
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
5271
 
5272
    private List<Transaction> success;
5273
    private TransactionServiceException ex;
5274
 
5275
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5276
    public enum _Fields implements TFieldIdEnum {
5277
      SUCCESS((short)0, "success"),
5278
      EX((short)1, "ex");
5279
 
5280
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5281
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5282
 
5283
      static {
5284
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5285
          byId.put((int)field._thriftId, field);
5286
          byName.put(field.getFieldName(), field);
5287
        }
5288
      }
5289
 
5290
      /**
5291
       * Find the _Fields constant that matches fieldId, or null if its not found.
5292
       */
5293
      public static _Fields findByThriftId(int fieldId) {
5294
        return byId.get(fieldId);
5295
      }
5296
 
5297
      /**
5298
       * Find the _Fields constant that matches fieldId, throwing an exception
5299
       * if it is not found.
5300
       */
5301
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5302
        _Fields fields = findByThriftId(fieldId);
5303
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5304
        return fields;
5305
      }
5306
 
5307
      /**
5308
       * Find the _Fields constant that matches name, or null if its not found.
5309
       */
5310
      public static _Fields findByName(String name) {
5311
        return byName.get(name);
5312
      }
5313
 
5314
      private final short _thriftId;
5315
      private final String _fieldName;
5316
 
5317
      _Fields(short thriftId, String fieldName) {
5318
        _thriftId = thriftId;
5319
        _fieldName = fieldName;
5320
      }
5321
 
5322
      public short getThriftFieldId() {
5323
        return _thriftId;
5324
      }
5325
 
5326
      public String getFieldName() {
5327
        return _fieldName;
5328
      }
5329
    }
5330
 
5331
    // isset id assignments
5332
 
5333
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
5334
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
5335
          new ListMetaData(TType.LIST, 
5336
              new StructMetaData(TType.STRUCT, Transaction.class))));
5337
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
5338
          new FieldValueMetaData(TType.STRUCT)));
5339
    }});
5340
 
5341
    static {
5342
      FieldMetaData.addStructMetaDataMap(getTransactionsForShoppingCartId_result.class, metaDataMap);
5343
    }
5344
 
5345
    public getTransactionsForShoppingCartId_result() {
5346
    }
5347
 
5348
    public getTransactionsForShoppingCartId_result(
5349
      List<Transaction> success,
5350
      TransactionServiceException ex)
5351
    {
5352
      this();
5353
      this.success = success;
5354
      this.ex = ex;
5355
    }
5356
 
5357
    /**
5358
     * Performs a deep copy on <i>other</i>.
5359
     */
5360
    public getTransactionsForShoppingCartId_result(getTransactionsForShoppingCartId_result other) {
5361
      if (other.isSetSuccess()) {
5362
        List<Transaction> __this__success = new ArrayList<Transaction>();
5363
        for (Transaction other_element : other.success) {
5364
          __this__success.add(new Transaction(other_element));
5365
        }
5366
        this.success = __this__success;
5367
      }
5368
      if (other.isSetEx()) {
5369
        this.ex = new TransactionServiceException(other.ex);
5370
      }
5371
    }
5372
 
5373
    public getTransactionsForShoppingCartId_result deepCopy() {
5374
      return new getTransactionsForShoppingCartId_result(this);
5375
    }
5376
 
5377
    @Deprecated
5378
    public getTransactionsForShoppingCartId_result clone() {
5379
      return new getTransactionsForShoppingCartId_result(this);
5380
    }
5381
 
5382
    public int getSuccessSize() {
5383
      return (this.success == null) ? 0 : this.success.size();
5384
    }
5385
 
5386
    public java.util.Iterator<Transaction> getSuccessIterator() {
5387
      return (this.success == null) ? null : this.success.iterator();
5388
    }
5389
 
5390
    public void addToSuccess(Transaction elem) {
5391
      if (this.success == null) {
5392
        this.success = new ArrayList<Transaction>();
5393
      }
5394
      this.success.add(elem);
5395
    }
5396
 
5397
    public List<Transaction> getSuccess() {
5398
      return this.success;
5399
    }
5400
 
5401
    public getTransactionsForShoppingCartId_result setSuccess(List<Transaction> success) {
5402
      this.success = success;
5403
      return this;
5404
    }
5405
 
5406
    public void unsetSuccess() {
5407
      this.success = null;
5408
    }
5409
 
5410
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
5411
    public boolean isSetSuccess() {
5412
      return this.success != null;
5413
    }
5414
 
5415
    public void setSuccessIsSet(boolean value) {
5416
      if (!value) {
5417
        this.success = null;
5418
      }
5419
    }
5420
 
5421
    public TransactionServiceException getEx() {
5422
      return this.ex;
5423
    }
5424
 
5425
    public getTransactionsForShoppingCartId_result setEx(TransactionServiceException ex) {
5426
      this.ex = ex;
5427
      return this;
5428
    }
5429
 
5430
    public void unsetEx() {
5431
      this.ex = null;
5432
    }
5433
 
5434
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
5435
    public boolean isSetEx() {
5436
      return this.ex != null;
5437
    }
5438
 
5439
    public void setExIsSet(boolean value) {
5440
      if (!value) {
5441
        this.ex = null;
5442
      }
5443
    }
5444
 
5445
    public void setFieldValue(_Fields field, Object value) {
5446
      switch (field) {
5447
      case SUCCESS:
5448
        if (value == null) {
5449
          unsetSuccess();
5450
        } else {
5451
          setSuccess((List<Transaction>)value);
5452
        }
5453
        break;
5454
 
5455
      case EX:
5456
        if (value == null) {
5457
          unsetEx();
5458
        } else {
5459
          setEx((TransactionServiceException)value);
5460
        }
5461
        break;
5462
 
5463
      }
5464
    }
5465
 
5466
    public void setFieldValue(int fieldID, Object value) {
5467
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5468
    }
5469
 
5470
    public Object getFieldValue(_Fields field) {
5471
      switch (field) {
5472
      case SUCCESS:
5473
        return getSuccess();
5474
 
5475
      case EX:
5476
        return getEx();
5477
 
5478
      }
5479
      throw new IllegalStateException();
5480
    }
5481
 
5482
    public Object getFieldValue(int fieldId) {
5483
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5484
    }
5485
 
5486
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5487
    public boolean isSet(_Fields field) {
5488
      switch (field) {
5489
      case SUCCESS:
5490
        return isSetSuccess();
5491
      case EX:
5492
        return isSetEx();
5493
      }
5494
      throw new IllegalStateException();
5495
    }
5496
 
5497
    public boolean isSet(int fieldID) {
5498
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5499
    }
5500
 
5501
    @Override
5502
    public boolean equals(Object that) {
5503
      if (that == null)
5504
        return false;
5505
      if (that instanceof getTransactionsForShoppingCartId_result)
5506
        return this.equals((getTransactionsForShoppingCartId_result)that);
5507
      return false;
5508
    }
5509
 
5510
    public boolean equals(getTransactionsForShoppingCartId_result that) {
5511
      if (that == null)
5512
        return false;
5513
 
5514
      boolean this_present_success = true && this.isSetSuccess();
5515
      boolean that_present_success = true && that.isSetSuccess();
5516
      if (this_present_success || that_present_success) {
5517
        if (!(this_present_success && that_present_success))
5518
          return false;
5519
        if (!this.success.equals(that.success))
5520
          return false;
5521
      }
5522
 
5523
      boolean this_present_ex = true && this.isSetEx();
5524
      boolean that_present_ex = true && that.isSetEx();
5525
      if (this_present_ex || that_present_ex) {
5526
        if (!(this_present_ex && that_present_ex))
5527
          return false;
5528
        if (!this.ex.equals(that.ex))
5529
          return false;
5530
      }
5531
 
5532
      return true;
5533
    }
5534
 
5535
    @Override
5536
    public int hashCode() {
5537
      return 0;
5538
    }
5539
 
684 chandransh 5540
    public int compareTo(getTransactionsForShoppingCartId_result other) {
5541
      if (!getClass().equals(other.getClass())) {
5542
        return getClass().getName().compareTo(other.getClass().getName());
5543
      }
5544
 
5545
      int lastComparison = 0;
5546
      getTransactionsForShoppingCartId_result typedOther = (getTransactionsForShoppingCartId_result)other;
5547
 
5548
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
5549
      if (lastComparison != 0) {
5550
        return lastComparison;
5551
      }
5552
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
5553
      if (lastComparison != 0) {
5554
        return lastComparison;
5555
      }
5556
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
5557
      if (lastComparison != 0) {
5558
        return lastComparison;
5559
      }
5560
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
5561
      if (lastComparison != 0) {
5562
        return lastComparison;
5563
      }
5564
      return 0;
5565
    }
5566
 
132 ashish 5567
    public void read(TProtocol iprot) throws TException {
5568
      TField field;
5569
      iprot.readStructBegin();
5570
      while (true)
5571
      {
5572
        field = iprot.readFieldBegin();
5573
        if (field.type == TType.STOP) { 
5574
          break;
5575
        }
5576
        _Fields fieldId = _Fields.findByThriftId(field.id);
5577
        if (fieldId == null) {
5578
          TProtocolUtil.skip(iprot, field.type);
5579
        } else {
5580
          switch (fieldId) {
5581
            case SUCCESS:
5582
              if (field.type == TType.LIST) {
5583
                {
684 chandransh 5584
                  TList _list12 = iprot.readListBegin();
5585
                  this.success = new ArrayList<Transaction>(_list12.size);
5586
                  for (int _i13 = 0; _i13 < _list12.size; ++_i13)
132 ashish 5587
                  {
684 chandransh 5588
                    Transaction _elem14;
5589
                    _elem14 = new Transaction();
5590
                    _elem14.read(iprot);
5591
                    this.success.add(_elem14);
132 ashish 5592
                  }
5593
                  iprot.readListEnd();
5594
                }
5595
              } else { 
5596
                TProtocolUtil.skip(iprot, field.type);
5597
              }
5598
              break;
5599
            case EX:
5600
              if (field.type == TType.STRUCT) {
5601
                this.ex = new TransactionServiceException();
5602
                this.ex.read(iprot);
5603
              } else { 
5604
                TProtocolUtil.skip(iprot, field.type);
5605
              }
5606
              break;
5607
          }
5608
          iprot.readFieldEnd();
5609
        }
5610
      }
5611
      iprot.readStructEnd();
5612
      validate();
5613
    }
5614
 
5615
    public void write(TProtocol oprot) throws TException {
5616
      oprot.writeStructBegin(STRUCT_DESC);
5617
 
5618
      if (this.isSetSuccess()) {
5619
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
5620
        {
5621
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
684 chandransh 5622
          for (Transaction _iter15 : this.success)
132 ashish 5623
          {
684 chandransh 5624
            _iter15.write(oprot);
132 ashish 5625
          }
5626
          oprot.writeListEnd();
5627
        }
5628
        oprot.writeFieldEnd();
5629
      } else if (this.isSetEx()) {
5630
        oprot.writeFieldBegin(EX_FIELD_DESC);
5631
        this.ex.write(oprot);
5632
        oprot.writeFieldEnd();
5633
      }
5634
      oprot.writeFieldStop();
5635
      oprot.writeStructEnd();
5636
    }
5637
 
5638
    @Override
5639
    public String toString() {
5640
      StringBuilder sb = new StringBuilder("getTransactionsForShoppingCartId_result(");
5641
      boolean first = true;
5642
 
5643
      sb.append("success:");
5644
      if (this.success == null) {
5645
        sb.append("null");
5646
      } else {
5647
        sb.append(this.success);
5648
      }
5649
      first = false;
5650
      if (!first) sb.append(", ");
5651
      sb.append("ex:");
5652
      if (this.ex == null) {
5653
        sb.append("null");
5654
      } else {
5655
        sb.append(this.ex);
5656
      }
5657
      first = false;
5658
      sb.append(")");
5659
      return sb.toString();
5660
    }
5661
 
5662
    public void validate() throws TException {
5663
      // check for required fields
5664
    }
5665
 
5666
  }
5667
 
68 ashish 5668
  public static class getTransactionStatus_args implements TBase<getTransactionStatus_args._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionStatus_args>   {
5669
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionStatus_args");
5670
 
5671
    private static final TField TRANSACTION_ID_FIELD_DESC = new TField("transactionId", TType.I64, (short)1);
5672
 
5673
    private long transactionId;
5674
 
5675
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5676
    public enum _Fields implements TFieldIdEnum {
5677
      TRANSACTION_ID((short)1, "transactionId");
5678
 
5679
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5680
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5681
 
5682
      static {
5683
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5684
          byId.put((int)field._thriftId, field);
5685
          byName.put(field.getFieldName(), field);
5686
        }
5687
      }
5688
 
5689
      /**
5690
       * Find the _Fields constant that matches fieldId, or null if its not found.
5691
       */
5692
      public static _Fields findByThriftId(int fieldId) {
5693
        return byId.get(fieldId);
5694
      }
5695
 
5696
      /**
5697
       * Find the _Fields constant that matches fieldId, throwing an exception
5698
       * if it is not found.
5699
       */
5700
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5701
        _Fields fields = findByThriftId(fieldId);
5702
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5703
        return fields;
5704
      }
5705
 
5706
      /**
5707
       * Find the _Fields constant that matches name, or null if its not found.
5708
       */
5709
      public static _Fields findByName(String name) {
5710
        return byName.get(name);
5711
      }
5712
 
5713
      private final short _thriftId;
5714
      private final String _fieldName;
5715
 
5716
      _Fields(short thriftId, String fieldName) {
5717
        _thriftId = thriftId;
5718
        _fieldName = fieldName;
5719
      }
5720
 
5721
      public short getThriftFieldId() {
5722
        return _thriftId;
5723
      }
5724
 
5725
      public String getFieldName() {
5726
        return _fieldName;
5727
      }
5728
    }
5729
 
5730
    // isset id assignments
5731
    private static final int __TRANSACTIONID_ISSET_ID = 0;
5732
    private BitSet __isset_bit_vector = new BitSet(1);
5733
 
5734
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
5735
      put(_Fields.TRANSACTION_ID, new FieldMetaData("transactionId", TFieldRequirementType.DEFAULT, 
5736
          new FieldValueMetaData(TType.I64)));
5737
    }});
5738
 
5739
    static {
5740
      FieldMetaData.addStructMetaDataMap(getTransactionStatus_args.class, metaDataMap);
5741
    }
5742
 
5743
    public getTransactionStatus_args() {
5744
    }
5745
 
5746
    public getTransactionStatus_args(
5747
      long transactionId)
5748
    {
5749
      this();
5750
      this.transactionId = transactionId;
5751
      setTransactionIdIsSet(true);
5752
    }
5753
 
5754
    /**
5755
     * Performs a deep copy on <i>other</i>.
5756
     */
5757
    public getTransactionStatus_args(getTransactionStatus_args other) {
5758
      __isset_bit_vector.clear();
5759
      __isset_bit_vector.or(other.__isset_bit_vector);
5760
      this.transactionId = other.transactionId;
5761
    }
5762
 
5763
    public getTransactionStatus_args deepCopy() {
5764
      return new getTransactionStatus_args(this);
5765
    }
5766
 
5767
    @Deprecated
5768
    public getTransactionStatus_args clone() {
5769
      return new getTransactionStatus_args(this);
5770
    }
5771
 
5772
    public long getTransactionId() {
5773
      return this.transactionId;
5774
    }
5775
 
5776
    public getTransactionStatus_args setTransactionId(long transactionId) {
5777
      this.transactionId = transactionId;
5778
      setTransactionIdIsSet(true);
5779
      return this;
5780
    }
5781
 
5782
    public void unsetTransactionId() {
5783
      __isset_bit_vector.clear(__TRANSACTIONID_ISSET_ID);
5784
    }
5785
 
5786
    /** Returns true if field transactionId is set (has been asigned a value) and false otherwise */
5787
    public boolean isSetTransactionId() {
5788
      return __isset_bit_vector.get(__TRANSACTIONID_ISSET_ID);
5789
    }
5790
 
5791
    public void setTransactionIdIsSet(boolean value) {
5792
      __isset_bit_vector.set(__TRANSACTIONID_ISSET_ID, value);
5793
    }
5794
 
5795
    public void setFieldValue(_Fields field, Object value) {
5796
      switch (field) {
5797
      case TRANSACTION_ID:
5798
        if (value == null) {
5799
          unsetTransactionId();
5800
        } else {
5801
          setTransactionId((Long)value);
5802
        }
5803
        break;
5804
 
5805
      }
5806
    }
5807
 
5808
    public void setFieldValue(int fieldID, Object value) {
5809
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5810
    }
5811
 
5812
    public Object getFieldValue(_Fields field) {
5813
      switch (field) {
5814
      case TRANSACTION_ID:
5815
        return new Long(getTransactionId());
5816
 
5817
      }
5818
      throw new IllegalStateException();
5819
    }
5820
 
5821
    public Object getFieldValue(int fieldId) {
5822
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5823
    }
5824
 
5825
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5826
    public boolean isSet(_Fields field) {
5827
      switch (field) {
5828
      case TRANSACTION_ID:
5829
        return isSetTransactionId();
5830
      }
5831
      throw new IllegalStateException();
5832
    }
5833
 
5834
    public boolean isSet(int fieldID) {
5835
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5836
    }
5837
 
5838
    @Override
5839
    public boolean equals(Object that) {
5840
      if (that == null)
5841
        return false;
5842
      if (that instanceof getTransactionStatus_args)
5843
        return this.equals((getTransactionStatus_args)that);
5844
      return false;
5845
    }
5846
 
5847
    public boolean equals(getTransactionStatus_args that) {
5848
      if (that == null)
5849
        return false;
5850
 
5851
      boolean this_present_transactionId = true;
5852
      boolean that_present_transactionId = true;
5853
      if (this_present_transactionId || that_present_transactionId) {
5854
        if (!(this_present_transactionId && that_present_transactionId))
5855
          return false;
5856
        if (this.transactionId != that.transactionId)
5857
          return false;
5858
      }
5859
 
5860
      return true;
5861
    }
5862
 
5863
    @Override
5864
    public int hashCode() {
5865
      return 0;
5866
    }
5867
 
5868
    public int compareTo(getTransactionStatus_args other) {
5869
      if (!getClass().equals(other.getClass())) {
5870
        return getClass().getName().compareTo(other.getClass().getName());
5871
      }
5872
 
5873
      int lastComparison = 0;
5874
      getTransactionStatus_args typedOther = (getTransactionStatus_args)other;
5875
 
5876
      lastComparison = Boolean.valueOf(isSetTransactionId()).compareTo(isSetTransactionId());
5877
      if (lastComparison != 0) {
5878
        return lastComparison;
5879
      }
5880
      lastComparison = TBaseHelper.compareTo(transactionId, typedOther.transactionId);
5881
      if (lastComparison != 0) {
5882
        return lastComparison;
5883
      }
5884
      return 0;
5885
    }
5886
 
5887
    public void read(TProtocol iprot) throws TException {
5888
      TField field;
5889
      iprot.readStructBegin();
5890
      while (true)
5891
      {
5892
        field = iprot.readFieldBegin();
5893
        if (field.type == TType.STOP) { 
5894
          break;
5895
        }
5896
        _Fields fieldId = _Fields.findByThriftId(field.id);
5897
        if (fieldId == null) {
5898
          TProtocolUtil.skip(iprot, field.type);
5899
        } else {
5900
          switch (fieldId) {
5901
            case TRANSACTION_ID:
5902
              if (field.type == TType.I64) {
5903
                this.transactionId = iprot.readI64();
5904
                setTransactionIdIsSet(true);
5905
              } else { 
5906
                TProtocolUtil.skip(iprot, field.type);
5907
              }
5908
              break;
5909
          }
5910
          iprot.readFieldEnd();
5911
        }
5912
      }
5913
      iprot.readStructEnd();
5914
      validate();
5915
    }
5916
 
5917
    public void write(TProtocol oprot) throws TException {
5918
      validate();
5919
 
5920
      oprot.writeStructBegin(STRUCT_DESC);
5921
      oprot.writeFieldBegin(TRANSACTION_ID_FIELD_DESC);
5922
      oprot.writeI64(this.transactionId);
5923
      oprot.writeFieldEnd();
5924
      oprot.writeFieldStop();
5925
      oprot.writeStructEnd();
5926
    }
5927
 
5928
    @Override
5929
    public String toString() {
5930
      StringBuilder sb = new StringBuilder("getTransactionStatus_args(");
5931
      boolean first = true;
5932
 
5933
      sb.append("transactionId:");
5934
      sb.append(this.transactionId);
5935
      first = false;
5936
      sb.append(")");
5937
      return sb.toString();
5938
    }
5939
 
5940
    public void validate() throws TException {
5941
      // check for required fields
5942
    }
5943
 
5944
  }
5945
 
5946
  public static class getTransactionStatus_result implements TBase<getTransactionStatus_result._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionStatus_result>   {
5947
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionStatus_result");
5948
 
5949
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I32, (short)0);
5950
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
5951
 
5952
    private TransactionStatus success;
5953
    private TransactionServiceException ex;
5954
 
5955
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5956
    public enum _Fields implements TFieldIdEnum {
5957
      /**
5958
       * 
5959
       * @see TransactionStatus
5960
       */
5961
      SUCCESS((short)0, "success"),
5962
      EX((short)1, "ex");
5963
 
5964
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5965
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5966
 
5967
      static {
5968
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5969
          byId.put((int)field._thriftId, field);
5970
          byName.put(field.getFieldName(), field);
5971
        }
5972
      }
5973
 
5974
      /**
5975
       * Find the _Fields constant that matches fieldId, or null if its not found.
5976
       */
5977
      public static _Fields findByThriftId(int fieldId) {
5978
        return byId.get(fieldId);
5979
      }
5980
 
5981
      /**
5982
       * Find the _Fields constant that matches fieldId, throwing an exception
5983
       * if it is not found.
5984
       */
5985
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5986
        _Fields fields = findByThriftId(fieldId);
5987
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5988
        return fields;
5989
      }
5990
 
5991
      /**
5992
       * Find the _Fields constant that matches name, or null if its not found.
5993
       */
5994
      public static _Fields findByName(String name) {
5995
        return byName.get(name);
5996
      }
5997
 
5998
      private final short _thriftId;
5999
      private final String _fieldName;
6000
 
6001
      _Fields(short thriftId, String fieldName) {
6002
        _thriftId = thriftId;
6003
        _fieldName = fieldName;
6004
      }
6005
 
6006
      public short getThriftFieldId() {
6007
        return _thriftId;
6008
      }
6009
 
6010
      public String getFieldName() {
6011
        return _fieldName;
6012
      }
6013
    }
6014
 
6015
    // isset id assignments
6016
 
6017
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
6018
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
6019
          new EnumMetaData(TType.ENUM, TransactionStatus.class)));
6020
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
6021
          new FieldValueMetaData(TType.STRUCT)));
6022
    }});
6023
 
6024
    static {
6025
      FieldMetaData.addStructMetaDataMap(getTransactionStatus_result.class, metaDataMap);
6026
    }
6027
 
6028
    public getTransactionStatus_result() {
6029
    }
6030
 
6031
    public getTransactionStatus_result(
6032
      TransactionStatus success,
6033
      TransactionServiceException ex)
6034
    {
6035
      this();
6036
      this.success = success;
6037
      this.ex = ex;
6038
    }
6039
 
6040
    /**
6041
     * Performs a deep copy on <i>other</i>.
6042
     */
6043
    public getTransactionStatus_result(getTransactionStatus_result other) {
6044
      if (other.isSetSuccess()) {
6045
        this.success = other.success;
6046
      }
6047
      if (other.isSetEx()) {
6048
        this.ex = new TransactionServiceException(other.ex);
6049
      }
6050
    }
6051
 
6052
    public getTransactionStatus_result deepCopy() {
6053
      return new getTransactionStatus_result(this);
6054
    }
6055
 
6056
    @Deprecated
6057
    public getTransactionStatus_result clone() {
6058
      return new getTransactionStatus_result(this);
6059
    }
6060
 
6061
    /**
6062
     * 
6063
     * @see TransactionStatus
6064
     */
6065
    public TransactionStatus getSuccess() {
6066
      return this.success;
6067
    }
6068
 
6069
    /**
6070
     * 
6071
     * @see TransactionStatus
6072
     */
6073
    public getTransactionStatus_result setSuccess(TransactionStatus success) {
6074
      this.success = success;
6075
      return this;
6076
    }
6077
 
6078
    public void unsetSuccess() {
6079
      this.success = null;
6080
    }
6081
 
6082
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
6083
    public boolean isSetSuccess() {
6084
      return this.success != null;
6085
    }
6086
 
6087
    public void setSuccessIsSet(boolean value) {
6088
      if (!value) {
6089
        this.success = null;
6090
      }
6091
    }
6092
 
6093
    public TransactionServiceException getEx() {
6094
      return this.ex;
6095
    }
6096
 
6097
    public getTransactionStatus_result setEx(TransactionServiceException ex) {
6098
      this.ex = ex;
6099
      return this;
6100
    }
6101
 
6102
    public void unsetEx() {
6103
      this.ex = null;
6104
    }
6105
 
6106
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
6107
    public boolean isSetEx() {
6108
      return this.ex != null;
6109
    }
6110
 
6111
    public void setExIsSet(boolean value) {
6112
      if (!value) {
6113
        this.ex = null;
6114
      }
6115
    }
6116
 
6117
    public void setFieldValue(_Fields field, Object value) {
6118
      switch (field) {
6119
      case SUCCESS:
6120
        if (value == null) {
6121
          unsetSuccess();
6122
        } else {
6123
          setSuccess((TransactionStatus)value);
6124
        }
6125
        break;
6126
 
6127
      case EX:
6128
        if (value == null) {
6129
          unsetEx();
6130
        } else {
6131
          setEx((TransactionServiceException)value);
6132
        }
6133
        break;
6134
 
6135
      }
6136
    }
6137
 
6138
    public void setFieldValue(int fieldID, Object value) {
6139
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
6140
    }
6141
 
6142
    public Object getFieldValue(_Fields field) {
6143
      switch (field) {
6144
      case SUCCESS:
6145
        return getSuccess();
6146
 
6147
      case EX:
6148
        return getEx();
6149
 
6150
      }
6151
      throw new IllegalStateException();
6152
    }
6153
 
6154
    public Object getFieldValue(int fieldId) {
6155
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
6156
    }
6157
 
6158
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
6159
    public boolean isSet(_Fields field) {
6160
      switch (field) {
6161
      case SUCCESS:
6162
        return isSetSuccess();
6163
      case EX:
6164
        return isSetEx();
6165
      }
6166
      throw new IllegalStateException();
6167
    }
6168
 
6169
    public boolean isSet(int fieldID) {
6170
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
6171
    }
6172
 
6173
    @Override
6174
    public boolean equals(Object that) {
6175
      if (that == null)
6176
        return false;
6177
      if (that instanceof getTransactionStatus_result)
6178
        return this.equals((getTransactionStatus_result)that);
6179
      return false;
6180
    }
6181
 
6182
    public boolean equals(getTransactionStatus_result that) {
6183
      if (that == null)
6184
        return false;
6185
 
6186
      boolean this_present_success = true && this.isSetSuccess();
6187
      boolean that_present_success = true && that.isSetSuccess();
6188
      if (this_present_success || that_present_success) {
6189
        if (!(this_present_success && that_present_success))
6190
          return false;
6191
        if (!this.success.equals(that.success))
6192
          return false;
6193
      }
6194
 
6195
      boolean this_present_ex = true && this.isSetEx();
6196
      boolean that_present_ex = true && that.isSetEx();
6197
      if (this_present_ex || that_present_ex) {
6198
        if (!(this_present_ex && that_present_ex))
6199
          return false;
6200
        if (!this.ex.equals(that.ex))
6201
          return false;
6202
      }
6203
 
6204
      return true;
6205
    }
6206
 
6207
    @Override
6208
    public int hashCode() {
6209
      return 0;
6210
    }
6211
 
6212
    public int compareTo(getTransactionStatus_result other) {
6213
      if (!getClass().equals(other.getClass())) {
6214
        return getClass().getName().compareTo(other.getClass().getName());
6215
      }
6216
 
6217
      int lastComparison = 0;
6218
      getTransactionStatus_result typedOther = (getTransactionStatus_result)other;
6219
 
6220
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
6221
      if (lastComparison != 0) {
6222
        return lastComparison;
6223
      }
6224
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
6225
      if (lastComparison != 0) {
6226
        return lastComparison;
6227
      }
6228
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
6229
      if (lastComparison != 0) {
6230
        return lastComparison;
6231
      }
6232
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
6233
      if (lastComparison != 0) {
6234
        return lastComparison;
6235
      }
6236
      return 0;
6237
    }
6238
 
6239
    public void read(TProtocol iprot) throws TException {
6240
      TField field;
6241
      iprot.readStructBegin();
6242
      while (true)
6243
      {
6244
        field = iprot.readFieldBegin();
6245
        if (field.type == TType.STOP) { 
6246
          break;
6247
        }
6248
        _Fields fieldId = _Fields.findByThriftId(field.id);
6249
        if (fieldId == null) {
6250
          TProtocolUtil.skip(iprot, field.type);
6251
        } else {
6252
          switch (fieldId) {
6253
            case SUCCESS:
6254
              if (field.type == TType.I32) {
6255
                this.success = TransactionStatus.findByValue(iprot.readI32());
6256
              } else { 
6257
                TProtocolUtil.skip(iprot, field.type);
6258
              }
6259
              break;
6260
            case EX:
6261
              if (field.type == TType.STRUCT) {
6262
                this.ex = new TransactionServiceException();
6263
                this.ex.read(iprot);
6264
              } else { 
6265
                TProtocolUtil.skip(iprot, field.type);
6266
              }
6267
              break;
6268
          }
6269
          iprot.readFieldEnd();
6270
        }
6271
      }
6272
      iprot.readStructEnd();
6273
      validate();
6274
    }
6275
 
6276
    public void write(TProtocol oprot) throws TException {
6277
      oprot.writeStructBegin(STRUCT_DESC);
6278
 
6279
      if (this.isSetSuccess()) {
6280
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
6281
        oprot.writeI32(this.success.getValue());
6282
        oprot.writeFieldEnd();
6283
      } else if (this.isSetEx()) {
6284
        oprot.writeFieldBegin(EX_FIELD_DESC);
6285
        this.ex.write(oprot);
6286
        oprot.writeFieldEnd();
6287
      }
6288
      oprot.writeFieldStop();
6289
      oprot.writeStructEnd();
6290
    }
6291
 
6292
    @Override
6293
    public String toString() {
6294
      StringBuilder sb = new StringBuilder("getTransactionStatus_result(");
6295
      boolean first = true;
6296
 
6297
      sb.append("success:");
6298
      if (this.success == null) {
6299
        sb.append("null");
6300
      } else {
6301
        String success_name = success.name();
6302
        if (success_name != null) {
6303
          sb.append(success_name);
6304
          sb.append(" (");
6305
        }
6306
        sb.append(this.success);
6307
        if (success_name != null) {
6308
          sb.append(")");
6309
        }
6310
      }
6311
      first = false;
6312
      if (!first) sb.append(", ");
6313
      sb.append("ex:");
6314
      if (this.ex == null) {
6315
        sb.append("null");
6316
      } else {
6317
        sb.append(this.ex);
6318
      }
6319
      first = false;
6320
      sb.append(")");
6321
      return sb.toString();
6322
    }
6323
 
6324
    public void validate() throws TException {
6325
      // check for required fields
6326
    }
6327
 
6328
  }
6329
 
6330
  public static class changeTransactionStatus_args implements TBase<changeTransactionStatus_args._Fields>, java.io.Serializable, Cloneable, Comparable<changeTransactionStatus_args>   {
6331
    private static final TStruct STRUCT_DESC = new TStruct("changeTransactionStatus_args");
6332
 
6333
    private static final TField TRANSACTION_ID_FIELD_DESC = new TField("transactionId", TType.I64, (short)1);
6334
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)2);
6335
    private static final TField DESCRIPTION_FIELD_DESC = new TField("description", TType.STRING, (short)3);
6336
 
6337
    private long transactionId;
6338
    private TransactionStatus status;
6339
    private String description;
6340
 
6341
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6342
    public enum _Fields implements TFieldIdEnum {
6343
      TRANSACTION_ID((short)1, "transactionId"),
6344
      /**
6345
       * 
6346
       * @see TransactionStatus
6347
       */
6348
      STATUS((short)2, "status"),
6349
      DESCRIPTION((short)3, "description");
6350
 
6351
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
6352
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6353
 
6354
      static {
6355
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6356
          byId.put((int)field._thriftId, field);
6357
          byName.put(field.getFieldName(), field);
6358
        }
6359
      }
6360
 
6361
      /**
6362
       * Find the _Fields constant that matches fieldId, or null if its not found.
6363
       */
6364
      public static _Fields findByThriftId(int fieldId) {
6365
        return byId.get(fieldId);
6366
      }
6367
 
6368
      /**
6369
       * Find the _Fields constant that matches fieldId, throwing an exception
6370
       * if it is not found.
6371
       */
6372
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6373
        _Fields fields = findByThriftId(fieldId);
6374
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6375
        return fields;
6376
      }
6377
 
6378
      /**
6379
       * Find the _Fields constant that matches name, or null if its not found.
6380
       */
6381
      public static _Fields findByName(String name) {
6382
        return byName.get(name);
6383
      }
6384
 
6385
      private final short _thriftId;
6386
      private final String _fieldName;
6387
 
6388
      _Fields(short thriftId, String fieldName) {
6389
        _thriftId = thriftId;
6390
        _fieldName = fieldName;
6391
      }
6392
 
6393
      public short getThriftFieldId() {
6394
        return _thriftId;
6395
      }
6396
 
6397
      public String getFieldName() {
6398
        return _fieldName;
6399
      }
6400
    }
6401
 
6402
    // isset id assignments
6403
    private static final int __TRANSACTIONID_ISSET_ID = 0;
6404
    private BitSet __isset_bit_vector = new BitSet(1);
6405
 
6406
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
6407
      put(_Fields.TRANSACTION_ID, new FieldMetaData("transactionId", TFieldRequirementType.DEFAULT, 
6408
          new FieldValueMetaData(TType.I64)));
6409
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
6410
          new EnumMetaData(TType.ENUM, TransactionStatus.class)));
6411
      put(_Fields.DESCRIPTION, new FieldMetaData("description", TFieldRequirementType.DEFAULT, 
6412
          new FieldValueMetaData(TType.STRING)));
6413
    }});
6414
 
6415
    static {
6416
      FieldMetaData.addStructMetaDataMap(changeTransactionStatus_args.class, metaDataMap);
6417
    }
6418
 
6419
    public changeTransactionStatus_args() {
6420
    }
6421
 
6422
    public changeTransactionStatus_args(
6423
      long transactionId,
6424
      TransactionStatus status,
6425
      String description)
6426
    {
6427
      this();
6428
      this.transactionId = transactionId;
6429
      setTransactionIdIsSet(true);
6430
      this.status = status;
6431
      this.description = description;
6432
    }
6433
 
6434
    /**
6435
     * Performs a deep copy on <i>other</i>.
6436
     */
6437
    public changeTransactionStatus_args(changeTransactionStatus_args other) {
6438
      __isset_bit_vector.clear();
6439
      __isset_bit_vector.or(other.__isset_bit_vector);
6440
      this.transactionId = other.transactionId;
6441
      if (other.isSetStatus()) {
6442
        this.status = other.status;
6443
      }
6444
      if (other.isSetDescription()) {
6445
        this.description = other.description;
6446
      }
6447
    }
6448
 
6449
    public changeTransactionStatus_args deepCopy() {
6450
      return new changeTransactionStatus_args(this);
6451
    }
6452
 
6453
    @Deprecated
6454
    public changeTransactionStatus_args clone() {
6455
      return new changeTransactionStatus_args(this);
6456
    }
6457
 
6458
    public long getTransactionId() {
6459
      return this.transactionId;
6460
    }
6461
 
6462
    public changeTransactionStatus_args setTransactionId(long transactionId) {
6463
      this.transactionId = transactionId;
6464
      setTransactionIdIsSet(true);
6465
      return this;
6466
    }
6467
 
6468
    public void unsetTransactionId() {
6469
      __isset_bit_vector.clear(__TRANSACTIONID_ISSET_ID);
6470
    }
6471
 
6472
    /** Returns true if field transactionId is set (has been asigned a value) and false otherwise */
6473
    public boolean isSetTransactionId() {
6474
      return __isset_bit_vector.get(__TRANSACTIONID_ISSET_ID);
6475
    }
6476
 
6477
    public void setTransactionIdIsSet(boolean value) {
6478
      __isset_bit_vector.set(__TRANSACTIONID_ISSET_ID, value);
6479
    }
6480
 
6481
    /**
6482
     * 
6483
     * @see TransactionStatus
6484
     */
6485
    public TransactionStatus getStatus() {
6486
      return this.status;
6487
    }
6488
 
6489
    /**
6490
     * 
6491
     * @see TransactionStatus
6492
     */
6493
    public changeTransactionStatus_args setStatus(TransactionStatus status) {
6494
      this.status = status;
6495
      return this;
6496
    }
6497
 
6498
    public void unsetStatus() {
6499
      this.status = null;
6500
    }
6501
 
6502
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
6503
    public boolean isSetStatus() {
6504
      return this.status != null;
6505
    }
6506
 
6507
    public void setStatusIsSet(boolean value) {
6508
      if (!value) {
6509
        this.status = null;
6510
      }
6511
    }
6512
 
6513
    public String getDescription() {
6514
      return this.description;
6515
    }
6516
 
6517
    public changeTransactionStatus_args setDescription(String description) {
6518
      this.description = description;
6519
      return this;
6520
    }
6521
 
6522
    public void unsetDescription() {
6523
      this.description = null;
6524
    }
6525
 
6526
    /** Returns true if field description is set (has been asigned a value) and false otherwise */
6527
    public boolean isSetDescription() {
6528
      return this.description != null;
6529
    }
6530
 
6531
    public void setDescriptionIsSet(boolean value) {
6532
      if (!value) {
6533
        this.description = null;
6534
      }
6535
    }
6536
 
6537
    public void setFieldValue(_Fields field, Object value) {
6538
      switch (field) {
6539
      case TRANSACTION_ID:
6540
        if (value == null) {
6541
          unsetTransactionId();
6542
        } else {
6543
          setTransactionId((Long)value);
6544
        }
6545
        break;
6546
 
6547
      case STATUS:
6548
        if (value == null) {
6549
          unsetStatus();
6550
        } else {
6551
          setStatus((TransactionStatus)value);
6552
        }
6553
        break;
6554
 
6555
      case DESCRIPTION:
6556
        if (value == null) {
6557
          unsetDescription();
6558
        } else {
6559
          setDescription((String)value);
6560
        }
6561
        break;
6562
 
6563
      }
6564
    }
6565
 
6566
    public void setFieldValue(int fieldID, Object value) {
6567
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
6568
    }
6569
 
6570
    public Object getFieldValue(_Fields field) {
6571
      switch (field) {
6572
      case TRANSACTION_ID:
6573
        return new Long(getTransactionId());
6574
 
6575
      case STATUS:
6576
        return getStatus();
6577
 
6578
      case DESCRIPTION:
6579
        return getDescription();
6580
 
6581
      }
6582
      throw new IllegalStateException();
6583
    }
6584
 
6585
    public Object getFieldValue(int fieldId) {
6586
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
6587
    }
6588
 
6589
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
6590
    public boolean isSet(_Fields field) {
6591
      switch (field) {
6592
      case TRANSACTION_ID:
6593
        return isSetTransactionId();
6594
      case STATUS:
6595
        return isSetStatus();
6596
      case DESCRIPTION:
6597
        return isSetDescription();
6598
      }
6599
      throw new IllegalStateException();
6600
    }
6601
 
6602
    public boolean isSet(int fieldID) {
6603
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
6604
    }
6605
 
6606
    @Override
6607
    public boolean equals(Object that) {
6608
      if (that == null)
6609
        return false;
6610
      if (that instanceof changeTransactionStatus_args)
6611
        return this.equals((changeTransactionStatus_args)that);
6612
      return false;
6613
    }
6614
 
6615
    public boolean equals(changeTransactionStatus_args that) {
6616
      if (that == null)
6617
        return false;
6618
 
6619
      boolean this_present_transactionId = true;
6620
      boolean that_present_transactionId = true;
6621
      if (this_present_transactionId || that_present_transactionId) {
6622
        if (!(this_present_transactionId && that_present_transactionId))
6623
          return false;
6624
        if (this.transactionId != that.transactionId)
6625
          return false;
6626
      }
6627
 
6628
      boolean this_present_status = true && this.isSetStatus();
6629
      boolean that_present_status = true && that.isSetStatus();
6630
      if (this_present_status || that_present_status) {
6631
        if (!(this_present_status && that_present_status))
6632
          return false;
6633
        if (!this.status.equals(that.status))
6634
          return false;
6635
      }
6636
 
6637
      boolean this_present_description = true && this.isSetDescription();
6638
      boolean that_present_description = true && that.isSetDescription();
6639
      if (this_present_description || that_present_description) {
6640
        if (!(this_present_description && that_present_description))
6641
          return false;
6642
        if (!this.description.equals(that.description))
6643
          return false;
6644
      }
6645
 
6646
      return true;
6647
    }
6648
 
6649
    @Override
6650
    public int hashCode() {
6651
      return 0;
6652
    }
6653
 
6654
    public int compareTo(changeTransactionStatus_args other) {
6655
      if (!getClass().equals(other.getClass())) {
6656
        return getClass().getName().compareTo(other.getClass().getName());
6657
      }
6658
 
6659
      int lastComparison = 0;
6660
      changeTransactionStatus_args typedOther = (changeTransactionStatus_args)other;
6661
 
6662
      lastComparison = Boolean.valueOf(isSetTransactionId()).compareTo(isSetTransactionId());
6663
      if (lastComparison != 0) {
6664
        return lastComparison;
6665
      }
6666
      lastComparison = TBaseHelper.compareTo(transactionId, typedOther.transactionId);
6667
      if (lastComparison != 0) {
6668
        return lastComparison;
6669
      }
6670
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
6671
      if (lastComparison != 0) {
6672
        return lastComparison;
6673
      }
6674
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
6675
      if (lastComparison != 0) {
6676
        return lastComparison;
6677
      }
6678
      lastComparison = Boolean.valueOf(isSetDescription()).compareTo(isSetDescription());
6679
      if (lastComparison != 0) {
6680
        return lastComparison;
6681
      }
6682
      lastComparison = TBaseHelper.compareTo(description, typedOther.description);
6683
      if (lastComparison != 0) {
6684
        return lastComparison;
6685
      }
6686
      return 0;
6687
    }
6688
 
6689
    public void read(TProtocol iprot) throws TException {
6690
      TField field;
6691
      iprot.readStructBegin();
6692
      while (true)
6693
      {
6694
        field = iprot.readFieldBegin();
6695
        if (field.type == TType.STOP) { 
6696
          break;
6697
        }
6698
        _Fields fieldId = _Fields.findByThriftId(field.id);
6699
        if (fieldId == null) {
6700
          TProtocolUtil.skip(iprot, field.type);
6701
        } else {
6702
          switch (fieldId) {
6703
            case TRANSACTION_ID:
6704
              if (field.type == TType.I64) {
6705
                this.transactionId = iprot.readI64();
6706
                setTransactionIdIsSet(true);
6707
              } else { 
6708
                TProtocolUtil.skip(iprot, field.type);
6709
              }
6710
              break;
6711
            case STATUS:
6712
              if (field.type == TType.I32) {
6713
                this.status = TransactionStatus.findByValue(iprot.readI32());
6714
              } else { 
6715
                TProtocolUtil.skip(iprot, field.type);
6716
              }
6717
              break;
6718
            case DESCRIPTION:
6719
              if (field.type == TType.STRING) {
6720
                this.description = iprot.readString();
6721
              } else { 
6722
                TProtocolUtil.skip(iprot, field.type);
6723
              }
6724
              break;
6725
          }
6726
          iprot.readFieldEnd();
6727
        }
6728
      }
6729
      iprot.readStructEnd();
6730
      validate();
6731
    }
6732
 
6733
    public void write(TProtocol oprot) throws TException {
6734
      validate();
6735
 
6736
      oprot.writeStructBegin(STRUCT_DESC);
6737
      oprot.writeFieldBegin(TRANSACTION_ID_FIELD_DESC);
6738
      oprot.writeI64(this.transactionId);
6739
      oprot.writeFieldEnd();
6740
      if (this.status != null) {
6741
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
6742
        oprot.writeI32(this.status.getValue());
6743
        oprot.writeFieldEnd();
6744
      }
6745
      if (this.description != null) {
6746
        oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC);
6747
        oprot.writeString(this.description);
6748
        oprot.writeFieldEnd();
6749
      }
6750
      oprot.writeFieldStop();
6751
      oprot.writeStructEnd();
6752
    }
6753
 
6754
    @Override
6755
    public String toString() {
6756
      StringBuilder sb = new StringBuilder("changeTransactionStatus_args(");
6757
      boolean first = true;
6758
 
6759
      sb.append("transactionId:");
6760
      sb.append(this.transactionId);
6761
      first = false;
6762
      if (!first) sb.append(", ");
6763
      sb.append("status:");
6764
      if (this.status == null) {
6765
        sb.append("null");
6766
      } else {
6767
        String status_name = status.name();
6768
        if (status_name != null) {
6769
          sb.append(status_name);
6770
          sb.append(" (");
6771
        }
6772
        sb.append(this.status);
6773
        if (status_name != null) {
6774
          sb.append(")");
6775
        }
6776
      }
6777
      first = false;
6778
      if (!first) sb.append(", ");
6779
      sb.append("description:");
6780
      if (this.description == null) {
6781
        sb.append("null");
6782
      } else {
6783
        sb.append(this.description);
6784
      }
6785
      first = false;
6786
      sb.append(")");
6787
      return sb.toString();
6788
    }
6789
 
6790
    public void validate() throws TException {
6791
      // check for required fields
6792
    }
6793
 
6794
  }
6795
 
6796
  public static class changeTransactionStatus_result implements TBase<changeTransactionStatus_result._Fields>, java.io.Serializable, Cloneable, Comparable<changeTransactionStatus_result>   {
6797
    private static final TStruct STRUCT_DESC = new TStruct("changeTransactionStatus_result");
6798
 
6799
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
6800
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
6801
 
6802
    private boolean success;
6803
    private TransactionServiceException ex;
6804
 
6805
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6806
    public enum _Fields implements TFieldIdEnum {
6807
      SUCCESS((short)0, "success"),
6808
      EX((short)1, "ex");
6809
 
6810
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
6811
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6812
 
6813
      static {
6814
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6815
          byId.put((int)field._thriftId, field);
6816
          byName.put(field.getFieldName(), field);
6817
        }
6818
      }
6819
 
6820
      /**
6821
       * Find the _Fields constant that matches fieldId, or null if its not found.
6822
       */
6823
      public static _Fields findByThriftId(int fieldId) {
6824
        return byId.get(fieldId);
6825
      }
6826
 
6827
      /**
6828
       * Find the _Fields constant that matches fieldId, throwing an exception
6829
       * if it is not found.
6830
       */
6831
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6832
        _Fields fields = findByThriftId(fieldId);
6833
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6834
        return fields;
6835
      }
6836
 
6837
      /**
6838
       * Find the _Fields constant that matches name, or null if its not found.
6839
       */
6840
      public static _Fields findByName(String name) {
6841
        return byName.get(name);
6842
      }
6843
 
6844
      private final short _thriftId;
6845
      private final String _fieldName;
6846
 
6847
      _Fields(short thriftId, String fieldName) {
6848
        _thriftId = thriftId;
6849
        _fieldName = fieldName;
6850
      }
6851
 
6852
      public short getThriftFieldId() {
6853
        return _thriftId;
6854
      }
6855
 
6856
      public String getFieldName() {
6857
        return _fieldName;
6858
      }
6859
    }
6860
 
6861
    // isset id assignments
6862
    private static final int __SUCCESS_ISSET_ID = 0;
6863
    private BitSet __isset_bit_vector = new BitSet(1);
6864
 
6865
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
6866
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
6867
          new FieldValueMetaData(TType.BOOL)));
6868
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
6869
          new FieldValueMetaData(TType.STRUCT)));
6870
    }});
6871
 
6872
    static {
6873
      FieldMetaData.addStructMetaDataMap(changeTransactionStatus_result.class, metaDataMap);
6874
    }
6875
 
6876
    public changeTransactionStatus_result() {
6877
    }
6878
 
6879
    public changeTransactionStatus_result(
6880
      boolean success,
6881
      TransactionServiceException ex)
6882
    {
6883
      this();
6884
      this.success = success;
6885
      setSuccessIsSet(true);
6886
      this.ex = ex;
6887
    }
6888
 
6889
    /**
6890
     * Performs a deep copy on <i>other</i>.
6891
     */
6892
    public changeTransactionStatus_result(changeTransactionStatus_result other) {
6893
      __isset_bit_vector.clear();
6894
      __isset_bit_vector.or(other.__isset_bit_vector);
6895
      this.success = other.success;
6896
      if (other.isSetEx()) {
6897
        this.ex = new TransactionServiceException(other.ex);
6898
      }
6899
    }
6900
 
6901
    public changeTransactionStatus_result deepCopy() {
6902
      return new changeTransactionStatus_result(this);
6903
    }
6904
 
6905
    @Deprecated
6906
    public changeTransactionStatus_result clone() {
6907
      return new changeTransactionStatus_result(this);
6908
    }
6909
 
6910
    public boolean isSuccess() {
6911
      return this.success;
6912
    }
6913
 
6914
    public changeTransactionStatus_result setSuccess(boolean success) {
6915
      this.success = success;
6916
      setSuccessIsSet(true);
6917
      return this;
6918
    }
6919
 
6920
    public void unsetSuccess() {
6921
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
6922
    }
6923
 
6924
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
6925
    public boolean isSetSuccess() {
6926
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
6927
    }
6928
 
6929
    public void setSuccessIsSet(boolean value) {
6930
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
6931
    }
6932
 
6933
    public TransactionServiceException getEx() {
6934
      return this.ex;
6935
    }
6936
 
6937
    public changeTransactionStatus_result setEx(TransactionServiceException ex) {
6938
      this.ex = ex;
6939
      return this;
6940
    }
6941
 
6942
    public void unsetEx() {
6943
      this.ex = null;
6944
    }
6945
 
6946
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
6947
    public boolean isSetEx() {
6948
      return this.ex != null;
6949
    }
6950
 
6951
    public void setExIsSet(boolean value) {
6952
      if (!value) {
6953
        this.ex = null;
6954
      }
6955
    }
6956
 
6957
    public void setFieldValue(_Fields field, Object value) {
6958
      switch (field) {
6959
      case SUCCESS:
6960
        if (value == null) {
6961
          unsetSuccess();
6962
        } else {
6963
          setSuccess((Boolean)value);
6964
        }
6965
        break;
6966
 
6967
      case EX:
6968
        if (value == null) {
6969
          unsetEx();
6970
        } else {
6971
          setEx((TransactionServiceException)value);
6972
        }
6973
        break;
6974
 
6975
      }
6976
    }
6977
 
6978
    public void setFieldValue(int fieldID, Object value) {
6979
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
6980
    }
6981
 
6982
    public Object getFieldValue(_Fields field) {
6983
      switch (field) {
6984
      case SUCCESS:
6985
        return new Boolean(isSuccess());
6986
 
6987
      case EX:
6988
        return getEx();
6989
 
6990
      }
6991
      throw new IllegalStateException();
6992
    }
6993
 
6994
    public Object getFieldValue(int fieldId) {
6995
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
6996
    }
6997
 
6998
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
6999
    public boolean isSet(_Fields field) {
7000
      switch (field) {
7001
      case SUCCESS:
7002
        return isSetSuccess();
7003
      case EX:
7004
        return isSetEx();
7005
      }
7006
      throw new IllegalStateException();
7007
    }
7008
 
7009
    public boolean isSet(int fieldID) {
7010
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
7011
    }
7012
 
7013
    @Override
7014
    public boolean equals(Object that) {
7015
      if (that == null)
7016
        return false;
7017
      if (that instanceof changeTransactionStatus_result)
7018
        return this.equals((changeTransactionStatus_result)that);
7019
      return false;
7020
    }
7021
 
7022
    public boolean equals(changeTransactionStatus_result that) {
7023
      if (that == null)
7024
        return false;
7025
 
7026
      boolean this_present_success = true;
7027
      boolean that_present_success = true;
7028
      if (this_present_success || that_present_success) {
7029
        if (!(this_present_success && that_present_success))
7030
          return false;
7031
        if (this.success != that.success)
7032
          return false;
7033
      }
7034
 
7035
      boolean this_present_ex = true && this.isSetEx();
7036
      boolean that_present_ex = true && that.isSetEx();
7037
      if (this_present_ex || that_present_ex) {
7038
        if (!(this_present_ex && that_present_ex))
7039
          return false;
7040
        if (!this.ex.equals(that.ex))
7041
          return false;
7042
      }
7043
 
7044
      return true;
7045
    }
7046
 
7047
    @Override
7048
    public int hashCode() {
7049
      return 0;
7050
    }
7051
 
7052
    public int compareTo(changeTransactionStatus_result other) {
7053
      if (!getClass().equals(other.getClass())) {
7054
        return getClass().getName().compareTo(other.getClass().getName());
7055
      }
7056
 
7057
      int lastComparison = 0;
7058
      changeTransactionStatus_result typedOther = (changeTransactionStatus_result)other;
7059
 
7060
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
7061
      if (lastComparison != 0) {
7062
        return lastComparison;
7063
      }
7064
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
7065
      if (lastComparison != 0) {
7066
        return lastComparison;
7067
      }
7068
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
7069
      if (lastComparison != 0) {
7070
        return lastComparison;
7071
      }
7072
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
7073
      if (lastComparison != 0) {
7074
        return lastComparison;
7075
      }
7076
      return 0;
7077
    }
7078
 
7079
    public void read(TProtocol iprot) throws TException {
7080
      TField field;
7081
      iprot.readStructBegin();
7082
      while (true)
7083
      {
7084
        field = iprot.readFieldBegin();
7085
        if (field.type == TType.STOP) { 
7086
          break;
7087
        }
7088
        _Fields fieldId = _Fields.findByThriftId(field.id);
7089
        if (fieldId == null) {
7090
          TProtocolUtil.skip(iprot, field.type);
7091
        } else {
7092
          switch (fieldId) {
7093
            case SUCCESS:
7094
              if (field.type == TType.BOOL) {
7095
                this.success = iprot.readBool();
7096
                setSuccessIsSet(true);
7097
              } else { 
7098
                TProtocolUtil.skip(iprot, field.type);
7099
              }
7100
              break;
7101
            case EX:
7102
              if (field.type == TType.STRUCT) {
7103
                this.ex = new TransactionServiceException();
7104
                this.ex.read(iprot);
7105
              } else { 
7106
                TProtocolUtil.skip(iprot, field.type);
7107
              }
7108
              break;
7109
          }
7110
          iprot.readFieldEnd();
7111
        }
7112
      }
7113
      iprot.readStructEnd();
7114
      validate();
7115
    }
7116
 
7117
    public void write(TProtocol oprot) throws TException {
7118
      oprot.writeStructBegin(STRUCT_DESC);
7119
 
7120
      if (this.isSetSuccess()) {
7121
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
7122
        oprot.writeBool(this.success);
7123
        oprot.writeFieldEnd();
7124
      } else if (this.isSetEx()) {
7125
        oprot.writeFieldBegin(EX_FIELD_DESC);
7126
        this.ex.write(oprot);
7127
        oprot.writeFieldEnd();
7128
      }
7129
      oprot.writeFieldStop();
7130
      oprot.writeStructEnd();
7131
    }
7132
 
7133
    @Override
7134
    public String toString() {
7135
      StringBuilder sb = new StringBuilder("changeTransactionStatus_result(");
7136
      boolean first = true;
7137
 
7138
      sb.append("success:");
7139
      sb.append(this.success);
7140
      first = false;
7141
      if (!first) sb.append(", ");
7142
      sb.append("ex:");
7143
      if (this.ex == null) {
7144
        sb.append("null");
7145
      } else {
7146
        sb.append(this.ex);
7147
      }
7148
      first = false;
7149
      sb.append(")");
7150
      return sb.toString();
7151
    }
7152
 
7153
    public void validate() throws TException {
7154
      // check for required fields
7155
    }
7156
 
7157
  }
7158
 
1398 varun.gupt 7159
  public static class enqueueTransactionInfoEmail_args implements TBase<enqueueTransactionInfoEmail_args._Fields>, java.io.Serializable, Cloneable, Comparable<enqueueTransactionInfoEmail_args>   {
7160
    private static final TStruct STRUCT_DESC = new TStruct("enqueueTransactionInfoEmail_args");
1382 varun.gupt 7161
 
7162
    private static final TField TRANSACTION_ID_FIELD_DESC = new TField("transactionId", TType.I64, (short)1);
7163
 
7164
    private long transactionId;
7165
 
7166
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7167
    public enum _Fields implements TFieldIdEnum {
7168
      TRANSACTION_ID((short)1, "transactionId");
7169
 
7170
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
7171
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7172
 
7173
      static {
7174
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7175
          byId.put((int)field._thriftId, field);
7176
          byName.put(field.getFieldName(), field);
7177
        }
7178
      }
7179
 
7180
      /**
7181
       * Find the _Fields constant that matches fieldId, or null if its not found.
7182
       */
7183
      public static _Fields findByThriftId(int fieldId) {
7184
        return byId.get(fieldId);
7185
      }
7186
 
7187
      /**
7188
       * Find the _Fields constant that matches fieldId, throwing an exception
7189
       * if it is not found.
7190
       */
7191
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7192
        _Fields fields = findByThriftId(fieldId);
7193
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7194
        return fields;
7195
      }
7196
 
7197
      /**
7198
       * Find the _Fields constant that matches name, or null if its not found.
7199
       */
7200
      public static _Fields findByName(String name) {
7201
        return byName.get(name);
7202
      }
7203
 
7204
      private final short _thriftId;
7205
      private final String _fieldName;
7206
 
7207
      _Fields(short thriftId, String fieldName) {
7208
        _thriftId = thriftId;
7209
        _fieldName = fieldName;
7210
      }
7211
 
7212
      public short getThriftFieldId() {
7213
        return _thriftId;
7214
      }
7215
 
7216
      public String getFieldName() {
7217
        return _fieldName;
7218
      }
7219
    }
7220
 
7221
    // isset id assignments
7222
    private static final int __TRANSACTIONID_ISSET_ID = 0;
7223
    private BitSet __isset_bit_vector = new BitSet(1);
7224
 
7225
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
7226
      put(_Fields.TRANSACTION_ID, new FieldMetaData("transactionId", TFieldRequirementType.DEFAULT, 
7227
          new FieldValueMetaData(TType.I64)));
7228
    }});
7229
 
7230
    static {
1398 varun.gupt 7231
      FieldMetaData.addStructMetaDataMap(enqueueTransactionInfoEmail_args.class, metaDataMap);
1382 varun.gupt 7232
    }
7233
 
1398 varun.gupt 7234
    public enqueueTransactionInfoEmail_args() {
1382 varun.gupt 7235
    }
7236
 
1398 varun.gupt 7237
    public enqueueTransactionInfoEmail_args(
1382 varun.gupt 7238
      long transactionId)
7239
    {
7240
      this();
7241
      this.transactionId = transactionId;
7242
      setTransactionIdIsSet(true);
7243
    }
7244
 
7245
    /**
7246
     * Performs a deep copy on <i>other</i>.
7247
     */
1398 varun.gupt 7248
    public enqueueTransactionInfoEmail_args(enqueueTransactionInfoEmail_args other) {
1382 varun.gupt 7249
      __isset_bit_vector.clear();
7250
      __isset_bit_vector.or(other.__isset_bit_vector);
7251
      this.transactionId = other.transactionId;
7252
    }
7253
 
1398 varun.gupt 7254
    public enqueueTransactionInfoEmail_args deepCopy() {
7255
      return new enqueueTransactionInfoEmail_args(this);
1382 varun.gupt 7256
    }
7257
 
7258
    @Deprecated
1398 varun.gupt 7259
    public enqueueTransactionInfoEmail_args clone() {
7260
      return new enqueueTransactionInfoEmail_args(this);
1382 varun.gupt 7261
    }
7262
 
7263
    public long getTransactionId() {
7264
      return this.transactionId;
7265
    }
7266
 
1398 varun.gupt 7267
    public enqueueTransactionInfoEmail_args setTransactionId(long transactionId) {
1382 varun.gupt 7268
      this.transactionId = transactionId;
7269
      setTransactionIdIsSet(true);
7270
      return this;
7271
    }
7272
 
7273
    public void unsetTransactionId() {
7274
      __isset_bit_vector.clear(__TRANSACTIONID_ISSET_ID);
7275
    }
7276
 
7277
    /** Returns true if field transactionId is set (has been asigned a value) and false otherwise */
7278
    public boolean isSetTransactionId() {
7279
      return __isset_bit_vector.get(__TRANSACTIONID_ISSET_ID);
7280
    }
7281
 
7282
    public void setTransactionIdIsSet(boolean value) {
7283
      __isset_bit_vector.set(__TRANSACTIONID_ISSET_ID, value);
7284
    }
7285
 
7286
    public void setFieldValue(_Fields field, Object value) {
7287
      switch (field) {
7288
      case TRANSACTION_ID:
7289
        if (value == null) {
7290
          unsetTransactionId();
7291
        } else {
7292
          setTransactionId((Long)value);
7293
        }
7294
        break;
7295
 
7296
      }
7297
    }
7298
 
7299
    public void setFieldValue(int fieldID, Object value) {
7300
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
7301
    }
7302
 
7303
    public Object getFieldValue(_Fields field) {
7304
      switch (field) {
7305
      case TRANSACTION_ID:
7306
        return new Long(getTransactionId());
7307
 
7308
      }
7309
      throw new IllegalStateException();
7310
    }
7311
 
7312
    public Object getFieldValue(int fieldId) {
7313
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
7314
    }
7315
 
7316
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
7317
    public boolean isSet(_Fields field) {
7318
      switch (field) {
7319
      case TRANSACTION_ID:
7320
        return isSetTransactionId();
7321
      }
7322
      throw new IllegalStateException();
7323
    }
7324
 
7325
    public boolean isSet(int fieldID) {
7326
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
7327
    }
7328
 
7329
    @Override
7330
    public boolean equals(Object that) {
7331
      if (that == null)
7332
        return false;
1398 varun.gupt 7333
      if (that instanceof enqueueTransactionInfoEmail_args)
7334
        return this.equals((enqueueTransactionInfoEmail_args)that);
1382 varun.gupt 7335
      return false;
7336
    }
7337
 
1398 varun.gupt 7338
    public boolean equals(enqueueTransactionInfoEmail_args that) {
1382 varun.gupt 7339
      if (that == null)
7340
        return false;
7341
 
7342
      boolean this_present_transactionId = true;
7343
      boolean that_present_transactionId = true;
7344
      if (this_present_transactionId || that_present_transactionId) {
7345
        if (!(this_present_transactionId && that_present_transactionId))
7346
          return false;
7347
        if (this.transactionId != that.transactionId)
7348
          return false;
7349
      }
7350
 
7351
      return true;
7352
    }
7353
 
7354
    @Override
7355
    public int hashCode() {
7356
      return 0;
7357
    }
7358
 
1398 varun.gupt 7359
    public int compareTo(enqueueTransactionInfoEmail_args other) {
1382 varun.gupt 7360
      if (!getClass().equals(other.getClass())) {
7361
        return getClass().getName().compareTo(other.getClass().getName());
7362
      }
7363
 
7364
      int lastComparison = 0;
1398 varun.gupt 7365
      enqueueTransactionInfoEmail_args typedOther = (enqueueTransactionInfoEmail_args)other;
1382 varun.gupt 7366
 
7367
      lastComparison = Boolean.valueOf(isSetTransactionId()).compareTo(isSetTransactionId());
7368
      if (lastComparison != 0) {
7369
        return lastComparison;
7370
      }
7371
      lastComparison = TBaseHelper.compareTo(transactionId, typedOther.transactionId);
7372
      if (lastComparison != 0) {
7373
        return lastComparison;
7374
      }
7375
      return 0;
7376
    }
7377
 
7378
    public void read(TProtocol iprot) throws TException {
7379
      TField field;
7380
      iprot.readStructBegin();
7381
      while (true)
7382
      {
7383
        field = iprot.readFieldBegin();
7384
        if (field.type == TType.STOP) { 
7385
          break;
7386
        }
7387
        _Fields fieldId = _Fields.findByThriftId(field.id);
7388
        if (fieldId == null) {
7389
          TProtocolUtil.skip(iprot, field.type);
7390
        } else {
7391
          switch (fieldId) {
7392
            case TRANSACTION_ID:
7393
              if (field.type == TType.I64) {
7394
                this.transactionId = iprot.readI64();
7395
                setTransactionIdIsSet(true);
7396
              } else { 
7397
                TProtocolUtil.skip(iprot, field.type);
7398
              }
7399
              break;
7400
          }
7401
          iprot.readFieldEnd();
7402
        }
7403
      }
7404
      iprot.readStructEnd();
7405
      validate();
7406
    }
7407
 
7408
    public void write(TProtocol oprot) throws TException {
7409
      validate();
7410
 
7411
      oprot.writeStructBegin(STRUCT_DESC);
7412
      oprot.writeFieldBegin(TRANSACTION_ID_FIELD_DESC);
7413
      oprot.writeI64(this.transactionId);
7414
      oprot.writeFieldEnd();
7415
      oprot.writeFieldStop();
7416
      oprot.writeStructEnd();
7417
    }
7418
 
7419
    @Override
7420
    public String toString() {
1398 varun.gupt 7421
      StringBuilder sb = new StringBuilder("enqueueTransactionInfoEmail_args(");
1382 varun.gupt 7422
      boolean first = true;
7423
 
7424
      sb.append("transactionId:");
7425
      sb.append(this.transactionId);
7426
      first = false;
7427
      sb.append(")");
7428
      return sb.toString();
7429
    }
7430
 
7431
    public void validate() throws TException {
7432
      // check for required fields
7433
    }
7434
 
7435
  }
7436
 
1398 varun.gupt 7437
  public static class enqueueTransactionInfoEmail_result implements TBase<enqueueTransactionInfoEmail_result._Fields>, java.io.Serializable, Cloneable, Comparable<enqueueTransactionInfoEmail_result>   {
7438
    private static final TStruct STRUCT_DESC = new TStruct("enqueueTransactionInfoEmail_result");
1382 varun.gupt 7439
 
7440
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
7441
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
7442
 
7443
    private boolean success;
7444
    private TransactionServiceException ex;
7445
 
7446
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7447
    public enum _Fields implements TFieldIdEnum {
7448
      SUCCESS((short)0, "success"),
7449
      EX((short)1, "ex");
7450
 
7451
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
7452
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7453
 
7454
      static {
7455
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7456
          byId.put((int)field._thriftId, field);
7457
          byName.put(field.getFieldName(), field);
7458
        }
7459
      }
7460
 
7461
      /**
7462
       * Find the _Fields constant that matches fieldId, or null if its not found.
7463
       */
7464
      public static _Fields findByThriftId(int fieldId) {
7465
        return byId.get(fieldId);
7466
      }
7467
 
7468
      /**
7469
       * Find the _Fields constant that matches fieldId, throwing an exception
7470
       * if it is not found.
7471
       */
7472
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7473
        _Fields fields = findByThriftId(fieldId);
7474
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7475
        return fields;
7476
      }
7477
 
7478
      /**
7479
       * Find the _Fields constant that matches name, or null if its not found.
7480
       */
7481
      public static _Fields findByName(String name) {
7482
        return byName.get(name);
7483
      }
7484
 
7485
      private final short _thriftId;
7486
      private final String _fieldName;
7487
 
7488
      _Fields(short thriftId, String fieldName) {
7489
        _thriftId = thriftId;
7490
        _fieldName = fieldName;
7491
      }
7492
 
7493
      public short getThriftFieldId() {
7494
        return _thriftId;
7495
      }
7496
 
7497
      public String getFieldName() {
7498
        return _fieldName;
7499
      }
7500
    }
7501
 
7502
    // isset id assignments
7503
    private static final int __SUCCESS_ISSET_ID = 0;
7504
    private BitSet __isset_bit_vector = new BitSet(1);
7505
 
7506
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
7507
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
7508
          new FieldValueMetaData(TType.BOOL)));
7509
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
7510
          new FieldValueMetaData(TType.STRUCT)));
7511
    }});
7512
 
7513
    static {
1398 varun.gupt 7514
      FieldMetaData.addStructMetaDataMap(enqueueTransactionInfoEmail_result.class, metaDataMap);
1382 varun.gupt 7515
    }
7516
 
1398 varun.gupt 7517
    public enqueueTransactionInfoEmail_result() {
1382 varun.gupt 7518
    }
7519
 
1398 varun.gupt 7520
    public enqueueTransactionInfoEmail_result(
1382 varun.gupt 7521
      boolean success,
7522
      TransactionServiceException ex)
7523
    {
7524
      this();
7525
      this.success = success;
7526
      setSuccessIsSet(true);
7527
      this.ex = ex;
7528
    }
7529
 
7530
    /**
7531
     * Performs a deep copy on <i>other</i>.
7532
     */
1398 varun.gupt 7533
    public enqueueTransactionInfoEmail_result(enqueueTransactionInfoEmail_result other) {
1382 varun.gupt 7534
      __isset_bit_vector.clear();
7535
      __isset_bit_vector.or(other.__isset_bit_vector);
7536
      this.success = other.success;
7537
      if (other.isSetEx()) {
7538
        this.ex = new TransactionServiceException(other.ex);
7539
      }
7540
    }
7541
 
1398 varun.gupt 7542
    public enqueueTransactionInfoEmail_result deepCopy() {
7543
      return new enqueueTransactionInfoEmail_result(this);
1382 varun.gupt 7544
    }
7545
 
7546
    @Deprecated
1398 varun.gupt 7547
    public enqueueTransactionInfoEmail_result clone() {
7548
      return new enqueueTransactionInfoEmail_result(this);
1382 varun.gupt 7549
    }
7550
 
7551
    public boolean isSuccess() {
7552
      return this.success;
7553
    }
7554
 
1398 varun.gupt 7555
    public enqueueTransactionInfoEmail_result setSuccess(boolean success) {
1382 varun.gupt 7556
      this.success = success;
7557
      setSuccessIsSet(true);
7558
      return this;
7559
    }
7560
 
7561
    public void unsetSuccess() {
7562
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
7563
    }
7564
 
7565
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
7566
    public boolean isSetSuccess() {
7567
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
7568
    }
7569
 
7570
    public void setSuccessIsSet(boolean value) {
7571
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
7572
    }
7573
 
7574
    public TransactionServiceException getEx() {
7575
      return this.ex;
7576
    }
7577
 
1398 varun.gupt 7578
    public enqueueTransactionInfoEmail_result setEx(TransactionServiceException ex) {
1382 varun.gupt 7579
      this.ex = ex;
7580
      return this;
7581
    }
7582
 
7583
    public void unsetEx() {
7584
      this.ex = null;
7585
    }
7586
 
7587
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
7588
    public boolean isSetEx() {
7589
      return this.ex != null;
7590
    }
7591
 
7592
    public void setExIsSet(boolean value) {
7593
      if (!value) {
7594
        this.ex = null;
7595
      }
7596
    }
7597
 
7598
    public void setFieldValue(_Fields field, Object value) {
7599
      switch (field) {
7600
      case SUCCESS:
7601
        if (value == null) {
7602
          unsetSuccess();
7603
        } else {
7604
          setSuccess((Boolean)value);
7605
        }
7606
        break;
7607
 
7608
      case EX:
7609
        if (value == null) {
7610
          unsetEx();
7611
        } else {
7612
          setEx((TransactionServiceException)value);
7613
        }
7614
        break;
7615
 
7616
      }
7617
    }
7618
 
7619
    public void setFieldValue(int fieldID, Object value) {
7620
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
7621
    }
7622
 
7623
    public Object getFieldValue(_Fields field) {
7624
      switch (field) {
7625
      case SUCCESS:
7626
        return new Boolean(isSuccess());
7627
 
7628
      case EX:
7629
        return getEx();
7630
 
7631
      }
7632
      throw new IllegalStateException();
7633
    }
7634
 
7635
    public Object getFieldValue(int fieldId) {
7636
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
7637
    }
7638
 
7639
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
7640
    public boolean isSet(_Fields field) {
7641
      switch (field) {
7642
      case SUCCESS:
7643
        return isSetSuccess();
7644
      case EX:
7645
        return isSetEx();
7646
      }
7647
      throw new IllegalStateException();
7648
    }
7649
 
7650
    public boolean isSet(int fieldID) {
7651
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
7652
    }
7653
 
7654
    @Override
7655
    public boolean equals(Object that) {
7656
      if (that == null)
7657
        return false;
1398 varun.gupt 7658
      if (that instanceof enqueueTransactionInfoEmail_result)
7659
        return this.equals((enqueueTransactionInfoEmail_result)that);
1382 varun.gupt 7660
      return false;
7661
    }
7662
 
1398 varun.gupt 7663
    public boolean equals(enqueueTransactionInfoEmail_result that) {
1382 varun.gupt 7664
      if (that == null)
7665
        return false;
7666
 
7667
      boolean this_present_success = true;
7668
      boolean that_present_success = true;
7669
      if (this_present_success || that_present_success) {
7670
        if (!(this_present_success && that_present_success))
7671
          return false;
7672
        if (this.success != that.success)
7673
          return false;
7674
      }
7675
 
7676
      boolean this_present_ex = true && this.isSetEx();
7677
      boolean that_present_ex = true && that.isSetEx();
7678
      if (this_present_ex || that_present_ex) {
7679
        if (!(this_present_ex && that_present_ex))
7680
          return false;
7681
        if (!this.ex.equals(that.ex))
7682
          return false;
7683
      }
7684
 
7685
      return true;
7686
    }
7687
 
7688
    @Override
7689
    public int hashCode() {
7690
      return 0;
7691
    }
7692
 
1398 varun.gupt 7693
    public int compareTo(enqueueTransactionInfoEmail_result other) {
1382 varun.gupt 7694
      if (!getClass().equals(other.getClass())) {
7695
        return getClass().getName().compareTo(other.getClass().getName());
7696
      }
7697
 
7698
      int lastComparison = 0;
1398 varun.gupt 7699
      enqueueTransactionInfoEmail_result typedOther = (enqueueTransactionInfoEmail_result)other;
1382 varun.gupt 7700
 
7701
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
7702
      if (lastComparison != 0) {
7703
        return lastComparison;
7704
      }
7705
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
7706
      if (lastComparison != 0) {
7707
        return lastComparison;
7708
      }
7709
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
7710
      if (lastComparison != 0) {
7711
        return lastComparison;
7712
      }
7713
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
7714
      if (lastComparison != 0) {
7715
        return lastComparison;
7716
      }
7717
      return 0;
7718
    }
7719
 
7720
    public void read(TProtocol iprot) throws TException {
7721
      TField field;
7722
      iprot.readStructBegin();
7723
      while (true)
7724
      {
7725
        field = iprot.readFieldBegin();
7726
        if (field.type == TType.STOP) { 
7727
          break;
7728
        }
7729
        _Fields fieldId = _Fields.findByThriftId(field.id);
7730
        if (fieldId == null) {
7731
          TProtocolUtil.skip(iprot, field.type);
7732
        } else {
7733
          switch (fieldId) {
7734
            case SUCCESS:
7735
              if (field.type == TType.BOOL) {
7736
                this.success = iprot.readBool();
7737
                setSuccessIsSet(true);
7738
              } else { 
7739
                TProtocolUtil.skip(iprot, field.type);
7740
              }
7741
              break;
7742
            case EX:
7743
              if (field.type == TType.STRUCT) {
7744
                this.ex = new TransactionServiceException();
7745
                this.ex.read(iprot);
7746
              } else { 
7747
                TProtocolUtil.skip(iprot, field.type);
7748
              }
7749
              break;
7750
          }
7751
          iprot.readFieldEnd();
7752
        }
7753
      }
7754
      iprot.readStructEnd();
7755
      validate();
7756
    }
7757
 
7758
    public void write(TProtocol oprot) throws TException {
7759
      oprot.writeStructBegin(STRUCT_DESC);
7760
 
7761
      if (this.isSetSuccess()) {
7762
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
7763
        oprot.writeBool(this.success);
7764
        oprot.writeFieldEnd();
7765
      } else if (this.isSetEx()) {
7766
        oprot.writeFieldBegin(EX_FIELD_DESC);
7767
        this.ex.write(oprot);
7768
        oprot.writeFieldEnd();
7769
      }
7770
      oprot.writeFieldStop();
7771
      oprot.writeStructEnd();
7772
    }
7773
 
7774
    @Override
7775
    public String toString() {
1398 varun.gupt 7776
      StringBuilder sb = new StringBuilder("enqueueTransactionInfoEmail_result(");
1382 varun.gupt 7777
      boolean first = true;
7778
 
7779
      sb.append("success:");
7780
      sb.append(this.success);
7781
      first = false;
7782
      if (!first) sb.append(", ");
7783
      sb.append("ex:");
7784
      if (this.ex == null) {
7785
        sb.append("null");
7786
      } else {
7787
        sb.append(this.ex);
7788
      }
7789
      first = false;
7790
      sb.append(")");
7791
      return sb.toString();
7792
    }
7793
 
7794
    public void validate() throws TException {
7795
      // check for required fields
7796
    }
7797
 
7798
  }
7799
 
483 rajveer 7800
  public static class getAllOrders_args implements TBase<getAllOrders_args._Fields>, java.io.Serializable, Cloneable, Comparable<getAllOrders_args>   {
7801
    private static final TStruct STRUCT_DESC = new TStruct("getAllOrders_args");
68 ashish 7802
 
483 rajveer 7803
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)1);
7804
    private static final TField FROM_DATE_FIELD_DESC = new TField("from_date", TType.I64, (short)2);
7805
    private static final TField TO_DATE_FIELD_DESC = new TField("to_date", TType.I64, (short)3);
7806
    private static final TField WAREHOUSE_ID_FIELD_DESC = new TField("warehouse_id", TType.I64, (short)4);
68 ashish 7807
 
483 rajveer 7808
    private OrderStatus status;
7809
    private long from_date;
7810
    private long to_date;
7811
    private long warehouse_id;
68 ashish 7812
 
7813
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7814
    public enum _Fields implements TFieldIdEnum {
483 rajveer 7815
      /**
7816
       * 
7817
       * @see OrderStatus
7818
       */
7819
      STATUS((short)1, "status"),
7820
      FROM_DATE((short)2, "from_date"),
7821
      TO_DATE((short)3, "to_date"),
7822
      WAREHOUSE_ID((short)4, "warehouse_id");
68 ashish 7823
 
7824
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
7825
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7826
 
7827
      static {
7828
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7829
          byId.put((int)field._thriftId, field);
7830
          byName.put(field.getFieldName(), field);
7831
        }
7832
      }
7833
 
7834
      /**
7835
       * Find the _Fields constant that matches fieldId, or null if its not found.
7836
       */
7837
      public static _Fields findByThriftId(int fieldId) {
7838
        return byId.get(fieldId);
7839
      }
7840
 
7841
      /**
7842
       * Find the _Fields constant that matches fieldId, throwing an exception
7843
       * if it is not found.
7844
       */
7845
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7846
        _Fields fields = findByThriftId(fieldId);
7847
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7848
        return fields;
7849
      }
7850
 
7851
      /**
7852
       * Find the _Fields constant that matches name, or null if its not found.
7853
       */
7854
      public static _Fields findByName(String name) {
7855
        return byName.get(name);
7856
      }
7857
 
7858
      private final short _thriftId;
7859
      private final String _fieldName;
7860
 
7861
      _Fields(short thriftId, String fieldName) {
7862
        _thriftId = thriftId;
7863
        _fieldName = fieldName;
7864
      }
7865
 
7866
      public short getThriftFieldId() {
7867
        return _thriftId;
7868
      }
7869
 
7870
      public String getFieldName() {
7871
        return _fieldName;
7872
      }
7873
    }
7874
 
7875
    // isset id assignments
483 rajveer 7876
    private static final int __FROM_DATE_ISSET_ID = 0;
7877
    private static final int __TO_DATE_ISSET_ID = 1;
7878
    private static final int __WAREHOUSE_ID_ISSET_ID = 2;
7879
    private BitSet __isset_bit_vector = new BitSet(3);
68 ashish 7880
 
7881
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 7882
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
7883
          new EnumMetaData(TType.ENUM, OrderStatus.class)));
7884
      put(_Fields.FROM_DATE, new FieldMetaData("from_date", TFieldRequirementType.DEFAULT, 
68 ashish 7885
          new FieldValueMetaData(TType.I64)));
483 rajveer 7886
      put(_Fields.TO_DATE, new FieldMetaData("to_date", TFieldRequirementType.DEFAULT, 
7887
          new FieldValueMetaData(TType.I64)));
7888
      put(_Fields.WAREHOUSE_ID, new FieldMetaData("warehouse_id", TFieldRequirementType.DEFAULT, 
7889
          new FieldValueMetaData(TType.I64)));
68 ashish 7890
    }});
7891
 
7892
    static {
483 rajveer 7893
      FieldMetaData.addStructMetaDataMap(getAllOrders_args.class, metaDataMap);
68 ashish 7894
    }
7895
 
483 rajveer 7896
    public getAllOrders_args() {
68 ashish 7897
    }
7898
 
483 rajveer 7899
    public getAllOrders_args(
7900
      OrderStatus status,
7901
      long from_date,
7902
      long to_date,
7903
      long warehouse_id)
68 ashish 7904
    {
7905
      this();
483 rajveer 7906
      this.status = status;
7907
      this.from_date = from_date;
7908
      setFrom_dateIsSet(true);
7909
      this.to_date = to_date;
7910
      setTo_dateIsSet(true);
7911
      this.warehouse_id = warehouse_id;
7912
      setWarehouse_idIsSet(true);
68 ashish 7913
    }
7914
 
7915
    /**
7916
     * Performs a deep copy on <i>other</i>.
7917
     */
483 rajveer 7918
    public getAllOrders_args(getAllOrders_args other) {
68 ashish 7919
      __isset_bit_vector.clear();
7920
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 7921
      if (other.isSetStatus()) {
7922
        this.status = other.status;
7923
      }
7924
      this.from_date = other.from_date;
7925
      this.to_date = other.to_date;
7926
      this.warehouse_id = other.warehouse_id;
68 ashish 7927
    }
7928
 
483 rajveer 7929
    public getAllOrders_args deepCopy() {
7930
      return new getAllOrders_args(this);
68 ashish 7931
    }
7932
 
7933
    @Deprecated
483 rajveer 7934
    public getAllOrders_args clone() {
7935
      return new getAllOrders_args(this);
68 ashish 7936
    }
7937
 
483 rajveer 7938
    /**
7939
     * 
7940
     * @see OrderStatus
7941
     */
7942
    public OrderStatus getStatus() {
7943
      return this.status;
68 ashish 7944
    }
7945
 
483 rajveer 7946
    /**
7947
     * 
7948
     * @see OrderStatus
7949
     */
7950
    public getAllOrders_args setStatus(OrderStatus status) {
7951
      this.status = status;
68 ashish 7952
      return this;
7953
    }
7954
 
483 rajveer 7955
    public void unsetStatus() {
7956
      this.status = null;
68 ashish 7957
    }
7958
 
483 rajveer 7959
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
7960
    public boolean isSetStatus() {
7961
      return this.status != null;
68 ashish 7962
    }
7963
 
483 rajveer 7964
    public void setStatusIsSet(boolean value) {
7965
      if (!value) {
7966
        this.status = null;
68 ashish 7967
      }
7968
    }
7969
 
483 rajveer 7970
    public long getFrom_date() {
7971
      return this.from_date;
68 ashish 7972
    }
7973
 
483 rajveer 7974
    public getAllOrders_args setFrom_date(long from_date) {
7975
      this.from_date = from_date;
7976
      setFrom_dateIsSet(true);
7977
      return this;
68 ashish 7978
    }
7979
 
483 rajveer 7980
    public void unsetFrom_date() {
7981
      __isset_bit_vector.clear(__FROM_DATE_ISSET_ID);
68 ashish 7982
    }
7983
 
483 rajveer 7984
    /** Returns true if field from_date is set (has been asigned a value) and false otherwise */
7985
    public boolean isSetFrom_date() {
7986
      return __isset_bit_vector.get(__FROM_DATE_ISSET_ID);
68 ashish 7987
    }
7988
 
483 rajveer 7989
    public void setFrom_dateIsSet(boolean value) {
7990
      __isset_bit_vector.set(__FROM_DATE_ISSET_ID, value);
68 ashish 7991
    }
7992
 
483 rajveer 7993
    public long getTo_date() {
7994
      return this.to_date;
68 ashish 7995
    }
7996
 
483 rajveer 7997
    public getAllOrders_args setTo_date(long to_date) {
7998
      this.to_date = to_date;
7999
      setTo_dateIsSet(true);
68 ashish 8000
      return this;
8001
    }
8002
 
483 rajveer 8003
    public void unsetTo_date() {
8004
      __isset_bit_vector.clear(__TO_DATE_ISSET_ID);
68 ashish 8005
    }
8006
 
483 rajveer 8007
    /** Returns true if field to_date is set (has been asigned a value) and false otherwise */
8008
    public boolean isSetTo_date() {
8009
      return __isset_bit_vector.get(__TO_DATE_ISSET_ID);
68 ashish 8010
    }
8011
 
483 rajveer 8012
    public void setTo_dateIsSet(boolean value) {
8013
      __isset_bit_vector.set(__TO_DATE_ISSET_ID, value);
68 ashish 8014
    }
8015
 
483 rajveer 8016
    public long getWarehouse_id() {
8017
      return this.warehouse_id;
68 ashish 8018
    }
8019
 
483 rajveer 8020
    public getAllOrders_args setWarehouse_id(long warehouse_id) {
8021
      this.warehouse_id = warehouse_id;
8022
      setWarehouse_idIsSet(true);
68 ashish 8023
      return this;
8024
    }
8025
 
483 rajveer 8026
    public void unsetWarehouse_id() {
8027
      __isset_bit_vector.clear(__WAREHOUSE_ID_ISSET_ID);
68 ashish 8028
    }
8029
 
483 rajveer 8030
    /** Returns true if field warehouse_id is set (has been asigned a value) and false otherwise */
8031
    public boolean isSetWarehouse_id() {
8032
      return __isset_bit_vector.get(__WAREHOUSE_ID_ISSET_ID);
68 ashish 8033
    }
8034
 
483 rajveer 8035
    public void setWarehouse_idIsSet(boolean value) {
8036
      __isset_bit_vector.set(__WAREHOUSE_ID_ISSET_ID, value);
68 ashish 8037
    }
8038
 
8039
    public void setFieldValue(_Fields field, Object value) {
8040
      switch (field) {
483 rajveer 8041
      case STATUS:
68 ashish 8042
        if (value == null) {
483 rajveer 8043
          unsetStatus();
68 ashish 8044
        } else {
483 rajveer 8045
          setStatus((OrderStatus)value);
68 ashish 8046
        }
8047
        break;
8048
 
483 rajveer 8049
      case FROM_DATE:
68 ashish 8050
        if (value == null) {
483 rajveer 8051
          unsetFrom_date();
68 ashish 8052
        } else {
483 rajveer 8053
          setFrom_date((Long)value);
68 ashish 8054
        }
8055
        break;
8056
 
483 rajveer 8057
      case TO_DATE:
8058
        if (value == null) {
8059
          unsetTo_date();
8060
        } else {
8061
          setTo_date((Long)value);
8062
        }
8063
        break;
8064
 
8065
      case WAREHOUSE_ID:
8066
        if (value == null) {
8067
          unsetWarehouse_id();
8068
        } else {
8069
          setWarehouse_id((Long)value);
8070
        }
8071
        break;
8072
 
68 ashish 8073
      }
8074
    }
8075
 
8076
    public void setFieldValue(int fieldID, Object value) {
8077
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
8078
    }
8079
 
8080
    public Object getFieldValue(_Fields field) {
8081
      switch (field) {
483 rajveer 8082
      case STATUS:
8083
        return getStatus();
68 ashish 8084
 
483 rajveer 8085
      case FROM_DATE:
8086
        return new Long(getFrom_date());
68 ashish 8087
 
483 rajveer 8088
      case TO_DATE:
8089
        return new Long(getTo_date());
8090
 
8091
      case WAREHOUSE_ID:
8092
        return new Long(getWarehouse_id());
8093
 
68 ashish 8094
      }
8095
      throw new IllegalStateException();
8096
    }
8097
 
8098
    public Object getFieldValue(int fieldId) {
8099
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
8100
    }
8101
 
8102
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
8103
    public boolean isSet(_Fields field) {
8104
      switch (field) {
483 rajveer 8105
      case STATUS:
8106
        return isSetStatus();
8107
      case FROM_DATE:
8108
        return isSetFrom_date();
8109
      case TO_DATE:
8110
        return isSetTo_date();
8111
      case WAREHOUSE_ID:
8112
        return isSetWarehouse_id();
68 ashish 8113
      }
8114
      throw new IllegalStateException();
8115
    }
8116
 
8117
    public boolean isSet(int fieldID) {
8118
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
8119
    }
8120
 
8121
    @Override
8122
    public boolean equals(Object that) {
8123
      if (that == null)
8124
        return false;
483 rajveer 8125
      if (that instanceof getAllOrders_args)
8126
        return this.equals((getAllOrders_args)that);
68 ashish 8127
      return false;
8128
    }
8129
 
483 rajveer 8130
    public boolean equals(getAllOrders_args that) {
68 ashish 8131
      if (that == null)
8132
        return false;
8133
 
483 rajveer 8134
      boolean this_present_status = true && this.isSetStatus();
8135
      boolean that_present_status = true && that.isSetStatus();
8136
      if (this_present_status || that_present_status) {
8137
        if (!(this_present_status && that_present_status))
68 ashish 8138
          return false;
483 rajveer 8139
        if (!this.status.equals(that.status))
68 ashish 8140
          return false;
8141
      }
8142
 
483 rajveer 8143
      boolean this_present_from_date = true;
8144
      boolean that_present_from_date = true;
8145
      if (this_present_from_date || that_present_from_date) {
8146
        if (!(this_present_from_date && that_present_from_date))
68 ashish 8147
          return false;
483 rajveer 8148
        if (this.from_date != that.from_date)
68 ashish 8149
          return false;
8150
      }
8151
 
483 rajveer 8152
      boolean this_present_to_date = true;
8153
      boolean that_present_to_date = true;
8154
      if (this_present_to_date || that_present_to_date) {
8155
        if (!(this_present_to_date && that_present_to_date))
8156
          return false;
8157
        if (this.to_date != that.to_date)
8158
          return false;
68 ashish 8159
      }
8160
 
483 rajveer 8161
      boolean this_present_warehouse_id = true;
8162
      boolean that_present_warehouse_id = true;
8163
      if (this_present_warehouse_id || that_present_warehouse_id) {
8164
        if (!(this_present_warehouse_id && that_present_warehouse_id))
68 ashish 8165
          return false;
483 rajveer 8166
        if (this.warehouse_id != that.warehouse_id)
68 ashish 8167
          return false;
8168
      }
8169
 
8170
      return true;
8171
    }
8172
 
8173
    @Override
8174
    public int hashCode() {
8175
      return 0;
8176
    }
8177
 
483 rajveer 8178
    public int compareTo(getAllOrders_args other) {
68 ashish 8179
      if (!getClass().equals(other.getClass())) {
8180
        return getClass().getName().compareTo(other.getClass().getName());
8181
      }
8182
 
8183
      int lastComparison = 0;
483 rajveer 8184
      getAllOrders_args typedOther = (getAllOrders_args)other;
68 ashish 8185
 
483 rajveer 8186
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
68 ashish 8187
      if (lastComparison != 0) {
8188
        return lastComparison;
8189
      }
483 rajveer 8190
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
68 ashish 8191
      if (lastComparison != 0) {
8192
        return lastComparison;
8193
      }
483 rajveer 8194
      lastComparison = Boolean.valueOf(isSetFrom_date()).compareTo(isSetFrom_date());
8195
      if (lastComparison != 0) {
8196
        return lastComparison;
8197
      }
8198
      lastComparison = TBaseHelper.compareTo(from_date, typedOther.from_date);
8199
      if (lastComparison != 0) {
8200
        return lastComparison;
8201
      }
8202
      lastComparison = Boolean.valueOf(isSetTo_date()).compareTo(isSetTo_date());
8203
      if (lastComparison != 0) {
8204
        return lastComparison;
8205
      }
8206
      lastComparison = TBaseHelper.compareTo(to_date, typedOther.to_date);
8207
      if (lastComparison != 0) {
8208
        return lastComparison;
8209
      }
8210
      lastComparison = Boolean.valueOf(isSetWarehouse_id()).compareTo(isSetWarehouse_id());
8211
      if (lastComparison != 0) {
8212
        return lastComparison;
8213
      }
8214
      lastComparison = TBaseHelper.compareTo(warehouse_id, typedOther.warehouse_id);
8215
      if (lastComparison != 0) {
8216
        return lastComparison;
8217
      }
68 ashish 8218
      return 0;
8219
    }
8220
 
8221
    public void read(TProtocol iprot) throws TException {
8222
      TField field;
8223
      iprot.readStructBegin();
8224
      while (true)
8225
      {
8226
        field = iprot.readFieldBegin();
8227
        if (field.type == TType.STOP) { 
8228
          break;
8229
        }
8230
        _Fields fieldId = _Fields.findByThriftId(field.id);
8231
        if (fieldId == null) {
8232
          TProtocolUtil.skip(iprot, field.type);
8233
        } else {
8234
          switch (fieldId) {
483 rajveer 8235
            case STATUS:
8236
              if (field.type == TType.I32) {
8237
                this.status = OrderStatus.findByValue(iprot.readI32());
8238
              } else { 
8239
                TProtocolUtil.skip(iprot, field.type);
8240
              }
8241
              break;
8242
            case FROM_DATE:
68 ashish 8243
              if (field.type == TType.I64) {
483 rajveer 8244
                this.from_date = iprot.readI64();
8245
                setFrom_dateIsSet(true);
68 ashish 8246
              } else { 
8247
                TProtocolUtil.skip(iprot, field.type);
8248
              }
8249
              break;
483 rajveer 8250
            case TO_DATE:
8251
              if (field.type == TType.I64) {
8252
                this.to_date = iprot.readI64();
8253
                setTo_dateIsSet(true);
8254
              } else { 
8255
                TProtocolUtil.skip(iprot, field.type);
8256
              }
8257
              break;
8258
            case WAREHOUSE_ID:
8259
              if (field.type == TType.I64) {
8260
                this.warehouse_id = iprot.readI64();
8261
                setWarehouse_idIsSet(true);
8262
              } else { 
8263
                TProtocolUtil.skip(iprot, field.type);
8264
              }
8265
              break;
68 ashish 8266
          }
8267
          iprot.readFieldEnd();
8268
        }
8269
      }
8270
      iprot.readStructEnd();
8271
      validate();
8272
    }
8273
 
8274
    public void write(TProtocol oprot) throws TException {
8275
      validate();
8276
 
8277
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 8278
      if (this.status != null) {
8279
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
8280
        oprot.writeI32(this.status.getValue());
8281
        oprot.writeFieldEnd();
8282
      }
8283
      oprot.writeFieldBegin(FROM_DATE_FIELD_DESC);
8284
      oprot.writeI64(this.from_date);
68 ashish 8285
      oprot.writeFieldEnd();
483 rajveer 8286
      oprot.writeFieldBegin(TO_DATE_FIELD_DESC);
8287
      oprot.writeI64(this.to_date);
8288
      oprot.writeFieldEnd();
8289
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
8290
      oprot.writeI64(this.warehouse_id);
8291
      oprot.writeFieldEnd();
68 ashish 8292
      oprot.writeFieldStop();
8293
      oprot.writeStructEnd();
8294
    }
8295
 
8296
    @Override
8297
    public String toString() {
483 rajveer 8298
      StringBuilder sb = new StringBuilder("getAllOrders_args(");
68 ashish 8299
      boolean first = true;
8300
 
483 rajveer 8301
      sb.append("status:");
8302
      if (this.status == null) {
8303
        sb.append("null");
8304
      } else {
8305
        String status_name = status.name();
8306
        if (status_name != null) {
8307
          sb.append(status_name);
8308
          sb.append(" (");
8309
        }
8310
        sb.append(this.status);
8311
        if (status_name != null) {
8312
          sb.append(")");
8313
        }
8314
      }
68 ashish 8315
      first = false;
483 rajveer 8316
      if (!first) sb.append(", ");
8317
      sb.append("from_date:");
8318
      sb.append(this.from_date);
8319
      first = false;
8320
      if (!first) sb.append(", ");
8321
      sb.append("to_date:");
8322
      sb.append(this.to_date);
8323
      first = false;
8324
      if (!first) sb.append(", ");
8325
      sb.append("warehouse_id:");
8326
      sb.append(this.warehouse_id);
8327
      first = false;
68 ashish 8328
      sb.append(")");
8329
      return sb.toString();
8330
    }
8331
 
8332
    public void validate() throws TException {
8333
      // check for required fields
8334
    }
8335
 
8336
  }
8337
 
483 rajveer 8338
  public static class getAllOrders_result implements TBase<getAllOrders_result._Fields>, java.io.Serializable, Cloneable, Comparable<getAllOrders_result>   {
8339
    private static final TStruct STRUCT_DESC = new TStruct("getAllOrders_result");
68 ashish 8340
 
483 rajveer 8341
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
68 ashish 8342
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
8343
 
483 rajveer 8344
    private List<Order> success;
68 ashish 8345
    private TransactionServiceException ex;
8346
 
8347
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8348
    public enum _Fields implements TFieldIdEnum {
8349
      SUCCESS((short)0, "success"),
8350
      EX((short)1, "ex");
8351
 
8352
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
8353
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8354
 
8355
      static {
8356
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8357
          byId.put((int)field._thriftId, field);
8358
          byName.put(field.getFieldName(), field);
8359
        }
8360
      }
8361
 
8362
      /**
8363
       * Find the _Fields constant that matches fieldId, or null if its not found.
8364
       */
8365
      public static _Fields findByThriftId(int fieldId) {
8366
        return byId.get(fieldId);
8367
      }
8368
 
8369
      /**
8370
       * Find the _Fields constant that matches fieldId, throwing an exception
8371
       * if it is not found.
8372
       */
8373
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8374
        _Fields fields = findByThriftId(fieldId);
8375
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8376
        return fields;
8377
      }
8378
 
8379
      /**
8380
       * Find the _Fields constant that matches name, or null if its not found.
8381
       */
8382
      public static _Fields findByName(String name) {
8383
        return byName.get(name);
8384
      }
8385
 
8386
      private final short _thriftId;
8387
      private final String _fieldName;
8388
 
8389
      _Fields(short thriftId, String fieldName) {
8390
        _thriftId = thriftId;
8391
        _fieldName = fieldName;
8392
      }
8393
 
8394
      public short getThriftFieldId() {
8395
        return _thriftId;
8396
      }
8397
 
8398
      public String getFieldName() {
8399
        return _fieldName;
8400
      }
8401
    }
8402
 
8403
    // isset id assignments
8404
 
8405
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
8406
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
483 rajveer 8407
          new ListMetaData(TType.LIST, 
8408
              new StructMetaData(TType.STRUCT, Order.class))));
68 ashish 8409
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
8410
          new FieldValueMetaData(TType.STRUCT)));
8411
    }});
8412
 
8413
    static {
483 rajveer 8414
      FieldMetaData.addStructMetaDataMap(getAllOrders_result.class, metaDataMap);
68 ashish 8415
    }
8416
 
483 rajveer 8417
    public getAllOrders_result() {
68 ashish 8418
    }
8419
 
483 rajveer 8420
    public getAllOrders_result(
8421
      List<Order> success,
68 ashish 8422
      TransactionServiceException ex)
8423
    {
8424
      this();
8425
      this.success = success;
8426
      this.ex = ex;
8427
    }
8428
 
8429
    /**
8430
     * Performs a deep copy on <i>other</i>.
8431
     */
483 rajveer 8432
    public getAllOrders_result(getAllOrders_result other) {
68 ashish 8433
      if (other.isSetSuccess()) {
483 rajveer 8434
        List<Order> __this__success = new ArrayList<Order>();
8435
        for (Order other_element : other.success) {
8436
          __this__success.add(new Order(other_element));
8437
        }
8438
        this.success = __this__success;
68 ashish 8439
      }
8440
      if (other.isSetEx()) {
8441
        this.ex = new TransactionServiceException(other.ex);
8442
      }
8443
    }
8444
 
483 rajveer 8445
    public getAllOrders_result deepCopy() {
8446
      return new getAllOrders_result(this);
68 ashish 8447
    }
8448
 
8449
    @Deprecated
483 rajveer 8450
    public getAllOrders_result clone() {
8451
      return new getAllOrders_result(this);
68 ashish 8452
    }
8453
 
483 rajveer 8454
    public int getSuccessSize() {
8455
      return (this.success == null) ? 0 : this.success.size();
8456
    }
8457
 
8458
    public java.util.Iterator<Order> getSuccessIterator() {
8459
      return (this.success == null) ? null : this.success.iterator();
8460
    }
8461
 
8462
    public void addToSuccess(Order elem) {
8463
      if (this.success == null) {
8464
        this.success = new ArrayList<Order>();
8465
      }
8466
      this.success.add(elem);
8467
    }
8468
 
8469
    public List<Order> getSuccess() {
68 ashish 8470
      return this.success;
8471
    }
8472
 
483 rajveer 8473
    public getAllOrders_result setSuccess(List<Order> success) {
68 ashish 8474
      this.success = success;
8475
      return this;
8476
    }
8477
 
8478
    public void unsetSuccess() {
8479
      this.success = null;
8480
    }
8481
 
8482
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
8483
    public boolean isSetSuccess() {
8484
      return this.success != null;
8485
    }
8486
 
8487
    public void setSuccessIsSet(boolean value) {
8488
      if (!value) {
8489
        this.success = null;
8490
      }
8491
    }
8492
 
8493
    public TransactionServiceException getEx() {
8494
      return this.ex;
8495
    }
8496
 
483 rajveer 8497
    public getAllOrders_result setEx(TransactionServiceException ex) {
68 ashish 8498
      this.ex = ex;
8499
      return this;
8500
    }
8501
 
8502
    public void unsetEx() {
8503
      this.ex = null;
8504
    }
8505
 
8506
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
8507
    public boolean isSetEx() {
8508
      return this.ex != null;
8509
    }
8510
 
8511
    public void setExIsSet(boolean value) {
8512
      if (!value) {
8513
        this.ex = null;
8514
      }
8515
    }
8516
 
8517
    public void setFieldValue(_Fields field, Object value) {
8518
      switch (field) {
8519
      case SUCCESS:
8520
        if (value == null) {
8521
          unsetSuccess();
8522
        } else {
483 rajveer 8523
          setSuccess((List<Order>)value);
68 ashish 8524
        }
8525
        break;
8526
 
8527
      case EX:
8528
        if (value == null) {
8529
          unsetEx();
8530
        } else {
8531
          setEx((TransactionServiceException)value);
8532
        }
8533
        break;
8534
 
8535
      }
8536
    }
8537
 
8538
    public void setFieldValue(int fieldID, Object value) {
8539
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
8540
    }
8541
 
8542
    public Object getFieldValue(_Fields field) {
8543
      switch (field) {
8544
      case SUCCESS:
8545
        return getSuccess();
8546
 
8547
      case EX:
8548
        return getEx();
8549
 
8550
      }
8551
      throw new IllegalStateException();
8552
    }
8553
 
8554
    public Object getFieldValue(int fieldId) {
8555
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
8556
    }
8557
 
8558
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
8559
    public boolean isSet(_Fields field) {
8560
      switch (field) {
8561
      case SUCCESS:
8562
        return isSetSuccess();
8563
      case EX:
8564
        return isSetEx();
8565
      }
8566
      throw new IllegalStateException();
8567
    }
8568
 
8569
    public boolean isSet(int fieldID) {
8570
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
8571
    }
8572
 
8573
    @Override
8574
    public boolean equals(Object that) {
8575
      if (that == null)
8576
        return false;
483 rajveer 8577
      if (that instanceof getAllOrders_result)
8578
        return this.equals((getAllOrders_result)that);
68 ashish 8579
      return false;
8580
    }
8581
 
483 rajveer 8582
    public boolean equals(getAllOrders_result that) {
68 ashish 8583
      if (that == null)
8584
        return false;
8585
 
8586
      boolean this_present_success = true && this.isSetSuccess();
8587
      boolean that_present_success = true && that.isSetSuccess();
8588
      if (this_present_success || that_present_success) {
8589
        if (!(this_present_success && that_present_success))
8590
          return false;
8591
        if (!this.success.equals(that.success))
8592
          return false;
8593
      }
8594
 
8595
      boolean this_present_ex = true && this.isSetEx();
8596
      boolean that_present_ex = true && that.isSetEx();
8597
      if (this_present_ex || that_present_ex) {
8598
        if (!(this_present_ex && that_present_ex))
8599
          return false;
8600
        if (!this.ex.equals(that.ex))
8601
          return false;
8602
      }
8603
 
8604
      return true;
8605
    }
8606
 
8607
    @Override
8608
    public int hashCode() {
8609
      return 0;
8610
    }
8611
 
483 rajveer 8612
    public int compareTo(getAllOrders_result other) {
8613
      if (!getClass().equals(other.getClass())) {
8614
        return getClass().getName().compareTo(other.getClass().getName());
8615
      }
8616
 
8617
      int lastComparison = 0;
8618
      getAllOrders_result typedOther = (getAllOrders_result)other;
8619
 
8620
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
8621
      if (lastComparison != 0) {
8622
        return lastComparison;
8623
      }
8624
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
8625
      if (lastComparison != 0) {
8626
        return lastComparison;
8627
      }
8628
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
8629
      if (lastComparison != 0) {
8630
        return lastComparison;
8631
      }
8632
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
8633
      if (lastComparison != 0) {
8634
        return lastComparison;
8635
      }
8636
      return 0;
8637
    }
8638
 
68 ashish 8639
    public void read(TProtocol iprot) throws TException {
8640
      TField field;
8641
      iprot.readStructBegin();
8642
      while (true)
8643
      {
8644
        field = iprot.readFieldBegin();
8645
        if (field.type == TType.STOP) { 
8646
          break;
8647
        }
8648
        _Fields fieldId = _Fields.findByThriftId(field.id);
8649
        if (fieldId == null) {
8650
          TProtocolUtil.skip(iprot, field.type);
8651
        } else {
8652
          switch (fieldId) {
8653
            case SUCCESS:
483 rajveer 8654
              if (field.type == TType.LIST) {
8655
                {
684 chandransh 8656
                  TList _list16 = iprot.readListBegin();
8657
                  this.success = new ArrayList<Order>(_list16.size);
8658
                  for (int _i17 = 0; _i17 < _list16.size; ++_i17)
483 rajveer 8659
                  {
684 chandransh 8660
                    Order _elem18;
8661
                    _elem18 = new Order();
8662
                    _elem18.read(iprot);
8663
                    this.success.add(_elem18);
483 rajveer 8664
                  }
8665
                  iprot.readListEnd();
8666
                }
68 ashish 8667
              } else { 
8668
                TProtocolUtil.skip(iprot, field.type);
8669
              }
8670
              break;
8671
            case EX:
8672
              if (field.type == TType.STRUCT) {
8673
                this.ex = new TransactionServiceException();
8674
                this.ex.read(iprot);
8675
              } else { 
8676
                TProtocolUtil.skip(iprot, field.type);
8677
              }
8678
              break;
8679
          }
8680
          iprot.readFieldEnd();
8681
        }
8682
      }
8683
      iprot.readStructEnd();
8684
      validate();
8685
    }
8686
 
8687
    public void write(TProtocol oprot) throws TException {
8688
      oprot.writeStructBegin(STRUCT_DESC);
8689
 
8690
      if (this.isSetSuccess()) {
8691
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
483 rajveer 8692
        {
8693
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
684 chandransh 8694
          for (Order _iter19 : this.success)
483 rajveer 8695
          {
684 chandransh 8696
            _iter19.write(oprot);
483 rajveer 8697
          }
8698
          oprot.writeListEnd();
8699
        }
68 ashish 8700
        oprot.writeFieldEnd();
8701
      } else if (this.isSetEx()) {
8702
        oprot.writeFieldBegin(EX_FIELD_DESC);
8703
        this.ex.write(oprot);
8704
        oprot.writeFieldEnd();
8705
      }
8706
      oprot.writeFieldStop();
8707
      oprot.writeStructEnd();
8708
    }
8709
 
8710
    @Override
8711
    public String toString() {
483 rajveer 8712
      StringBuilder sb = new StringBuilder("getAllOrders_result(");
68 ashish 8713
      boolean first = true;
8714
 
8715
      sb.append("success:");
8716
      if (this.success == null) {
8717
        sb.append("null");
8718
      } else {
8719
        sb.append(this.success);
8720
      }
8721
      first = false;
8722
      if (!first) sb.append(", ");
8723
      sb.append("ex:");
8724
      if (this.ex == null) {
8725
        sb.append("null");
8726
      } else {
8727
        sb.append(this.ex);
8728
      }
8729
      first = false;
8730
      sb.append(")");
8731
      return sb.toString();
8732
    }
8733
 
8734
    public void validate() throws TException {
8735
      // check for required fields
8736
    }
8737
 
8738
  }
8739
 
1022 varun.gupt 8740
  public static class getOrdersByBillingDate_args implements TBase<getOrdersByBillingDate_args._Fields>, java.io.Serializable, Cloneable, Comparable<getOrdersByBillingDate_args>   {
8741
    private static final TStruct STRUCT_DESC = new TStruct("getOrdersByBillingDate_args");
8742
 
8743
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)1);
8744
    private static final TField START_BILLING_DATE_FIELD_DESC = new TField("start_billing_date", TType.I64, (short)2);
8745
    private static final TField END_BILLING_DATE_FIELD_DESC = new TField("end_billing_date", TType.I64, (short)3);
8746
    private static final TField WAREHOUSE_ID_FIELD_DESC = new TField("warehouse_id", TType.I64, (short)4);
8747
 
8748
    private OrderStatus status;
8749
    private long start_billing_date;
8750
    private long end_billing_date;
8751
    private long warehouse_id;
8752
 
8753
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8754
    public enum _Fields implements TFieldIdEnum {
8755
      /**
8756
       * 
8757
       * @see OrderStatus
8758
       */
8759
      STATUS((short)1, "status"),
8760
      START_BILLING_DATE((short)2, "start_billing_date"),
8761
      END_BILLING_DATE((short)3, "end_billing_date"),
8762
      WAREHOUSE_ID((short)4, "warehouse_id");
8763
 
8764
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
8765
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8766
 
8767
      static {
8768
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8769
          byId.put((int)field._thriftId, field);
8770
          byName.put(field.getFieldName(), field);
8771
        }
8772
      }
8773
 
8774
      /**
8775
       * Find the _Fields constant that matches fieldId, or null if its not found.
8776
       */
8777
      public static _Fields findByThriftId(int fieldId) {
8778
        return byId.get(fieldId);
8779
      }
8780
 
8781
      /**
8782
       * Find the _Fields constant that matches fieldId, throwing an exception
8783
       * if it is not found.
8784
       */
8785
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8786
        _Fields fields = findByThriftId(fieldId);
8787
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8788
        return fields;
8789
      }
8790
 
8791
      /**
8792
       * Find the _Fields constant that matches name, or null if its not found.
8793
       */
8794
      public static _Fields findByName(String name) {
8795
        return byName.get(name);
8796
      }
8797
 
8798
      private final short _thriftId;
8799
      private final String _fieldName;
8800
 
8801
      _Fields(short thriftId, String fieldName) {
8802
        _thriftId = thriftId;
8803
        _fieldName = fieldName;
8804
      }
8805
 
8806
      public short getThriftFieldId() {
8807
        return _thriftId;
8808
      }
8809
 
8810
      public String getFieldName() {
8811
        return _fieldName;
8812
      }
8813
    }
8814
 
8815
    // isset id assignments
8816
    private static final int __START_BILLING_DATE_ISSET_ID = 0;
8817
    private static final int __END_BILLING_DATE_ISSET_ID = 1;
8818
    private static final int __WAREHOUSE_ID_ISSET_ID = 2;
8819
    private BitSet __isset_bit_vector = new BitSet(3);
8820
 
8821
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
8822
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
8823
          new EnumMetaData(TType.ENUM, OrderStatus.class)));
8824
      put(_Fields.START_BILLING_DATE, new FieldMetaData("start_billing_date", TFieldRequirementType.DEFAULT, 
8825
          new FieldValueMetaData(TType.I64)));
8826
      put(_Fields.END_BILLING_DATE, new FieldMetaData("end_billing_date", TFieldRequirementType.DEFAULT, 
8827
          new FieldValueMetaData(TType.I64)));
8828
      put(_Fields.WAREHOUSE_ID, new FieldMetaData("warehouse_id", TFieldRequirementType.DEFAULT, 
8829
          new FieldValueMetaData(TType.I64)));
8830
    }});
8831
 
8832
    static {
8833
      FieldMetaData.addStructMetaDataMap(getOrdersByBillingDate_args.class, metaDataMap);
8834
    }
8835
 
8836
    public getOrdersByBillingDate_args() {
8837
    }
8838
 
8839
    public getOrdersByBillingDate_args(
8840
      OrderStatus status,
8841
      long start_billing_date,
8842
      long end_billing_date,
8843
      long warehouse_id)
8844
    {
8845
      this();
8846
      this.status = status;
8847
      this.start_billing_date = start_billing_date;
8848
      setStart_billing_dateIsSet(true);
8849
      this.end_billing_date = end_billing_date;
8850
      setEnd_billing_dateIsSet(true);
8851
      this.warehouse_id = warehouse_id;
8852
      setWarehouse_idIsSet(true);
8853
    }
8854
 
8855
    /**
8856
     * Performs a deep copy on <i>other</i>.
8857
     */
8858
    public getOrdersByBillingDate_args(getOrdersByBillingDate_args other) {
8859
      __isset_bit_vector.clear();
8860
      __isset_bit_vector.or(other.__isset_bit_vector);
8861
      if (other.isSetStatus()) {
8862
        this.status = other.status;
8863
      }
8864
      this.start_billing_date = other.start_billing_date;
8865
      this.end_billing_date = other.end_billing_date;
8866
      this.warehouse_id = other.warehouse_id;
8867
    }
8868
 
8869
    public getOrdersByBillingDate_args deepCopy() {
8870
      return new getOrdersByBillingDate_args(this);
8871
    }
8872
 
8873
    @Deprecated
8874
    public getOrdersByBillingDate_args clone() {
8875
      return new getOrdersByBillingDate_args(this);
8876
    }
8877
 
8878
    /**
8879
     * 
8880
     * @see OrderStatus
8881
     */
8882
    public OrderStatus getStatus() {
8883
      return this.status;
8884
    }
8885
 
8886
    /**
8887
     * 
8888
     * @see OrderStatus
8889
     */
8890
    public getOrdersByBillingDate_args setStatus(OrderStatus status) {
8891
      this.status = status;
8892
      return this;
8893
    }
8894
 
8895
    public void unsetStatus() {
8896
      this.status = null;
8897
    }
8898
 
8899
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
8900
    public boolean isSetStatus() {
8901
      return this.status != null;
8902
    }
8903
 
8904
    public void setStatusIsSet(boolean value) {
8905
      if (!value) {
8906
        this.status = null;
8907
      }
8908
    }
8909
 
8910
    public long getStart_billing_date() {
8911
      return this.start_billing_date;
8912
    }
8913
 
8914
    public getOrdersByBillingDate_args setStart_billing_date(long start_billing_date) {
8915
      this.start_billing_date = start_billing_date;
8916
      setStart_billing_dateIsSet(true);
8917
      return this;
8918
    }
8919
 
8920
    public void unsetStart_billing_date() {
8921
      __isset_bit_vector.clear(__START_BILLING_DATE_ISSET_ID);
8922
    }
8923
 
8924
    /** Returns true if field start_billing_date is set (has been asigned a value) and false otherwise */
8925
    public boolean isSetStart_billing_date() {
8926
      return __isset_bit_vector.get(__START_BILLING_DATE_ISSET_ID);
8927
    }
8928
 
8929
    public void setStart_billing_dateIsSet(boolean value) {
8930
      __isset_bit_vector.set(__START_BILLING_DATE_ISSET_ID, value);
8931
    }
8932
 
8933
    public long getEnd_billing_date() {
8934
      return this.end_billing_date;
8935
    }
8936
 
8937
    public getOrdersByBillingDate_args setEnd_billing_date(long end_billing_date) {
8938
      this.end_billing_date = end_billing_date;
8939
      setEnd_billing_dateIsSet(true);
8940
      return this;
8941
    }
8942
 
8943
    public void unsetEnd_billing_date() {
8944
      __isset_bit_vector.clear(__END_BILLING_DATE_ISSET_ID);
8945
    }
8946
 
8947
    /** Returns true if field end_billing_date is set (has been asigned a value) and false otherwise */
8948
    public boolean isSetEnd_billing_date() {
8949
      return __isset_bit_vector.get(__END_BILLING_DATE_ISSET_ID);
8950
    }
8951
 
8952
    public void setEnd_billing_dateIsSet(boolean value) {
8953
      __isset_bit_vector.set(__END_BILLING_DATE_ISSET_ID, value);
8954
    }
8955
 
8956
    public long getWarehouse_id() {
8957
      return this.warehouse_id;
8958
    }
8959
 
8960
    public getOrdersByBillingDate_args setWarehouse_id(long warehouse_id) {
8961
      this.warehouse_id = warehouse_id;
8962
      setWarehouse_idIsSet(true);
8963
      return this;
8964
    }
8965
 
8966
    public void unsetWarehouse_id() {
8967
      __isset_bit_vector.clear(__WAREHOUSE_ID_ISSET_ID);
8968
    }
8969
 
8970
    /** Returns true if field warehouse_id is set (has been asigned a value) and false otherwise */
8971
    public boolean isSetWarehouse_id() {
8972
      return __isset_bit_vector.get(__WAREHOUSE_ID_ISSET_ID);
8973
    }
8974
 
8975
    public void setWarehouse_idIsSet(boolean value) {
8976
      __isset_bit_vector.set(__WAREHOUSE_ID_ISSET_ID, value);
8977
    }
8978
 
8979
    public void setFieldValue(_Fields field, Object value) {
8980
      switch (field) {
8981
      case STATUS:
8982
        if (value == null) {
8983
          unsetStatus();
8984
        } else {
8985
          setStatus((OrderStatus)value);
8986
        }
8987
        break;
8988
 
8989
      case START_BILLING_DATE:
8990
        if (value == null) {
8991
          unsetStart_billing_date();
8992
        } else {
8993
          setStart_billing_date((Long)value);
8994
        }
8995
        break;
8996
 
8997
      case END_BILLING_DATE:
8998
        if (value == null) {
8999
          unsetEnd_billing_date();
9000
        } else {
9001
          setEnd_billing_date((Long)value);
9002
        }
9003
        break;
9004
 
9005
      case WAREHOUSE_ID:
9006
        if (value == null) {
9007
          unsetWarehouse_id();
9008
        } else {
9009
          setWarehouse_id((Long)value);
9010
        }
9011
        break;
9012
 
9013
      }
9014
    }
9015
 
9016
    public void setFieldValue(int fieldID, Object value) {
9017
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
9018
    }
9019
 
9020
    public Object getFieldValue(_Fields field) {
9021
      switch (field) {
9022
      case STATUS:
9023
        return getStatus();
9024
 
9025
      case START_BILLING_DATE:
9026
        return new Long(getStart_billing_date());
9027
 
9028
      case END_BILLING_DATE:
9029
        return new Long(getEnd_billing_date());
9030
 
9031
      case WAREHOUSE_ID:
9032
        return new Long(getWarehouse_id());
9033
 
9034
      }
9035
      throw new IllegalStateException();
9036
    }
9037
 
9038
    public Object getFieldValue(int fieldId) {
9039
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
9040
    }
9041
 
9042
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
9043
    public boolean isSet(_Fields field) {
9044
      switch (field) {
9045
      case STATUS:
9046
        return isSetStatus();
9047
      case START_BILLING_DATE:
9048
        return isSetStart_billing_date();
9049
      case END_BILLING_DATE:
9050
        return isSetEnd_billing_date();
9051
      case WAREHOUSE_ID:
9052
        return isSetWarehouse_id();
9053
      }
9054
      throw new IllegalStateException();
9055
    }
9056
 
9057
    public boolean isSet(int fieldID) {
9058
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
9059
    }
9060
 
9061
    @Override
9062
    public boolean equals(Object that) {
9063
      if (that == null)
9064
        return false;
9065
      if (that instanceof getOrdersByBillingDate_args)
9066
        return this.equals((getOrdersByBillingDate_args)that);
9067
      return false;
9068
    }
9069
 
9070
    public boolean equals(getOrdersByBillingDate_args that) {
9071
      if (that == null)
9072
        return false;
9073
 
9074
      boolean this_present_status = true && this.isSetStatus();
9075
      boolean that_present_status = true && that.isSetStatus();
9076
      if (this_present_status || that_present_status) {
9077
        if (!(this_present_status && that_present_status))
9078
          return false;
9079
        if (!this.status.equals(that.status))
9080
          return false;
9081
      }
9082
 
9083
      boolean this_present_start_billing_date = true;
9084
      boolean that_present_start_billing_date = true;
9085
      if (this_present_start_billing_date || that_present_start_billing_date) {
9086
        if (!(this_present_start_billing_date && that_present_start_billing_date))
9087
          return false;
9088
        if (this.start_billing_date != that.start_billing_date)
9089
          return false;
9090
      }
9091
 
9092
      boolean this_present_end_billing_date = true;
9093
      boolean that_present_end_billing_date = true;
9094
      if (this_present_end_billing_date || that_present_end_billing_date) {
9095
        if (!(this_present_end_billing_date && that_present_end_billing_date))
9096
          return false;
9097
        if (this.end_billing_date != that.end_billing_date)
9098
          return false;
9099
      }
9100
 
9101
      boolean this_present_warehouse_id = true;
9102
      boolean that_present_warehouse_id = true;
9103
      if (this_present_warehouse_id || that_present_warehouse_id) {
9104
        if (!(this_present_warehouse_id && that_present_warehouse_id))
9105
          return false;
9106
        if (this.warehouse_id != that.warehouse_id)
9107
          return false;
9108
      }
9109
 
9110
      return true;
9111
    }
9112
 
9113
    @Override
9114
    public int hashCode() {
9115
      return 0;
9116
    }
9117
 
9118
    public int compareTo(getOrdersByBillingDate_args other) {
9119
      if (!getClass().equals(other.getClass())) {
9120
        return getClass().getName().compareTo(other.getClass().getName());
9121
      }
9122
 
9123
      int lastComparison = 0;
9124
      getOrdersByBillingDate_args typedOther = (getOrdersByBillingDate_args)other;
9125
 
9126
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
9127
      if (lastComparison != 0) {
9128
        return lastComparison;
9129
      }
9130
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
9131
      if (lastComparison != 0) {
9132
        return lastComparison;
9133
      }
9134
      lastComparison = Boolean.valueOf(isSetStart_billing_date()).compareTo(isSetStart_billing_date());
9135
      if (lastComparison != 0) {
9136
        return lastComparison;
9137
      }
9138
      lastComparison = TBaseHelper.compareTo(start_billing_date, typedOther.start_billing_date);
9139
      if (lastComparison != 0) {
9140
        return lastComparison;
9141
      }
9142
      lastComparison = Boolean.valueOf(isSetEnd_billing_date()).compareTo(isSetEnd_billing_date());
9143
      if (lastComparison != 0) {
9144
        return lastComparison;
9145
      }
9146
      lastComparison = TBaseHelper.compareTo(end_billing_date, typedOther.end_billing_date);
9147
      if (lastComparison != 0) {
9148
        return lastComparison;
9149
      }
9150
      lastComparison = Boolean.valueOf(isSetWarehouse_id()).compareTo(isSetWarehouse_id());
9151
      if (lastComparison != 0) {
9152
        return lastComparison;
9153
      }
9154
      lastComparison = TBaseHelper.compareTo(warehouse_id, typedOther.warehouse_id);
9155
      if (lastComparison != 0) {
9156
        return lastComparison;
9157
      }
9158
      return 0;
9159
    }
9160
 
9161
    public void read(TProtocol iprot) throws TException {
9162
      TField field;
9163
      iprot.readStructBegin();
9164
      while (true)
9165
      {
9166
        field = iprot.readFieldBegin();
9167
        if (field.type == TType.STOP) { 
9168
          break;
9169
        }
9170
        _Fields fieldId = _Fields.findByThriftId(field.id);
9171
        if (fieldId == null) {
9172
          TProtocolUtil.skip(iprot, field.type);
9173
        } else {
9174
          switch (fieldId) {
9175
            case STATUS:
9176
              if (field.type == TType.I32) {
9177
                this.status = OrderStatus.findByValue(iprot.readI32());
9178
              } else { 
9179
                TProtocolUtil.skip(iprot, field.type);
9180
              }
9181
              break;
9182
            case START_BILLING_DATE:
9183
              if (field.type == TType.I64) {
9184
                this.start_billing_date = iprot.readI64();
9185
                setStart_billing_dateIsSet(true);
9186
              } else { 
9187
                TProtocolUtil.skip(iprot, field.type);
9188
              }
9189
              break;
9190
            case END_BILLING_DATE:
9191
              if (field.type == TType.I64) {
9192
                this.end_billing_date = iprot.readI64();
9193
                setEnd_billing_dateIsSet(true);
9194
              } else { 
9195
                TProtocolUtil.skip(iprot, field.type);
9196
              }
9197
              break;
9198
            case WAREHOUSE_ID:
9199
              if (field.type == TType.I64) {
9200
                this.warehouse_id = iprot.readI64();
9201
                setWarehouse_idIsSet(true);
9202
              } else { 
9203
                TProtocolUtil.skip(iprot, field.type);
9204
              }
9205
              break;
9206
          }
9207
          iprot.readFieldEnd();
9208
        }
9209
      }
9210
      iprot.readStructEnd();
9211
      validate();
9212
    }
9213
 
9214
    public void write(TProtocol oprot) throws TException {
9215
      validate();
9216
 
9217
      oprot.writeStructBegin(STRUCT_DESC);
9218
      if (this.status != null) {
9219
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
9220
        oprot.writeI32(this.status.getValue());
9221
        oprot.writeFieldEnd();
9222
      }
9223
      oprot.writeFieldBegin(START_BILLING_DATE_FIELD_DESC);
9224
      oprot.writeI64(this.start_billing_date);
9225
      oprot.writeFieldEnd();
9226
      oprot.writeFieldBegin(END_BILLING_DATE_FIELD_DESC);
9227
      oprot.writeI64(this.end_billing_date);
9228
      oprot.writeFieldEnd();
9229
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
9230
      oprot.writeI64(this.warehouse_id);
9231
      oprot.writeFieldEnd();
9232
      oprot.writeFieldStop();
9233
      oprot.writeStructEnd();
9234
    }
9235
 
9236
    @Override
9237
    public String toString() {
9238
      StringBuilder sb = new StringBuilder("getOrdersByBillingDate_args(");
9239
      boolean first = true;
9240
 
9241
      sb.append("status:");
9242
      if (this.status == null) {
9243
        sb.append("null");
9244
      } else {
9245
        String status_name = status.name();
9246
        if (status_name != null) {
9247
          sb.append(status_name);
9248
          sb.append(" (");
9249
        }
9250
        sb.append(this.status);
9251
        if (status_name != null) {
9252
          sb.append(")");
9253
        }
9254
      }
9255
      first = false;
9256
      if (!first) sb.append(", ");
9257
      sb.append("start_billing_date:");
9258
      sb.append(this.start_billing_date);
9259
      first = false;
9260
      if (!first) sb.append(", ");
9261
      sb.append("end_billing_date:");
9262
      sb.append(this.end_billing_date);
9263
      first = false;
9264
      if (!first) sb.append(", ");
9265
      sb.append("warehouse_id:");
9266
      sb.append(this.warehouse_id);
9267
      first = false;
9268
      sb.append(")");
9269
      return sb.toString();
9270
    }
9271
 
9272
    public void validate() throws TException {
9273
      // check for required fields
9274
    }
9275
 
9276
  }
9277
 
9278
  public static class getOrdersByBillingDate_result implements TBase<getOrdersByBillingDate_result._Fields>, java.io.Serializable, Cloneable, Comparable<getOrdersByBillingDate_result>   {
9279
    private static final TStruct STRUCT_DESC = new TStruct("getOrdersByBillingDate_result");
9280
 
9281
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
9282
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
9283
 
9284
    private List<Order> success;
9285
    private TransactionServiceException ex;
9286
 
9287
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9288
    public enum _Fields implements TFieldIdEnum {
9289
      SUCCESS((short)0, "success"),
9290
      EX((short)1, "ex");
9291
 
9292
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
9293
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9294
 
9295
      static {
9296
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9297
          byId.put((int)field._thriftId, field);
9298
          byName.put(field.getFieldName(), field);
9299
        }
9300
      }
9301
 
9302
      /**
9303
       * Find the _Fields constant that matches fieldId, or null if its not found.
9304
       */
9305
      public static _Fields findByThriftId(int fieldId) {
9306
        return byId.get(fieldId);
9307
      }
9308
 
9309
      /**
9310
       * Find the _Fields constant that matches fieldId, throwing an exception
9311
       * if it is not found.
9312
       */
9313
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9314
        _Fields fields = findByThriftId(fieldId);
9315
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9316
        return fields;
9317
      }
9318
 
9319
      /**
9320
       * Find the _Fields constant that matches name, or null if its not found.
9321
       */
9322
      public static _Fields findByName(String name) {
9323
        return byName.get(name);
9324
      }
9325
 
9326
      private final short _thriftId;
9327
      private final String _fieldName;
9328
 
9329
      _Fields(short thriftId, String fieldName) {
9330
        _thriftId = thriftId;
9331
        _fieldName = fieldName;
9332
      }
9333
 
9334
      public short getThriftFieldId() {
9335
        return _thriftId;
9336
      }
9337
 
9338
      public String getFieldName() {
9339
        return _fieldName;
9340
      }
9341
    }
9342
 
9343
    // isset id assignments
9344
 
9345
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
9346
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
9347
          new ListMetaData(TType.LIST, 
9348
              new StructMetaData(TType.STRUCT, Order.class))));
9349
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
9350
          new FieldValueMetaData(TType.STRUCT)));
9351
    }});
9352
 
9353
    static {
9354
      FieldMetaData.addStructMetaDataMap(getOrdersByBillingDate_result.class, metaDataMap);
9355
    }
9356
 
9357
    public getOrdersByBillingDate_result() {
9358
    }
9359
 
9360
    public getOrdersByBillingDate_result(
9361
      List<Order> success,
9362
      TransactionServiceException ex)
9363
    {
9364
      this();
9365
      this.success = success;
9366
      this.ex = ex;
9367
    }
9368
 
9369
    /**
9370
     * Performs a deep copy on <i>other</i>.
9371
     */
9372
    public getOrdersByBillingDate_result(getOrdersByBillingDate_result other) {
9373
      if (other.isSetSuccess()) {
9374
        List<Order> __this__success = new ArrayList<Order>();
9375
        for (Order other_element : other.success) {
9376
          __this__success.add(new Order(other_element));
9377
        }
9378
        this.success = __this__success;
9379
      }
9380
      if (other.isSetEx()) {
9381
        this.ex = new TransactionServiceException(other.ex);
9382
      }
9383
    }
9384
 
9385
    public getOrdersByBillingDate_result deepCopy() {
9386
      return new getOrdersByBillingDate_result(this);
9387
    }
9388
 
9389
    @Deprecated
9390
    public getOrdersByBillingDate_result clone() {
9391
      return new getOrdersByBillingDate_result(this);
9392
    }
9393
 
9394
    public int getSuccessSize() {
9395
      return (this.success == null) ? 0 : this.success.size();
9396
    }
9397
 
9398
    public java.util.Iterator<Order> getSuccessIterator() {
9399
      return (this.success == null) ? null : this.success.iterator();
9400
    }
9401
 
9402
    public void addToSuccess(Order elem) {
9403
      if (this.success == null) {
9404
        this.success = new ArrayList<Order>();
9405
      }
9406
      this.success.add(elem);
9407
    }
9408
 
9409
    public List<Order> getSuccess() {
9410
      return this.success;
9411
    }
9412
 
9413
    public getOrdersByBillingDate_result setSuccess(List<Order> success) {
9414
      this.success = success;
9415
      return this;
9416
    }
9417
 
9418
    public void unsetSuccess() {
9419
      this.success = null;
9420
    }
9421
 
9422
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
9423
    public boolean isSetSuccess() {
9424
      return this.success != null;
9425
    }
9426
 
9427
    public void setSuccessIsSet(boolean value) {
9428
      if (!value) {
9429
        this.success = null;
9430
      }
9431
    }
9432
 
9433
    public TransactionServiceException getEx() {
9434
      return this.ex;
9435
    }
9436
 
9437
    public getOrdersByBillingDate_result setEx(TransactionServiceException ex) {
9438
      this.ex = ex;
9439
      return this;
9440
    }
9441
 
9442
    public void unsetEx() {
9443
      this.ex = null;
9444
    }
9445
 
9446
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
9447
    public boolean isSetEx() {
9448
      return this.ex != null;
9449
    }
9450
 
9451
    public void setExIsSet(boolean value) {
9452
      if (!value) {
9453
        this.ex = null;
9454
      }
9455
    }
9456
 
9457
    public void setFieldValue(_Fields field, Object value) {
9458
      switch (field) {
9459
      case SUCCESS:
9460
        if (value == null) {
9461
          unsetSuccess();
9462
        } else {
9463
          setSuccess((List<Order>)value);
9464
        }
9465
        break;
9466
 
9467
      case EX:
9468
        if (value == null) {
9469
          unsetEx();
9470
        } else {
9471
          setEx((TransactionServiceException)value);
9472
        }
9473
        break;
9474
 
9475
      }
9476
    }
9477
 
9478
    public void setFieldValue(int fieldID, Object value) {
9479
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
9480
    }
9481
 
9482
    public Object getFieldValue(_Fields field) {
9483
      switch (field) {
9484
      case SUCCESS:
9485
        return getSuccess();
9486
 
9487
      case EX:
9488
        return getEx();
9489
 
9490
      }
9491
      throw new IllegalStateException();
9492
    }
9493
 
9494
    public Object getFieldValue(int fieldId) {
9495
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
9496
    }
9497
 
9498
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
9499
    public boolean isSet(_Fields field) {
9500
      switch (field) {
9501
      case SUCCESS:
9502
        return isSetSuccess();
9503
      case EX:
9504
        return isSetEx();
9505
      }
9506
      throw new IllegalStateException();
9507
    }
9508
 
9509
    public boolean isSet(int fieldID) {
9510
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
9511
    }
9512
 
9513
    @Override
9514
    public boolean equals(Object that) {
9515
      if (that == null)
9516
        return false;
9517
      if (that instanceof getOrdersByBillingDate_result)
9518
        return this.equals((getOrdersByBillingDate_result)that);
9519
      return false;
9520
    }
9521
 
9522
    public boolean equals(getOrdersByBillingDate_result that) {
9523
      if (that == null)
9524
        return false;
9525
 
9526
      boolean this_present_success = true && this.isSetSuccess();
9527
      boolean that_present_success = true && that.isSetSuccess();
9528
      if (this_present_success || that_present_success) {
9529
        if (!(this_present_success && that_present_success))
9530
          return false;
9531
        if (!this.success.equals(that.success))
9532
          return false;
9533
      }
9534
 
9535
      boolean this_present_ex = true && this.isSetEx();
9536
      boolean that_present_ex = true && that.isSetEx();
9537
      if (this_present_ex || that_present_ex) {
9538
        if (!(this_present_ex && that_present_ex))
9539
          return false;
9540
        if (!this.ex.equals(that.ex))
9541
          return false;
9542
      }
9543
 
9544
      return true;
9545
    }
9546
 
9547
    @Override
9548
    public int hashCode() {
9549
      return 0;
9550
    }
9551
 
9552
    public int compareTo(getOrdersByBillingDate_result other) {
9553
      if (!getClass().equals(other.getClass())) {
9554
        return getClass().getName().compareTo(other.getClass().getName());
9555
      }
9556
 
9557
      int lastComparison = 0;
9558
      getOrdersByBillingDate_result typedOther = (getOrdersByBillingDate_result)other;
9559
 
9560
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
9561
      if (lastComparison != 0) {
9562
        return lastComparison;
9563
      }
9564
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
9565
      if (lastComparison != 0) {
9566
        return lastComparison;
9567
      }
9568
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
9569
      if (lastComparison != 0) {
9570
        return lastComparison;
9571
      }
9572
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
9573
      if (lastComparison != 0) {
9574
        return lastComparison;
9575
      }
9576
      return 0;
9577
    }
9578
 
9579
    public void read(TProtocol iprot) throws TException {
9580
      TField field;
9581
      iprot.readStructBegin();
9582
      while (true)
9583
      {
9584
        field = iprot.readFieldBegin();
9585
        if (field.type == TType.STOP) { 
9586
          break;
9587
        }
9588
        _Fields fieldId = _Fields.findByThriftId(field.id);
9589
        if (fieldId == null) {
9590
          TProtocolUtil.skip(iprot, field.type);
9591
        } else {
9592
          switch (fieldId) {
9593
            case SUCCESS:
9594
              if (field.type == TType.LIST) {
9595
                {
9596
                  TList _list20 = iprot.readListBegin();
9597
                  this.success = new ArrayList<Order>(_list20.size);
9598
                  for (int _i21 = 0; _i21 < _list20.size; ++_i21)
9599
                  {
9600
                    Order _elem22;
9601
                    _elem22 = new Order();
9602
                    _elem22.read(iprot);
9603
                    this.success.add(_elem22);
9604
                  }
9605
                  iprot.readListEnd();
9606
                }
9607
              } else { 
9608
                TProtocolUtil.skip(iprot, field.type);
9609
              }
9610
              break;
9611
            case EX:
9612
              if (field.type == TType.STRUCT) {
9613
                this.ex = new TransactionServiceException();
9614
                this.ex.read(iprot);
9615
              } else { 
9616
                TProtocolUtil.skip(iprot, field.type);
9617
              }
9618
              break;
9619
          }
9620
          iprot.readFieldEnd();
9621
        }
9622
      }
9623
      iprot.readStructEnd();
9624
      validate();
9625
    }
9626
 
9627
    public void write(TProtocol oprot) throws TException {
9628
      oprot.writeStructBegin(STRUCT_DESC);
9629
 
9630
      if (this.isSetSuccess()) {
9631
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
9632
        {
9633
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
9634
          for (Order _iter23 : this.success)
9635
          {
9636
            _iter23.write(oprot);
9637
          }
9638
          oprot.writeListEnd();
9639
        }
9640
        oprot.writeFieldEnd();
9641
      } else if (this.isSetEx()) {
9642
        oprot.writeFieldBegin(EX_FIELD_DESC);
9643
        this.ex.write(oprot);
9644
        oprot.writeFieldEnd();
9645
      }
9646
      oprot.writeFieldStop();
9647
      oprot.writeStructEnd();
9648
    }
9649
 
9650
    @Override
9651
    public String toString() {
9652
      StringBuilder sb = new StringBuilder("getOrdersByBillingDate_result(");
9653
      boolean first = true;
9654
 
9655
      sb.append("success:");
9656
      if (this.success == null) {
9657
        sb.append("null");
9658
      } else {
9659
        sb.append(this.success);
9660
      }
9661
      first = false;
9662
      if (!first) sb.append(", ");
9663
      sb.append("ex:");
9664
      if (this.ex == null) {
9665
        sb.append("null");
9666
      } else {
9667
        sb.append(this.ex);
9668
      }
9669
      first = false;
9670
      sb.append(")");
9671
      return sb.toString();
9672
    }
9673
 
9674
    public void validate() throws TException {
9675
      // check for required fields
9676
    }
9677
 
9678
  }
9679
 
1382 varun.gupt 9680
  public static class getReturnableOrdersForCustomer_args implements TBase<getReturnableOrdersForCustomer_args._Fields>, java.io.Serializable, Cloneable, Comparable<getReturnableOrdersForCustomer_args>   {
9681
    private static final TStruct STRUCT_DESC = new TStruct("getReturnableOrdersForCustomer_args");
9682
 
9683
    private static final TField CUSTOMER_ID_FIELD_DESC = new TField("customer_id", TType.I64, (short)1);
9684
    private static final TField LIMIT_FIELD_DESC = new TField("limit", TType.I64, (short)2);
9685
 
9686
    private long customer_id;
9687
    private long limit;
9688
 
9689
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9690
    public enum _Fields implements TFieldIdEnum {
9691
      CUSTOMER_ID((short)1, "customer_id"),
9692
      LIMIT((short)2, "limit");
9693
 
9694
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
9695
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9696
 
9697
      static {
9698
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9699
          byId.put((int)field._thriftId, field);
9700
          byName.put(field.getFieldName(), field);
9701
        }
9702
      }
9703
 
9704
      /**
9705
       * Find the _Fields constant that matches fieldId, or null if its not found.
9706
       */
9707
      public static _Fields findByThriftId(int fieldId) {
9708
        return byId.get(fieldId);
9709
      }
9710
 
9711
      /**
9712
       * Find the _Fields constant that matches fieldId, throwing an exception
9713
       * if it is not found.
9714
       */
9715
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9716
        _Fields fields = findByThriftId(fieldId);
9717
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9718
        return fields;
9719
      }
9720
 
9721
      /**
9722
       * Find the _Fields constant that matches name, or null if its not found.
9723
       */
9724
      public static _Fields findByName(String name) {
9725
        return byName.get(name);
9726
      }
9727
 
9728
      private final short _thriftId;
9729
      private final String _fieldName;
9730
 
9731
      _Fields(short thriftId, String fieldName) {
9732
        _thriftId = thriftId;
9733
        _fieldName = fieldName;
9734
      }
9735
 
9736
      public short getThriftFieldId() {
9737
        return _thriftId;
9738
      }
9739
 
9740
      public String getFieldName() {
9741
        return _fieldName;
9742
      }
9743
    }
9744
 
9745
    // isset id assignments
9746
    private static final int __CUSTOMER_ID_ISSET_ID = 0;
9747
    private static final int __LIMIT_ISSET_ID = 1;
9748
    private BitSet __isset_bit_vector = new BitSet(2);
9749
 
9750
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
9751
      put(_Fields.CUSTOMER_ID, new FieldMetaData("customer_id", TFieldRequirementType.DEFAULT, 
9752
          new FieldValueMetaData(TType.I64)));
9753
      put(_Fields.LIMIT, new FieldMetaData("limit", TFieldRequirementType.DEFAULT, 
9754
          new FieldValueMetaData(TType.I64)));
9755
    }});
9756
 
9757
    static {
9758
      FieldMetaData.addStructMetaDataMap(getReturnableOrdersForCustomer_args.class, metaDataMap);
9759
    }
9760
 
9761
    public getReturnableOrdersForCustomer_args() {
9762
    }
9763
 
9764
    public getReturnableOrdersForCustomer_args(
9765
      long customer_id,
9766
      long limit)
9767
    {
9768
      this();
9769
      this.customer_id = customer_id;
9770
      setCustomer_idIsSet(true);
9771
      this.limit = limit;
9772
      setLimitIsSet(true);
9773
    }
9774
 
9775
    /**
9776
     * Performs a deep copy on <i>other</i>.
9777
     */
9778
    public getReturnableOrdersForCustomer_args(getReturnableOrdersForCustomer_args other) {
9779
      __isset_bit_vector.clear();
9780
      __isset_bit_vector.or(other.__isset_bit_vector);
9781
      this.customer_id = other.customer_id;
9782
      this.limit = other.limit;
9783
    }
9784
 
9785
    public getReturnableOrdersForCustomer_args deepCopy() {
9786
      return new getReturnableOrdersForCustomer_args(this);
9787
    }
9788
 
9789
    @Deprecated
9790
    public getReturnableOrdersForCustomer_args clone() {
9791
      return new getReturnableOrdersForCustomer_args(this);
9792
    }
9793
 
9794
    public long getCustomer_id() {
9795
      return this.customer_id;
9796
    }
9797
 
9798
    public getReturnableOrdersForCustomer_args setCustomer_id(long customer_id) {
9799
      this.customer_id = customer_id;
9800
      setCustomer_idIsSet(true);
9801
      return this;
9802
    }
9803
 
9804
    public void unsetCustomer_id() {
9805
      __isset_bit_vector.clear(__CUSTOMER_ID_ISSET_ID);
9806
    }
9807
 
9808
    /** Returns true if field customer_id is set (has been asigned a value) and false otherwise */
9809
    public boolean isSetCustomer_id() {
9810
      return __isset_bit_vector.get(__CUSTOMER_ID_ISSET_ID);
9811
    }
9812
 
9813
    public void setCustomer_idIsSet(boolean value) {
9814
      __isset_bit_vector.set(__CUSTOMER_ID_ISSET_ID, value);
9815
    }
9816
 
9817
    public long getLimit() {
9818
      return this.limit;
9819
    }
9820
 
9821
    public getReturnableOrdersForCustomer_args setLimit(long limit) {
9822
      this.limit = limit;
9823
      setLimitIsSet(true);
9824
      return this;
9825
    }
9826
 
9827
    public void unsetLimit() {
9828
      __isset_bit_vector.clear(__LIMIT_ISSET_ID);
9829
    }
9830
 
9831
    /** Returns true if field limit is set (has been asigned a value) and false otherwise */
9832
    public boolean isSetLimit() {
9833
      return __isset_bit_vector.get(__LIMIT_ISSET_ID);
9834
    }
9835
 
9836
    public void setLimitIsSet(boolean value) {
9837
      __isset_bit_vector.set(__LIMIT_ISSET_ID, value);
9838
    }
9839
 
9840
    public void setFieldValue(_Fields field, Object value) {
9841
      switch (field) {
9842
      case CUSTOMER_ID:
9843
        if (value == null) {
9844
          unsetCustomer_id();
9845
        } else {
9846
          setCustomer_id((Long)value);
9847
        }
9848
        break;
9849
 
9850
      case LIMIT:
9851
        if (value == null) {
9852
          unsetLimit();
9853
        } else {
9854
          setLimit((Long)value);
9855
        }
9856
        break;
9857
 
9858
      }
9859
    }
9860
 
9861
    public void setFieldValue(int fieldID, Object value) {
9862
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
9863
    }
9864
 
9865
    public Object getFieldValue(_Fields field) {
9866
      switch (field) {
9867
      case CUSTOMER_ID:
9868
        return new Long(getCustomer_id());
9869
 
9870
      case LIMIT:
9871
        return new Long(getLimit());
9872
 
9873
      }
9874
      throw new IllegalStateException();
9875
    }
9876
 
9877
    public Object getFieldValue(int fieldId) {
9878
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
9879
    }
9880
 
9881
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
9882
    public boolean isSet(_Fields field) {
9883
      switch (field) {
9884
      case CUSTOMER_ID:
9885
        return isSetCustomer_id();
9886
      case LIMIT:
9887
        return isSetLimit();
9888
      }
9889
      throw new IllegalStateException();
9890
    }
9891
 
9892
    public boolean isSet(int fieldID) {
9893
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
9894
    }
9895
 
9896
    @Override
9897
    public boolean equals(Object that) {
9898
      if (that == null)
9899
        return false;
9900
      if (that instanceof getReturnableOrdersForCustomer_args)
9901
        return this.equals((getReturnableOrdersForCustomer_args)that);
9902
      return false;
9903
    }
9904
 
9905
    public boolean equals(getReturnableOrdersForCustomer_args that) {
9906
      if (that == null)
9907
        return false;
9908
 
9909
      boolean this_present_customer_id = true;
9910
      boolean that_present_customer_id = true;
9911
      if (this_present_customer_id || that_present_customer_id) {
9912
        if (!(this_present_customer_id && that_present_customer_id))
9913
          return false;
9914
        if (this.customer_id != that.customer_id)
9915
          return false;
9916
      }
9917
 
9918
      boolean this_present_limit = true;
9919
      boolean that_present_limit = true;
9920
      if (this_present_limit || that_present_limit) {
9921
        if (!(this_present_limit && that_present_limit))
9922
          return false;
9923
        if (this.limit != that.limit)
9924
          return false;
9925
      }
9926
 
9927
      return true;
9928
    }
9929
 
9930
    @Override
9931
    public int hashCode() {
9932
      return 0;
9933
    }
9934
 
9935
    public int compareTo(getReturnableOrdersForCustomer_args other) {
9936
      if (!getClass().equals(other.getClass())) {
9937
        return getClass().getName().compareTo(other.getClass().getName());
9938
      }
9939
 
9940
      int lastComparison = 0;
9941
      getReturnableOrdersForCustomer_args typedOther = (getReturnableOrdersForCustomer_args)other;
9942
 
9943
      lastComparison = Boolean.valueOf(isSetCustomer_id()).compareTo(isSetCustomer_id());
9944
      if (lastComparison != 0) {
9945
        return lastComparison;
9946
      }
9947
      lastComparison = TBaseHelper.compareTo(customer_id, typedOther.customer_id);
9948
      if (lastComparison != 0) {
9949
        return lastComparison;
9950
      }
9951
      lastComparison = Boolean.valueOf(isSetLimit()).compareTo(isSetLimit());
9952
      if (lastComparison != 0) {
9953
        return lastComparison;
9954
      }
9955
      lastComparison = TBaseHelper.compareTo(limit, typedOther.limit);
9956
      if (lastComparison != 0) {
9957
        return lastComparison;
9958
      }
9959
      return 0;
9960
    }
9961
 
9962
    public void read(TProtocol iprot) throws TException {
9963
      TField field;
9964
      iprot.readStructBegin();
9965
      while (true)
9966
      {
9967
        field = iprot.readFieldBegin();
9968
        if (field.type == TType.STOP) { 
9969
          break;
9970
        }
9971
        _Fields fieldId = _Fields.findByThriftId(field.id);
9972
        if (fieldId == null) {
9973
          TProtocolUtil.skip(iprot, field.type);
9974
        } else {
9975
          switch (fieldId) {
9976
            case CUSTOMER_ID:
9977
              if (field.type == TType.I64) {
9978
                this.customer_id = iprot.readI64();
9979
                setCustomer_idIsSet(true);
9980
              } else { 
9981
                TProtocolUtil.skip(iprot, field.type);
9982
              }
9983
              break;
9984
            case LIMIT:
9985
              if (field.type == TType.I64) {
9986
                this.limit = iprot.readI64();
9987
                setLimitIsSet(true);
9988
              } else { 
9989
                TProtocolUtil.skip(iprot, field.type);
9990
              }
9991
              break;
9992
          }
9993
          iprot.readFieldEnd();
9994
        }
9995
      }
9996
      iprot.readStructEnd();
9997
      validate();
9998
    }
9999
 
10000
    public void write(TProtocol oprot) throws TException {
10001
      validate();
10002
 
10003
      oprot.writeStructBegin(STRUCT_DESC);
10004
      oprot.writeFieldBegin(CUSTOMER_ID_FIELD_DESC);
10005
      oprot.writeI64(this.customer_id);
10006
      oprot.writeFieldEnd();
10007
      oprot.writeFieldBegin(LIMIT_FIELD_DESC);
10008
      oprot.writeI64(this.limit);
10009
      oprot.writeFieldEnd();
10010
      oprot.writeFieldStop();
10011
      oprot.writeStructEnd();
10012
    }
10013
 
10014
    @Override
10015
    public String toString() {
10016
      StringBuilder sb = new StringBuilder("getReturnableOrdersForCustomer_args(");
10017
      boolean first = true;
10018
 
10019
      sb.append("customer_id:");
10020
      sb.append(this.customer_id);
10021
      first = false;
10022
      if (!first) sb.append(", ");
10023
      sb.append("limit:");
10024
      sb.append(this.limit);
10025
      first = false;
10026
      sb.append(")");
10027
      return sb.toString();
10028
    }
10029
 
10030
    public void validate() throws TException {
10031
      // check for required fields
10032
    }
10033
 
10034
  }
10035
 
10036
  public static class getReturnableOrdersForCustomer_result implements TBase<getReturnableOrdersForCustomer_result._Fields>, java.io.Serializable, Cloneable, Comparable<getReturnableOrdersForCustomer_result>   {
10037
    private static final TStruct STRUCT_DESC = new TStruct("getReturnableOrdersForCustomer_result");
10038
 
10039
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
10040
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
10041
 
10042
    private List<Long> success;
10043
    private TransactionServiceException ex;
10044
 
10045
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10046
    public enum _Fields implements TFieldIdEnum {
10047
      SUCCESS((short)0, "success"),
10048
      EX((short)1, "ex");
10049
 
10050
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
10051
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10052
 
10053
      static {
10054
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10055
          byId.put((int)field._thriftId, field);
10056
          byName.put(field.getFieldName(), field);
10057
        }
10058
      }
10059
 
10060
      /**
10061
       * Find the _Fields constant that matches fieldId, or null if its not found.
10062
       */
10063
      public static _Fields findByThriftId(int fieldId) {
10064
        return byId.get(fieldId);
10065
      }
10066
 
10067
      /**
10068
       * Find the _Fields constant that matches fieldId, throwing an exception
10069
       * if it is not found.
10070
       */
10071
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10072
        _Fields fields = findByThriftId(fieldId);
10073
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10074
        return fields;
10075
      }
10076
 
10077
      /**
10078
       * Find the _Fields constant that matches name, or null if its not found.
10079
       */
10080
      public static _Fields findByName(String name) {
10081
        return byName.get(name);
10082
      }
10083
 
10084
      private final short _thriftId;
10085
      private final String _fieldName;
10086
 
10087
      _Fields(short thriftId, String fieldName) {
10088
        _thriftId = thriftId;
10089
        _fieldName = fieldName;
10090
      }
10091
 
10092
      public short getThriftFieldId() {
10093
        return _thriftId;
10094
      }
10095
 
10096
      public String getFieldName() {
10097
        return _fieldName;
10098
      }
10099
    }
10100
 
10101
    // isset id assignments
10102
 
10103
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
10104
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
10105
          new ListMetaData(TType.LIST, 
10106
              new FieldValueMetaData(TType.I64))));
10107
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
10108
          new FieldValueMetaData(TType.STRUCT)));
10109
    }});
10110
 
10111
    static {
10112
      FieldMetaData.addStructMetaDataMap(getReturnableOrdersForCustomer_result.class, metaDataMap);
10113
    }
10114
 
10115
    public getReturnableOrdersForCustomer_result() {
10116
    }
10117
 
10118
    public getReturnableOrdersForCustomer_result(
10119
      List<Long> success,
10120
      TransactionServiceException ex)
10121
    {
10122
      this();
10123
      this.success = success;
10124
      this.ex = ex;
10125
    }
10126
 
10127
    /**
10128
     * Performs a deep copy on <i>other</i>.
10129
     */
10130
    public getReturnableOrdersForCustomer_result(getReturnableOrdersForCustomer_result other) {
10131
      if (other.isSetSuccess()) {
10132
        List<Long> __this__success = new ArrayList<Long>();
10133
        for (Long other_element : other.success) {
10134
          __this__success.add(other_element);
10135
        }
10136
        this.success = __this__success;
10137
      }
10138
      if (other.isSetEx()) {
10139
        this.ex = new TransactionServiceException(other.ex);
10140
      }
10141
    }
10142
 
10143
    public getReturnableOrdersForCustomer_result deepCopy() {
10144
      return new getReturnableOrdersForCustomer_result(this);
10145
    }
10146
 
10147
    @Deprecated
10148
    public getReturnableOrdersForCustomer_result clone() {
10149
      return new getReturnableOrdersForCustomer_result(this);
10150
    }
10151
 
10152
    public int getSuccessSize() {
10153
      return (this.success == null) ? 0 : this.success.size();
10154
    }
10155
 
10156
    public java.util.Iterator<Long> getSuccessIterator() {
10157
      return (this.success == null) ? null : this.success.iterator();
10158
    }
10159
 
10160
    public void addToSuccess(long elem) {
10161
      if (this.success == null) {
10162
        this.success = new ArrayList<Long>();
10163
      }
10164
      this.success.add(elem);
10165
    }
10166
 
10167
    public List<Long> getSuccess() {
10168
      return this.success;
10169
    }
10170
 
10171
    public getReturnableOrdersForCustomer_result setSuccess(List<Long> success) {
10172
      this.success = success;
10173
      return this;
10174
    }
10175
 
10176
    public void unsetSuccess() {
10177
      this.success = null;
10178
    }
10179
 
10180
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
10181
    public boolean isSetSuccess() {
10182
      return this.success != null;
10183
    }
10184
 
10185
    public void setSuccessIsSet(boolean value) {
10186
      if (!value) {
10187
        this.success = null;
10188
      }
10189
    }
10190
 
10191
    public TransactionServiceException getEx() {
10192
      return this.ex;
10193
    }
10194
 
10195
    public getReturnableOrdersForCustomer_result setEx(TransactionServiceException ex) {
10196
      this.ex = ex;
10197
      return this;
10198
    }
10199
 
10200
    public void unsetEx() {
10201
      this.ex = null;
10202
    }
10203
 
10204
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
10205
    public boolean isSetEx() {
10206
      return this.ex != null;
10207
    }
10208
 
10209
    public void setExIsSet(boolean value) {
10210
      if (!value) {
10211
        this.ex = null;
10212
      }
10213
    }
10214
 
10215
    public void setFieldValue(_Fields field, Object value) {
10216
      switch (field) {
10217
      case SUCCESS:
10218
        if (value == null) {
10219
          unsetSuccess();
10220
        } else {
10221
          setSuccess((List<Long>)value);
10222
        }
10223
        break;
10224
 
10225
      case EX:
10226
        if (value == null) {
10227
          unsetEx();
10228
        } else {
10229
          setEx((TransactionServiceException)value);
10230
        }
10231
        break;
10232
 
10233
      }
10234
    }
10235
 
10236
    public void setFieldValue(int fieldID, Object value) {
10237
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
10238
    }
10239
 
10240
    public Object getFieldValue(_Fields field) {
10241
      switch (field) {
10242
      case SUCCESS:
10243
        return getSuccess();
10244
 
10245
      case EX:
10246
        return getEx();
10247
 
10248
      }
10249
      throw new IllegalStateException();
10250
    }
10251
 
10252
    public Object getFieldValue(int fieldId) {
10253
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
10254
    }
10255
 
10256
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
10257
    public boolean isSet(_Fields field) {
10258
      switch (field) {
10259
      case SUCCESS:
10260
        return isSetSuccess();
10261
      case EX:
10262
        return isSetEx();
10263
      }
10264
      throw new IllegalStateException();
10265
    }
10266
 
10267
    public boolean isSet(int fieldID) {
10268
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
10269
    }
10270
 
10271
    @Override
10272
    public boolean equals(Object that) {
10273
      if (that == null)
10274
        return false;
10275
      if (that instanceof getReturnableOrdersForCustomer_result)
10276
        return this.equals((getReturnableOrdersForCustomer_result)that);
10277
      return false;
10278
    }
10279
 
10280
    public boolean equals(getReturnableOrdersForCustomer_result that) {
10281
      if (that == null)
10282
        return false;
10283
 
10284
      boolean this_present_success = true && this.isSetSuccess();
10285
      boolean that_present_success = true && that.isSetSuccess();
10286
      if (this_present_success || that_present_success) {
10287
        if (!(this_present_success && that_present_success))
10288
          return false;
10289
        if (!this.success.equals(that.success))
10290
          return false;
10291
      }
10292
 
10293
      boolean this_present_ex = true && this.isSetEx();
10294
      boolean that_present_ex = true && that.isSetEx();
10295
      if (this_present_ex || that_present_ex) {
10296
        if (!(this_present_ex && that_present_ex))
10297
          return false;
10298
        if (!this.ex.equals(that.ex))
10299
          return false;
10300
      }
10301
 
10302
      return true;
10303
    }
10304
 
10305
    @Override
10306
    public int hashCode() {
10307
      return 0;
10308
    }
10309
 
10310
    public int compareTo(getReturnableOrdersForCustomer_result other) {
10311
      if (!getClass().equals(other.getClass())) {
10312
        return getClass().getName().compareTo(other.getClass().getName());
10313
      }
10314
 
10315
      int lastComparison = 0;
10316
      getReturnableOrdersForCustomer_result typedOther = (getReturnableOrdersForCustomer_result)other;
10317
 
10318
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
10319
      if (lastComparison != 0) {
10320
        return lastComparison;
10321
      }
10322
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
10323
      if (lastComparison != 0) {
10324
        return lastComparison;
10325
      }
10326
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
10327
      if (lastComparison != 0) {
10328
        return lastComparison;
10329
      }
10330
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
10331
      if (lastComparison != 0) {
10332
        return lastComparison;
10333
      }
10334
      return 0;
10335
    }
10336
 
10337
    public void read(TProtocol iprot) throws TException {
10338
      TField field;
10339
      iprot.readStructBegin();
10340
      while (true)
10341
      {
10342
        field = iprot.readFieldBegin();
10343
        if (field.type == TType.STOP) { 
10344
          break;
10345
        }
10346
        _Fields fieldId = _Fields.findByThriftId(field.id);
10347
        if (fieldId == null) {
10348
          TProtocolUtil.skip(iprot, field.type);
10349
        } else {
10350
          switch (fieldId) {
10351
            case SUCCESS:
10352
              if (field.type == TType.LIST) {
10353
                {
10354
                  TList _list24 = iprot.readListBegin();
10355
                  this.success = new ArrayList<Long>(_list24.size);
10356
                  for (int _i25 = 0; _i25 < _list24.size; ++_i25)
10357
                  {
10358
                    long _elem26;
10359
                    _elem26 = iprot.readI64();
10360
                    this.success.add(_elem26);
10361
                  }
10362
                  iprot.readListEnd();
10363
                }
10364
              } else { 
10365
                TProtocolUtil.skip(iprot, field.type);
10366
              }
10367
              break;
10368
            case EX:
10369
              if (field.type == TType.STRUCT) {
10370
                this.ex = new TransactionServiceException();
10371
                this.ex.read(iprot);
10372
              } else { 
10373
                TProtocolUtil.skip(iprot, field.type);
10374
              }
10375
              break;
10376
          }
10377
          iprot.readFieldEnd();
10378
        }
10379
      }
10380
      iprot.readStructEnd();
10381
      validate();
10382
    }
10383
 
10384
    public void write(TProtocol oprot) throws TException {
10385
      oprot.writeStructBegin(STRUCT_DESC);
10386
 
10387
      if (this.isSetSuccess()) {
10388
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
10389
        {
10390
          oprot.writeListBegin(new TList(TType.I64, this.success.size()));
10391
          for (long _iter27 : this.success)
10392
          {
10393
            oprot.writeI64(_iter27);
10394
          }
10395
          oprot.writeListEnd();
10396
        }
10397
        oprot.writeFieldEnd();
10398
      } else if (this.isSetEx()) {
10399
        oprot.writeFieldBegin(EX_FIELD_DESC);
10400
        this.ex.write(oprot);
10401
        oprot.writeFieldEnd();
10402
      }
10403
      oprot.writeFieldStop();
10404
      oprot.writeStructEnd();
10405
    }
10406
 
10407
    @Override
10408
    public String toString() {
10409
      StringBuilder sb = new StringBuilder("getReturnableOrdersForCustomer_result(");
10410
      boolean first = true;
10411
 
10412
      sb.append("success:");
10413
      if (this.success == null) {
10414
        sb.append("null");
10415
      } else {
10416
        sb.append(this.success);
10417
      }
10418
      first = false;
10419
      if (!first) sb.append(", ");
10420
      sb.append("ex:");
10421
      if (this.ex == null) {
10422
        sb.append("null");
10423
      } else {
10424
        sb.append(this.ex);
10425
      }
10426
      first = false;
10427
      sb.append(")");
10428
      return sb.toString();
10429
    }
10430
 
10431
    public void validate() throws TException {
10432
      // check for required fields
10433
    }
10434
 
10435
  }
10436
 
10437
  public static class getCancellableOrdersForCustomer_args implements TBase<getCancellableOrdersForCustomer_args._Fields>, java.io.Serializable, Cloneable, Comparable<getCancellableOrdersForCustomer_args>   {
10438
    private static final TStruct STRUCT_DESC = new TStruct("getCancellableOrdersForCustomer_args");
10439
 
10440
    private static final TField CUSTOMER_ID_FIELD_DESC = new TField("customer_id", TType.I64, (short)1);
10441
    private static final TField LIMIT_FIELD_DESC = new TField("limit", TType.I64, (short)2);
10442
 
10443
    private long customer_id;
10444
    private long limit;
10445
 
10446
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10447
    public enum _Fields implements TFieldIdEnum {
10448
      CUSTOMER_ID((short)1, "customer_id"),
10449
      LIMIT((short)2, "limit");
10450
 
10451
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
10452
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10453
 
10454
      static {
10455
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10456
          byId.put((int)field._thriftId, field);
10457
          byName.put(field.getFieldName(), field);
10458
        }
10459
      }
10460
 
10461
      /**
10462
       * Find the _Fields constant that matches fieldId, or null if its not found.
10463
       */
10464
      public static _Fields findByThriftId(int fieldId) {
10465
        return byId.get(fieldId);
10466
      }
10467
 
10468
      /**
10469
       * Find the _Fields constant that matches fieldId, throwing an exception
10470
       * if it is not found.
10471
       */
10472
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10473
        _Fields fields = findByThriftId(fieldId);
10474
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10475
        return fields;
10476
      }
10477
 
10478
      /**
10479
       * Find the _Fields constant that matches name, or null if its not found.
10480
       */
10481
      public static _Fields findByName(String name) {
10482
        return byName.get(name);
10483
      }
10484
 
10485
      private final short _thriftId;
10486
      private final String _fieldName;
10487
 
10488
      _Fields(short thriftId, String fieldName) {
10489
        _thriftId = thriftId;
10490
        _fieldName = fieldName;
10491
      }
10492
 
10493
      public short getThriftFieldId() {
10494
        return _thriftId;
10495
      }
10496
 
10497
      public String getFieldName() {
10498
        return _fieldName;
10499
      }
10500
    }
10501
 
10502
    // isset id assignments
10503
    private static final int __CUSTOMER_ID_ISSET_ID = 0;
10504
    private static final int __LIMIT_ISSET_ID = 1;
10505
    private BitSet __isset_bit_vector = new BitSet(2);
10506
 
10507
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
10508
      put(_Fields.CUSTOMER_ID, new FieldMetaData("customer_id", TFieldRequirementType.DEFAULT, 
10509
          new FieldValueMetaData(TType.I64)));
10510
      put(_Fields.LIMIT, new FieldMetaData("limit", TFieldRequirementType.DEFAULT, 
10511
          new FieldValueMetaData(TType.I64)));
10512
    }});
10513
 
10514
    static {
10515
      FieldMetaData.addStructMetaDataMap(getCancellableOrdersForCustomer_args.class, metaDataMap);
10516
    }
10517
 
10518
    public getCancellableOrdersForCustomer_args() {
10519
    }
10520
 
10521
    public getCancellableOrdersForCustomer_args(
10522
      long customer_id,
10523
      long limit)
10524
    {
10525
      this();
10526
      this.customer_id = customer_id;
10527
      setCustomer_idIsSet(true);
10528
      this.limit = limit;
10529
      setLimitIsSet(true);
10530
    }
10531
 
10532
    /**
10533
     * Performs a deep copy on <i>other</i>.
10534
     */
10535
    public getCancellableOrdersForCustomer_args(getCancellableOrdersForCustomer_args other) {
10536
      __isset_bit_vector.clear();
10537
      __isset_bit_vector.or(other.__isset_bit_vector);
10538
      this.customer_id = other.customer_id;
10539
      this.limit = other.limit;
10540
    }
10541
 
10542
    public getCancellableOrdersForCustomer_args deepCopy() {
10543
      return new getCancellableOrdersForCustomer_args(this);
10544
    }
10545
 
10546
    @Deprecated
10547
    public getCancellableOrdersForCustomer_args clone() {
10548
      return new getCancellableOrdersForCustomer_args(this);
10549
    }
10550
 
10551
    public long getCustomer_id() {
10552
      return this.customer_id;
10553
    }
10554
 
10555
    public getCancellableOrdersForCustomer_args setCustomer_id(long customer_id) {
10556
      this.customer_id = customer_id;
10557
      setCustomer_idIsSet(true);
10558
      return this;
10559
    }
10560
 
10561
    public void unsetCustomer_id() {
10562
      __isset_bit_vector.clear(__CUSTOMER_ID_ISSET_ID);
10563
    }
10564
 
10565
    /** Returns true if field customer_id is set (has been asigned a value) and false otherwise */
10566
    public boolean isSetCustomer_id() {
10567
      return __isset_bit_vector.get(__CUSTOMER_ID_ISSET_ID);
10568
    }
10569
 
10570
    public void setCustomer_idIsSet(boolean value) {
10571
      __isset_bit_vector.set(__CUSTOMER_ID_ISSET_ID, value);
10572
    }
10573
 
10574
    public long getLimit() {
10575
      return this.limit;
10576
    }
10577
 
10578
    public getCancellableOrdersForCustomer_args setLimit(long limit) {
10579
      this.limit = limit;
10580
      setLimitIsSet(true);
10581
      return this;
10582
    }
10583
 
10584
    public void unsetLimit() {
10585
      __isset_bit_vector.clear(__LIMIT_ISSET_ID);
10586
    }
10587
 
10588
    /** Returns true if field limit is set (has been asigned a value) and false otherwise */
10589
    public boolean isSetLimit() {
10590
      return __isset_bit_vector.get(__LIMIT_ISSET_ID);
10591
    }
10592
 
10593
    public void setLimitIsSet(boolean value) {
10594
      __isset_bit_vector.set(__LIMIT_ISSET_ID, value);
10595
    }
10596
 
10597
    public void setFieldValue(_Fields field, Object value) {
10598
      switch (field) {
10599
      case CUSTOMER_ID:
10600
        if (value == null) {
10601
          unsetCustomer_id();
10602
        } else {
10603
          setCustomer_id((Long)value);
10604
        }
10605
        break;
10606
 
10607
      case LIMIT:
10608
        if (value == null) {
10609
          unsetLimit();
10610
        } else {
10611
          setLimit((Long)value);
10612
        }
10613
        break;
10614
 
10615
      }
10616
    }
10617
 
10618
    public void setFieldValue(int fieldID, Object value) {
10619
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
10620
    }
10621
 
10622
    public Object getFieldValue(_Fields field) {
10623
      switch (field) {
10624
      case CUSTOMER_ID:
10625
        return new Long(getCustomer_id());
10626
 
10627
      case LIMIT:
10628
        return new Long(getLimit());
10629
 
10630
      }
10631
      throw new IllegalStateException();
10632
    }
10633
 
10634
    public Object getFieldValue(int fieldId) {
10635
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
10636
    }
10637
 
10638
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
10639
    public boolean isSet(_Fields field) {
10640
      switch (field) {
10641
      case CUSTOMER_ID:
10642
        return isSetCustomer_id();
10643
      case LIMIT:
10644
        return isSetLimit();
10645
      }
10646
      throw new IllegalStateException();
10647
    }
10648
 
10649
    public boolean isSet(int fieldID) {
10650
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
10651
    }
10652
 
10653
    @Override
10654
    public boolean equals(Object that) {
10655
      if (that == null)
10656
        return false;
10657
      if (that instanceof getCancellableOrdersForCustomer_args)
10658
        return this.equals((getCancellableOrdersForCustomer_args)that);
10659
      return false;
10660
    }
10661
 
10662
    public boolean equals(getCancellableOrdersForCustomer_args that) {
10663
      if (that == null)
10664
        return false;
10665
 
10666
      boolean this_present_customer_id = true;
10667
      boolean that_present_customer_id = true;
10668
      if (this_present_customer_id || that_present_customer_id) {
10669
        if (!(this_present_customer_id && that_present_customer_id))
10670
          return false;
10671
        if (this.customer_id != that.customer_id)
10672
          return false;
10673
      }
10674
 
10675
      boolean this_present_limit = true;
10676
      boolean that_present_limit = true;
10677
      if (this_present_limit || that_present_limit) {
10678
        if (!(this_present_limit && that_present_limit))
10679
          return false;
10680
        if (this.limit != that.limit)
10681
          return false;
10682
      }
10683
 
10684
      return true;
10685
    }
10686
 
10687
    @Override
10688
    public int hashCode() {
10689
      return 0;
10690
    }
10691
 
10692
    public int compareTo(getCancellableOrdersForCustomer_args other) {
10693
      if (!getClass().equals(other.getClass())) {
10694
        return getClass().getName().compareTo(other.getClass().getName());
10695
      }
10696
 
10697
      int lastComparison = 0;
10698
      getCancellableOrdersForCustomer_args typedOther = (getCancellableOrdersForCustomer_args)other;
10699
 
10700
      lastComparison = Boolean.valueOf(isSetCustomer_id()).compareTo(isSetCustomer_id());
10701
      if (lastComparison != 0) {
10702
        return lastComparison;
10703
      }
10704
      lastComparison = TBaseHelper.compareTo(customer_id, typedOther.customer_id);
10705
      if (lastComparison != 0) {
10706
        return lastComparison;
10707
      }
10708
      lastComparison = Boolean.valueOf(isSetLimit()).compareTo(isSetLimit());
10709
      if (lastComparison != 0) {
10710
        return lastComparison;
10711
      }
10712
      lastComparison = TBaseHelper.compareTo(limit, typedOther.limit);
10713
      if (lastComparison != 0) {
10714
        return lastComparison;
10715
      }
10716
      return 0;
10717
    }
10718
 
10719
    public void read(TProtocol iprot) throws TException {
10720
      TField field;
10721
      iprot.readStructBegin();
10722
      while (true)
10723
      {
10724
        field = iprot.readFieldBegin();
10725
        if (field.type == TType.STOP) { 
10726
          break;
10727
        }
10728
        _Fields fieldId = _Fields.findByThriftId(field.id);
10729
        if (fieldId == null) {
10730
          TProtocolUtil.skip(iprot, field.type);
10731
        } else {
10732
          switch (fieldId) {
10733
            case CUSTOMER_ID:
10734
              if (field.type == TType.I64) {
10735
                this.customer_id = iprot.readI64();
10736
                setCustomer_idIsSet(true);
10737
              } else { 
10738
                TProtocolUtil.skip(iprot, field.type);
10739
              }
10740
              break;
10741
            case LIMIT:
10742
              if (field.type == TType.I64) {
10743
                this.limit = iprot.readI64();
10744
                setLimitIsSet(true);
10745
              } else { 
10746
                TProtocolUtil.skip(iprot, field.type);
10747
              }
10748
              break;
10749
          }
10750
          iprot.readFieldEnd();
10751
        }
10752
      }
10753
      iprot.readStructEnd();
10754
      validate();
10755
    }
10756
 
10757
    public void write(TProtocol oprot) throws TException {
10758
      validate();
10759
 
10760
      oprot.writeStructBegin(STRUCT_DESC);
10761
      oprot.writeFieldBegin(CUSTOMER_ID_FIELD_DESC);
10762
      oprot.writeI64(this.customer_id);
10763
      oprot.writeFieldEnd();
10764
      oprot.writeFieldBegin(LIMIT_FIELD_DESC);
10765
      oprot.writeI64(this.limit);
10766
      oprot.writeFieldEnd();
10767
      oprot.writeFieldStop();
10768
      oprot.writeStructEnd();
10769
    }
10770
 
10771
    @Override
10772
    public String toString() {
10773
      StringBuilder sb = new StringBuilder("getCancellableOrdersForCustomer_args(");
10774
      boolean first = true;
10775
 
10776
      sb.append("customer_id:");
10777
      sb.append(this.customer_id);
10778
      first = false;
10779
      if (!first) sb.append(", ");
10780
      sb.append("limit:");
10781
      sb.append(this.limit);
10782
      first = false;
10783
      sb.append(")");
10784
      return sb.toString();
10785
    }
10786
 
10787
    public void validate() throws TException {
10788
      // check for required fields
10789
    }
10790
 
10791
  }
10792
 
10793
  public static class getCancellableOrdersForCustomer_result implements TBase<getCancellableOrdersForCustomer_result._Fields>, java.io.Serializable, Cloneable, Comparable<getCancellableOrdersForCustomer_result>   {
10794
    private static final TStruct STRUCT_DESC = new TStruct("getCancellableOrdersForCustomer_result");
10795
 
10796
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
10797
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
10798
 
10799
    private List<Long> success;
10800
    private TransactionServiceException ex;
10801
 
10802
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10803
    public enum _Fields implements TFieldIdEnum {
10804
      SUCCESS((short)0, "success"),
10805
      EX((short)1, "ex");
10806
 
10807
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
10808
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10809
 
10810
      static {
10811
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10812
          byId.put((int)field._thriftId, field);
10813
          byName.put(field.getFieldName(), field);
10814
        }
10815
      }
10816
 
10817
      /**
10818
       * Find the _Fields constant that matches fieldId, or null if its not found.
10819
       */
10820
      public static _Fields findByThriftId(int fieldId) {
10821
        return byId.get(fieldId);
10822
      }
10823
 
10824
      /**
10825
       * Find the _Fields constant that matches fieldId, throwing an exception
10826
       * if it is not found.
10827
       */
10828
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10829
        _Fields fields = findByThriftId(fieldId);
10830
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10831
        return fields;
10832
      }
10833
 
10834
      /**
10835
       * Find the _Fields constant that matches name, or null if its not found.
10836
       */
10837
      public static _Fields findByName(String name) {
10838
        return byName.get(name);
10839
      }
10840
 
10841
      private final short _thriftId;
10842
      private final String _fieldName;
10843
 
10844
      _Fields(short thriftId, String fieldName) {
10845
        _thriftId = thriftId;
10846
        _fieldName = fieldName;
10847
      }
10848
 
10849
      public short getThriftFieldId() {
10850
        return _thriftId;
10851
      }
10852
 
10853
      public String getFieldName() {
10854
        return _fieldName;
10855
      }
10856
    }
10857
 
10858
    // isset id assignments
10859
 
10860
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
10861
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
10862
          new ListMetaData(TType.LIST, 
10863
              new FieldValueMetaData(TType.I64))));
10864
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
10865
          new FieldValueMetaData(TType.STRUCT)));
10866
    }});
10867
 
10868
    static {
10869
      FieldMetaData.addStructMetaDataMap(getCancellableOrdersForCustomer_result.class, metaDataMap);
10870
    }
10871
 
10872
    public getCancellableOrdersForCustomer_result() {
10873
    }
10874
 
10875
    public getCancellableOrdersForCustomer_result(
10876
      List<Long> success,
10877
      TransactionServiceException ex)
10878
    {
10879
      this();
10880
      this.success = success;
10881
      this.ex = ex;
10882
    }
10883
 
10884
    /**
10885
     * Performs a deep copy on <i>other</i>.
10886
     */
10887
    public getCancellableOrdersForCustomer_result(getCancellableOrdersForCustomer_result other) {
10888
      if (other.isSetSuccess()) {
10889
        List<Long> __this__success = new ArrayList<Long>();
10890
        for (Long other_element : other.success) {
10891
          __this__success.add(other_element);
10892
        }
10893
        this.success = __this__success;
10894
      }
10895
      if (other.isSetEx()) {
10896
        this.ex = new TransactionServiceException(other.ex);
10897
      }
10898
    }
10899
 
10900
    public getCancellableOrdersForCustomer_result deepCopy() {
10901
      return new getCancellableOrdersForCustomer_result(this);
10902
    }
10903
 
10904
    @Deprecated
10905
    public getCancellableOrdersForCustomer_result clone() {
10906
      return new getCancellableOrdersForCustomer_result(this);
10907
    }
10908
 
10909
    public int getSuccessSize() {
10910
      return (this.success == null) ? 0 : this.success.size();
10911
    }
10912
 
10913
    public java.util.Iterator<Long> getSuccessIterator() {
10914
      return (this.success == null) ? null : this.success.iterator();
10915
    }
10916
 
10917
    public void addToSuccess(long elem) {
10918
      if (this.success == null) {
10919
        this.success = new ArrayList<Long>();
10920
      }
10921
      this.success.add(elem);
10922
    }
10923
 
10924
    public List<Long> getSuccess() {
10925
      return this.success;
10926
    }
10927
 
10928
    public getCancellableOrdersForCustomer_result setSuccess(List<Long> success) {
10929
      this.success = success;
10930
      return this;
10931
    }
10932
 
10933
    public void unsetSuccess() {
10934
      this.success = null;
10935
    }
10936
 
10937
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
10938
    public boolean isSetSuccess() {
10939
      return this.success != null;
10940
    }
10941
 
10942
    public void setSuccessIsSet(boolean value) {
10943
      if (!value) {
10944
        this.success = null;
10945
      }
10946
    }
10947
 
10948
    public TransactionServiceException getEx() {
10949
      return this.ex;
10950
    }
10951
 
10952
    public getCancellableOrdersForCustomer_result setEx(TransactionServiceException ex) {
10953
      this.ex = ex;
10954
      return this;
10955
    }
10956
 
10957
    public void unsetEx() {
10958
      this.ex = null;
10959
    }
10960
 
10961
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
10962
    public boolean isSetEx() {
10963
      return this.ex != null;
10964
    }
10965
 
10966
    public void setExIsSet(boolean value) {
10967
      if (!value) {
10968
        this.ex = null;
10969
      }
10970
    }
10971
 
10972
    public void setFieldValue(_Fields field, Object value) {
10973
      switch (field) {
10974
      case SUCCESS:
10975
        if (value == null) {
10976
          unsetSuccess();
10977
        } else {
10978
          setSuccess((List<Long>)value);
10979
        }
10980
        break;
10981
 
10982
      case EX:
10983
        if (value == null) {
10984
          unsetEx();
10985
        } else {
10986
          setEx((TransactionServiceException)value);
10987
        }
10988
        break;
10989
 
10990
      }
10991
    }
10992
 
10993
    public void setFieldValue(int fieldID, Object value) {
10994
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
10995
    }
10996
 
10997
    public Object getFieldValue(_Fields field) {
10998
      switch (field) {
10999
      case SUCCESS:
11000
        return getSuccess();
11001
 
11002
      case EX:
11003
        return getEx();
11004
 
11005
      }
11006
      throw new IllegalStateException();
11007
    }
11008
 
11009
    public Object getFieldValue(int fieldId) {
11010
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
11011
    }
11012
 
11013
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
11014
    public boolean isSet(_Fields field) {
11015
      switch (field) {
11016
      case SUCCESS:
11017
        return isSetSuccess();
11018
      case EX:
11019
        return isSetEx();
11020
      }
11021
      throw new IllegalStateException();
11022
    }
11023
 
11024
    public boolean isSet(int fieldID) {
11025
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
11026
    }
11027
 
11028
    @Override
11029
    public boolean equals(Object that) {
11030
      if (that == null)
11031
        return false;
11032
      if (that instanceof getCancellableOrdersForCustomer_result)
11033
        return this.equals((getCancellableOrdersForCustomer_result)that);
11034
      return false;
11035
    }
11036
 
11037
    public boolean equals(getCancellableOrdersForCustomer_result that) {
11038
      if (that == null)
11039
        return false;
11040
 
11041
      boolean this_present_success = true && this.isSetSuccess();
11042
      boolean that_present_success = true && that.isSetSuccess();
11043
      if (this_present_success || that_present_success) {
11044
        if (!(this_present_success && that_present_success))
11045
          return false;
11046
        if (!this.success.equals(that.success))
11047
          return false;
11048
      }
11049
 
11050
      boolean this_present_ex = true && this.isSetEx();
11051
      boolean that_present_ex = true && that.isSetEx();
11052
      if (this_present_ex || that_present_ex) {
11053
        if (!(this_present_ex && that_present_ex))
11054
          return false;
11055
        if (!this.ex.equals(that.ex))
11056
          return false;
11057
      }
11058
 
11059
      return true;
11060
    }
11061
 
11062
    @Override
11063
    public int hashCode() {
11064
      return 0;
11065
    }
11066
 
11067
    public int compareTo(getCancellableOrdersForCustomer_result other) {
11068
      if (!getClass().equals(other.getClass())) {
11069
        return getClass().getName().compareTo(other.getClass().getName());
11070
      }
11071
 
11072
      int lastComparison = 0;
11073
      getCancellableOrdersForCustomer_result typedOther = (getCancellableOrdersForCustomer_result)other;
11074
 
11075
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
11076
      if (lastComparison != 0) {
11077
        return lastComparison;
11078
      }
11079
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
11080
      if (lastComparison != 0) {
11081
        return lastComparison;
11082
      }
11083
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
11084
      if (lastComparison != 0) {
11085
        return lastComparison;
11086
      }
11087
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
11088
      if (lastComparison != 0) {
11089
        return lastComparison;
11090
      }
11091
      return 0;
11092
    }
11093
 
11094
    public void read(TProtocol iprot) throws TException {
11095
      TField field;
11096
      iprot.readStructBegin();
11097
      while (true)
11098
      {
11099
        field = iprot.readFieldBegin();
11100
        if (field.type == TType.STOP) { 
11101
          break;
11102
        }
11103
        _Fields fieldId = _Fields.findByThriftId(field.id);
11104
        if (fieldId == null) {
11105
          TProtocolUtil.skip(iprot, field.type);
11106
        } else {
11107
          switch (fieldId) {
11108
            case SUCCESS:
11109
              if (field.type == TType.LIST) {
11110
                {
11111
                  TList _list28 = iprot.readListBegin();
11112
                  this.success = new ArrayList<Long>(_list28.size);
11113
                  for (int _i29 = 0; _i29 < _list28.size; ++_i29)
11114
                  {
11115
                    long _elem30;
11116
                    _elem30 = iprot.readI64();
11117
                    this.success.add(_elem30);
11118
                  }
11119
                  iprot.readListEnd();
11120
                }
11121
              } else { 
11122
                TProtocolUtil.skip(iprot, field.type);
11123
              }
11124
              break;
11125
            case EX:
11126
              if (field.type == TType.STRUCT) {
11127
                this.ex = new TransactionServiceException();
11128
                this.ex.read(iprot);
11129
              } else { 
11130
                TProtocolUtil.skip(iprot, field.type);
11131
              }
11132
              break;
11133
          }
11134
          iprot.readFieldEnd();
11135
        }
11136
      }
11137
      iprot.readStructEnd();
11138
      validate();
11139
    }
11140
 
11141
    public void write(TProtocol oprot) throws TException {
11142
      oprot.writeStructBegin(STRUCT_DESC);
11143
 
11144
      if (this.isSetSuccess()) {
11145
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
11146
        {
11147
          oprot.writeListBegin(new TList(TType.I64, this.success.size()));
11148
          for (long _iter31 : this.success)
11149
          {
11150
            oprot.writeI64(_iter31);
11151
          }
11152
          oprot.writeListEnd();
11153
        }
11154
        oprot.writeFieldEnd();
11155
      } else if (this.isSetEx()) {
11156
        oprot.writeFieldBegin(EX_FIELD_DESC);
11157
        this.ex.write(oprot);
11158
        oprot.writeFieldEnd();
11159
      }
11160
      oprot.writeFieldStop();
11161
      oprot.writeStructEnd();
11162
    }
11163
 
11164
    @Override
11165
    public String toString() {
11166
      StringBuilder sb = new StringBuilder("getCancellableOrdersForCustomer_result(");
11167
      boolean first = true;
11168
 
11169
      sb.append("success:");
11170
      if (this.success == null) {
11171
        sb.append("null");
11172
      } else {
11173
        sb.append(this.success);
11174
      }
11175
      first = false;
11176
      if (!first) sb.append(", ");
11177
      sb.append("ex:");
11178
      if (this.ex == null) {
11179
        sb.append("null");
11180
      } else {
11181
        sb.append(this.ex);
11182
      }
11183
      first = false;
11184
      sb.append(")");
11185
      return sb.toString();
11186
    }
11187
 
11188
    public void validate() throws TException {
11189
      // check for required fields
11190
    }
11191
 
11192
  }
11193
 
483 rajveer 11194
  public static class changeOrderStatus_args implements TBase<changeOrderStatus_args._Fields>, java.io.Serializable, Cloneable, Comparable<changeOrderStatus_args>   {
11195
    private static final TStruct STRUCT_DESC = new TStruct("changeOrderStatus_args");
68 ashish 11196
 
483 rajveer 11197
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
11198
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)2);
11199
    private static final TField DESCRIPTION_FIELD_DESC = new TField("description", TType.STRING, (short)3);
68 ashish 11200
 
483 rajveer 11201
    private long orderId;
11202
    private OrderStatus status;
11203
    private String description;
68 ashish 11204
 
11205
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11206
    public enum _Fields implements TFieldIdEnum {
483 rajveer 11207
      ORDER_ID((short)1, "orderId"),
11208
      /**
11209
       * 
11210
       * @see OrderStatus
11211
       */
11212
      STATUS((short)2, "status"),
11213
      DESCRIPTION((short)3, "description");
68 ashish 11214
 
11215
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
11216
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11217
 
11218
      static {
11219
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11220
          byId.put((int)field._thriftId, field);
11221
          byName.put(field.getFieldName(), field);
11222
        }
11223
      }
11224
 
11225
      /**
11226
       * Find the _Fields constant that matches fieldId, or null if its not found.
11227
       */
11228
      public static _Fields findByThriftId(int fieldId) {
11229
        return byId.get(fieldId);
11230
      }
11231
 
11232
      /**
11233
       * Find the _Fields constant that matches fieldId, throwing an exception
11234
       * if it is not found.
11235
       */
11236
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11237
        _Fields fields = findByThriftId(fieldId);
11238
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11239
        return fields;
11240
      }
11241
 
11242
      /**
11243
       * Find the _Fields constant that matches name, or null if its not found.
11244
       */
11245
      public static _Fields findByName(String name) {
11246
        return byName.get(name);
11247
      }
11248
 
11249
      private final short _thriftId;
11250
      private final String _fieldName;
11251
 
11252
      _Fields(short thriftId, String fieldName) {
11253
        _thriftId = thriftId;
11254
        _fieldName = fieldName;
11255
      }
11256
 
11257
      public short getThriftFieldId() {
11258
        return _thriftId;
11259
      }
11260
 
11261
      public String getFieldName() {
11262
        return _fieldName;
11263
      }
11264
    }
11265
 
11266
    // isset id assignments
483 rajveer 11267
    private static final int __ORDERID_ISSET_ID = 0;
68 ashish 11268
    private BitSet __isset_bit_vector = new BitSet(1);
11269
 
11270
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 11271
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
68 ashish 11272
          new FieldValueMetaData(TType.I64)));
483 rajveer 11273
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
11274
          new EnumMetaData(TType.ENUM, OrderStatus.class)));
11275
      put(_Fields.DESCRIPTION, new FieldMetaData("description", TFieldRequirementType.DEFAULT, 
11276
          new FieldValueMetaData(TType.STRING)));
68 ashish 11277
    }});
11278
 
11279
    static {
483 rajveer 11280
      FieldMetaData.addStructMetaDataMap(changeOrderStatus_args.class, metaDataMap);
68 ashish 11281
    }
11282
 
483 rajveer 11283
    public changeOrderStatus_args() {
68 ashish 11284
    }
11285
 
483 rajveer 11286
    public changeOrderStatus_args(
11287
      long orderId,
11288
      OrderStatus status,
11289
      String description)
68 ashish 11290
    {
11291
      this();
483 rajveer 11292
      this.orderId = orderId;
11293
      setOrderIdIsSet(true);
11294
      this.status = status;
11295
      this.description = description;
68 ashish 11296
    }
11297
 
11298
    /**
11299
     * Performs a deep copy on <i>other</i>.
11300
     */
483 rajveer 11301
    public changeOrderStatus_args(changeOrderStatus_args other) {
68 ashish 11302
      __isset_bit_vector.clear();
11303
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 11304
      this.orderId = other.orderId;
11305
      if (other.isSetStatus()) {
11306
        this.status = other.status;
11307
      }
11308
      if (other.isSetDescription()) {
11309
        this.description = other.description;
11310
      }
68 ashish 11311
    }
11312
 
483 rajveer 11313
    public changeOrderStatus_args deepCopy() {
11314
      return new changeOrderStatus_args(this);
68 ashish 11315
    }
11316
 
11317
    @Deprecated
483 rajveer 11318
    public changeOrderStatus_args clone() {
11319
      return new changeOrderStatus_args(this);
68 ashish 11320
    }
11321
 
483 rajveer 11322
    public long getOrderId() {
11323
      return this.orderId;
68 ashish 11324
    }
11325
 
483 rajveer 11326
    public changeOrderStatus_args setOrderId(long orderId) {
11327
      this.orderId = orderId;
11328
      setOrderIdIsSet(true);
68 ashish 11329
      return this;
11330
    }
11331
 
483 rajveer 11332
    public void unsetOrderId() {
11333
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
68 ashish 11334
    }
11335
 
483 rajveer 11336
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
11337
    public boolean isSetOrderId() {
11338
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
68 ashish 11339
    }
11340
 
483 rajveer 11341
    public void setOrderIdIsSet(boolean value) {
11342
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
68 ashish 11343
    }
11344
 
483 rajveer 11345
    /**
11346
     * 
11347
     * @see OrderStatus
11348
     */
11349
    public OrderStatus getStatus() {
11350
      return this.status;
68 ashish 11351
    }
11352
 
11353
    /**
483 rajveer 11354
     * 
11355
     * @see OrderStatus
68 ashish 11356
     */
483 rajveer 11357
    public changeOrderStatus_args setStatus(OrderStatus status) {
11358
      this.status = status;
68 ashish 11359
      return this;
11360
    }
11361
 
483 rajveer 11362
    public void unsetStatus() {
11363
      this.status = null;
68 ashish 11364
    }
11365
 
483 rajveer 11366
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
11367
    public boolean isSetStatus() {
11368
      return this.status != null;
68 ashish 11369
    }
11370
 
483 rajveer 11371
    public void setStatusIsSet(boolean value) {
68 ashish 11372
      if (!value) {
483 rajveer 11373
        this.status = null;
68 ashish 11374
      }
11375
    }
11376
 
483 rajveer 11377
    public String getDescription() {
11378
      return this.description;
68 ashish 11379
    }
11380
 
483 rajveer 11381
    public changeOrderStatus_args setDescription(String description) {
11382
      this.description = description;
68 ashish 11383
      return this;
11384
    }
11385
 
483 rajveer 11386
    public void unsetDescription() {
11387
      this.description = null;
68 ashish 11388
    }
11389
 
483 rajveer 11390
    /** Returns true if field description is set (has been asigned a value) and false otherwise */
11391
    public boolean isSetDescription() {
11392
      return this.description != null;
68 ashish 11393
    }
11394
 
483 rajveer 11395
    public void setDescriptionIsSet(boolean value) {
68 ashish 11396
      if (!value) {
483 rajveer 11397
        this.description = null;
68 ashish 11398
      }
11399
    }
11400
 
11401
    public void setFieldValue(_Fields field, Object value) {
11402
      switch (field) {
483 rajveer 11403
      case ORDER_ID:
68 ashish 11404
        if (value == null) {
483 rajveer 11405
          unsetOrderId();
68 ashish 11406
        } else {
483 rajveer 11407
          setOrderId((Long)value);
68 ashish 11408
        }
11409
        break;
11410
 
483 rajveer 11411
      case STATUS:
68 ashish 11412
        if (value == null) {
483 rajveer 11413
          unsetStatus();
68 ashish 11414
        } else {
483 rajveer 11415
          setStatus((OrderStatus)value);
68 ashish 11416
        }
11417
        break;
11418
 
483 rajveer 11419
      case DESCRIPTION:
11420
        if (value == null) {
11421
          unsetDescription();
11422
        } else {
11423
          setDescription((String)value);
11424
        }
11425
        break;
11426
 
68 ashish 11427
      }
11428
    }
11429
 
11430
    public void setFieldValue(int fieldID, Object value) {
11431
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
11432
    }
11433
 
11434
    public Object getFieldValue(_Fields field) {
11435
      switch (field) {
483 rajveer 11436
      case ORDER_ID:
11437
        return new Long(getOrderId());
68 ashish 11438
 
483 rajveer 11439
      case STATUS:
11440
        return getStatus();
68 ashish 11441
 
483 rajveer 11442
      case DESCRIPTION:
11443
        return getDescription();
11444
 
68 ashish 11445
      }
11446
      throw new IllegalStateException();
11447
    }
11448
 
11449
    public Object getFieldValue(int fieldId) {
11450
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
11451
    }
11452
 
11453
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
11454
    public boolean isSet(_Fields field) {
11455
      switch (field) {
483 rajveer 11456
      case ORDER_ID:
11457
        return isSetOrderId();
11458
      case STATUS:
11459
        return isSetStatus();
11460
      case DESCRIPTION:
11461
        return isSetDescription();
68 ashish 11462
      }
11463
      throw new IllegalStateException();
11464
    }
11465
 
11466
    public boolean isSet(int fieldID) {
11467
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
11468
    }
11469
 
11470
    @Override
11471
    public boolean equals(Object that) {
11472
      if (that == null)
11473
        return false;
483 rajveer 11474
      if (that instanceof changeOrderStatus_args)
11475
        return this.equals((changeOrderStatus_args)that);
68 ashish 11476
      return false;
11477
    }
11478
 
483 rajveer 11479
    public boolean equals(changeOrderStatus_args that) {
68 ashish 11480
      if (that == null)
11481
        return false;
11482
 
483 rajveer 11483
      boolean this_present_orderId = true;
11484
      boolean that_present_orderId = true;
11485
      if (this_present_orderId || that_present_orderId) {
11486
        if (!(this_present_orderId && that_present_orderId))
68 ashish 11487
          return false;
483 rajveer 11488
        if (this.orderId != that.orderId)
68 ashish 11489
          return false;
11490
      }
11491
 
483 rajveer 11492
      boolean this_present_status = true && this.isSetStatus();
11493
      boolean that_present_status = true && that.isSetStatus();
11494
      if (this_present_status || that_present_status) {
11495
        if (!(this_present_status && that_present_status))
68 ashish 11496
          return false;
483 rajveer 11497
        if (!this.status.equals(that.status))
68 ashish 11498
          return false;
11499
      }
11500
 
483 rajveer 11501
      boolean this_present_description = true && this.isSetDescription();
11502
      boolean that_present_description = true && that.isSetDescription();
11503
      if (this_present_description || that_present_description) {
11504
        if (!(this_present_description && that_present_description))
11505
          return false;
11506
        if (!this.description.equals(that.description))
11507
          return false;
11508
      }
11509
 
68 ashish 11510
      return true;
11511
    }
11512
 
11513
    @Override
11514
    public int hashCode() {
11515
      return 0;
11516
    }
11517
 
483 rajveer 11518
    public int compareTo(changeOrderStatus_args other) {
11519
      if (!getClass().equals(other.getClass())) {
11520
        return getClass().getName().compareTo(other.getClass().getName());
68 ashish 11521
      }
11522
 
483 rajveer 11523
      int lastComparison = 0;
11524
      changeOrderStatus_args typedOther = (changeOrderStatus_args)other;
68 ashish 11525
 
483 rajveer 11526
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
11527
      if (lastComparison != 0) {
11528
        return lastComparison;
68 ashish 11529
      }
483 rajveer 11530
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
11531
      if (lastComparison != 0) {
11532
        return lastComparison;
68 ashish 11533
      }
483 rajveer 11534
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
11535
      if (lastComparison != 0) {
11536
        return lastComparison;
68 ashish 11537
      }
483 rajveer 11538
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
11539
      if (lastComparison != 0) {
11540
        return lastComparison;
68 ashish 11541
      }
483 rajveer 11542
      lastComparison = Boolean.valueOf(isSetDescription()).compareTo(isSetDescription());
11543
      if (lastComparison != 0) {
11544
        return lastComparison;
68 ashish 11545
      }
483 rajveer 11546
      lastComparison = TBaseHelper.compareTo(description, typedOther.description);
11547
      if (lastComparison != 0) {
11548
        return lastComparison;
68 ashish 11549
      }
11550
      return 0;
11551
    }
11552
 
11553
    public void read(TProtocol iprot) throws TException {
11554
      TField field;
11555
      iprot.readStructBegin();
11556
      while (true)
11557
      {
11558
        field = iprot.readFieldBegin();
11559
        if (field.type == TType.STOP) { 
11560
          break;
11561
        }
11562
        _Fields fieldId = _Fields.findByThriftId(field.id);
11563
        if (fieldId == null) {
11564
          TProtocolUtil.skip(iprot, field.type);
11565
        } else {
11566
          switch (fieldId) {
483 rajveer 11567
            case ORDER_ID:
68 ashish 11568
              if (field.type == TType.I64) {
483 rajveer 11569
                this.orderId = iprot.readI64();
11570
                setOrderIdIsSet(true);
68 ashish 11571
              } else { 
11572
                TProtocolUtil.skip(iprot, field.type);
11573
              }
11574
              break;
483 rajveer 11575
            case STATUS:
11576
              if (field.type == TType.I32) {
11577
                this.status = OrderStatus.findByValue(iprot.readI32());
68 ashish 11578
              } else { 
11579
                TProtocolUtil.skip(iprot, field.type);
11580
              }
11581
              break;
483 rajveer 11582
            case DESCRIPTION:
11583
              if (field.type == TType.STRING) {
11584
                this.description = iprot.readString();
11585
              } else { 
11586
                TProtocolUtil.skip(iprot, field.type);
11587
              }
11588
              break;
68 ashish 11589
          }
11590
          iprot.readFieldEnd();
11591
        }
11592
      }
11593
      iprot.readStructEnd();
11594
      validate();
11595
    }
11596
 
11597
    public void write(TProtocol oprot) throws TException {
11598
      validate();
11599
 
11600
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 11601
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
11602
      oprot.writeI64(this.orderId);
68 ashish 11603
      oprot.writeFieldEnd();
483 rajveer 11604
      if (this.status != null) {
11605
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
11606
        oprot.writeI32(this.status.getValue());
68 ashish 11607
        oprot.writeFieldEnd();
11608
      }
483 rajveer 11609
      if (this.description != null) {
11610
        oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC);
11611
        oprot.writeString(this.description);
11612
        oprot.writeFieldEnd();
11613
      }
68 ashish 11614
      oprot.writeFieldStop();
11615
      oprot.writeStructEnd();
11616
    }
11617
 
11618
    @Override
11619
    public String toString() {
483 rajveer 11620
      StringBuilder sb = new StringBuilder("changeOrderStatus_args(");
68 ashish 11621
      boolean first = true;
11622
 
483 rajveer 11623
      sb.append("orderId:");
11624
      sb.append(this.orderId);
68 ashish 11625
      first = false;
11626
      if (!first) sb.append(", ");
483 rajveer 11627
      sb.append("status:");
11628
      if (this.status == null) {
68 ashish 11629
        sb.append("null");
11630
      } else {
483 rajveer 11631
        String status_name = status.name();
11632
        if (status_name != null) {
11633
          sb.append(status_name);
11634
          sb.append(" (");
11635
        }
11636
        sb.append(this.status);
11637
        if (status_name != null) {
11638
          sb.append(")");
11639
        }
68 ashish 11640
      }
11641
      first = false;
483 rajveer 11642
      if (!first) sb.append(", ");
11643
      sb.append("description:");
11644
      if (this.description == null) {
11645
        sb.append("null");
11646
      } else {
11647
        sb.append(this.description);
11648
      }
11649
      first = false;
68 ashish 11650
      sb.append(")");
11651
      return sb.toString();
11652
    }
11653
 
11654
    public void validate() throws TException {
11655
      // check for required fields
11656
    }
11657
 
11658
  }
11659
 
483 rajveer 11660
  public static class changeOrderStatus_result implements TBase<changeOrderStatus_result._Fields>, java.io.Serializable, Cloneable, Comparable<changeOrderStatus_result>   {
11661
    private static final TStruct STRUCT_DESC = new TStruct("changeOrderStatus_result");
68 ashish 11662
 
11663
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
11664
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
11665
 
11666
    private boolean success;
11667
    private TransactionServiceException ex;
11668
 
11669
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11670
    public enum _Fields implements TFieldIdEnum {
11671
      SUCCESS((short)0, "success"),
11672
      EX((short)1, "ex");
11673
 
11674
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
11675
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11676
 
11677
      static {
11678
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11679
          byId.put((int)field._thriftId, field);
11680
          byName.put(field.getFieldName(), field);
11681
        }
11682
      }
11683
 
11684
      /**
11685
       * Find the _Fields constant that matches fieldId, or null if its not found.
11686
       */
11687
      public static _Fields findByThriftId(int fieldId) {
11688
        return byId.get(fieldId);
11689
      }
11690
 
11691
      /**
11692
       * Find the _Fields constant that matches fieldId, throwing an exception
11693
       * if it is not found.
11694
       */
11695
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11696
        _Fields fields = findByThriftId(fieldId);
11697
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11698
        return fields;
11699
      }
11700
 
11701
      /**
11702
       * Find the _Fields constant that matches name, or null if its not found.
11703
       */
11704
      public static _Fields findByName(String name) {
11705
        return byName.get(name);
11706
      }
11707
 
11708
      private final short _thriftId;
11709
      private final String _fieldName;
11710
 
11711
      _Fields(short thriftId, String fieldName) {
11712
        _thriftId = thriftId;
11713
        _fieldName = fieldName;
11714
      }
11715
 
11716
      public short getThriftFieldId() {
11717
        return _thriftId;
11718
      }
11719
 
11720
      public String getFieldName() {
11721
        return _fieldName;
11722
      }
11723
    }
11724
 
11725
    // isset id assignments
11726
    private static final int __SUCCESS_ISSET_ID = 0;
11727
    private BitSet __isset_bit_vector = new BitSet(1);
11728
 
11729
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
11730
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
11731
          new FieldValueMetaData(TType.BOOL)));
11732
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
11733
          new FieldValueMetaData(TType.STRUCT)));
11734
    }});
11735
 
11736
    static {
483 rajveer 11737
      FieldMetaData.addStructMetaDataMap(changeOrderStatus_result.class, metaDataMap);
68 ashish 11738
    }
11739
 
483 rajveer 11740
    public changeOrderStatus_result() {
68 ashish 11741
    }
11742
 
483 rajveer 11743
    public changeOrderStatus_result(
68 ashish 11744
      boolean success,
11745
      TransactionServiceException ex)
11746
    {
11747
      this();
11748
      this.success = success;
11749
      setSuccessIsSet(true);
11750
      this.ex = ex;
11751
    }
11752
 
11753
    /**
11754
     * Performs a deep copy on <i>other</i>.
11755
     */
483 rajveer 11756
    public changeOrderStatus_result(changeOrderStatus_result other) {
68 ashish 11757
      __isset_bit_vector.clear();
11758
      __isset_bit_vector.or(other.__isset_bit_vector);
11759
      this.success = other.success;
11760
      if (other.isSetEx()) {
11761
        this.ex = new TransactionServiceException(other.ex);
11762
      }
11763
    }
11764
 
483 rajveer 11765
    public changeOrderStatus_result deepCopy() {
11766
      return new changeOrderStatus_result(this);
68 ashish 11767
    }
11768
 
11769
    @Deprecated
483 rajveer 11770
    public changeOrderStatus_result clone() {
11771
      return new changeOrderStatus_result(this);
68 ashish 11772
    }
11773
 
11774
    public boolean isSuccess() {
11775
      return this.success;
11776
    }
11777
 
483 rajveer 11778
    public changeOrderStatus_result setSuccess(boolean success) {
68 ashish 11779
      this.success = success;
11780
      setSuccessIsSet(true);
11781
      return this;
11782
    }
11783
 
11784
    public void unsetSuccess() {
11785
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
11786
    }
11787
 
11788
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
11789
    public boolean isSetSuccess() {
11790
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
11791
    }
11792
 
11793
    public void setSuccessIsSet(boolean value) {
11794
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
11795
    }
11796
 
11797
    public TransactionServiceException getEx() {
11798
      return this.ex;
11799
    }
11800
 
483 rajveer 11801
    public changeOrderStatus_result setEx(TransactionServiceException ex) {
68 ashish 11802
      this.ex = ex;
11803
      return this;
11804
    }
11805
 
11806
    public void unsetEx() {
11807
      this.ex = null;
11808
    }
11809
 
11810
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
11811
    public boolean isSetEx() {
11812
      return this.ex != null;
11813
    }
11814
 
11815
    public void setExIsSet(boolean value) {
11816
      if (!value) {
11817
        this.ex = null;
11818
      }
11819
    }
11820
 
11821
    public void setFieldValue(_Fields field, Object value) {
11822
      switch (field) {
11823
      case SUCCESS:
11824
        if (value == null) {
11825
          unsetSuccess();
11826
        } else {
11827
          setSuccess((Boolean)value);
11828
        }
11829
        break;
11830
 
11831
      case EX:
11832
        if (value == null) {
11833
          unsetEx();
11834
        } else {
11835
          setEx((TransactionServiceException)value);
11836
        }
11837
        break;
11838
 
11839
      }
11840
    }
11841
 
11842
    public void setFieldValue(int fieldID, Object value) {
11843
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
11844
    }
11845
 
11846
    public Object getFieldValue(_Fields field) {
11847
      switch (field) {
11848
      case SUCCESS:
11849
        return new Boolean(isSuccess());
11850
 
11851
      case EX:
11852
        return getEx();
11853
 
11854
      }
11855
      throw new IllegalStateException();
11856
    }
11857
 
11858
    public Object getFieldValue(int fieldId) {
11859
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
11860
    }
11861
 
11862
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
11863
    public boolean isSet(_Fields field) {
11864
      switch (field) {
11865
      case SUCCESS:
11866
        return isSetSuccess();
11867
      case EX:
11868
        return isSetEx();
11869
      }
11870
      throw new IllegalStateException();
11871
    }
11872
 
11873
    public boolean isSet(int fieldID) {
11874
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
11875
    }
11876
 
11877
    @Override
11878
    public boolean equals(Object that) {
11879
      if (that == null)
11880
        return false;
483 rajveer 11881
      if (that instanceof changeOrderStatus_result)
11882
        return this.equals((changeOrderStatus_result)that);
68 ashish 11883
      return false;
11884
    }
11885
 
483 rajveer 11886
    public boolean equals(changeOrderStatus_result that) {
68 ashish 11887
      if (that == null)
11888
        return false;
11889
 
11890
      boolean this_present_success = true;
11891
      boolean that_present_success = true;
11892
      if (this_present_success || that_present_success) {
11893
        if (!(this_present_success && that_present_success))
11894
          return false;
11895
        if (this.success != that.success)
11896
          return false;
11897
      }
11898
 
11899
      boolean this_present_ex = true && this.isSetEx();
11900
      boolean that_present_ex = true && that.isSetEx();
11901
      if (this_present_ex || that_present_ex) {
11902
        if (!(this_present_ex && that_present_ex))
11903
          return false;
11904
        if (!this.ex.equals(that.ex))
11905
          return false;
11906
      }
11907
 
11908
      return true;
11909
    }
11910
 
11911
    @Override
11912
    public int hashCode() {
11913
      return 0;
11914
    }
11915
 
483 rajveer 11916
    public int compareTo(changeOrderStatus_result other) {
68 ashish 11917
      if (!getClass().equals(other.getClass())) {
11918
        return getClass().getName().compareTo(other.getClass().getName());
11919
      }
11920
 
11921
      int lastComparison = 0;
483 rajveer 11922
      changeOrderStatus_result typedOther = (changeOrderStatus_result)other;
68 ashish 11923
 
11924
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
11925
      if (lastComparison != 0) {
11926
        return lastComparison;
11927
      }
11928
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
11929
      if (lastComparison != 0) {
11930
        return lastComparison;
11931
      }
11932
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
11933
      if (lastComparison != 0) {
11934
        return lastComparison;
11935
      }
11936
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
11937
      if (lastComparison != 0) {
11938
        return lastComparison;
11939
      }
11940
      return 0;
11941
    }
11942
 
11943
    public void read(TProtocol iprot) throws TException {
11944
      TField field;
11945
      iprot.readStructBegin();
11946
      while (true)
11947
      {
11948
        field = iprot.readFieldBegin();
11949
        if (field.type == TType.STOP) { 
11950
          break;
11951
        }
11952
        _Fields fieldId = _Fields.findByThriftId(field.id);
11953
        if (fieldId == null) {
11954
          TProtocolUtil.skip(iprot, field.type);
11955
        } else {
11956
          switch (fieldId) {
11957
            case SUCCESS:
11958
              if (field.type == TType.BOOL) {
11959
                this.success = iprot.readBool();
11960
                setSuccessIsSet(true);
11961
              } else { 
11962
                TProtocolUtil.skip(iprot, field.type);
11963
              }
11964
              break;
11965
            case EX:
11966
              if (field.type == TType.STRUCT) {
11967
                this.ex = new TransactionServiceException();
11968
                this.ex.read(iprot);
11969
              } else { 
11970
                TProtocolUtil.skip(iprot, field.type);
11971
              }
11972
              break;
11973
          }
11974
          iprot.readFieldEnd();
11975
        }
11976
      }
11977
      iprot.readStructEnd();
11978
      validate();
11979
    }
11980
 
11981
    public void write(TProtocol oprot) throws TException {
11982
      oprot.writeStructBegin(STRUCT_DESC);
11983
 
11984
      if (this.isSetSuccess()) {
11985
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
11986
        oprot.writeBool(this.success);
11987
        oprot.writeFieldEnd();
11988
      } else if (this.isSetEx()) {
11989
        oprot.writeFieldBegin(EX_FIELD_DESC);
11990
        this.ex.write(oprot);
11991
        oprot.writeFieldEnd();
11992
      }
11993
      oprot.writeFieldStop();
11994
      oprot.writeStructEnd();
11995
    }
11996
 
11997
    @Override
11998
    public String toString() {
483 rajveer 11999
      StringBuilder sb = new StringBuilder("changeOrderStatus_result(");
68 ashish 12000
      boolean first = true;
12001
 
12002
      sb.append("success:");
12003
      sb.append(this.success);
12004
      first = false;
12005
      if (!first) sb.append(", ");
12006
      sb.append("ex:");
12007
      if (this.ex == null) {
12008
        sb.append("null");
12009
      } else {
12010
        sb.append(this.ex);
12011
      }
12012
      first = false;
12013
      sb.append(")");
12014
      return sb.toString();
12015
    }
12016
 
12017
    public void validate() throws TException {
12018
      // check for required fields
12019
    }
12020
 
12021
  }
12022
 
495 rajveer 12023
  public static class addBillingDetails_args implements TBase<addBillingDetails_args._Fields>, java.io.Serializable, Cloneable, Comparable<addBillingDetails_args>   {
12024
    private static final TStruct STRUCT_DESC = new TStruct("addBillingDetails_args");
12025
 
12026
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
12027
    private static final TField INVOICE_NUMBER_FIELD_DESC = new TField("invoice_number", TType.STRING, (short)2);
1148 chandransh 12028
    private static final TField BILLED_BY_FIELD_DESC = new TField("billed_by", TType.STRING, (short)3);
495 rajveer 12029
 
12030
    private long orderId;
12031
    private String invoice_number;
12032
    private String billed_by;
12033
 
12034
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12035
    public enum _Fields implements TFieldIdEnum {
12036
      ORDER_ID((short)1, "orderId"),
12037
      INVOICE_NUMBER((short)2, "invoice_number"),
1148 chandransh 12038
      BILLED_BY((short)3, "billed_by");
495 rajveer 12039
 
12040
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
12041
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12042
 
12043
      static {
12044
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12045
          byId.put((int)field._thriftId, field);
12046
          byName.put(field.getFieldName(), field);
12047
        }
12048
      }
12049
 
12050
      /**
12051
       * Find the _Fields constant that matches fieldId, or null if its not found.
12052
       */
12053
      public static _Fields findByThriftId(int fieldId) {
12054
        return byId.get(fieldId);
12055
      }
12056
 
12057
      /**
12058
       * Find the _Fields constant that matches fieldId, throwing an exception
12059
       * if it is not found.
12060
       */
12061
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12062
        _Fields fields = findByThriftId(fieldId);
12063
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12064
        return fields;
12065
      }
12066
 
12067
      /**
12068
       * Find the _Fields constant that matches name, or null if its not found.
12069
       */
12070
      public static _Fields findByName(String name) {
12071
        return byName.get(name);
12072
      }
12073
 
12074
      private final short _thriftId;
12075
      private final String _fieldName;
12076
 
12077
      _Fields(short thriftId, String fieldName) {
12078
        _thriftId = thriftId;
12079
        _fieldName = fieldName;
12080
      }
12081
 
12082
      public short getThriftFieldId() {
12083
        return _thriftId;
12084
      }
12085
 
12086
      public String getFieldName() {
12087
        return _fieldName;
12088
      }
12089
    }
12090
 
12091
    // isset id assignments
12092
    private static final int __ORDERID_ISSET_ID = 0;
1148 chandransh 12093
    private BitSet __isset_bit_vector = new BitSet(1);
495 rajveer 12094
 
12095
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
12096
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
12097
          new FieldValueMetaData(TType.I64)));
12098
      put(_Fields.INVOICE_NUMBER, new FieldMetaData("invoice_number", TFieldRequirementType.DEFAULT, 
12099
          new FieldValueMetaData(TType.STRING)));
12100
      put(_Fields.BILLED_BY, new FieldMetaData("billed_by", TFieldRequirementType.DEFAULT, 
12101
          new FieldValueMetaData(TType.STRING)));
12102
    }});
12103
 
12104
    static {
12105
      FieldMetaData.addStructMetaDataMap(addBillingDetails_args.class, metaDataMap);
12106
    }
12107
 
12108
    public addBillingDetails_args() {
12109
    }
12110
 
12111
    public addBillingDetails_args(
12112
      long orderId,
12113
      String invoice_number,
12114
      String billed_by)
12115
    {
12116
      this();
12117
      this.orderId = orderId;
12118
      setOrderIdIsSet(true);
12119
      this.invoice_number = invoice_number;
12120
      this.billed_by = billed_by;
12121
    }
12122
 
12123
    /**
12124
     * Performs a deep copy on <i>other</i>.
12125
     */
12126
    public addBillingDetails_args(addBillingDetails_args other) {
12127
      __isset_bit_vector.clear();
12128
      __isset_bit_vector.or(other.__isset_bit_vector);
12129
      this.orderId = other.orderId;
12130
      if (other.isSetInvoice_number()) {
12131
        this.invoice_number = other.invoice_number;
12132
      }
12133
      if (other.isSetBilled_by()) {
12134
        this.billed_by = other.billed_by;
12135
      }
12136
    }
12137
 
12138
    public addBillingDetails_args deepCopy() {
12139
      return new addBillingDetails_args(this);
12140
    }
12141
 
12142
    @Deprecated
12143
    public addBillingDetails_args clone() {
12144
      return new addBillingDetails_args(this);
12145
    }
12146
 
12147
    public long getOrderId() {
12148
      return this.orderId;
12149
    }
12150
 
12151
    public addBillingDetails_args setOrderId(long orderId) {
12152
      this.orderId = orderId;
12153
      setOrderIdIsSet(true);
12154
      return this;
12155
    }
12156
 
12157
    public void unsetOrderId() {
12158
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
12159
    }
12160
 
12161
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
12162
    public boolean isSetOrderId() {
12163
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
12164
    }
12165
 
12166
    public void setOrderIdIsSet(boolean value) {
12167
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
12168
    }
12169
 
12170
    public String getInvoice_number() {
12171
      return this.invoice_number;
12172
    }
12173
 
12174
    public addBillingDetails_args setInvoice_number(String invoice_number) {
12175
      this.invoice_number = invoice_number;
12176
      return this;
12177
    }
12178
 
12179
    public void unsetInvoice_number() {
12180
      this.invoice_number = null;
12181
    }
12182
 
12183
    /** Returns true if field invoice_number is set (has been asigned a value) and false otherwise */
12184
    public boolean isSetInvoice_number() {
12185
      return this.invoice_number != null;
12186
    }
12187
 
12188
    public void setInvoice_numberIsSet(boolean value) {
12189
      if (!value) {
12190
        this.invoice_number = null;
12191
      }
12192
    }
12193
 
12194
    public String getBilled_by() {
12195
      return this.billed_by;
12196
    }
12197
 
12198
    public addBillingDetails_args setBilled_by(String billed_by) {
12199
      this.billed_by = billed_by;
12200
      return this;
12201
    }
12202
 
12203
    public void unsetBilled_by() {
12204
      this.billed_by = null;
12205
    }
12206
 
12207
    /** Returns true if field billed_by is set (has been asigned a value) and false otherwise */
12208
    public boolean isSetBilled_by() {
12209
      return this.billed_by != null;
12210
    }
12211
 
12212
    public void setBilled_byIsSet(boolean value) {
12213
      if (!value) {
12214
        this.billed_by = null;
12215
      }
12216
    }
12217
 
12218
    public void setFieldValue(_Fields field, Object value) {
12219
      switch (field) {
12220
      case ORDER_ID:
12221
        if (value == null) {
12222
          unsetOrderId();
12223
        } else {
12224
          setOrderId((Long)value);
12225
        }
12226
        break;
12227
 
12228
      case INVOICE_NUMBER:
12229
        if (value == null) {
12230
          unsetInvoice_number();
12231
        } else {
12232
          setInvoice_number((String)value);
12233
        }
12234
        break;
12235
 
12236
      case BILLED_BY:
12237
        if (value == null) {
12238
          unsetBilled_by();
12239
        } else {
12240
          setBilled_by((String)value);
12241
        }
12242
        break;
12243
 
12244
      }
12245
    }
12246
 
12247
    public void setFieldValue(int fieldID, Object value) {
12248
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
12249
    }
12250
 
12251
    public Object getFieldValue(_Fields field) {
12252
      switch (field) {
12253
      case ORDER_ID:
12254
        return new Long(getOrderId());
12255
 
12256
      case INVOICE_NUMBER:
12257
        return getInvoice_number();
12258
 
12259
      case BILLED_BY:
12260
        return getBilled_by();
12261
 
12262
      }
12263
      throw new IllegalStateException();
12264
    }
12265
 
12266
    public Object getFieldValue(int fieldId) {
12267
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
12268
    }
12269
 
12270
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
12271
    public boolean isSet(_Fields field) {
12272
      switch (field) {
12273
      case ORDER_ID:
12274
        return isSetOrderId();
12275
      case INVOICE_NUMBER:
12276
        return isSetInvoice_number();
12277
      case BILLED_BY:
12278
        return isSetBilled_by();
12279
      }
12280
      throw new IllegalStateException();
12281
    }
12282
 
12283
    public boolean isSet(int fieldID) {
12284
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
12285
    }
12286
 
12287
    @Override
12288
    public boolean equals(Object that) {
12289
      if (that == null)
12290
        return false;
12291
      if (that instanceof addBillingDetails_args)
12292
        return this.equals((addBillingDetails_args)that);
12293
      return false;
12294
    }
12295
 
12296
    public boolean equals(addBillingDetails_args that) {
12297
      if (that == null)
12298
        return false;
12299
 
12300
      boolean this_present_orderId = true;
12301
      boolean that_present_orderId = true;
12302
      if (this_present_orderId || that_present_orderId) {
12303
        if (!(this_present_orderId && that_present_orderId))
12304
          return false;
12305
        if (this.orderId != that.orderId)
12306
          return false;
12307
      }
12308
 
12309
      boolean this_present_invoice_number = true && this.isSetInvoice_number();
12310
      boolean that_present_invoice_number = true && that.isSetInvoice_number();
12311
      if (this_present_invoice_number || that_present_invoice_number) {
12312
        if (!(this_present_invoice_number && that_present_invoice_number))
12313
          return false;
12314
        if (!this.invoice_number.equals(that.invoice_number))
12315
          return false;
12316
      }
12317
 
12318
      boolean this_present_billed_by = true && this.isSetBilled_by();
12319
      boolean that_present_billed_by = true && that.isSetBilled_by();
12320
      if (this_present_billed_by || that_present_billed_by) {
12321
        if (!(this_present_billed_by && that_present_billed_by))
12322
          return false;
12323
        if (!this.billed_by.equals(that.billed_by))
12324
          return false;
12325
      }
12326
 
12327
      return true;
12328
    }
12329
 
12330
    @Override
12331
    public int hashCode() {
12332
      return 0;
12333
    }
12334
 
12335
    public int compareTo(addBillingDetails_args other) {
12336
      if (!getClass().equals(other.getClass())) {
12337
        return getClass().getName().compareTo(other.getClass().getName());
12338
      }
12339
 
12340
      int lastComparison = 0;
12341
      addBillingDetails_args typedOther = (addBillingDetails_args)other;
12342
 
12343
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
12344
      if (lastComparison != 0) {
12345
        return lastComparison;
12346
      }
12347
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
12348
      if (lastComparison != 0) {
12349
        return lastComparison;
12350
      }
12351
      lastComparison = Boolean.valueOf(isSetInvoice_number()).compareTo(isSetInvoice_number());
12352
      if (lastComparison != 0) {
12353
        return lastComparison;
12354
      }
12355
      lastComparison = TBaseHelper.compareTo(invoice_number, typedOther.invoice_number);
12356
      if (lastComparison != 0) {
12357
        return lastComparison;
12358
      }
12359
      lastComparison = Boolean.valueOf(isSetBilled_by()).compareTo(isSetBilled_by());
12360
      if (lastComparison != 0) {
12361
        return lastComparison;
12362
      }
12363
      lastComparison = TBaseHelper.compareTo(billed_by, typedOther.billed_by);
12364
      if (lastComparison != 0) {
12365
        return lastComparison;
12366
      }
12367
      return 0;
12368
    }
12369
 
12370
    public void read(TProtocol iprot) throws TException {
12371
      TField field;
12372
      iprot.readStructBegin();
12373
      while (true)
12374
      {
12375
        field = iprot.readFieldBegin();
12376
        if (field.type == TType.STOP) { 
12377
          break;
12378
        }
12379
        _Fields fieldId = _Fields.findByThriftId(field.id);
12380
        if (fieldId == null) {
12381
          TProtocolUtil.skip(iprot, field.type);
12382
        } else {
12383
          switch (fieldId) {
12384
            case ORDER_ID:
12385
              if (field.type == TType.I64) {
12386
                this.orderId = iprot.readI64();
12387
                setOrderIdIsSet(true);
12388
              } else { 
12389
                TProtocolUtil.skip(iprot, field.type);
12390
              }
12391
              break;
12392
            case INVOICE_NUMBER:
12393
              if (field.type == TType.STRING) {
12394
                this.invoice_number = iprot.readString();
12395
              } else { 
12396
                TProtocolUtil.skip(iprot, field.type);
12397
              }
12398
              break;
12399
            case BILLED_BY:
12400
              if (field.type == TType.STRING) {
12401
                this.billed_by = iprot.readString();
12402
              } else { 
12403
                TProtocolUtil.skip(iprot, field.type);
12404
              }
12405
              break;
12406
          }
12407
          iprot.readFieldEnd();
12408
        }
12409
      }
12410
      iprot.readStructEnd();
12411
      validate();
12412
    }
12413
 
12414
    public void write(TProtocol oprot) throws TException {
12415
      validate();
12416
 
12417
      oprot.writeStructBegin(STRUCT_DESC);
12418
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
12419
      oprot.writeI64(this.orderId);
12420
      oprot.writeFieldEnd();
12421
      if (this.invoice_number != null) {
12422
        oprot.writeFieldBegin(INVOICE_NUMBER_FIELD_DESC);
12423
        oprot.writeString(this.invoice_number);
12424
        oprot.writeFieldEnd();
12425
      }
12426
      if (this.billed_by != null) {
12427
        oprot.writeFieldBegin(BILLED_BY_FIELD_DESC);
12428
        oprot.writeString(this.billed_by);
12429
        oprot.writeFieldEnd();
12430
      }
12431
      oprot.writeFieldStop();
12432
      oprot.writeStructEnd();
12433
    }
12434
 
12435
    @Override
12436
    public String toString() {
12437
      StringBuilder sb = new StringBuilder("addBillingDetails_args(");
12438
      boolean first = true;
12439
 
12440
      sb.append("orderId:");
12441
      sb.append(this.orderId);
12442
      first = false;
12443
      if (!first) sb.append(", ");
12444
      sb.append("invoice_number:");
12445
      if (this.invoice_number == null) {
12446
        sb.append("null");
12447
      } else {
12448
        sb.append(this.invoice_number);
12449
      }
12450
      first = false;
12451
      if (!first) sb.append(", ");
12452
      sb.append("billed_by:");
12453
      if (this.billed_by == null) {
12454
        sb.append("null");
12455
      } else {
12456
        sb.append(this.billed_by);
12457
      }
12458
      first = false;
12459
      sb.append(")");
12460
      return sb.toString();
12461
    }
12462
 
12463
    public void validate() throws TException {
12464
      // check for required fields
12465
    }
12466
 
12467
  }
12468
 
12469
  public static class addBillingDetails_result implements TBase<addBillingDetails_result._Fields>, java.io.Serializable, Cloneable, Comparable<addBillingDetails_result>   {
12470
    private static final TStruct STRUCT_DESC = new TStruct("addBillingDetails_result");
12471
 
12472
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
12473
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
12474
 
12475
    private boolean success;
12476
    private TransactionServiceException ex;
12477
 
12478
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12479
    public enum _Fields implements TFieldIdEnum {
12480
      SUCCESS((short)0, "success"),
12481
      EX((short)1, "ex");
12482
 
12483
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
12484
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12485
 
12486
      static {
12487
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12488
          byId.put((int)field._thriftId, field);
12489
          byName.put(field.getFieldName(), field);
12490
        }
12491
      }
12492
 
12493
      /**
12494
       * Find the _Fields constant that matches fieldId, or null if its not found.
12495
       */
12496
      public static _Fields findByThriftId(int fieldId) {
12497
        return byId.get(fieldId);
12498
      }
12499
 
12500
      /**
12501
       * Find the _Fields constant that matches fieldId, throwing an exception
12502
       * if it is not found.
12503
       */
12504
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12505
        _Fields fields = findByThriftId(fieldId);
12506
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12507
        return fields;
12508
      }
12509
 
12510
      /**
12511
       * Find the _Fields constant that matches name, or null if its not found.
12512
       */
12513
      public static _Fields findByName(String name) {
12514
        return byName.get(name);
12515
      }
12516
 
12517
      private final short _thriftId;
12518
      private final String _fieldName;
12519
 
12520
      _Fields(short thriftId, String fieldName) {
12521
        _thriftId = thriftId;
12522
        _fieldName = fieldName;
12523
      }
12524
 
12525
      public short getThriftFieldId() {
12526
        return _thriftId;
12527
      }
12528
 
12529
      public String getFieldName() {
12530
        return _fieldName;
12531
      }
12532
    }
12533
 
12534
    // isset id assignments
12535
    private static final int __SUCCESS_ISSET_ID = 0;
12536
    private BitSet __isset_bit_vector = new BitSet(1);
12537
 
12538
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
12539
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
12540
          new FieldValueMetaData(TType.BOOL)));
12541
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
12542
          new FieldValueMetaData(TType.STRUCT)));
12543
    }});
12544
 
12545
    static {
12546
      FieldMetaData.addStructMetaDataMap(addBillingDetails_result.class, metaDataMap);
12547
    }
12548
 
12549
    public addBillingDetails_result() {
12550
    }
12551
 
12552
    public addBillingDetails_result(
12553
      boolean success,
12554
      TransactionServiceException ex)
12555
    {
12556
      this();
12557
      this.success = success;
12558
      setSuccessIsSet(true);
12559
      this.ex = ex;
12560
    }
12561
 
12562
    /**
12563
     * Performs a deep copy on <i>other</i>.
12564
     */
12565
    public addBillingDetails_result(addBillingDetails_result other) {
12566
      __isset_bit_vector.clear();
12567
      __isset_bit_vector.or(other.__isset_bit_vector);
12568
      this.success = other.success;
12569
      if (other.isSetEx()) {
12570
        this.ex = new TransactionServiceException(other.ex);
12571
      }
12572
    }
12573
 
12574
    public addBillingDetails_result deepCopy() {
12575
      return new addBillingDetails_result(this);
12576
    }
12577
 
12578
    @Deprecated
12579
    public addBillingDetails_result clone() {
12580
      return new addBillingDetails_result(this);
12581
    }
12582
 
12583
    public boolean isSuccess() {
12584
      return this.success;
12585
    }
12586
 
12587
    public addBillingDetails_result setSuccess(boolean success) {
12588
      this.success = success;
12589
      setSuccessIsSet(true);
12590
      return this;
12591
    }
12592
 
12593
    public void unsetSuccess() {
12594
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
12595
    }
12596
 
12597
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
12598
    public boolean isSetSuccess() {
12599
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
12600
    }
12601
 
12602
    public void setSuccessIsSet(boolean value) {
12603
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
12604
    }
12605
 
12606
    public TransactionServiceException getEx() {
12607
      return this.ex;
12608
    }
12609
 
12610
    public addBillingDetails_result setEx(TransactionServiceException ex) {
12611
      this.ex = ex;
12612
      return this;
12613
    }
12614
 
12615
    public void unsetEx() {
12616
      this.ex = null;
12617
    }
12618
 
12619
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
12620
    public boolean isSetEx() {
12621
      return this.ex != null;
12622
    }
12623
 
12624
    public void setExIsSet(boolean value) {
12625
      if (!value) {
12626
        this.ex = null;
12627
      }
12628
    }
12629
 
12630
    public void setFieldValue(_Fields field, Object value) {
12631
      switch (field) {
12632
      case SUCCESS:
12633
        if (value == null) {
12634
          unsetSuccess();
12635
        } else {
12636
          setSuccess((Boolean)value);
12637
        }
12638
        break;
12639
 
12640
      case EX:
12641
        if (value == null) {
12642
          unsetEx();
12643
        } else {
12644
          setEx((TransactionServiceException)value);
12645
        }
12646
        break;
12647
 
12648
      }
12649
    }
12650
 
12651
    public void setFieldValue(int fieldID, Object value) {
12652
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
12653
    }
12654
 
12655
    public Object getFieldValue(_Fields field) {
12656
      switch (field) {
12657
      case SUCCESS:
12658
        return new Boolean(isSuccess());
12659
 
12660
      case EX:
12661
        return getEx();
12662
 
12663
      }
12664
      throw new IllegalStateException();
12665
    }
12666
 
12667
    public Object getFieldValue(int fieldId) {
12668
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
12669
    }
12670
 
12671
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
12672
    public boolean isSet(_Fields field) {
12673
      switch (field) {
12674
      case SUCCESS:
12675
        return isSetSuccess();
12676
      case EX:
12677
        return isSetEx();
12678
      }
12679
      throw new IllegalStateException();
12680
    }
12681
 
12682
    public boolean isSet(int fieldID) {
12683
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
12684
    }
12685
 
12686
    @Override
12687
    public boolean equals(Object that) {
12688
      if (that == null)
12689
        return false;
12690
      if (that instanceof addBillingDetails_result)
12691
        return this.equals((addBillingDetails_result)that);
12692
      return false;
12693
    }
12694
 
12695
    public boolean equals(addBillingDetails_result that) {
12696
      if (that == null)
12697
        return false;
12698
 
12699
      boolean this_present_success = true;
12700
      boolean that_present_success = true;
12701
      if (this_present_success || that_present_success) {
12702
        if (!(this_present_success && that_present_success))
12703
          return false;
12704
        if (this.success != that.success)
12705
          return false;
12706
      }
12707
 
12708
      boolean this_present_ex = true && this.isSetEx();
12709
      boolean that_present_ex = true && that.isSetEx();
12710
      if (this_present_ex || that_present_ex) {
12711
        if (!(this_present_ex && that_present_ex))
12712
          return false;
12713
        if (!this.ex.equals(that.ex))
12714
          return false;
12715
      }
12716
 
12717
      return true;
12718
    }
12719
 
12720
    @Override
12721
    public int hashCode() {
12722
      return 0;
12723
    }
12724
 
12725
    public int compareTo(addBillingDetails_result other) {
12726
      if (!getClass().equals(other.getClass())) {
12727
        return getClass().getName().compareTo(other.getClass().getName());
12728
      }
12729
 
12730
      int lastComparison = 0;
12731
      addBillingDetails_result typedOther = (addBillingDetails_result)other;
12732
 
12733
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
12734
      if (lastComparison != 0) {
12735
        return lastComparison;
12736
      }
12737
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
12738
      if (lastComparison != 0) {
12739
        return lastComparison;
12740
      }
12741
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
12742
      if (lastComparison != 0) {
12743
        return lastComparison;
12744
      }
12745
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
12746
      if (lastComparison != 0) {
12747
        return lastComparison;
12748
      }
12749
      return 0;
12750
    }
12751
 
12752
    public void read(TProtocol iprot) throws TException {
12753
      TField field;
12754
      iprot.readStructBegin();
12755
      while (true)
12756
      {
12757
        field = iprot.readFieldBegin();
12758
        if (field.type == TType.STOP) { 
12759
          break;
12760
        }
12761
        _Fields fieldId = _Fields.findByThriftId(field.id);
12762
        if (fieldId == null) {
12763
          TProtocolUtil.skip(iprot, field.type);
12764
        } else {
12765
          switch (fieldId) {
12766
            case SUCCESS:
12767
              if (field.type == TType.BOOL) {
12768
                this.success = iprot.readBool();
12769
                setSuccessIsSet(true);
12770
              } else { 
12771
                TProtocolUtil.skip(iprot, field.type);
12772
              }
12773
              break;
12774
            case EX:
12775
              if (field.type == TType.STRUCT) {
12776
                this.ex = new TransactionServiceException();
12777
                this.ex.read(iprot);
12778
              } else { 
12779
                TProtocolUtil.skip(iprot, field.type);
12780
              }
12781
              break;
12782
          }
12783
          iprot.readFieldEnd();
12784
        }
12785
      }
12786
      iprot.readStructEnd();
12787
      validate();
12788
    }
12789
 
12790
    public void write(TProtocol oprot) throws TException {
12791
      oprot.writeStructBegin(STRUCT_DESC);
12792
 
12793
      if (this.isSetSuccess()) {
12794
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
12795
        oprot.writeBool(this.success);
12796
        oprot.writeFieldEnd();
12797
      } else if (this.isSetEx()) {
12798
        oprot.writeFieldBegin(EX_FIELD_DESC);
12799
        this.ex.write(oprot);
12800
        oprot.writeFieldEnd();
12801
      }
12802
      oprot.writeFieldStop();
12803
      oprot.writeStructEnd();
12804
    }
12805
 
12806
    @Override
12807
    public String toString() {
12808
      StringBuilder sb = new StringBuilder("addBillingDetails_result(");
12809
      boolean first = true;
12810
 
12811
      sb.append("success:");
12812
      sb.append(this.success);
12813
      first = false;
12814
      if (!first) sb.append(", ");
12815
      sb.append("ex:");
12816
      if (this.ex == null) {
12817
        sb.append("null");
12818
      } else {
12819
        sb.append(this.ex);
12820
      }
12821
      first = false;
12822
      sb.append(")");
12823
      return sb.toString();
12824
    }
12825
 
12826
    public void validate() throws TException {
12827
      // check for required fields
12828
    }
12829
 
12830
  }
12831
 
1148 chandransh 12832
  public static class addJacketNumber_args implements TBase<addJacketNumber_args._Fields>, java.io.Serializable, Cloneable, Comparable<addJacketNumber_args>   {
12833
    private static final TStruct STRUCT_DESC = new TStruct("addJacketNumber_args");
12834
 
12835
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
12836
    private static final TField JACKET_NUMBER_FIELD_DESC = new TField("jacketNumber", TType.I64, (short)2);
12837
 
12838
    private long orderId;
12839
    private long jacketNumber;
12840
 
12841
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12842
    public enum _Fields implements TFieldIdEnum {
12843
      ORDER_ID((short)1, "orderId"),
12844
      JACKET_NUMBER((short)2, "jacketNumber");
12845
 
12846
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
12847
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12848
 
12849
      static {
12850
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12851
          byId.put((int)field._thriftId, field);
12852
          byName.put(field.getFieldName(), field);
12853
        }
12854
      }
12855
 
12856
      /**
12857
       * Find the _Fields constant that matches fieldId, or null if its not found.
12858
       */
12859
      public static _Fields findByThriftId(int fieldId) {
12860
        return byId.get(fieldId);
12861
      }
12862
 
12863
      /**
12864
       * Find the _Fields constant that matches fieldId, throwing an exception
12865
       * if it is not found.
12866
       */
12867
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12868
        _Fields fields = findByThriftId(fieldId);
12869
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12870
        return fields;
12871
      }
12872
 
12873
      /**
12874
       * Find the _Fields constant that matches name, or null if its not found.
12875
       */
12876
      public static _Fields findByName(String name) {
12877
        return byName.get(name);
12878
      }
12879
 
12880
      private final short _thriftId;
12881
      private final String _fieldName;
12882
 
12883
      _Fields(short thriftId, String fieldName) {
12884
        _thriftId = thriftId;
12885
        _fieldName = fieldName;
12886
      }
12887
 
12888
      public short getThriftFieldId() {
12889
        return _thriftId;
12890
      }
12891
 
12892
      public String getFieldName() {
12893
        return _fieldName;
12894
      }
12895
    }
12896
 
12897
    // isset id assignments
12898
    private static final int __ORDERID_ISSET_ID = 0;
12899
    private static final int __JACKETNUMBER_ISSET_ID = 1;
12900
    private BitSet __isset_bit_vector = new BitSet(2);
12901
 
12902
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
12903
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
12904
          new FieldValueMetaData(TType.I64)));
12905
      put(_Fields.JACKET_NUMBER, new FieldMetaData("jacketNumber", TFieldRequirementType.DEFAULT, 
12906
          new FieldValueMetaData(TType.I64)));
12907
    }});
12908
 
12909
    static {
12910
      FieldMetaData.addStructMetaDataMap(addJacketNumber_args.class, metaDataMap);
12911
    }
12912
 
12913
    public addJacketNumber_args() {
12914
    }
12915
 
12916
    public addJacketNumber_args(
12917
      long orderId,
12918
      long jacketNumber)
12919
    {
12920
      this();
12921
      this.orderId = orderId;
12922
      setOrderIdIsSet(true);
12923
      this.jacketNumber = jacketNumber;
12924
      setJacketNumberIsSet(true);
12925
    }
12926
 
12927
    /**
12928
     * Performs a deep copy on <i>other</i>.
12929
     */
12930
    public addJacketNumber_args(addJacketNumber_args other) {
12931
      __isset_bit_vector.clear();
12932
      __isset_bit_vector.or(other.__isset_bit_vector);
12933
      this.orderId = other.orderId;
12934
      this.jacketNumber = other.jacketNumber;
12935
    }
12936
 
12937
    public addJacketNumber_args deepCopy() {
12938
      return new addJacketNumber_args(this);
12939
    }
12940
 
12941
    @Deprecated
12942
    public addJacketNumber_args clone() {
12943
      return new addJacketNumber_args(this);
12944
    }
12945
 
12946
    public long getOrderId() {
12947
      return this.orderId;
12948
    }
12949
 
12950
    public addJacketNumber_args setOrderId(long orderId) {
12951
      this.orderId = orderId;
12952
      setOrderIdIsSet(true);
12953
      return this;
12954
    }
12955
 
12956
    public void unsetOrderId() {
12957
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
12958
    }
12959
 
12960
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
12961
    public boolean isSetOrderId() {
12962
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
12963
    }
12964
 
12965
    public void setOrderIdIsSet(boolean value) {
12966
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
12967
    }
12968
 
12969
    public long getJacketNumber() {
12970
      return this.jacketNumber;
12971
    }
12972
 
12973
    public addJacketNumber_args setJacketNumber(long jacketNumber) {
12974
      this.jacketNumber = jacketNumber;
12975
      setJacketNumberIsSet(true);
12976
      return this;
12977
    }
12978
 
12979
    public void unsetJacketNumber() {
12980
      __isset_bit_vector.clear(__JACKETNUMBER_ISSET_ID);
12981
    }
12982
 
12983
    /** Returns true if field jacketNumber is set (has been asigned a value) and false otherwise */
12984
    public boolean isSetJacketNumber() {
12985
      return __isset_bit_vector.get(__JACKETNUMBER_ISSET_ID);
12986
    }
12987
 
12988
    public void setJacketNumberIsSet(boolean value) {
12989
      __isset_bit_vector.set(__JACKETNUMBER_ISSET_ID, value);
12990
    }
12991
 
12992
    public void setFieldValue(_Fields field, Object value) {
12993
      switch (field) {
12994
      case ORDER_ID:
12995
        if (value == null) {
12996
          unsetOrderId();
12997
        } else {
12998
          setOrderId((Long)value);
12999
        }
13000
        break;
13001
 
13002
      case JACKET_NUMBER:
13003
        if (value == null) {
13004
          unsetJacketNumber();
13005
        } else {
13006
          setJacketNumber((Long)value);
13007
        }
13008
        break;
13009
 
13010
      }
13011
    }
13012
 
13013
    public void setFieldValue(int fieldID, Object value) {
13014
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
13015
    }
13016
 
13017
    public Object getFieldValue(_Fields field) {
13018
      switch (field) {
13019
      case ORDER_ID:
13020
        return new Long(getOrderId());
13021
 
13022
      case JACKET_NUMBER:
13023
        return new Long(getJacketNumber());
13024
 
13025
      }
13026
      throw new IllegalStateException();
13027
    }
13028
 
13029
    public Object getFieldValue(int fieldId) {
13030
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
13031
    }
13032
 
13033
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
13034
    public boolean isSet(_Fields field) {
13035
      switch (field) {
13036
      case ORDER_ID:
13037
        return isSetOrderId();
13038
      case JACKET_NUMBER:
13039
        return isSetJacketNumber();
13040
      }
13041
      throw new IllegalStateException();
13042
    }
13043
 
13044
    public boolean isSet(int fieldID) {
13045
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
13046
    }
13047
 
13048
    @Override
13049
    public boolean equals(Object that) {
13050
      if (that == null)
13051
        return false;
13052
      if (that instanceof addJacketNumber_args)
13053
        return this.equals((addJacketNumber_args)that);
13054
      return false;
13055
    }
13056
 
13057
    public boolean equals(addJacketNumber_args that) {
13058
      if (that == null)
13059
        return false;
13060
 
13061
      boolean this_present_orderId = true;
13062
      boolean that_present_orderId = true;
13063
      if (this_present_orderId || that_present_orderId) {
13064
        if (!(this_present_orderId && that_present_orderId))
13065
          return false;
13066
        if (this.orderId != that.orderId)
13067
          return false;
13068
      }
13069
 
13070
      boolean this_present_jacketNumber = true;
13071
      boolean that_present_jacketNumber = true;
13072
      if (this_present_jacketNumber || that_present_jacketNumber) {
13073
        if (!(this_present_jacketNumber && that_present_jacketNumber))
13074
          return false;
13075
        if (this.jacketNumber != that.jacketNumber)
13076
          return false;
13077
      }
13078
 
13079
      return true;
13080
    }
13081
 
13082
    @Override
13083
    public int hashCode() {
13084
      return 0;
13085
    }
13086
 
13087
    public int compareTo(addJacketNumber_args other) {
13088
      if (!getClass().equals(other.getClass())) {
13089
        return getClass().getName().compareTo(other.getClass().getName());
13090
      }
13091
 
13092
      int lastComparison = 0;
13093
      addJacketNumber_args typedOther = (addJacketNumber_args)other;
13094
 
13095
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
13096
      if (lastComparison != 0) {
13097
        return lastComparison;
13098
      }
13099
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
13100
      if (lastComparison != 0) {
13101
        return lastComparison;
13102
      }
13103
      lastComparison = Boolean.valueOf(isSetJacketNumber()).compareTo(isSetJacketNumber());
13104
      if (lastComparison != 0) {
13105
        return lastComparison;
13106
      }
13107
      lastComparison = TBaseHelper.compareTo(jacketNumber, typedOther.jacketNumber);
13108
      if (lastComparison != 0) {
13109
        return lastComparison;
13110
      }
13111
      return 0;
13112
    }
13113
 
13114
    public void read(TProtocol iprot) throws TException {
13115
      TField field;
13116
      iprot.readStructBegin();
13117
      while (true)
13118
      {
13119
        field = iprot.readFieldBegin();
13120
        if (field.type == TType.STOP) { 
13121
          break;
13122
        }
13123
        _Fields fieldId = _Fields.findByThriftId(field.id);
13124
        if (fieldId == null) {
13125
          TProtocolUtil.skip(iprot, field.type);
13126
        } else {
13127
          switch (fieldId) {
13128
            case ORDER_ID:
13129
              if (field.type == TType.I64) {
13130
                this.orderId = iprot.readI64();
13131
                setOrderIdIsSet(true);
13132
              } else { 
13133
                TProtocolUtil.skip(iprot, field.type);
13134
              }
13135
              break;
13136
            case JACKET_NUMBER:
13137
              if (field.type == TType.I64) {
13138
                this.jacketNumber = iprot.readI64();
13139
                setJacketNumberIsSet(true);
13140
              } else { 
13141
                TProtocolUtil.skip(iprot, field.type);
13142
              }
13143
              break;
13144
          }
13145
          iprot.readFieldEnd();
13146
        }
13147
      }
13148
      iprot.readStructEnd();
13149
      validate();
13150
    }
13151
 
13152
    public void write(TProtocol oprot) throws TException {
13153
      validate();
13154
 
13155
      oprot.writeStructBegin(STRUCT_DESC);
13156
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
13157
      oprot.writeI64(this.orderId);
13158
      oprot.writeFieldEnd();
13159
      oprot.writeFieldBegin(JACKET_NUMBER_FIELD_DESC);
13160
      oprot.writeI64(this.jacketNumber);
13161
      oprot.writeFieldEnd();
13162
      oprot.writeFieldStop();
13163
      oprot.writeStructEnd();
13164
    }
13165
 
13166
    @Override
13167
    public String toString() {
13168
      StringBuilder sb = new StringBuilder("addJacketNumber_args(");
13169
      boolean first = true;
13170
 
13171
      sb.append("orderId:");
13172
      sb.append(this.orderId);
13173
      first = false;
13174
      if (!first) sb.append(", ");
13175
      sb.append("jacketNumber:");
13176
      sb.append(this.jacketNumber);
13177
      first = false;
13178
      sb.append(")");
13179
      return sb.toString();
13180
    }
13181
 
13182
    public void validate() throws TException {
13183
      // check for required fields
13184
    }
13185
 
13186
  }
13187
 
13188
  public static class addJacketNumber_result implements TBase<addJacketNumber_result._Fields>, java.io.Serializable, Cloneable, Comparable<addJacketNumber_result>   {
13189
    private static final TStruct STRUCT_DESC = new TStruct("addJacketNumber_result");
13190
 
13191
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
13192
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
13193
 
13194
    private boolean success;
13195
    private TransactionServiceException ex;
13196
 
13197
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13198
    public enum _Fields implements TFieldIdEnum {
13199
      SUCCESS((short)0, "success"),
13200
      EX((short)1, "ex");
13201
 
13202
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
13203
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13204
 
13205
      static {
13206
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13207
          byId.put((int)field._thriftId, field);
13208
          byName.put(field.getFieldName(), field);
13209
        }
13210
      }
13211
 
13212
      /**
13213
       * Find the _Fields constant that matches fieldId, or null if its not found.
13214
       */
13215
      public static _Fields findByThriftId(int fieldId) {
13216
        return byId.get(fieldId);
13217
      }
13218
 
13219
      /**
13220
       * Find the _Fields constant that matches fieldId, throwing an exception
13221
       * if it is not found.
13222
       */
13223
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13224
        _Fields fields = findByThriftId(fieldId);
13225
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13226
        return fields;
13227
      }
13228
 
13229
      /**
13230
       * Find the _Fields constant that matches name, or null if its not found.
13231
       */
13232
      public static _Fields findByName(String name) {
13233
        return byName.get(name);
13234
      }
13235
 
13236
      private final short _thriftId;
13237
      private final String _fieldName;
13238
 
13239
      _Fields(short thriftId, String fieldName) {
13240
        _thriftId = thriftId;
13241
        _fieldName = fieldName;
13242
      }
13243
 
13244
      public short getThriftFieldId() {
13245
        return _thriftId;
13246
      }
13247
 
13248
      public String getFieldName() {
13249
        return _fieldName;
13250
      }
13251
    }
13252
 
13253
    // isset id assignments
13254
    private static final int __SUCCESS_ISSET_ID = 0;
13255
    private BitSet __isset_bit_vector = new BitSet(1);
13256
 
13257
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
13258
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
13259
          new FieldValueMetaData(TType.BOOL)));
13260
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
13261
          new FieldValueMetaData(TType.STRUCT)));
13262
    }});
13263
 
13264
    static {
13265
      FieldMetaData.addStructMetaDataMap(addJacketNumber_result.class, metaDataMap);
13266
    }
13267
 
13268
    public addJacketNumber_result() {
13269
    }
13270
 
13271
    public addJacketNumber_result(
13272
      boolean success,
13273
      TransactionServiceException ex)
13274
    {
13275
      this();
13276
      this.success = success;
13277
      setSuccessIsSet(true);
13278
      this.ex = ex;
13279
    }
13280
 
13281
    /**
13282
     * Performs a deep copy on <i>other</i>.
13283
     */
13284
    public addJacketNumber_result(addJacketNumber_result other) {
13285
      __isset_bit_vector.clear();
13286
      __isset_bit_vector.or(other.__isset_bit_vector);
13287
      this.success = other.success;
13288
      if (other.isSetEx()) {
13289
        this.ex = new TransactionServiceException(other.ex);
13290
      }
13291
    }
13292
 
13293
    public addJacketNumber_result deepCopy() {
13294
      return new addJacketNumber_result(this);
13295
    }
13296
 
13297
    @Deprecated
13298
    public addJacketNumber_result clone() {
13299
      return new addJacketNumber_result(this);
13300
    }
13301
 
13302
    public boolean isSuccess() {
13303
      return this.success;
13304
    }
13305
 
13306
    public addJacketNumber_result setSuccess(boolean success) {
13307
      this.success = success;
13308
      setSuccessIsSet(true);
13309
      return this;
13310
    }
13311
 
13312
    public void unsetSuccess() {
13313
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
13314
    }
13315
 
13316
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
13317
    public boolean isSetSuccess() {
13318
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
13319
    }
13320
 
13321
    public void setSuccessIsSet(boolean value) {
13322
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
13323
    }
13324
 
13325
    public TransactionServiceException getEx() {
13326
      return this.ex;
13327
    }
13328
 
13329
    public addJacketNumber_result setEx(TransactionServiceException ex) {
13330
      this.ex = ex;
13331
      return this;
13332
    }
13333
 
13334
    public void unsetEx() {
13335
      this.ex = null;
13336
    }
13337
 
13338
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
13339
    public boolean isSetEx() {
13340
      return this.ex != null;
13341
    }
13342
 
13343
    public void setExIsSet(boolean value) {
13344
      if (!value) {
13345
        this.ex = null;
13346
      }
13347
    }
13348
 
13349
    public void setFieldValue(_Fields field, Object value) {
13350
      switch (field) {
13351
      case SUCCESS:
13352
        if (value == null) {
13353
          unsetSuccess();
13354
        } else {
13355
          setSuccess((Boolean)value);
13356
        }
13357
        break;
13358
 
13359
      case EX:
13360
        if (value == null) {
13361
          unsetEx();
13362
        } else {
13363
          setEx((TransactionServiceException)value);
13364
        }
13365
        break;
13366
 
13367
      }
13368
    }
13369
 
13370
    public void setFieldValue(int fieldID, Object value) {
13371
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
13372
    }
13373
 
13374
    public Object getFieldValue(_Fields field) {
13375
      switch (field) {
13376
      case SUCCESS:
13377
        return new Boolean(isSuccess());
13378
 
13379
      case EX:
13380
        return getEx();
13381
 
13382
      }
13383
      throw new IllegalStateException();
13384
    }
13385
 
13386
    public Object getFieldValue(int fieldId) {
13387
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
13388
    }
13389
 
13390
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
13391
    public boolean isSet(_Fields field) {
13392
      switch (field) {
13393
      case SUCCESS:
13394
        return isSetSuccess();
13395
      case EX:
13396
        return isSetEx();
13397
      }
13398
      throw new IllegalStateException();
13399
    }
13400
 
13401
    public boolean isSet(int fieldID) {
13402
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
13403
    }
13404
 
13405
    @Override
13406
    public boolean equals(Object that) {
13407
      if (that == null)
13408
        return false;
13409
      if (that instanceof addJacketNumber_result)
13410
        return this.equals((addJacketNumber_result)that);
13411
      return false;
13412
    }
13413
 
13414
    public boolean equals(addJacketNumber_result that) {
13415
      if (that == null)
13416
        return false;
13417
 
13418
      boolean this_present_success = true;
13419
      boolean that_present_success = true;
13420
      if (this_present_success || that_present_success) {
13421
        if (!(this_present_success && that_present_success))
13422
          return false;
13423
        if (this.success != that.success)
13424
          return false;
13425
      }
13426
 
13427
      boolean this_present_ex = true && this.isSetEx();
13428
      boolean that_present_ex = true && that.isSetEx();
13429
      if (this_present_ex || that_present_ex) {
13430
        if (!(this_present_ex && that_present_ex))
13431
          return false;
13432
        if (!this.ex.equals(that.ex))
13433
          return false;
13434
      }
13435
 
13436
      return true;
13437
    }
13438
 
13439
    @Override
13440
    public int hashCode() {
13441
      return 0;
13442
    }
13443
 
13444
    public int compareTo(addJacketNumber_result other) {
13445
      if (!getClass().equals(other.getClass())) {
13446
        return getClass().getName().compareTo(other.getClass().getName());
13447
      }
13448
 
13449
      int lastComparison = 0;
13450
      addJacketNumber_result typedOther = (addJacketNumber_result)other;
13451
 
13452
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
13453
      if (lastComparison != 0) {
13454
        return lastComparison;
13455
      }
13456
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
13457
      if (lastComparison != 0) {
13458
        return lastComparison;
13459
      }
13460
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
13461
      if (lastComparison != 0) {
13462
        return lastComparison;
13463
      }
13464
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
13465
      if (lastComparison != 0) {
13466
        return lastComparison;
13467
      }
13468
      return 0;
13469
    }
13470
 
13471
    public void read(TProtocol iprot) throws TException {
13472
      TField field;
13473
      iprot.readStructBegin();
13474
      while (true)
13475
      {
13476
        field = iprot.readFieldBegin();
13477
        if (field.type == TType.STOP) { 
13478
          break;
13479
        }
13480
        _Fields fieldId = _Fields.findByThriftId(field.id);
13481
        if (fieldId == null) {
13482
          TProtocolUtil.skip(iprot, field.type);
13483
        } else {
13484
          switch (fieldId) {
13485
            case SUCCESS:
13486
              if (field.type == TType.BOOL) {
13487
                this.success = iprot.readBool();
13488
                setSuccessIsSet(true);
13489
              } else { 
13490
                TProtocolUtil.skip(iprot, field.type);
13491
              }
13492
              break;
13493
            case EX:
13494
              if (field.type == TType.STRUCT) {
13495
                this.ex = new TransactionServiceException();
13496
                this.ex.read(iprot);
13497
              } else { 
13498
                TProtocolUtil.skip(iprot, field.type);
13499
              }
13500
              break;
13501
          }
13502
          iprot.readFieldEnd();
13503
        }
13504
      }
13505
      iprot.readStructEnd();
13506
      validate();
13507
    }
13508
 
13509
    public void write(TProtocol oprot) throws TException {
13510
      oprot.writeStructBegin(STRUCT_DESC);
13511
 
13512
      if (this.isSetSuccess()) {
13513
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
13514
        oprot.writeBool(this.success);
13515
        oprot.writeFieldEnd();
13516
      } else if (this.isSetEx()) {
13517
        oprot.writeFieldBegin(EX_FIELD_DESC);
13518
        this.ex.write(oprot);
13519
        oprot.writeFieldEnd();
13520
      }
13521
      oprot.writeFieldStop();
13522
      oprot.writeStructEnd();
13523
    }
13524
 
13525
    @Override
13526
    public String toString() {
13527
      StringBuilder sb = new StringBuilder("addJacketNumber_result(");
13528
      boolean first = true;
13529
 
13530
      sb.append("success:");
13531
      sb.append(this.success);
13532
      first = false;
13533
      if (!first) sb.append(", ");
13534
      sb.append("ex:");
13535
      if (this.ex == null) {
13536
        sb.append("null");
13537
      } else {
13538
        sb.append(this.ex);
13539
      }
13540
      first = false;
13541
      sb.append(")");
13542
      return sb.toString();
13543
    }
13544
 
13545
    public void validate() throws TException {
13546
      // check for required fields
13547
    }
13548
 
13549
  }
13550
 
923 rajveer 13551
  public static class acceptOrder_args implements TBase<acceptOrder_args._Fields>, java.io.Serializable, Cloneable, Comparable<acceptOrder_args>   {
13552
    private static final TStruct STRUCT_DESC = new TStruct("acceptOrder_args");
13553
 
13554
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
13555
 
13556
    private long orderId;
13557
 
13558
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13559
    public enum _Fields implements TFieldIdEnum {
13560
      ORDER_ID((short)1, "orderId");
13561
 
13562
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
13563
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13564
 
13565
      static {
13566
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13567
          byId.put((int)field._thriftId, field);
13568
          byName.put(field.getFieldName(), field);
13569
        }
13570
      }
13571
 
13572
      /**
13573
       * Find the _Fields constant that matches fieldId, or null if its not found.
13574
       */
13575
      public static _Fields findByThriftId(int fieldId) {
13576
        return byId.get(fieldId);
13577
      }
13578
 
13579
      /**
13580
       * Find the _Fields constant that matches fieldId, throwing an exception
13581
       * if it is not found.
13582
       */
13583
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13584
        _Fields fields = findByThriftId(fieldId);
13585
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13586
        return fields;
13587
      }
13588
 
13589
      /**
13590
       * Find the _Fields constant that matches name, or null if its not found.
13591
       */
13592
      public static _Fields findByName(String name) {
13593
        return byName.get(name);
13594
      }
13595
 
13596
      private final short _thriftId;
13597
      private final String _fieldName;
13598
 
13599
      _Fields(short thriftId, String fieldName) {
13600
        _thriftId = thriftId;
13601
        _fieldName = fieldName;
13602
      }
13603
 
13604
      public short getThriftFieldId() {
13605
        return _thriftId;
13606
      }
13607
 
13608
      public String getFieldName() {
13609
        return _fieldName;
13610
      }
13611
    }
13612
 
13613
    // isset id assignments
13614
    private static final int __ORDERID_ISSET_ID = 0;
13615
    private BitSet __isset_bit_vector = new BitSet(1);
13616
 
13617
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
13618
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
13619
          new FieldValueMetaData(TType.I64)));
13620
    }});
13621
 
13622
    static {
13623
      FieldMetaData.addStructMetaDataMap(acceptOrder_args.class, metaDataMap);
13624
    }
13625
 
13626
    public acceptOrder_args() {
13627
    }
13628
 
13629
    public acceptOrder_args(
13630
      long orderId)
13631
    {
13632
      this();
13633
      this.orderId = orderId;
13634
      setOrderIdIsSet(true);
13635
    }
13636
 
13637
    /**
13638
     * Performs a deep copy on <i>other</i>.
13639
     */
13640
    public acceptOrder_args(acceptOrder_args other) {
13641
      __isset_bit_vector.clear();
13642
      __isset_bit_vector.or(other.__isset_bit_vector);
13643
      this.orderId = other.orderId;
13644
    }
13645
 
13646
    public acceptOrder_args deepCopy() {
13647
      return new acceptOrder_args(this);
13648
    }
13649
 
13650
    @Deprecated
13651
    public acceptOrder_args clone() {
13652
      return new acceptOrder_args(this);
13653
    }
13654
 
13655
    public long getOrderId() {
13656
      return this.orderId;
13657
    }
13658
 
13659
    public acceptOrder_args setOrderId(long orderId) {
13660
      this.orderId = orderId;
13661
      setOrderIdIsSet(true);
13662
      return this;
13663
    }
13664
 
13665
    public void unsetOrderId() {
13666
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
13667
    }
13668
 
13669
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
13670
    public boolean isSetOrderId() {
13671
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
13672
    }
13673
 
13674
    public void setOrderIdIsSet(boolean value) {
13675
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
13676
    }
13677
 
13678
    public void setFieldValue(_Fields field, Object value) {
13679
      switch (field) {
13680
      case ORDER_ID:
13681
        if (value == null) {
13682
          unsetOrderId();
13683
        } else {
13684
          setOrderId((Long)value);
13685
        }
13686
        break;
13687
 
13688
      }
13689
    }
13690
 
13691
    public void setFieldValue(int fieldID, Object value) {
13692
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
13693
    }
13694
 
13695
    public Object getFieldValue(_Fields field) {
13696
      switch (field) {
13697
      case ORDER_ID:
13698
        return new Long(getOrderId());
13699
 
13700
      }
13701
      throw new IllegalStateException();
13702
    }
13703
 
13704
    public Object getFieldValue(int fieldId) {
13705
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
13706
    }
13707
 
13708
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
13709
    public boolean isSet(_Fields field) {
13710
      switch (field) {
13711
      case ORDER_ID:
13712
        return isSetOrderId();
13713
      }
13714
      throw new IllegalStateException();
13715
    }
13716
 
13717
    public boolean isSet(int fieldID) {
13718
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
13719
    }
13720
 
13721
    @Override
13722
    public boolean equals(Object that) {
13723
      if (that == null)
13724
        return false;
13725
      if (that instanceof acceptOrder_args)
13726
        return this.equals((acceptOrder_args)that);
13727
      return false;
13728
    }
13729
 
13730
    public boolean equals(acceptOrder_args that) {
13731
      if (that == null)
13732
        return false;
13733
 
13734
      boolean this_present_orderId = true;
13735
      boolean that_present_orderId = true;
13736
      if (this_present_orderId || that_present_orderId) {
13737
        if (!(this_present_orderId && that_present_orderId))
13738
          return false;
13739
        if (this.orderId != that.orderId)
13740
          return false;
13741
      }
13742
 
13743
      return true;
13744
    }
13745
 
13746
    @Override
13747
    public int hashCode() {
13748
      return 0;
13749
    }
13750
 
13751
    public int compareTo(acceptOrder_args other) {
13752
      if (!getClass().equals(other.getClass())) {
13753
        return getClass().getName().compareTo(other.getClass().getName());
13754
      }
13755
 
13756
      int lastComparison = 0;
13757
      acceptOrder_args typedOther = (acceptOrder_args)other;
13758
 
13759
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
13760
      if (lastComparison != 0) {
13761
        return lastComparison;
13762
      }
13763
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
13764
      if (lastComparison != 0) {
13765
        return lastComparison;
13766
      }
13767
      return 0;
13768
    }
13769
 
13770
    public void read(TProtocol iprot) throws TException {
13771
      TField field;
13772
      iprot.readStructBegin();
13773
      while (true)
13774
      {
13775
        field = iprot.readFieldBegin();
13776
        if (field.type == TType.STOP) { 
13777
          break;
13778
        }
13779
        _Fields fieldId = _Fields.findByThriftId(field.id);
13780
        if (fieldId == null) {
13781
          TProtocolUtil.skip(iprot, field.type);
13782
        } else {
13783
          switch (fieldId) {
13784
            case ORDER_ID:
13785
              if (field.type == TType.I64) {
13786
                this.orderId = iprot.readI64();
13787
                setOrderIdIsSet(true);
13788
              } else { 
13789
                TProtocolUtil.skip(iprot, field.type);
13790
              }
13791
              break;
13792
          }
13793
          iprot.readFieldEnd();
13794
        }
13795
      }
13796
      iprot.readStructEnd();
13797
      validate();
13798
    }
13799
 
13800
    public void write(TProtocol oprot) throws TException {
13801
      validate();
13802
 
13803
      oprot.writeStructBegin(STRUCT_DESC);
13804
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
13805
      oprot.writeI64(this.orderId);
13806
      oprot.writeFieldEnd();
13807
      oprot.writeFieldStop();
13808
      oprot.writeStructEnd();
13809
    }
13810
 
13811
    @Override
13812
    public String toString() {
13813
      StringBuilder sb = new StringBuilder("acceptOrder_args(");
13814
      boolean first = true;
13815
 
13816
      sb.append("orderId:");
13817
      sb.append(this.orderId);
13818
      first = false;
13819
      sb.append(")");
13820
      return sb.toString();
13821
    }
13822
 
13823
    public void validate() throws TException {
13824
      // check for required fields
13825
    }
13826
 
13827
  }
13828
 
13829
  public static class acceptOrder_result implements TBase<acceptOrder_result._Fields>, java.io.Serializable, Cloneable, Comparable<acceptOrder_result>   {
13830
    private static final TStruct STRUCT_DESC = new TStruct("acceptOrder_result");
13831
 
13832
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
13833
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
13834
 
13835
    private boolean success;
13836
    private TransactionServiceException ex;
13837
 
13838
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13839
    public enum _Fields implements TFieldIdEnum {
13840
      SUCCESS((short)0, "success"),
13841
      EX((short)1, "ex");
13842
 
13843
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
13844
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13845
 
13846
      static {
13847
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13848
          byId.put((int)field._thriftId, field);
13849
          byName.put(field.getFieldName(), field);
13850
        }
13851
      }
13852
 
13853
      /**
13854
       * Find the _Fields constant that matches fieldId, or null if its not found.
13855
       */
13856
      public static _Fields findByThriftId(int fieldId) {
13857
        return byId.get(fieldId);
13858
      }
13859
 
13860
      /**
13861
       * Find the _Fields constant that matches fieldId, throwing an exception
13862
       * if it is not found.
13863
       */
13864
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13865
        _Fields fields = findByThriftId(fieldId);
13866
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13867
        return fields;
13868
      }
13869
 
13870
      /**
13871
       * Find the _Fields constant that matches name, or null if its not found.
13872
       */
13873
      public static _Fields findByName(String name) {
13874
        return byName.get(name);
13875
      }
13876
 
13877
      private final short _thriftId;
13878
      private final String _fieldName;
13879
 
13880
      _Fields(short thriftId, String fieldName) {
13881
        _thriftId = thriftId;
13882
        _fieldName = fieldName;
13883
      }
13884
 
13885
      public short getThriftFieldId() {
13886
        return _thriftId;
13887
      }
13888
 
13889
      public String getFieldName() {
13890
        return _fieldName;
13891
      }
13892
    }
13893
 
13894
    // isset id assignments
13895
    private static final int __SUCCESS_ISSET_ID = 0;
13896
    private BitSet __isset_bit_vector = new BitSet(1);
13897
 
13898
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
13899
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
13900
          new FieldValueMetaData(TType.BOOL)));
13901
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
13902
          new FieldValueMetaData(TType.STRUCT)));
13903
    }});
13904
 
13905
    static {
13906
      FieldMetaData.addStructMetaDataMap(acceptOrder_result.class, metaDataMap);
13907
    }
13908
 
13909
    public acceptOrder_result() {
13910
    }
13911
 
13912
    public acceptOrder_result(
13913
      boolean success,
13914
      TransactionServiceException ex)
13915
    {
13916
      this();
13917
      this.success = success;
13918
      setSuccessIsSet(true);
13919
      this.ex = ex;
13920
    }
13921
 
13922
    /**
13923
     * Performs a deep copy on <i>other</i>.
13924
     */
13925
    public acceptOrder_result(acceptOrder_result other) {
13926
      __isset_bit_vector.clear();
13927
      __isset_bit_vector.or(other.__isset_bit_vector);
13928
      this.success = other.success;
13929
      if (other.isSetEx()) {
13930
        this.ex = new TransactionServiceException(other.ex);
13931
      }
13932
    }
13933
 
13934
    public acceptOrder_result deepCopy() {
13935
      return new acceptOrder_result(this);
13936
    }
13937
 
13938
    @Deprecated
13939
    public acceptOrder_result clone() {
13940
      return new acceptOrder_result(this);
13941
    }
13942
 
13943
    public boolean isSuccess() {
13944
      return this.success;
13945
    }
13946
 
13947
    public acceptOrder_result setSuccess(boolean success) {
13948
      this.success = success;
13949
      setSuccessIsSet(true);
13950
      return this;
13951
    }
13952
 
13953
    public void unsetSuccess() {
13954
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
13955
    }
13956
 
13957
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
13958
    public boolean isSetSuccess() {
13959
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
13960
    }
13961
 
13962
    public void setSuccessIsSet(boolean value) {
13963
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
13964
    }
13965
 
13966
    public TransactionServiceException getEx() {
13967
      return this.ex;
13968
    }
13969
 
13970
    public acceptOrder_result setEx(TransactionServiceException ex) {
13971
      this.ex = ex;
13972
      return this;
13973
    }
13974
 
13975
    public void unsetEx() {
13976
      this.ex = null;
13977
    }
13978
 
13979
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
13980
    public boolean isSetEx() {
13981
      return this.ex != null;
13982
    }
13983
 
13984
    public void setExIsSet(boolean value) {
13985
      if (!value) {
13986
        this.ex = null;
13987
      }
13988
    }
13989
 
13990
    public void setFieldValue(_Fields field, Object value) {
13991
      switch (field) {
13992
      case SUCCESS:
13993
        if (value == null) {
13994
          unsetSuccess();
13995
        } else {
13996
          setSuccess((Boolean)value);
13997
        }
13998
        break;
13999
 
14000
      case EX:
14001
        if (value == null) {
14002
          unsetEx();
14003
        } else {
14004
          setEx((TransactionServiceException)value);
14005
        }
14006
        break;
14007
 
14008
      }
14009
    }
14010
 
14011
    public void setFieldValue(int fieldID, Object value) {
14012
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
14013
    }
14014
 
14015
    public Object getFieldValue(_Fields field) {
14016
      switch (field) {
14017
      case SUCCESS:
14018
        return new Boolean(isSuccess());
14019
 
14020
      case EX:
14021
        return getEx();
14022
 
14023
      }
14024
      throw new IllegalStateException();
14025
    }
14026
 
14027
    public Object getFieldValue(int fieldId) {
14028
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
14029
    }
14030
 
14031
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
14032
    public boolean isSet(_Fields field) {
14033
      switch (field) {
14034
      case SUCCESS:
14035
        return isSetSuccess();
14036
      case EX:
14037
        return isSetEx();
14038
      }
14039
      throw new IllegalStateException();
14040
    }
14041
 
14042
    public boolean isSet(int fieldID) {
14043
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
14044
    }
14045
 
14046
    @Override
14047
    public boolean equals(Object that) {
14048
      if (that == null)
14049
        return false;
14050
      if (that instanceof acceptOrder_result)
14051
        return this.equals((acceptOrder_result)that);
14052
      return false;
14053
    }
14054
 
14055
    public boolean equals(acceptOrder_result that) {
14056
      if (that == null)
14057
        return false;
14058
 
14059
      boolean this_present_success = true;
14060
      boolean that_present_success = true;
14061
      if (this_present_success || that_present_success) {
14062
        if (!(this_present_success && that_present_success))
14063
          return false;
14064
        if (this.success != that.success)
14065
          return false;
14066
      }
14067
 
14068
      boolean this_present_ex = true && this.isSetEx();
14069
      boolean that_present_ex = true && that.isSetEx();
14070
      if (this_present_ex || that_present_ex) {
14071
        if (!(this_present_ex && that_present_ex))
14072
          return false;
14073
        if (!this.ex.equals(that.ex))
14074
          return false;
14075
      }
14076
 
14077
      return true;
14078
    }
14079
 
14080
    @Override
14081
    public int hashCode() {
14082
      return 0;
14083
    }
14084
 
14085
    public int compareTo(acceptOrder_result other) {
14086
      if (!getClass().equals(other.getClass())) {
14087
        return getClass().getName().compareTo(other.getClass().getName());
14088
      }
14089
 
14090
      int lastComparison = 0;
14091
      acceptOrder_result typedOther = (acceptOrder_result)other;
14092
 
14093
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
14094
      if (lastComparison != 0) {
14095
        return lastComparison;
14096
      }
14097
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
14098
      if (lastComparison != 0) {
14099
        return lastComparison;
14100
      }
14101
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
14102
      if (lastComparison != 0) {
14103
        return lastComparison;
14104
      }
14105
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
14106
      if (lastComparison != 0) {
14107
        return lastComparison;
14108
      }
14109
      return 0;
14110
    }
14111
 
14112
    public void read(TProtocol iprot) throws TException {
14113
      TField field;
14114
      iprot.readStructBegin();
14115
      while (true)
14116
      {
14117
        field = iprot.readFieldBegin();
14118
        if (field.type == TType.STOP) { 
14119
          break;
14120
        }
14121
        _Fields fieldId = _Fields.findByThriftId(field.id);
14122
        if (fieldId == null) {
14123
          TProtocolUtil.skip(iprot, field.type);
14124
        } else {
14125
          switch (fieldId) {
14126
            case SUCCESS:
14127
              if (field.type == TType.BOOL) {
14128
                this.success = iprot.readBool();
14129
                setSuccessIsSet(true);
14130
              } else { 
14131
                TProtocolUtil.skip(iprot, field.type);
14132
              }
14133
              break;
14134
            case EX:
14135
              if (field.type == TType.STRUCT) {
14136
                this.ex = new TransactionServiceException();
14137
                this.ex.read(iprot);
14138
              } else { 
14139
                TProtocolUtil.skip(iprot, field.type);
14140
              }
14141
              break;
14142
          }
14143
          iprot.readFieldEnd();
14144
        }
14145
      }
14146
      iprot.readStructEnd();
14147
      validate();
14148
    }
14149
 
14150
    public void write(TProtocol oprot) throws TException {
14151
      oprot.writeStructBegin(STRUCT_DESC);
14152
 
14153
      if (this.isSetSuccess()) {
14154
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
14155
        oprot.writeBool(this.success);
14156
        oprot.writeFieldEnd();
14157
      } else if (this.isSetEx()) {
14158
        oprot.writeFieldBegin(EX_FIELD_DESC);
14159
        this.ex.write(oprot);
14160
        oprot.writeFieldEnd();
14161
      }
14162
      oprot.writeFieldStop();
14163
      oprot.writeStructEnd();
14164
    }
14165
 
14166
    @Override
14167
    public String toString() {
14168
      StringBuilder sb = new StringBuilder("acceptOrder_result(");
14169
      boolean first = true;
14170
 
14171
      sb.append("success:");
14172
      sb.append(this.success);
14173
      first = false;
14174
      if (!first) sb.append(", ");
14175
      sb.append("ex:");
14176
      if (this.ex == null) {
14177
        sb.append("null");
14178
      } else {
14179
        sb.append(this.ex);
14180
      }
14181
      first = false;
14182
      sb.append(")");
14183
      return sb.toString();
14184
    }
14185
 
14186
    public void validate() throws TException {
14187
      // check for required fields
14188
    }
14189
 
14190
  }
14191
 
14192
  public static class billOrder_args implements TBase<billOrder_args._Fields>, java.io.Serializable, Cloneable, Comparable<billOrder_args>   {
14193
    private static final TStruct STRUCT_DESC = new TStruct("billOrder_args");
14194
 
14195
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
14196
 
14197
    private long orderId;
14198
 
14199
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14200
    public enum _Fields implements TFieldIdEnum {
14201
      ORDER_ID((short)1, "orderId");
14202
 
14203
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
14204
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14205
 
14206
      static {
14207
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14208
          byId.put((int)field._thriftId, field);
14209
          byName.put(field.getFieldName(), field);
14210
        }
14211
      }
14212
 
14213
      /**
14214
       * Find the _Fields constant that matches fieldId, or null if its not found.
14215
       */
14216
      public static _Fields findByThriftId(int fieldId) {
14217
        return byId.get(fieldId);
14218
      }
14219
 
14220
      /**
14221
       * Find the _Fields constant that matches fieldId, throwing an exception
14222
       * if it is not found.
14223
       */
14224
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14225
        _Fields fields = findByThriftId(fieldId);
14226
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14227
        return fields;
14228
      }
14229
 
14230
      /**
14231
       * Find the _Fields constant that matches name, or null if its not found.
14232
       */
14233
      public static _Fields findByName(String name) {
14234
        return byName.get(name);
14235
      }
14236
 
14237
      private final short _thriftId;
14238
      private final String _fieldName;
14239
 
14240
      _Fields(short thriftId, String fieldName) {
14241
        _thriftId = thriftId;
14242
        _fieldName = fieldName;
14243
      }
14244
 
14245
      public short getThriftFieldId() {
14246
        return _thriftId;
14247
      }
14248
 
14249
      public String getFieldName() {
14250
        return _fieldName;
14251
      }
14252
    }
14253
 
14254
    // isset id assignments
14255
    private static final int __ORDERID_ISSET_ID = 0;
14256
    private BitSet __isset_bit_vector = new BitSet(1);
14257
 
14258
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
14259
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
14260
          new FieldValueMetaData(TType.I64)));
14261
    }});
14262
 
14263
    static {
14264
      FieldMetaData.addStructMetaDataMap(billOrder_args.class, metaDataMap);
14265
    }
14266
 
14267
    public billOrder_args() {
14268
    }
14269
 
14270
    public billOrder_args(
14271
      long orderId)
14272
    {
14273
      this();
14274
      this.orderId = orderId;
14275
      setOrderIdIsSet(true);
14276
    }
14277
 
14278
    /**
14279
     * Performs a deep copy on <i>other</i>.
14280
     */
14281
    public billOrder_args(billOrder_args other) {
14282
      __isset_bit_vector.clear();
14283
      __isset_bit_vector.or(other.__isset_bit_vector);
14284
      this.orderId = other.orderId;
14285
    }
14286
 
14287
    public billOrder_args deepCopy() {
14288
      return new billOrder_args(this);
14289
    }
14290
 
14291
    @Deprecated
14292
    public billOrder_args clone() {
14293
      return new billOrder_args(this);
14294
    }
14295
 
14296
    public long getOrderId() {
14297
      return this.orderId;
14298
    }
14299
 
14300
    public billOrder_args setOrderId(long orderId) {
14301
      this.orderId = orderId;
14302
      setOrderIdIsSet(true);
14303
      return this;
14304
    }
14305
 
14306
    public void unsetOrderId() {
14307
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
14308
    }
14309
 
14310
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
14311
    public boolean isSetOrderId() {
14312
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
14313
    }
14314
 
14315
    public void setOrderIdIsSet(boolean value) {
14316
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
14317
    }
14318
 
14319
    public void setFieldValue(_Fields field, Object value) {
14320
      switch (field) {
14321
      case ORDER_ID:
14322
        if (value == null) {
14323
          unsetOrderId();
14324
        } else {
14325
          setOrderId((Long)value);
14326
        }
14327
        break;
14328
 
14329
      }
14330
    }
14331
 
14332
    public void setFieldValue(int fieldID, Object value) {
14333
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
14334
    }
14335
 
14336
    public Object getFieldValue(_Fields field) {
14337
      switch (field) {
14338
      case ORDER_ID:
14339
        return new Long(getOrderId());
14340
 
14341
      }
14342
      throw new IllegalStateException();
14343
    }
14344
 
14345
    public Object getFieldValue(int fieldId) {
14346
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
14347
    }
14348
 
14349
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
14350
    public boolean isSet(_Fields field) {
14351
      switch (field) {
14352
      case ORDER_ID:
14353
        return isSetOrderId();
14354
      }
14355
      throw new IllegalStateException();
14356
    }
14357
 
14358
    public boolean isSet(int fieldID) {
14359
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
14360
    }
14361
 
14362
    @Override
14363
    public boolean equals(Object that) {
14364
      if (that == null)
14365
        return false;
14366
      if (that instanceof billOrder_args)
14367
        return this.equals((billOrder_args)that);
14368
      return false;
14369
    }
14370
 
14371
    public boolean equals(billOrder_args that) {
14372
      if (that == null)
14373
        return false;
14374
 
14375
      boolean this_present_orderId = true;
14376
      boolean that_present_orderId = true;
14377
      if (this_present_orderId || that_present_orderId) {
14378
        if (!(this_present_orderId && that_present_orderId))
14379
          return false;
14380
        if (this.orderId != that.orderId)
14381
          return false;
14382
      }
14383
 
14384
      return true;
14385
    }
14386
 
14387
    @Override
14388
    public int hashCode() {
14389
      return 0;
14390
    }
14391
 
14392
    public int compareTo(billOrder_args other) {
14393
      if (!getClass().equals(other.getClass())) {
14394
        return getClass().getName().compareTo(other.getClass().getName());
14395
      }
14396
 
14397
      int lastComparison = 0;
14398
      billOrder_args typedOther = (billOrder_args)other;
14399
 
14400
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
14401
      if (lastComparison != 0) {
14402
        return lastComparison;
14403
      }
14404
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
14405
      if (lastComparison != 0) {
14406
        return lastComparison;
14407
      }
14408
      return 0;
14409
    }
14410
 
14411
    public void read(TProtocol iprot) throws TException {
14412
      TField field;
14413
      iprot.readStructBegin();
14414
      while (true)
14415
      {
14416
        field = iprot.readFieldBegin();
14417
        if (field.type == TType.STOP) { 
14418
          break;
14419
        }
14420
        _Fields fieldId = _Fields.findByThriftId(field.id);
14421
        if (fieldId == null) {
14422
          TProtocolUtil.skip(iprot, field.type);
14423
        } else {
14424
          switch (fieldId) {
14425
            case ORDER_ID:
14426
              if (field.type == TType.I64) {
14427
                this.orderId = iprot.readI64();
14428
                setOrderIdIsSet(true);
14429
              } else { 
14430
                TProtocolUtil.skip(iprot, field.type);
14431
              }
14432
              break;
14433
          }
14434
          iprot.readFieldEnd();
14435
        }
14436
      }
14437
      iprot.readStructEnd();
14438
      validate();
14439
    }
14440
 
14441
    public void write(TProtocol oprot) throws TException {
14442
      validate();
14443
 
14444
      oprot.writeStructBegin(STRUCT_DESC);
14445
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
14446
      oprot.writeI64(this.orderId);
14447
      oprot.writeFieldEnd();
14448
      oprot.writeFieldStop();
14449
      oprot.writeStructEnd();
14450
    }
14451
 
14452
    @Override
14453
    public String toString() {
14454
      StringBuilder sb = new StringBuilder("billOrder_args(");
14455
      boolean first = true;
14456
 
14457
      sb.append("orderId:");
14458
      sb.append(this.orderId);
14459
      first = false;
14460
      sb.append(")");
14461
      return sb.toString();
14462
    }
14463
 
14464
    public void validate() throws TException {
14465
      // check for required fields
14466
    }
14467
 
14468
  }
14469
 
14470
  public static class billOrder_result implements TBase<billOrder_result._Fields>, java.io.Serializable, Cloneable, Comparable<billOrder_result>   {
14471
    private static final TStruct STRUCT_DESC = new TStruct("billOrder_result");
14472
 
14473
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
14474
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
14475
 
14476
    private boolean success;
14477
    private TransactionServiceException ex;
14478
 
14479
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14480
    public enum _Fields implements TFieldIdEnum {
14481
      SUCCESS((short)0, "success"),
14482
      EX((short)1, "ex");
14483
 
14484
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
14485
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14486
 
14487
      static {
14488
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14489
          byId.put((int)field._thriftId, field);
14490
          byName.put(field.getFieldName(), field);
14491
        }
14492
      }
14493
 
14494
      /**
14495
       * Find the _Fields constant that matches fieldId, or null if its not found.
14496
       */
14497
      public static _Fields findByThriftId(int fieldId) {
14498
        return byId.get(fieldId);
14499
      }
14500
 
14501
      /**
14502
       * Find the _Fields constant that matches fieldId, throwing an exception
14503
       * if it is not found.
14504
       */
14505
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14506
        _Fields fields = findByThriftId(fieldId);
14507
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14508
        return fields;
14509
      }
14510
 
14511
      /**
14512
       * Find the _Fields constant that matches name, or null if its not found.
14513
       */
14514
      public static _Fields findByName(String name) {
14515
        return byName.get(name);
14516
      }
14517
 
14518
      private final short _thriftId;
14519
      private final String _fieldName;
14520
 
14521
      _Fields(short thriftId, String fieldName) {
14522
        _thriftId = thriftId;
14523
        _fieldName = fieldName;
14524
      }
14525
 
14526
      public short getThriftFieldId() {
14527
        return _thriftId;
14528
      }
14529
 
14530
      public String getFieldName() {
14531
        return _fieldName;
14532
      }
14533
    }
14534
 
14535
    // isset id assignments
14536
    private static final int __SUCCESS_ISSET_ID = 0;
14537
    private BitSet __isset_bit_vector = new BitSet(1);
14538
 
14539
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
14540
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
14541
          new FieldValueMetaData(TType.BOOL)));
14542
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
14543
          new FieldValueMetaData(TType.STRUCT)));
14544
    }});
14545
 
14546
    static {
14547
      FieldMetaData.addStructMetaDataMap(billOrder_result.class, metaDataMap);
14548
    }
14549
 
14550
    public billOrder_result() {
14551
    }
14552
 
14553
    public billOrder_result(
14554
      boolean success,
14555
      TransactionServiceException ex)
14556
    {
14557
      this();
14558
      this.success = success;
14559
      setSuccessIsSet(true);
14560
      this.ex = ex;
14561
    }
14562
 
14563
    /**
14564
     * Performs a deep copy on <i>other</i>.
14565
     */
14566
    public billOrder_result(billOrder_result other) {
14567
      __isset_bit_vector.clear();
14568
      __isset_bit_vector.or(other.__isset_bit_vector);
14569
      this.success = other.success;
14570
      if (other.isSetEx()) {
14571
        this.ex = new TransactionServiceException(other.ex);
14572
      }
14573
    }
14574
 
14575
    public billOrder_result deepCopy() {
14576
      return new billOrder_result(this);
14577
    }
14578
 
14579
    @Deprecated
14580
    public billOrder_result clone() {
14581
      return new billOrder_result(this);
14582
    }
14583
 
14584
    public boolean isSuccess() {
14585
      return this.success;
14586
    }
14587
 
14588
    public billOrder_result setSuccess(boolean success) {
14589
      this.success = success;
14590
      setSuccessIsSet(true);
14591
      return this;
14592
    }
14593
 
14594
    public void unsetSuccess() {
14595
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
14596
    }
14597
 
14598
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
14599
    public boolean isSetSuccess() {
14600
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
14601
    }
14602
 
14603
    public void setSuccessIsSet(boolean value) {
14604
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
14605
    }
14606
 
14607
    public TransactionServiceException getEx() {
14608
      return this.ex;
14609
    }
14610
 
14611
    public billOrder_result setEx(TransactionServiceException ex) {
14612
      this.ex = ex;
14613
      return this;
14614
    }
14615
 
14616
    public void unsetEx() {
14617
      this.ex = null;
14618
    }
14619
 
14620
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
14621
    public boolean isSetEx() {
14622
      return this.ex != null;
14623
    }
14624
 
14625
    public void setExIsSet(boolean value) {
14626
      if (!value) {
14627
        this.ex = null;
14628
      }
14629
    }
14630
 
14631
    public void setFieldValue(_Fields field, Object value) {
14632
      switch (field) {
14633
      case SUCCESS:
14634
        if (value == null) {
14635
          unsetSuccess();
14636
        } else {
14637
          setSuccess((Boolean)value);
14638
        }
14639
        break;
14640
 
14641
      case EX:
14642
        if (value == null) {
14643
          unsetEx();
14644
        } else {
14645
          setEx((TransactionServiceException)value);
14646
        }
14647
        break;
14648
 
14649
      }
14650
    }
14651
 
14652
    public void setFieldValue(int fieldID, Object value) {
14653
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
14654
    }
14655
 
14656
    public Object getFieldValue(_Fields field) {
14657
      switch (field) {
14658
      case SUCCESS:
14659
        return new Boolean(isSuccess());
14660
 
14661
      case EX:
14662
        return getEx();
14663
 
14664
      }
14665
      throw new IllegalStateException();
14666
    }
14667
 
14668
    public Object getFieldValue(int fieldId) {
14669
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
14670
    }
14671
 
14672
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
14673
    public boolean isSet(_Fields field) {
14674
      switch (field) {
14675
      case SUCCESS:
14676
        return isSetSuccess();
14677
      case EX:
14678
        return isSetEx();
14679
      }
14680
      throw new IllegalStateException();
14681
    }
14682
 
14683
    public boolean isSet(int fieldID) {
14684
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
14685
    }
14686
 
14687
    @Override
14688
    public boolean equals(Object that) {
14689
      if (that == null)
14690
        return false;
14691
      if (that instanceof billOrder_result)
14692
        return this.equals((billOrder_result)that);
14693
      return false;
14694
    }
14695
 
14696
    public boolean equals(billOrder_result that) {
14697
      if (that == null)
14698
        return false;
14699
 
14700
      boolean this_present_success = true;
14701
      boolean that_present_success = true;
14702
      if (this_present_success || that_present_success) {
14703
        if (!(this_present_success && that_present_success))
14704
          return false;
14705
        if (this.success != that.success)
14706
          return false;
14707
      }
14708
 
14709
      boolean this_present_ex = true && this.isSetEx();
14710
      boolean that_present_ex = true && that.isSetEx();
14711
      if (this_present_ex || that_present_ex) {
14712
        if (!(this_present_ex && that_present_ex))
14713
          return false;
14714
        if (!this.ex.equals(that.ex))
14715
          return false;
14716
      }
14717
 
14718
      return true;
14719
    }
14720
 
14721
    @Override
14722
    public int hashCode() {
14723
      return 0;
14724
    }
14725
 
14726
    public int compareTo(billOrder_result other) {
14727
      if (!getClass().equals(other.getClass())) {
14728
        return getClass().getName().compareTo(other.getClass().getName());
14729
      }
14730
 
14731
      int lastComparison = 0;
14732
      billOrder_result typedOther = (billOrder_result)other;
14733
 
14734
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
14735
      if (lastComparison != 0) {
14736
        return lastComparison;
14737
      }
14738
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
14739
      if (lastComparison != 0) {
14740
        return lastComparison;
14741
      }
14742
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
14743
      if (lastComparison != 0) {
14744
        return lastComparison;
14745
      }
14746
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
14747
      if (lastComparison != 0) {
14748
        return lastComparison;
14749
      }
14750
      return 0;
14751
    }
14752
 
14753
    public void read(TProtocol iprot) throws TException {
14754
      TField field;
14755
      iprot.readStructBegin();
14756
      while (true)
14757
      {
14758
        field = iprot.readFieldBegin();
14759
        if (field.type == TType.STOP) { 
14760
          break;
14761
        }
14762
        _Fields fieldId = _Fields.findByThriftId(field.id);
14763
        if (fieldId == null) {
14764
          TProtocolUtil.skip(iprot, field.type);
14765
        } else {
14766
          switch (fieldId) {
14767
            case SUCCESS:
14768
              if (field.type == TType.BOOL) {
14769
                this.success = iprot.readBool();
14770
                setSuccessIsSet(true);
14771
              } else { 
14772
                TProtocolUtil.skip(iprot, field.type);
14773
              }
14774
              break;
14775
            case EX:
14776
              if (field.type == TType.STRUCT) {
14777
                this.ex = new TransactionServiceException();
14778
                this.ex.read(iprot);
14779
              } else { 
14780
                TProtocolUtil.skip(iprot, field.type);
14781
              }
14782
              break;
14783
          }
14784
          iprot.readFieldEnd();
14785
        }
14786
      }
14787
      iprot.readStructEnd();
14788
      validate();
14789
    }
14790
 
14791
    public void write(TProtocol oprot) throws TException {
14792
      oprot.writeStructBegin(STRUCT_DESC);
14793
 
14794
      if (this.isSetSuccess()) {
14795
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
14796
        oprot.writeBool(this.success);
14797
        oprot.writeFieldEnd();
14798
      } else if (this.isSetEx()) {
14799
        oprot.writeFieldBegin(EX_FIELD_DESC);
14800
        this.ex.write(oprot);
14801
        oprot.writeFieldEnd();
14802
      }
14803
      oprot.writeFieldStop();
14804
      oprot.writeStructEnd();
14805
    }
14806
 
14807
    @Override
14808
    public String toString() {
14809
      StringBuilder sb = new StringBuilder("billOrder_result(");
14810
      boolean first = true;
14811
 
14812
      sb.append("success:");
14813
      sb.append(this.success);
14814
      first = false;
14815
      if (!first) sb.append(", ");
14816
      sb.append("ex:");
14817
      if (this.ex == null) {
14818
        sb.append("null");
14819
      } else {
14820
        sb.append(this.ex);
14821
      }
14822
      first = false;
14823
      sb.append(")");
14824
      return sb.toString();
14825
    }
14826
 
14827
    public void validate() throws TException {
14828
      // check for required fields
14829
    }
14830
 
14831
  }
14832
 
483 rajveer 14833
  public static class getOrdersForTransaction_args implements TBase<getOrdersForTransaction_args._Fields>, java.io.Serializable, Cloneable, Comparable<getOrdersForTransaction_args>   {
14834
    private static final TStruct STRUCT_DESC = new TStruct("getOrdersForTransaction_args");
68 ashish 14835
 
14836
    private static final TField TRANSACTION_ID_FIELD_DESC = new TField("transactionId", TType.I64, (short)1);
1529 ankur.sing 14837
    private static final TField CUSTOMER_ID_FIELD_DESC = new TField("customerId", TType.I64, (short)2);
68 ashish 14838
 
14839
    private long transactionId;
1529 ankur.sing 14840
    private long customerId;
68 ashish 14841
 
14842
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14843
    public enum _Fields implements TFieldIdEnum {
1529 ankur.sing 14844
      TRANSACTION_ID((short)1, "transactionId"),
14845
      CUSTOMER_ID((short)2, "customerId");
68 ashish 14846
 
14847
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
14848
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14849
 
14850
      static {
14851
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14852
          byId.put((int)field._thriftId, field);
14853
          byName.put(field.getFieldName(), field);
14854
        }
14855
      }
14856
 
14857
      /**
14858
       * Find the _Fields constant that matches fieldId, or null if its not found.
14859
       */
14860
      public static _Fields findByThriftId(int fieldId) {
14861
        return byId.get(fieldId);
14862
      }
14863
 
14864
      /**
14865
       * Find the _Fields constant that matches fieldId, throwing an exception
14866
       * if it is not found.
14867
       */
14868
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14869
        _Fields fields = findByThriftId(fieldId);
14870
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14871
        return fields;
14872
      }
14873
 
14874
      /**
14875
       * Find the _Fields constant that matches name, or null if its not found.
14876
       */
14877
      public static _Fields findByName(String name) {
14878
        return byName.get(name);
14879
      }
14880
 
14881
      private final short _thriftId;
14882
      private final String _fieldName;
14883
 
14884
      _Fields(short thriftId, String fieldName) {
14885
        _thriftId = thriftId;
14886
        _fieldName = fieldName;
14887
      }
14888
 
14889
      public short getThriftFieldId() {
14890
        return _thriftId;
14891
      }
14892
 
14893
      public String getFieldName() {
14894
        return _fieldName;
14895
      }
14896
    }
14897
 
14898
    // isset id assignments
14899
    private static final int __TRANSACTIONID_ISSET_ID = 0;
1529 ankur.sing 14900
    private static final int __CUSTOMERID_ISSET_ID = 1;
14901
    private BitSet __isset_bit_vector = new BitSet(2);
68 ashish 14902
 
14903
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
14904
      put(_Fields.TRANSACTION_ID, new FieldMetaData("transactionId", TFieldRequirementType.DEFAULT, 
14905
          new FieldValueMetaData(TType.I64)));
1529 ankur.sing 14906
      put(_Fields.CUSTOMER_ID, new FieldMetaData("customerId", TFieldRequirementType.DEFAULT, 
14907
          new FieldValueMetaData(TType.I64)));
68 ashish 14908
    }});
14909
 
14910
    static {
483 rajveer 14911
      FieldMetaData.addStructMetaDataMap(getOrdersForTransaction_args.class, metaDataMap);
68 ashish 14912
    }
14913
 
483 rajveer 14914
    public getOrdersForTransaction_args() {
68 ashish 14915
    }
14916
 
483 rajveer 14917
    public getOrdersForTransaction_args(
1529 ankur.sing 14918
      long transactionId,
14919
      long customerId)
68 ashish 14920
    {
14921
      this();
14922
      this.transactionId = transactionId;
14923
      setTransactionIdIsSet(true);
1529 ankur.sing 14924
      this.customerId = customerId;
14925
      setCustomerIdIsSet(true);
68 ashish 14926
    }
14927
 
14928
    /**
14929
     * Performs a deep copy on <i>other</i>.
14930
     */
483 rajveer 14931
    public getOrdersForTransaction_args(getOrdersForTransaction_args other) {
68 ashish 14932
      __isset_bit_vector.clear();
14933
      __isset_bit_vector.or(other.__isset_bit_vector);
14934
      this.transactionId = other.transactionId;
1529 ankur.sing 14935
      this.customerId = other.customerId;
68 ashish 14936
    }
14937
 
483 rajveer 14938
    public getOrdersForTransaction_args deepCopy() {
14939
      return new getOrdersForTransaction_args(this);
68 ashish 14940
    }
14941
 
14942
    @Deprecated
483 rajveer 14943
    public getOrdersForTransaction_args clone() {
14944
      return new getOrdersForTransaction_args(this);
68 ashish 14945
    }
14946
 
14947
    public long getTransactionId() {
14948
      return this.transactionId;
14949
    }
14950
 
483 rajveer 14951
    public getOrdersForTransaction_args setTransactionId(long transactionId) {
68 ashish 14952
      this.transactionId = transactionId;
14953
      setTransactionIdIsSet(true);
14954
      return this;
14955
    }
14956
 
14957
    public void unsetTransactionId() {
14958
      __isset_bit_vector.clear(__TRANSACTIONID_ISSET_ID);
14959
    }
14960
 
14961
    /** Returns true if field transactionId is set (has been asigned a value) and false otherwise */
14962
    public boolean isSetTransactionId() {
14963
      return __isset_bit_vector.get(__TRANSACTIONID_ISSET_ID);
14964
    }
14965
 
14966
    public void setTransactionIdIsSet(boolean value) {
14967
      __isset_bit_vector.set(__TRANSACTIONID_ISSET_ID, value);
14968
    }
14969
 
1529 ankur.sing 14970
    public long getCustomerId() {
14971
      return this.customerId;
14972
    }
14973
 
14974
    public getOrdersForTransaction_args setCustomerId(long customerId) {
14975
      this.customerId = customerId;
14976
      setCustomerIdIsSet(true);
14977
      return this;
14978
    }
14979
 
14980
    public void unsetCustomerId() {
14981
      __isset_bit_vector.clear(__CUSTOMERID_ISSET_ID);
14982
    }
14983
 
14984
    /** Returns true if field customerId is set (has been asigned a value) and false otherwise */
14985
    public boolean isSetCustomerId() {
14986
      return __isset_bit_vector.get(__CUSTOMERID_ISSET_ID);
14987
    }
14988
 
14989
    public void setCustomerIdIsSet(boolean value) {
14990
      __isset_bit_vector.set(__CUSTOMERID_ISSET_ID, value);
14991
    }
14992
 
68 ashish 14993
    public void setFieldValue(_Fields field, Object value) {
14994
      switch (field) {
14995
      case TRANSACTION_ID:
14996
        if (value == null) {
14997
          unsetTransactionId();
14998
        } else {
14999
          setTransactionId((Long)value);
15000
        }
15001
        break;
15002
 
1529 ankur.sing 15003
      case CUSTOMER_ID:
15004
        if (value == null) {
15005
          unsetCustomerId();
15006
        } else {
15007
          setCustomerId((Long)value);
15008
        }
15009
        break;
15010
 
68 ashish 15011
      }
15012
    }
15013
 
15014
    public void setFieldValue(int fieldID, Object value) {
15015
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
15016
    }
15017
 
15018
    public Object getFieldValue(_Fields field) {
15019
      switch (field) {
15020
      case TRANSACTION_ID:
15021
        return new Long(getTransactionId());
15022
 
1529 ankur.sing 15023
      case CUSTOMER_ID:
15024
        return new Long(getCustomerId());
15025
 
68 ashish 15026
      }
15027
      throw new IllegalStateException();
15028
    }
15029
 
15030
    public Object getFieldValue(int fieldId) {
15031
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
15032
    }
15033
 
15034
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
15035
    public boolean isSet(_Fields field) {
15036
      switch (field) {
15037
      case TRANSACTION_ID:
15038
        return isSetTransactionId();
1529 ankur.sing 15039
      case CUSTOMER_ID:
15040
        return isSetCustomerId();
68 ashish 15041
      }
15042
      throw new IllegalStateException();
15043
    }
15044
 
15045
    public boolean isSet(int fieldID) {
15046
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
15047
    }
15048
 
15049
    @Override
15050
    public boolean equals(Object that) {
15051
      if (that == null)
15052
        return false;
483 rajveer 15053
      if (that instanceof getOrdersForTransaction_args)
15054
        return this.equals((getOrdersForTransaction_args)that);
68 ashish 15055
      return false;
15056
    }
15057
 
483 rajveer 15058
    public boolean equals(getOrdersForTransaction_args that) {
68 ashish 15059
      if (that == null)
15060
        return false;
15061
 
15062
      boolean this_present_transactionId = true;
15063
      boolean that_present_transactionId = true;
15064
      if (this_present_transactionId || that_present_transactionId) {
15065
        if (!(this_present_transactionId && that_present_transactionId))
15066
          return false;
15067
        if (this.transactionId != that.transactionId)
15068
          return false;
15069
      }
15070
 
1529 ankur.sing 15071
      boolean this_present_customerId = true;
15072
      boolean that_present_customerId = true;
15073
      if (this_present_customerId || that_present_customerId) {
15074
        if (!(this_present_customerId && that_present_customerId))
15075
          return false;
15076
        if (this.customerId != that.customerId)
15077
          return false;
15078
      }
15079
 
68 ashish 15080
      return true;
15081
    }
15082
 
15083
    @Override
15084
    public int hashCode() {
15085
      return 0;
15086
    }
15087
 
483 rajveer 15088
    public int compareTo(getOrdersForTransaction_args other) {
68 ashish 15089
      if (!getClass().equals(other.getClass())) {
15090
        return getClass().getName().compareTo(other.getClass().getName());
15091
      }
15092
 
15093
      int lastComparison = 0;
483 rajveer 15094
      getOrdersForTransaction_args typedOther = (getOrdersForTransaction_args)other;
68 ashish 15095
 
15096
      lastComparison = Boolean.valueOf(isSetTransactionId()).compareTo(isSetTransactionId());
15097
      if (lastComparison != 0) {
15098
        return lastComparison;
15099
      }
15100
      lastComparison = TBaseHelper.compareTo(transactionId, typedOther.transactionId);
15101
      if (lastComparison != 0) {
15102
        return lastComparison;
15103
      }
1529 ankur.sing 15104
      lastComparison = Boolean.valueOf(isSetCustomerId()).compareTo(isSetCustomerId());
15105
      if (lastComparison != 0) {
15106
        return lastComparison;
15107
      }
15108
      lastComparison = TBaseHelper.compareTo(customerId, typedOther.customerId);
15109
      if (lastComparison != 0) {
15110
        return lastComparison;
15111
      }
68 ashish 15112
      return 0;
15113
    }
15114
 
15115
    public void read(TProtocol iprot) throws TException {
15116
      TField field;
15117
      iprot.readStructBegin();
15118
      while (true)
15119
      {
15120
        field = iprot.readFieldBegin();
15121
        if (field.type == TType.STOP) { 
15122
          break;
15123
        }
15124
        _Fields fieldId = _Fields.findByThriftId(field.id);
15125
        if (fieldId == null) {
15126
          TProtocolUtil.skip(iprot, field.type);
15127
        } else {
15128
          switch (fieldId) {
15129
            case TRANSACTION_ID:
15130
              if (field.type == TType.I64) {
15131
                this.transactionId = iprot.readI64();
15132
                setTransactionIdIsSet(true);
15133
              } else { 
15134
                TProtocolUtil.skip(iprot, field.type);
15135
              }
15136
              break;
1529 ankur.sing 15137
            case CUSTOMER_ID:
15138
              if (field.type == TType.I64) {
15139
                this.customerId = iprot.readI64();
15140
                setCustomerIdIsSet(true);
15141
              } else { 
15142
                TProtocolUtil.skip(iprot, field.type);
15143
              }
15144
              break;
68 ashish 15145
          }
15146
          iprot.readFieldEnd();
15147
        }
15148
      }
15149
      iprot.readStructEnd();
15150
      validate();
15151
    }
15152
 
15153
    public void write(TProtocol oprot) throws TException {
15154
      validate();
15155
 
15156
      oprot.writeStructBegin(STRUCT_DESC);
15157
      oprot.writeFieldBegin(TRANSACTION_ID_FIELD_DESC);
15158
      oprot.writeI64(this.transactionId);
15159
      oprot.writeFieldEnd();
1529 ankur.sing 15160
      oprot.writeFieldBegin(CUSTOMER_ID_FIELD_DESC);
15161
      oprot.writeI64(this.customerId);
15162
      oprot.writeFieldEnd();
68 ashish 15163
      oprot.writeFieldStop();
15164
      oprot.writeStructEnd();
15165
    }
15166
 
15167
    @Override
15168
    public String toString() {
483 rajveer 15169
      StringBuilder sb = new StringBuilder("getOrdersForTransaction_args(");
68 ashish 15170
      boolean first = true;
15171
 
15172
      sb.append("transactionId:");
15173
      sb.append(this.transactionId);
15174
      first = false;
1529 ankur.sing 15175
      if (!first) sb.append(", ");
15176
      sb.append("customerId:");
15177
      sb.append(this.customerId);
15178
      first = false;
68 ashish 15179
      sb.append(")");
15180
      return sb.toString();
15181
    }
15182
 
15183
    public void validate() throws TException {
15184
      // check for required fields
15185
    }
15186
 
15187
  }
15188
 
483 rajveer 15189
  public static class getOrdersForTransaction_result implements TBase<getOrdersForTransaction_result._Fields>, java.io.Serializable, Cloneable, Comparable<getOrdersForTransaction_result>   {
15190
    private static final TStruct STRUCT_DESC = new TStruct("getOrdersForTransaction_result");
68 ashish 15191
 
483 rajveer 15192
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
68 ashish 15193
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
15194
 
483 rajveer 15195
    private List<Order> success;
68 ashish 15196
    private TransactionServiceException ex;
15197
 
15198
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15199
    public enum _Fields implements TFieldIdEnum {
15200
      SUCCESS((short)0, "success"),
15201
      EX((short)1, "ex");
15202
 
15203
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
15204
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15205
 
15206
      static {
15207
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15208
          byId.put((int)field._thriftId, field);
15209
          byName.put(field.getFieldName(), field);
15210
        }
15211
      }
15212
 
15213
      /**
15214
       * Find the _Fields constant that matches fieldId, or null if its not found.
15215
       */
15216
      public static _Fields findByThriftId(int fieldId) {
15217
        return byId.get(fieldId);
15218
      }
15219
 
15220
      /**
15221
       * Find the _Fields constant that matches fieldId, throwing an exception
15222
       * if it is not found.
15223
       */
15224
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15225
        _Fields fields = findByThriftId(fieldId);
15226
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15227
        return fields;
15228
      }
15229
 
15230
      /**
15231
       * Find the _Fields constant that matches name, or null if its not found.
15232
       */
15233
      public static _Fields findByName(String name) {
15234
        return byName.get(name);
15235
      }
15236
 
15237
      private final short _thriftId;
15238
      private final String _fieldName;
15239
 
15240
      _Fields(short thriftId, String fieldName) {
15241
        _thriftId = thriftId;
15242
        _fieldName = fieldName;
15243
      }
15244
 
15245
      public short getThriftFieldId() {
15246
        return _thriftId;
15247
      }
15248
 
15249
      public String getFieldName() {
15250
        return _fieldName;
15251
      }
15252
    }
15253
 
15254
    // isset id assignments
15255
 
15256
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
15257
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
483 rajveer 15258
          new ListMetaData(TType.LIST, 
15259
              new StructMetaData(TType.STRUCT, Order.class))));
68 ashish 15260
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
15261
          new FieldValueMetaData(TType.STRUCT)));
15262
    }});
15263
 
15264
    static {
483 rajveer 15265
      FieldMetaData.addStructMetaDataMap(getOrdersForTransaction_result.class, metaDataMap);
68 ashish 15266
    }
15267
 
483 rajveer 15268
    public getOrdersForTransaction_result() {
68 ashish 15269
    }
15270
 
483 rajveer 15271
    public getOrdersForTransaction_result(
15272
      List<Order> success,
68 ashish 15273
      TransactionServiceException ex)
15274
    {
15275
      this();
15276
      this.success = success;
15277
      this.ex = ex;
15278
    }
15279
 
15280
    /**
15281
     * Performs a deep copy on <i>other</i>.
15282
     */
483 rajveer 15283
    public getOrdersForTransaction_result(getOrdersForTransaction_result other) {
15284
      if (other.isSetSuccess()) {
15285
        List<Order> __this__success = new ArrayList<Order>();
15286
        for (Order other_element : other.success) {
15287
          __this__success.add(new Order(other_element));
15288
        }
15289
        this.success = __this__success;
15290
      }
68 ashish 15291
      if (other.isSetEx()) {
15292
        this.ex = new TransactionServiceException(other.ex);
15293
      }
15294
    }
15295
 
483 rajveer 15296
    public getOrdersForTransaction_result deepCopy() {
15297
      return new getOrdersForTransaction_result(this);
68 ashish 15298
    }
15299
 
15300
    @Deprecated
483 rajveer 15301
    public getOrdersForTransaction_result clone() {
15302
      return new getOrdersForTransaction_result(this);
68 ashish 15303
    }
15304
 
483 rajveer 15305
    public int getSuccessSize() {
15306
      return (this.success == null) ? 0 : this.success.size();
15307
    }
15308
 
15309
    public java.util.Iterator<Order> getSuccessIterator() {
15310
      return (this.success == null) ? null : this.success.iterator();
15311
    }
15312
 
15313
    public void addToSuccess(Order elem) {
15314
      if (this.success == null) {
15315
        this.success = new ArrayList<Order>();
15316
      }
15317
      this.success.add(elem);
15318
    }
15319
 
15320
    public List<Order> getSuccess() {
68 ashish 15321
      return this.success;
15322
    }
15323
 
483 rajveer 15324
    public getOrdersForTransaction_result setSuccess(List<Order> success) {
68 ashish 15325
      this.success = success;
15326
      return this;
15327
    }
15328
 
15329
    public void unsetSuccess() {
483 rajveer 15330
      this.success = null;
68 ashish 15331
    }
15332
 
15333
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
15334
    public boolean isSetSuccess() {
483 rajveer 15335
      return this.success != null;
68 ashish 15336
    }
15337
 
15338
    public void setSuccessIsSet(boolean value) {
483 rajveer 15339
      if (!value) {
15340
        this.success = null;
15341
      }
68 ashish 15342
    }
15343
 
15344
    public TransactionServiceException getEx() {
15345
      return this.ex;
15346
    }
15347
 
483 rajveer 15348
    public getOrdersForTransaction_result setEx(TransactionServiceException ex) {
68 ashish 15349
      this.ex = ex;
15350
      return this;
15351
    }
15352
 
15353
    public void unsetEx() {
15354
      this.ex = null;
15355
    }
15356
 
15357
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
15358
    public boolean isSetEx() {
15359
      return this.ex != null;
15360
    }
15361
 
15362
    public void setExIsSet(boolean value) {
15363
      if (!value) {
15364
        this.ex = null;
15365
      }
15366
    }
15367
 
15368
    public void setFieldValue(_Fields field, Object value) {
15369
      switch (field) {
15370
      case SUCCESS:
15371
        if (value == null) {
15372
          unsetSuccess();
15373
        } else {
483 rajveer 15374
          setSuccess((List<Order>)value);
68 ashish 15375
        }
15376
        break;
15377
 
15378
      case EX:
15379
        if (value == null) {
15380
          unsetEx();
15381
        } else {
15382
          setEx((TransactionServiceException)value);
15383
        }
15384
        break;
15385
 
15386
      }
15387
    }
15388
 
15389
    public void setFieldValue(int fieldID, Object value) {
15390
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
15391
    }
15392
 
15393
    public Object getFieldValue(_Fields field) {
15394
      switch (field) {
15395
      case SUCCESS:
483 rajveer 15396
        return getSuccess();
68 ashish 15397
 
15398
      case EX:
15399
        return getEx();
15400
 
15401
      }
15402
      throw new IllegalStateException();
15403
    }
15404
 
15405
    public Object getFieldValue(int fieldId) {
15406
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
15407
    }
15408
 
15409
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
15410
    public boolean isSet(_Fields field) {
15411
      switch (field) {
15412
      case SUCCESS:
15413
        return isSetSuccess();
15414
      case EX:
15415
        return isSetEx();
15416
      }
15417
      throw new IllegalStateException();
15418
    }
15419
 
15420
    public boolean isSet(int fieldID) {
15421
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
15422
    }
15423
 
15424
    @Override
15425
    public boolean equals(Object that) {
15426
      if (that == null)
15427
        return false;
483 rajveer 15428
      if (that instanceof getOrdersForTransaction_result)
15429
        return this.equals((getOrdersForTransaction_result)that);
68 ashish 15430
      return false;
15431
    }
15432
 
483 rajveer 15433
    public boolean equals(getOrdersForTransaction_result that) {
68 ashish 15434
      if (that == null)
15435
        return false;
15436
 
483 rajveer 15437
      boolean this_present_success = true && this.isSetSuccess();
15438
      boolean that_present_success = true && that.isSetSuccess();
68 ashish 15439
      if (this_present_success || that_present_success) {
15440
        if (!(this_present_success && that_present_success))
15441
          return false;
483 rajveer 15442
        if (!this.success.equals(that.success))
68 ashish 15443
          return false;
15444
      }
15445
 
15446
      boolean this_present_ex = true && this.isSetEx();
15447
      boolean that_present_ex = true && that.isSetEx();
15448
      if (this_present_ex || that_present_ex) {
15449
        if (!(this_present_ex && that_present_ex))
15450
          return false;
15451
        if (!this.ex.equals(that.ex))
15452
          return false;
15453
      }
15454
 
15455
      return true;
15456
    }
15457
 
15458
    @Override
15459
    public int hashCode() {
15460
      return 0;
15461
    }
15462
 
483 rajveer 15463
    public int compareTo(getOrdersForTransaction_result other) {
68 ashish 15464
      if (!getClass().equals(other.getClass())) {
15465
        return getClass().getName().compareTo(other.getClass().getName());
15466
      }
15467
 
15468
      int lastComparison = 0;
483 rajveer 15469
      getOrdersForTransaction_result typedOther = (getOrdersForTransaction_result)other;
68 ashish 15470
 
15471
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
15472
      if (lastComparison != 0) {
15473
        return lastComparison;
15474
      }
15475
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
15476
      if (lastComparison != 0) {
15477
        return lastComparison;
15478
      }
15479
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
15480
      if (lastComparison != 0) {
15481
        return lastComparison;
15482
      }
15483
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
15484
      if (lastComparison != 0) {
15485
        return lastComparison;
15486
      }
15487
      return 0;
15488
    }
15489
 
15490
    public void read(TProtocol iprot) throws TException {
15491
      TField field;
15492
      iprot.readStructBegin();
15493
      while (true)
15494
      {
15495
        field = iprot.readFieldBegin();
15496
        if (field.type == TType.STOP) { 
15497
          break;
15498
        }
15499
        _Fields fieldId = _Fields.findByThriftId(field.id);
15500
        if (fieldId == null) {
15501
          TProtocolUtil.skip(iprot, field.type);
15502
        } else {
15503
          switch (fieldId) {
15504
            case SUCCESS:
483 rajveer 15505
              if (field.type == TType.LIST) {
15506
                {
1382 varun.gupt 15507
                  TList _list32 = iprot.readListBegin();
15508
                  this.success = new ArrayList<Order>(_list32.size);
15509
                  for (int _i33 = 0; _i33 < _list32.size; ++_i33)
483 rajveer 15510
                  {
1382 varun.gupt 15511
                    Order _elem34;
15512
                    _elem34 = new Order();
15513
                    _elem34.read(iprot);
15514
                    this.success.add(_elem34);
483 rajveer 15515
                  }
15516
                  iprot.readListEnd();
15517
                }
68 ashish 15518
              } else { 
15519
                TProtocolUtil.skip(iprot, field.type);
15520
              }
15521
              break;
15522
            case EX:
15523
              if (field.type == TType.STRUCT) {
15524
                this.ex = new TransactionServiceException();
15525
                this.ex.read(iprot);
15526
              } else { 
15527
                TProtocolUtil.skip(iprot, field.type);
15528
              }
15529
              break;
15530
          }
15531
          iprot.readFieldEnd();
15532
        }
15533
      }
15534
      iprot.readStructEnd();
15535
      validate();
15536
    }
15537
 
15538
    public void write(TProtocol oprot) throws TException {
15539
      oprot.writeStructBegin(STRUCT_DESC);
15540
 
15541
      if (this.isSetSuccess()) {
15542
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
483 rajveer 15543
        {
15544
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
1382 varun.gupt 15545
          for (Order _iter35 : this.success)
483 rajveer 15546
          {
1382 varun.gupt 15547
            _iter35.write(oprot);
483 rajveer 15548
          }
15549
          oprot.writeListEnd();
15550
        }
68 ashish 15551
        oprot.writeFieldEnd();
15552
      } else if (this.isSetEx()) {
15553
        oprot.writeFieldBegin(EX_FIELD_DESC);
15554
        this.ex.write(oprot);
15555
        oprot.writeFieldEnd();
15556
      }
15557
      oprot.writeFieldStop();
15558
      oprot.writeStructEnd();
15559
    }
15560
 
15561
    @Override
15562
    public String toString() {
483 rajveer 15563
      StringBuilder sb = new StringBuilder("getOrdersForTransaction_result(");
68 ashish 15564
      boolean first = true;
15565
 
15566
      sb.append("success:");
483 rajveer 15567
      if (this.success == null) {
15568
        sb.append("null");
15569
      } else {
15570
        sb.append(this.success);
15571
      }
68 ashish 15572
      first = false;
15573
      if (!first) sb.append(", ");
15574
      sb.append("ex:");
15575
      if (this.ex == null) {
15576
        sb.append("null");
15577
      } else {
15578
        sb.append(this.ex);
15579
      }
15580
      first = false;
15581
      sb.append(")");
15582
      return sb.toString();
15583
    }
15584
 
15585
    public void validate() throws TException {
15586
      // check for required fields
15587
    }
15588
 
15589
  }
15590
 
483 rajveer 15591
  public static class getOrdersForCustomer_args implements TBase<getOrdersForCustomer_args._Fields>, java.io.Serializable, Cloneable, Comparable<getOrdersForCustomer_args>   {
15592
    private static final TStruct STRUCT_DESC = new TStruct("getOrdersForCustomer_args");
68 ashish 15593
 
483 rajveer 15594
    private static final TField CUSTOMER_ID_FIELD_DESC = new TField("customerId", TType.I64, (short)1);
15595
    private static final TField FROM_DATE_FIELD_DESC = new TField("from_date", TType.I64, (short)2);
15596
    private static final TField TO_DATE_FIELD_DESC = new TField("to_date", TType.I64, (short)3);
15597
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)4);
68 ashish 15598
 
483 rajveer 15599
    private long customerId;
15600
    private long from_date;
15601
    private long to_date;
15602
    private OrderStatus status;
68 ashish 15603
 
15604
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15605
    public enum _Fields implements TFieldIdEnum {
483 rajveer 15606
      CUSTOMER_ID((short)1, "customerId"),
15607
      FROM_DATE((short)2, "from_date"),
15608
      TO_DATE((short)3, "to_date"),
15609
      /**
15610
       * 
15611
       * @see OrderStatus
15612
       */
15613
      STATUS((short)4, "status");
68 ashish 15614
 
15615
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
15616
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15617
 
15618
      static {
15619
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15620
          byId.put((int)field._thriftId, field);
15621
          byName.put(field.getFieldName(), field);
15622
        }
15623
      }
15624
 
15625
      /**
15626
       * Find the _Fields constant that matches fieldId, or null if its not found.
15627
       */
15628
      public static _Fields findByThriftId(int fieldId) {
15629
        return byId.get(fieldId);
15630
      }
15631
 
15632
      /**
15633
       * Find the _Fields constant that matches fieldId, throwing an exception
15634
       * if it is not found.
15635
       */
15636
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15637
        _Fields fields = findByThriftId(fieldId);
15638
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15639
        return fields;
15640
      }
15641
 
15642
      /**
15643
       * Find the _Fields constant that matches name, or null if its not found.
15644
       */
15645
      public static _Fields findByName(String name) {
15646
        return byName.get(name);
15647
      }
15648
 
15649
      private final short _thriftId;
15650
      private final String _fieldName;
15651
 
15652
      _Fields(short thriftId, String fieldName) {
15653
        _thriftId = thriftId;
15654
        _fieldName = fieldName;
15655
      }
15656
 
15657
      public short getThriftFieldId() {
15658
        return _thriftId;
15659
      }
15660
 
15661
      public String getFieldName() {
15662
        return _fieldName;
15663
      }
15664
    }
15665
 
15666
    // isset id assignments
483 rajveer 15667
    private static final int __CUSTOMERID_ISSET_ID = 0;
15668
    private static final int __FROM_DATE_ISSET_ID = 1;
15669
    private static final int __TO_DATE_ISSET_ID = 2;
68 ashish 15670
    private BitSet __isset_bit_vector = new BitSet(3);
15671
 
15672
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 15673
      put(_Fields.CUSTOMER_ID, new FieldMetaData("customerId", TFieldRequirementType.DEFAULT, 
68 ashish 15674
          new FieldValueMetaData(TType.I64)));
483 rajveer 15675
      put(_Fields.FROM_DATE, new FieldMetaData("from_date", TFieldRequirementType.DEFAULT, 
68 ashish 15676
          new FieldValueMetaData(TType.I64)));
483 rajveer 15677
      put(_Fields.TO_DATE, new FieldMetaData("to_date", TFieldRequirementType.DEFAULT, 
68 ashish 15678
          new FieldValueMetaData(TType.I64)));
483 rajveer 15679
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
15680
          new EnumMetaData(TType.ENUM, OrderStatus.class)));
68 ashish 15681
    }});
15682
 
15683
    static {
483 rajveer 15684
      FieldMetaData.addStructMetaDataMap(getOrdersForCustomer_args.class, metaDataMap);
68 ashish 15685
    }
15686
 
483 rajveer 15687
    public getOrdersForCustomer_args() {
68 ashish 15688
    }
15689
 
483 rajveer 15690
    public getOrdersForCustomer_args(
15691
      long customerId,
15692
      long from_date,
15693
      long to_date,
15694
      OrderStatus status)
68 ashish 15695
    {
15696
      this();
483 rajveer 15697
      this.customerId = customerId;
15698
      setCustomerIdIsSet(true);
15699
      this.from_date = from_date;
15700
      setFrom_dateIsSet(true);
15701
      this.to_date = to_date;
15702
      setTo_dateIsSet(true);
15703
      this.status = status;
68 ashish 15704
    }
15705
 
15706
    /**
15707
     * Performs a deep copy on <i>other</i>.
15708
     */
483 rajveer 15709
    public getOrdersForCustomer_args(getOrdersForCustomer_args other) {
68 ashish 15710
      __isset_bit_vector.clear();
15711
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 15712
      this.customerId = other.customerId;
15713
      this.from_date = other.from_date;
15714
      this.to_date = other.to_date;
15715
      if (other.isSetStatus()) {
15716
        this.status = other.status;
15717
      }
68 ashish 15718
    }
15719
 
483 rajveer 15720
    public getOrdersForCustomer_args deepCopy() {
15721
      return new getOrdersForCustomer_args(this);
68 ashish 15722
    }
15723
 
15724
    @Deprecated
483 rajveer 15725
    public getOrdersForCustomer_args clone() {
15726
      return new getOrdersForCustomer_args(this);
68 ashish 15727
    }
15728
 
483 rajveer 15729
    public long getCustomerId() {
15730
      return this.customerId;
68 ashish 15731
    }
15732
 
483 rajveer 15733
    public getOrdersForCustomer_args setCustomerId(long customerId) {
15734
      this.customerId = customerId;
15735
      setCustomerIdIsSet(true);
68 ashish 15736
      return this;
15737
    }
15738
 
483 rajveer 15739
    public void unsetCustomerId() {
15740
      __isset_bit_vector.clear(__CUSTOMERID_ISSET_ID);
68 ashish 15741
    }
15742
 
483 rajveer 15743
    /** Returns true if field customerId is set (has been asigned a value) and false otherwise */
15744
    public boolean isSetCustomerId() {
15745
      return __isset_bit_vector.get(__CUSTOMERID_ISSET_ID);
68 ashish 15746
    }
15747
 
483 rajveer 15748
    public void setCustomerIdIsSet(boolean value) {
15749
      __isset_bit_vector.set(__CUSTOMERID_ISSET_ID, value);
68 ashish 15750
    }
15751
 
483 rajveer 15752
    public long getFrom_date() {
15753
      return this.from_date;
68 ashish 15754
    }
15755
 
483 rajveer 15756
    public getOrdersForCustomer_args setFrom_date(long from_date) {
15757
      this.from_date = from_date;
15758
      setFrom_dateIsSet(true);
68 ashish 15759
      return this;
15760
    }
15761
 
483 rajveer 15762
    public void unsetFrom_date() {
15763
      __isset_bit_vector.clear(__FROM_DATE_ISSET_ID);
68 ashish 15764
    }
15765
 
483 rajveer 15766
    /** Returns true if field from_date is set (has been asigned a value) and false otherwise */
15767
    public boolean isSetFrom_date() {
15768
      return __isset_bit_vector.get(__FROM_DATE_ISSET_ID);
68 ashish 15769
    }
15770
 
483 rajveer 15771
    public void setFrom_dateIsSet(boolean value) {
15772
      __isset_bit_vector.set(__FROM_DATE_ISSET_ID, value);
68 ashish 15773
    }
15774
 
483 rajveer 15775
    public long getTo_date() {
15776
      return this.to_date;
68 ashish 15777
    }
15778
 
483 rajveer 15779
    public getOrdersForCustomer_args setTo_date(long to_date) {
15780
      this.to_date = to_date;
15781
      setTo_dateIsSet(true);
68 ashish 15782
      return this;
15783
    }
15784
 
483 rajveer 15785
    public void unsetTo_date() {
15786
      __isset_bit_vector.clear(__TO_DATE_ISSET_ID);
68 ashish 15787
    }
15788
 
483 rajveer 15789
    /** Returns true if field to_date is set (has been asigned a value) and false otherwise */
15790
    public boolean isSetTo_date() {
15791
      return __isset_bit_vector.get(__TO_DATE_ISSET_ID);
68 ashish 15792
    }
15793
 
483 rajveer 15794
    public void setTo_dateIsSet(boolean value) {
15795
      __isset_bit_vector.set(__TO_DATE_ISSET_ID, value);
68 ashish 15796
    }
15797
 
483 rajveer 15798
    /**
15799
     * 
15800
     * @see OrderStatus
15801
     */
15802
    public OrderStatus getStatus() {
15803
      return this.status;
15804
    }
15805
 
15806
    /**
15807
     * 
15808
     * @see OrderStatus
15809
     */
15810
    public getOrdersForCustomer_args setStatus(OrderStatus status) {
15811
      this.status = status;
15812
      return this;
15813
    }
15814
 
15815
    public void unsetStatus() {
15816
      this.status = null;
15817
    }
15818
 
15819
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
15820
    public boolean isSetStatus() {
15821
      return this.status != null;
15822
    }
15823
 
15824
    public void setStatusIsSet(boolean value) {
15825
      if (!value) {
15826
        this.status = null;
15827
      }
15828
    }
15829
 
68 ashish 15830
    public void setFieldValue(_Fields field, Object value) {
15831
      switch (field) {
483 rajveer 15832
      case CUSTOMER_ID:
68 ashish 15833
        if (value == null) {
483 rajveer 15834
          unsetCustomerId();
68 ashish 15835
        } else {
483 rajveer 15836
          setCustomerId((Long)value);
68 ashish 15837
        }
15838
        break;
15839
 
483 rajveer 15840
      case FROM_DATE:
68 ashish 15841
        if (value == null) {
483 rajveer 15842
          unsetFrom_date();
68 ashish 15843
        } else {
483 rajveer 15844
          setFrom_date((Long)value);
68 ashish 15845
        }
15846
        break;
15847
 
483 rajveer 15848
      case TO_DATE:
68 ashish 15849
        if (value == null) {
483 rajveer 15850
          unsetTo_date();
68 ashish 15851
        } else {
483 rajveer 15852
          setTo_date((Long)value);
68 ashish 15853
        }
15854
        break;
15855
 
483 rajveer 15856
      case STATUS:
15857
        if (value == null) {
15858
          unsetStatus();
15859
        } else {
15860
          setStatus((OrderStatus)value);
15861
        }
15862
        break;
15863
 
68 ashish 15864
      }
15865
    }
15866
 
15867
    public void setFieldValue(int fieldID, Object value) {
15868
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
15869
    }
15870
 
15871
    public Object getFieldValue(_Fields field) {
15872
      switch (field) {
483 rajveer 15873
      case CUSTOMER_ID:
15874
        return new Long(getCustomerId());
68 ashish 15875
 
483 rajveer 15876
      case FROM_DATE:
15877
        return new Long(getFrom_date());
68 ashish 15878
 
483 rajveer 15879
      case TO_DATE:
15880
        return new Long(getTo_date());
68 ashish 15881
 
483 rajveer 15882
      case STATUS:
15883
        return getStatus();
15884
 
68 ashish 15885
      }
15886
      throw new IllegalStateException();
15887
    }
15888
 
15889
    public Object getFieldValue(int fieldId) {
15890
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
15891
    }
15892
 
15893
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
15894
    public boolean isSet(_Fields field) {
15895
      switch (field) {
483 rajveer 15896
      case CUSTOMER_ID:
15897
        return isSetCustomerId();
15898
      case FROM_DATE:
15899
        return isSetFrom_date();
15900
      case TO_DATE:
15901
        return isSetTo_date();
15902
      case STATUS:
15903
        return isSetStatus();
68 ashish 15904
      }
15905
      throw new IllegalStateException();
15906
    }
15907
 
15908
    public boolean isSet(int fieldID) {
15909
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
15910
    }
15911
 
15912
    @Override
15913
    public boolean equals(Object that) {
15914
      if (that == null)
15915
        return false;
483 rajveer 15916
      if (that instanceof getOrdersForCustomer_args)
15917
        return this.equals((getOrdersForCustomer_args)that);
68 ashish 15918
      return false;
15919
    }
15920
 
483 rajveer 15921
    public boolean equals(getOrdersForCustomer_args that) {
68 ashish 15922
      if (that == null)
15923
        return false;
15924
 
483 rajveer 15925
      boolean this_present_customerId = true;
15926
      boolean that_present_customerId = true;
15927
      if (this_present_customerId || that_present_customerId) {
15928
        if (!(this_present_customerId && that_present_customerId))
68 ashish 15929
          return false;
483 rajveer 15930
        if (this.customerId != that.customerId)
68 ashish 15931
          return false;
15932
      }
15933
 
483 rajveer 15934
      boolean this_present_from_date = true;
15935
      boolean that_present_from_date = true;
15936
      if (this_present_from_date || that_present_from_date) {
15937
        if (!(this_present_from_date && that_present_from_date))
68 ashish 15938
          return false;
483 rajveer 15939
        if (this.from_date != that.from_date)
68 ashish 15940
          return false;
15941
      }
15942
 
483 rajveer 15943
      boolean this_present_to_date = true;
15944
      boolean that_present_to_date = true;
15945
      if (this_present_to_date || that_present_to_date) {
15946
        if (!(this_present_to_date && that_present_to_date))
68 ashish 15947
          return false;
483 rajveer 15948
        if (this.to_date != that.to_date)
68 ashish 15949
          return false;
15950
      }
15951
 
483 rajveer 15952
      boolean this_present_status = true && this.isSetStatus();
15953
      boolean that_present_status = true && that.isSetStatus();
15954
      if (this_present_status || that_present_status) {
15955
        if (!(this_present_status && that_present_status))
15956
          return false;
15957
        if (!this.status.equals(that.status))
15958
          return false;
15959
      }
15960
 
68 ashish 15961
      return true;
15962
    }
15963
 
15964
    @Override
15965
    public int hashCode() {
15966
      return 0;
15967
    }
15968
 
483 rajveer 15969
    public int compareTo(getOrdersForCustomer_args other) {
68 ashish 15970
      if (!getClass().equals(other.getClass())) {
15971
        return getClass().getName().compareTo(other.getClass().getName());
15972
      }
15973
 
15974
      int lastComparison = 0;
483 rajveer 15975
      getOrdersForCustomer_args typedOther = (getOrdersForCustomer_args)other;
68 ashish 15976
 
483 rajveer 15977
      lastComparison = Boolean.valueOf(isSetCustomerId()).compareTo(isSetCustomerId());
68 ashish 15978
      if (lastComparison != 0) {
15979
        return lastComparison;
15980
      }
483 rajveer 15981
      lastComparison = TBaseHelper.compareTo(customerId, typedOther.customerId);
68 ashish 15982
      if (lastComparison != 0) {
15983
        return lastComparison;
15984
      }
483 rajveer 15985
      lastComparison = Boolean.valueOf(isSetFrom_date()).compareTo(isSetFrom_date());
68 ashish 15986
      if (lastComparison != 0) {
15987
        return lastComparison;
15988
      }
483 rajveer 15989
      lastComparison = TBaseHelper.compareTo(from_date, typedOther.from_date);
68 ashish 15990
      if (lastComparison != 0) {
15991
        return lastComparison;
15992
      }
483 rajveer 15993
      lastComparison = Boolean.valueOf(isSetTo_date()).compareTo(isSetTo_date());
68 ashish 15994
      if (lastComparison != 0) {
15995
        return lastComparison;
15996
      }
483 rajveer 15997
      lastComparison = TBaseHelper.compareTo(to_date, typedOther.to_date);
68 ashish 15998
      if (lastComparison != 0) {
15999
        return lastComparison;
16000
      }
483 rajveer 16001
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
16002
      if (lastComparison != 0) {
16003
        return lastComparison;
16004
      }
16005
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
16006
      if (lastComparison != 0) {
16007
        return lastComparison;
16008
      }
68 ashish 16009
      return 0;
16010
    }
16011
 
16012
    public void read(TProtocol iprot) throws TException {
16013
      TField field;
16014
      iprot.readStructBegin();
16015
      while (true)
16016
      {
16017
        field = iprot.readFieldBegin();
16018
        if (field.type == TType.STOP) { 
16019
          break;
16020
        }
16021
        _Fields fieldId = _Fields.findByThriftId(field.id);
16022
        if (fieldId == null) {
16023
          TProtocolUtil.skip(iprot, field.type);
16024
        } else {
16025
          switch (fieldId) {
483 rajveer 16026
            case CUSTOMER_ID:
68 ashish 16027
              if (field.type == TType.I64) {
483 rajveer 16028
                this.customerId = iprot.readI64();
16029
                setCustomerIdIsSet(true);
68 ashish 16030
              } else { 
16031
                TProtocolUtil.skip(iprot, field.type);
16032
              }
16033
              break;
483 rajveer 16034
            case FROM_DATE:
68 ashish 16035
              if (field.type == TType.I64) {
483 rajveer 16036
                this.from_date = iprot.readI64();
16037
                setFrom_dateIsSet(true);
68 ashish 16038
              } else { 
16039
                TProtocolUtil.skip(iprot, field.type);
16040
              }
16041
              break;
483 rajveer 16042
            case TO_DATE:
68 ashish 16043
              if (field.type == TType.I64) {
483 rajveer 16044
                this.to_date = iprot.readI64();
16045
                setTo_dateIsSet(true);
68 ashish 16046
              } else { 
16047
                TProtocolUtil.skip(iprot, field.type);
16048
              }
16049
              break;
483 rajveer 16050
            case STATUS:
16051
              if (field.type == TType.I32) {
16052
                this.status = OrderStatus.findByValue(iprot.readI32());
16053
              } else { 
16054
                TProtocolUtil.skip(iprot, field.type);
16055
              }
16056
              break;
68 ashish 16057
          }
16058
          iprot.readFieldEnd();
16059
        }
16060
      }
16061
      iprot.readStructEnd();
16062
      validate();
16063
    }
16064
 
16065
    public void write(TProtocol oprot) throws TException {
16066
      validate();
16067
 
16068
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 16069
      oprot.writeFieldBegin(CUSTOMER_ID_FIELD_DESC);
16070
      oprot.writeI64(this.customerId);
68 ashish 16071
      oprot.writeFieldEnd();
483 rajveer 16072
      oprot.writeFieldBegin(FROM_DATE_FIELD_DESC);
16073
      oprot.writeI64(this.from_date);
68 ashish 16074
      oprot.writeFieldEnd();
483 rajveer 16075
      oprot.writeFieldBegin(TO_DATE_FIELD_DESC);
16076
      oprot.writeI64(this.to_date);
68 ashish 16077
      oprot.writeFieldEnd();
483 rajveer 16078
      if (this.status != null) {
16079
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
16080
        oprot.writeI32(this.status.getValue());
16081
        oprot.writeFieldEnd();
16082
      }
68 ashish 16083
      oprot.writeFieldStop();
16084
      oprot.writeStructEnd();
16085
    }
16086
 
16087
    @Override
16088
    public String toString() {
483 rajveer 16089
      StringBuilder sb = new StringBuilder("getOrdersForCustomer_args(");
68 ashish 16090
      boolean first = true;
16091
 
483 rajveer 16092
      sb.append("customerId:");
16093
      sb.append(this.customerId);
68 ashish 16094
      first = false;
16095
      if (!first) sb.append(", ");
483 rajveer 16096
      sb.append("from_date:");
16097
      sb.append(this.from_date);
68 ashish 16098
      first = false;
16099
      if (!first) sb.append(", ");
483 rajveer 16100
      sb.append("to_date:");
16101
      sb.append(this.to_date);
68 ashish 16102
      first = false;
483 rajveer 16103
      if (!first) sb.append(", ");
16104
      sb.append("status:");
16105
      if (this.status == null) {
16106
        sb.append("null");
16107
      } else {
16108
        String status_name = status.name();
16109
        if (status_name != null) {
16110
          sb.append(status_name);
16111
          sb.append(" (");
16112
        }
16113
        sb.append(this.status);
16114
        if (status_name != null) {
16115
          sb.append(")");
16116
        }
16117
      }
16118
      first = false;
68 ashish 16119
      sb.append(")");
16120
      return sb.toString();
16121
    }
16122
 
16123
    public void validate() throws TException {
16124
      // check for required fields
16125
    }
16126
 
16127
  }
16128
 
483 rajveer 16129
  public static class getOrdersForCustomer_result implements TBase<getOrdersForCustomer_result._Fields>, java.io.Serializable, Cloneable, Comparable<getOrdersForCustomer_result>   {
16130
    private static final TStruct STRUCT_DESC = new TStruct("getOrdersForCustomer_result");
68 ashish 16131
 
483 rajveer 16132
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
68 ashish 16133
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
16134
 
483 rajveer 16135
    private List<Order> success;
68 ashish 16136
    private TransactionServiceException ex;
16137
 
16138
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16139
    public enum _Fields implements TFieldIdEnum {
16140
      SUCCESS((short)0, "success"),
16141
      EX((short)1, "ex");
16142
 
16143
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
16144
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16145
 
16146
      static {
16147
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16148
          byId.put((int)field._thriftId, field);
16149
          byName.put(field.getFieldName(), field);
16150
        }
16151
      }
16152
 
16153
      /**
16154
       * Find the _Fields constant that matches fieldId, or null if its not found.
16155
       */
16156
      public static _Fields findByThriftId(int fieldId) {
16157
        return byId.get(fieldId);
16158
      }
16159
 
16160
      /**
16161
       * Find the _Fields constant that matches fieldId, throwing an exception
16162
       * if it is not found.
16163
       */
16164
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16165
        _Fields fields = findByThriftId(fieldId);
16166
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16167
        return fields;
16168
      }
16169
 
16170
      /**
16171
       * Find the _Fields constant that matches name, or null if its not found.
16172
       */
16173
      public static _Fields findByName(String name) {
16174
        return byName.get(name);
16175
      }
16176
 
16177
      private final short _thriftId;
16178
      private final String _fieldName;
16179
 
16180
      _Fields(short thriftId, String fieldName) {
16181
        _thriftId = thriftId;
16182
        _fieldName = fieldName;
16183
      }
16184
 
16185
      public short getThriftFieldId() {
16186
        return _thriftId;
16187
      }
16188
 
16189
      public String getFieldName() {
16190
        return _fieldName;
16191
      }
16192
    }
16193
 
16194
    // isset id assignments
16195
 
16196
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
16197
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
483 rajveer 16198
          new ListMetaData(TType.LIST, 
16199
              new StructMetaData(TType.STRUCT, Order.class))));
68 ashish 16200
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
16201
          new FieldValueMetaData(TType.STRUCT)));
16202
    }});
16203
 
16204
    static {
483 rajveer 16205
      FieldMetaData.addStructMetaDataMap(getOrdersForCustomer_result.class, metaDataMap);
68 ashish 16206
    }
16207
 
483 rajveer 16208
    public getOrdersForCustomer_result() {
68 ashish 16209
    }
16210
 
483 rajveer 16211
    public getOrdersForCustomer_result(
16212
      List<Order> success,
68 ashish 16213
      TransactionServiceException ex)
16214
    {
16215
      this();
16216
      this.success = success;
16217
      this.ex = ex;
16218
    }
16219
 
16220
    /**
16221
     * Performs a deep copy on <i>other</i>.
16222
     */
483 rajveer 16223
    public getOrdersForCustomer_result(getOrdersForCustomer_result other) {
16224
      if (other.isSetSuccess()) {
16225
        List<Order> __this__success = new ArrayList<Order>();
16226
        for (Order other_element : other.success) {
16227
          __this__success.add(new Order(other_element));
16228
        }
16229
        this.success = __this__success;
16230
      }
68 ashish 16231
      if (other.isSetEx()) {
16232
        this.ex = new TransactionServiceException(other.ex);
16233
      }
16234
    }
16235
 
483 rajveer 16236
    public getOrdersForCustomer_result deepCopy() {
16237
      return new getOrdersForCustomer_result(this);
68 ashish 16238
    }
16239
 
16240
    @Deprecated
483 rajveer 16241
    public getOrdersForCustomer_result clone() {
16242
      return new getOrdersForCustomer_result(this);
68 ashish 16243
    }
16244
 
483 rajveer 16245
    public int getSuccessSize() {
16246
      return (this.success == null) ? 0 : this.success.size();
16247
    }
16248
 
16249
    public java.util.Iterator<Order> getSuccessIterator() {
16250
      return (this.success == null) ? null : this.success.iterator();
16251
    }
16252
 
16253
    public void addToSuccess(Order elem) {
16254
      if (this.success == null) {
16255
        this.success = new ArrayList<Order>();
16256
      }
16257
      this.success.add(elem);
16258
    }
16259
 
16260
    public List<Order> getSuccess() {
68 ashish 16261
      return this.success;
16262
    }
16263
 
483 rajveer 16264
    public getOrdersForCustomer_result setSuccess(List<Order> success) {
68 ashish 16265
      this.success = success;
16266
      return this;
16267
    }
16268
 
16269
    public void unsetSuccess() {
483 rajveer 16270
      this.success = null;
68 ashish 16271
    }
16272
 
16273
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
16274
    public boolean isSetSuccess() {
483 rajveer 16275
      return this.success != null;
68 ashish 16276
    }
16277
 
16278
    public void setSuccessIsSet(boolean value) {
483 rajveer 16279
      if (!value) {
16280
        this.success = null;
16281
      }
68 ashish 16282
    }
16283
 
16284
    public TransactionServiceException getEx() {
16285
      return this.ex;
16286
    }
16287
 
483 rajveer 16288
    public getOrdersForCustomer_result setEx(TransactionServiceException ex) {
68 ashish 16289
      this.ex = ex;
16290
      return this;
16291
    }
16292
 
16293
    public void unsetEx() {
16294
      this.ex = null;
16295
    }
16296
 
16297
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
16298
    public boolean isSetEx() {
16299
      return this.ex != null;
16300
    }
16301
 
16302
    public void setExIsSet(boolean value) {
16303
      if (!value) {
16304
        this.ex = null;
16305
      }
16306
    }
16307
 
16308
    public void setFieldValue(_Fields field, Object value) {
16309
      switch (field) {
16310
      case SUCCESS:
16311
        if (value == null) {
16312
          unsetSuccess();
16313
        } else {
483 rajveer 16314
          setSuccess((List<Order>)value);
68 ashish 16315
        }
16316
        break;
16317
 
16318
      case EX:
16319
        if (value == null) {
16320
          unsetEx();
16321
        } else {
16322
          setEx((TransactionServiceException)value);
16323
        }
16324
        break;
16325
 
16326
      }
16327
    }
16328
 
16329
    public void setFieldValue(int fieldID, Object value) {
16330
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
16331
    }
16332
 
16333
    public Object getFieldValue(_Fields field) {
16334
      switch (field) {
16335
      case SUCCESS:
483 rajveer 16336
        return getSuccess();
68 ashish 16337
 
16338
      case EX:
16339
        return getEx();
16340
 
16341
      }
16342
      throw new IllegalStateException();
16343
    }
16344
 
16345
    public Object getFieldValue(int fieldId) {
16346
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
16347
    }
16348
 
16349
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
16350
    public boolean isSet(_Fields field) {
16351
      switch (field) {
16352
      case SUCCESS:
16353
        return isSetSuccess();
16354
      case EX:
16355
        return isSetEx();
16356
      }
16357
      throw new IllegalStateException();
16358
    }
16359
 
16360
    public boolean isSet(int fieldID) {
16361
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
16362
    }
16363
 
16364
    @Override
16365
    public boolean equals(Object that) {
16366
      if (that == null)
16367
        return false;
483 rajveer 16368
      if (that instanceof getOrdersForCustomer_result)
16369
        return this.equals((getOrdersForCustomer_result)that);
68 ashish 16370
      return false;
16371
    }
16372
 
483 rajveer 16373
    public boolean equals(getOrdersForCustomer_result that) {
68 ashish 16374
      if (that == null)
16375
        return false;
16376
 
483 rajveer 16377
      boolean this_present_success = true && this.isSetSuccess();
16378
      boolean that_present_success = true && that.isSetSuccess();
68 ashish 16379
      if (this_present_success || that_present_success) {
16380
        if (!(this_present_success && that_present_success))
16381
          return false;
483 rajveer 16382
        if (!this.success.equals(that.success))
68 ashish 16383
          return false;
16384
      }
16385
 
16386
      boolean this_present_ex = true && this.isSetEx();
16387
      boolean that_present_ex = true && that.isSetEx();
16388
      if (this_present_ex || that_present_ex) {
16389
        if (!(this_present_ex && that_present_ex))
16390
          return false;
16391
        if (!this.ex.equals(that.ex))
16392
          return false;
16393
      }
16394
 
16395
      return true;
16396
    }
16397
 
16398
    @Override
16399
    public int hashCode() {
16400
      return 0;
16401
    }
16402
 
483 rajveer 16403
    public int compareTo(getOrdersForCustomer_result other) {
68 ashish 16404
      if (!getClass().equals(other.getClass())) {
16405
        return getClass().getName().compareTo(other.getClass().getName());
16406
      }
16407
 
16408
      int lastComparison = 0;
483 rajveer 16409
      getOrdersForCustomer_result typedOther = (getOrdersForCustomer_result)other;
68 ashish 16410
 
16411
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
16412
      if (lastComparison != 0) {
16413
        return lastComparison;
16414
      }
16415
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
16416
      if (lastComparison != 0) {
16417
        return lastComparison;
16418
      }
16419
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
16420
      if (lastComparison != 0) {
16421
        return lastComparison;
16422
      }
16423
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
16424
      if (lastComparison != 0) {
16425
        return lastComparison;
16426
      }
16427
      return 0;
16428
    }
16429
 
16430
    public void read(TProtocol iprot) throws TException {
16431
      TField field;
16432
      iprot.readStructBegin();
16433
      while (true)
16434
      {
16435
        field = iprot.readFieldBegin();
16436
        if (field.type == TType.STOP) { 
16437
          break;
16438
        }
16439
        _Fields fieldId = _Fields.findByThriftId(field.id);
16440
        if (fieldId == null) {
16441
          TProtocolUtil.skip(iprot, field.type);
16442
        } else {
16443
          switch (fieldId) {
16444
            case SUCCESS:
483 rajveer 16445
              if (field.type == TType.LIST) {
16446
                {
1382 varun.gupt 16447
                  TList _list36 = iprot.readListBegin();
16448
                  this.success = new ArrayList<Order>(_list36.size);
16449
                  for (int _i37 = 0; _i37 < _list36.size; ++_i37)
483 rajveer 16450
                  {
1382 varun.gupt 16451
                    Order _elem38;
16452
                    _elem38 = new Order();
16453
                    _elem38.read(iprot);
16454
                    this.success.add(_elem38);
483 rajveer 16455
                  }
16456
                  iprot.readListEnd();
16457
                }
68 ashish 16458
              } else { 
16459
                TProtocolUtil.skip(iprot, field.type);
16460
              }
16461
              break;
16462
            case EX:
16463
              if (field.type == TType.STRUCT) {
16464
                this.ex = new TransactionServiceException();
16465
                this.ex.read(iprot);
16466
              } else { 
16467
                TProtocolUtil.skip(iprot, field.type);
16468
              }
16469
              break;
16470
          }
16471
          iprot.readFieldEnd();
16472
        }
16473
      }
16474
      iprot.readStructEnd();
16475
      validate();
16476
    }
16477
 
16478
    public void write(TProtocol oprot) throws TException {
16479
      oprot.writeStructBegin(STRUCT_DESC);
16480
 
16481
      if (this.isSetSuccess()) {
16482
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
483 rajveer 16483
        {
16484
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
1382 varun.gupt 16485
          for (Order _iter39 : this.success)
483 rajveer 16486
          {
1382 varun.gupt 16487
            _iter39.write(oprot);
483 rajveer 16488
          }
16489
          oprot.writeListEnd();
16490
        }
68 ashish 16491
        oprot.writeFieldEnd();
16492
      } else if (this.isSetEx()) {
16493
        oprot.writeFieldBegin(EX_FIELD_DESC);
16494
        this.ex.write(oprot);
16495
        oprot.writeFieldEnd();
16496
      }
16497
      oprot.writeFieldStop();
16498
      oprot.writeStructEnd();
16499
    }
16500
 
16501
    @Override
16502
    public String toString() {
483 rajveer 16503
      StringBuilder sb = new StringBuilder("getOrdersForCustomer_result(");
68 ashish 16504
      boolean first = true;
16505
 
16506
      sb.append("success:");
483 rajveer 16507
      if (this.success == null) {
16508
        sb.append("null");
16509
      } else {
16510
        sb.append(this.success);
16511
      }
68 ashish 16512
      first = false;
16513
      if (!first) sb.append(", ");
16514
      sb.append("ex:");
16515
      if (this.ex == null) {
16516
        sb.append("null");
16517
      } else {
16518
        sb.append(this.ex);
16519
      }
16520
      first = false;
16521
      sb.append(")");
16522
      return sb.toString();
16523
    }
16524
 
16525
    public void validate() throws TException {
16526
      // check for required fields
16527
    }
16528
 
16529
  }
16530
 
483 rajveer 16531
  public static class createOrder_args implements TBase<createOrder_args._Fields>, java.io.Serializable, Cloneable, Comparable<createOrder_args>   {
16532
    private static final TStruct STRUCT_DESC = new TStruct("createOrder_args");
68 ashish 16533
 
483 rajveer 16534
    private static final TField ORDER_FIELD_DESC = new TField("order", TType.STRUCT, (short)1);
68 ashish 16535
 
483 rajveer 16536
    private Order order;
68 ashish 16537
 
16538
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16539
    public enum _Fields implements TFieldIdEnum {
483 rajveer 16540
      ORDER((short)1, "order");
68 ashish 16541
 
16542
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
16543
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16544
 
16545
      static {
16546
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16547
          byId.put((int)field._thriftId, field);
16548
          byName.put(field.getFieldName(), field);
16549
        }
16550
      }
16551
 
16552
      /**
16553
       * Find the _Fields constant that matches fieldId, or null if its not found.
16554
       */
16555
      public static _Fields findByThriftId(int fieldId) {
16556
        return byId.get(fieldId);
16557
      }
16558
 
16559
      /**
16560
       * Find the _Fields constant that matches fieldId, throwing an exception
16561
       * if it is not found.
16562
       */
16563
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16564
        _Fields fields = findByThriftId(fieldId);
16565
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16566
        return fields;
16567
      }
16568
 
16569
      /**
16570
       * Find the _Fields constant that matches name, or null if its not found.
16571
       */
16572
      public static _Fields findByName(String name) {
16573
        return byName.get(name);
16574
      }
16575
 
16576
      private final short _thriftId;
16577
      private final String _fieldName;
16578
 
16579
      _Fields(short thriftId, String fieldName) {
16580
        _thriftId = thriftId;
16581
        _fieldName = fieldName;
16582
      }
16583
 
16584
      public short getThriftFieldId() {
16585
        return _thriftId;
16586
      }
16587
 
16588
      public String getFieldName() {
16589
        return _fieldName;
16590
      }
16591
    }
16592
 
16593
    // isset id assignments
16594
 
16595
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 16596
      put(_Fields.ORDER, new FieldMetaData("order", TFieldRequirementType.DEFAULT, 
16597
          new StructMetaData(TType.STRUCT, Order.class)));
68 ashish 16598
    }});
16599
 
16600
    static {
483 rajveer 16601
      FieldMetaData.addStructMetaDataMap(createOrder_args.class, metaDataMap);
68 ashish 16602
    }
16603
 
483 rajveer 16604
    public createOrder_args() {
68 ashish 16605
    }
16606
 
483 rajveer 16607
    public createOrder_args(
16608
      Order order)
68 ashish 16609
    {
16610
      this();
483 rajveer 16611
      this.order = order;
68 ashish 16612
    }
16613
 
16614
    /**
16615
     * Performs a deep copy on <i>other</i>.
16616
     */
483 rajveer 16617
    public createOrder_args(createOrder_args other) {
16618
      if (other.isSetOrder()) {
16619
        this.order = new Order(other.order);
16620
      }
68 ashish 16621
    }
16622
 
483 rajveer 16623
    public createOrder_args deepCopy() {
16624
      return new createOrder_args(this);
68 ashish 16625
    }
16626
 
16627
    @Deprecated
483 rajveer 16628
    public createOrder_args clone() {
16629
      return new createOrder_args(this);
68 ashish 16630
    }
16631
 
483 rajveer 16632
    public Order getOrder() {
16633
      return this.order;
68 ashish 16634
    }
16635
 
483 rajveer 16636
    public createOrder_args setOrder(Order order) {
16637
      this.order = order;
68 ashish 16638
      return this;
16639
    }
16640
 
483 rajveer 16641
    public void unsetOrder() {
16642
      this.order = null;
68 ashish 16643
    }
16644
 
483 rajveer 16645
    /** Returns true if field order is set (has been asigned a value) and false otherwise */
16646
    public boolean isSetOrder() {
16647
      return this.order != null;
68 ashish 16648
    }
16649
 
483 rajveer 16650
    public void setOrderIsSet(boolean value) {
16651
      if (!value) {
16652
        this.order = null;
16653
      }
68 ashish 16654
    }
16655
 
16656
    public void setFieldValue(_Fields field, Object value) {
16657
      switch (field) {
483 rajveer 16658
      case ORDER:
68 ashish 16659
        if (value == null) {
483 rajveer 16660
          unsetOrder();
68 ashish 16661
        } else {
483 rajveer 16662
          setOrder((Order)value);
68 ashish 16663
        }
16664
        break;
16665
 
16666
      }
16667
    }
16668
 
16669
    public void setFieldValue(int fieldID, Object value) {
16670
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
16671
    }
16672
 
16673
    public Object getFieldValue(_Fields field) {
16674
      switch (field) {
483 rajveer 16675
      case ORDER:
16676
        return getOrder();
68 ashish 16677
 
16678
      }
16679
      throw new IllegalStateException();
16680
    }
16681
 
16682
    public Object getFieldValue(int fieldId) {
16683
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
16684
    }
16685
 
16686
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
16687
    public boolean isSet(_Fields field) {
16688
      switch (field) {
483 rajveer 16689
      case ORDER:
16690
        return isSetOrder();
68 ashish 16691
      }
16692
      throw new IllegalStateException();
16693
    }
16694
 
16695
    public boolean isSet(int fieldID) {
16696
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
16697
    }
16698
 
16699
    @Override
16700
    public boolean equals(Object that) {
16701
      if (that == null)
16702
        return false;
483 rajveer 16703
      if (that instanceof createOrder_args)
16704
        return this.equals((createOrder_args)that);
68 ashish 16705
      return false;
16706
    }
16707
 
483 rajveer 16708
    public boolean equals(createOrder_args that) {
68 ashish 16709
      if (that == null)
16710
        return false;
16711
 
483 rajveer 16712
      boolean this_present_order = true && this.isSetOrder();
16713
      boolean that_present_order = true && that.isSetOrder();
16714
      if (this_present_order || that_present_order) {
16715
        if (!(this_present_order && that_present_order))
68 ashish 16716
          return false;
483 rajveer 16717
        if (!this.order.equals(that.order))
68 ashish 16718
          return false;
16719
      }
16720
 
16721
      return true;
16722
    }
16723
 
16724
    @Override
16725
    public int hashCode() {
16726
      return 0;
16727
    }
16728
 
483 rajveer 16729
    public int compareTo(createOrder_args other) {
68 ashish 16730
      if (!getClass().equals(other.getClass())) {
16731
        return getClass().getName().compareTo(other.getClass().getName());
16732
      }
16733
 
16734
      int lastComparison = 0;
483 rajveer 16735
      createOrder_args typedOther = (createOrder_args)other;
68 ashish 16736
 
483 rajveer 16737
      lastComparison = Boolean.valueOf(isSetOrder()).compareTo(isSetOrder());
68 ashish 16738
      if (lastComparison != 0) {
16739
        return lastComparison;
16740
      }
483 rajveer 16741
      lastComparison = TBaseHelper.compareTo(order, typedOther.order);
68 ashish 16742
      if (lastComparison != 0) {
16743
        return lastComparison;
16744
      }
16745
      return 0;
16746
    }
16747
 
16748
    public void read(TProtocol iprot) throws TException {
16749
      TField field;
16750
      iprot.readStructBegin();
16751
      while (true)
16752
      {
16753
        field = iprot.readFieldBegin();
16754
        if (field.type == TType.STOP) { 
16755
          break;
16756
        }
16757
        _Fields fieldId = _Fields.findByThriftId(field.id);
16758
        if (fieldId == null) {
16759
          TProtocolUtil.skip(iprot, field.type);
16760
        } else {
16761
          switch (fieldId) {
483 rajveer 16762
            case ORDER:
16763
              if (field.type == TType.STRUCT) {
16764
                this.order = new Order();
16765
                this.order.read(iprot);
68 ashish 16766
              } else { 
16767
                TProtocolUtil.skip(iprot, field.type);
16768
              }
16769
              break;
16770
          }
16771
          iprot.readFieldEnd();
16772
        }
16773
      }
16774
      iprot.readStructEnd();
16775
      validate();
16776
    }
16777
 
16778
    public void write(TProtocol oprot) throws TException {
16779
      validate();
16780
 
16781
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 16782
      if (this.order != null) {
16783
        oprot.writeFieldBegin(ORDER_FIELD_DESC);
16784
        this.order.write(oprot);
16785
        oprot.writeFieldEnd();
16786
      }
68 ashish 16787
      oprot.writeFieldStop();
16788
      oprot.writeStructEnd();
16789
    }
16790
 
16791
    @Override
16792
    public String toString() {
483 rajveer 16793
      StringBuilder sb = new StringBuilder("createOrder_args(");
68 ashish 16794
      boolean first = true;
16795
 
483 rajveer 16796
      sb.append("order:");
16797
      if (this.order == null) {
16798
        sb.append("null");
16799
      } else {
16800
        sb.append(this.order);
16801
      }
68 ashish 16802
      first = false;
16803
      sb.append(")");
16804
      return sb.toString();
16805
    }
16806
 
16807
    public void validate() throws TException {
16808
      // check for required fields
16809
    }
16810
 
16811
  }
16812
 
483 rajveer 16813
  public static class createOrder_result implements TBase<createOrder_result._Fields>, java.io.Serializable, Cloneable, Comparable<createOrder_result>   {
16814
    private static final TStruct STRUCT_DESC = new TStruct("createOrder_result");
68 ashish 16815
 
483 rajveer 16816
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
68 ashish 16817
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
16818
 
483 rajveer 16819
    private long success;
68 ashish 16820
    private TransactionServiceException ex;
16821
 
16822
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16823
    public enum _Fields implements TFieldIdEnum {
16824
      SUCCESS((short)0, "success"),
16825
      EX((short)1, "ex");
16826
 
16827
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
16828
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16829
 
16830
      static {
16831
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16832
          byId.put((int)field._thriftId, field);
16833
          byName.put(field.getFieldName(), field);
16834
        }
16835
      }
16836
 
16837
      /**
16838
       * Find the _Fields constant that matches fieldId, or null if its not found.
16839
       */
16840
      public static _Fields findByThriftId(int fieldId) {
16841
        return byId.get(fieldId);
16842
      }
16843
 
16844
      /**
16845
       * Find the _Fields constant that matches fieldId, throwing an exception
16846
       * if it is not found.
16847
       */
16848
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16849
        _Fields fields = findByThriftId(fieldId);
16850
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16851
        return fields;
16852
      }
16853
 
16854
      /**
16855
       * Find the _Fields constant that matches name, or null if its not found.
16856
       */
16857
      public static _Fields findByName(String name) {
16858
        return byName.get(name);
16859
      }
16860
 
16861
      private final short _thriftId;
16862
      private final String _fieldName;
16863
 
16864
      _Fields(short thriftId, String fieldName) {
16865
        _thriftId = thriftId;
16866
        _fieldName = fieldName;
16867
      }
16868
 
16869
      public short getThriftFieldId() {
16870
        return _thriftId;
16871
      }
16872
 
16873
      public String getFieldName() {
16874
        return _fieldName;
16875
      }
16876
    }
16877
 
16878
    // isset id assignments
16879
    private static final int __SUCCESS_ISSET_ID = 0;
16880
    private BitSet __isset_bit_vector = new BitSet(1);
16881
 
16882
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
16883
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
483 rajveer 16884
          new FieldValueMetaData(TType.I64)));
68 ashish 16885
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
16886
          new FieldValueMetaData(TType.STRUCT)));
16887
    }});
16888
 
16889
    static {
483 rajveer 16890
      FieldMetaData.addStructMetaDataMap(createOrder_result.class, metaDataMap);
68 ashish 16891
    }
16892
 
483 rajveer 16893
    public createOrder_result() {
68 ashish 16894
    }
16895
 
483 rajveer 16896
    public createOrder_result(
16897
      long success,
68 ashish 16898
      TransactionServiceException ex)
16899
    {
16900
      this();
16901
      this.success = success;
16902
      setSuccessIsSet(true);
16903
      this.ex = ex;
16904
    }
16905
 
16906
    /**
16907
     * Performs a deep copy on <i>other</i>.
16908
     */
483 rajveer 16909
    public createOrder_result(createOrder_result other) {
68 ashish 16910
      __isset_bit_vector.clear();
16911
      __isset_bit_vector.or(other.__isset_bit_vector);
16912
      this.success = other.success;
16913
      if (other.isSetEx()) {
16914
        this.ex = new TransactionServiceException(other.ex);
16915
      }
16916
    }
16917
 
483 rajveer 16918
    public createOrder_result deepCopy() {
16919
      return new createOrder_result(this);
68 ashish 16920
    }
16921
 
16922
    @Deprecated
483 rajveer 16923
    public createOrder_result clone() {
16924
      return new createOrder_result(this);
68 ashish 16925
    }
16926
 
483 rajveer 16927
    public long getSuccess() {
68 ashish 16928
      return this.success;
16929
    }
16930
 
483 rajveer 16931
    public createOrder_result setSuccess(long success) {
68 ashish 16932
      this.success = success;
16933
      setSuccessIsSet(true);
16934
      return this;
16935
    }
16936
 
16937
    public void unsetSuccess() {
16938
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
16939
    }
16940
 
16941
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
16942
    public boolean isSetSuccess() {
16943
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
16944
    }
16945
 
16946
    public void setSuccessIsSet(boolean value) {
16947
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
16948
    }
16949
 
16950
    public TransactionServiceException getEx() {
16951
      return this.ex;
16952
    }
16953
 
483 rajveer 16954
    public createOrder_result setEx(TransactionServiceException ex) {
68 ashish 16955
      this.ex = ex;
16956
      return this;
16957
    }
16958
 
16959
    public void unsetEx() {
16960
      this.ex = null;
16961
    }
16962
 
16963
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
16964
    public boolean isSetEx() {
16965
      return this.ex != null;
16966
    }
16967
 
16968
    public void setExIsSet(boolean value) {
16969
      if (!value) {
16970
        this.ex = null;
16971
      }
16972
    }
16973
 
16974
    public void setFieldValue(_Fields field, Object value) {
16975
      switch (field) {
16976
      case SUCCESS:
16977
        if (value == null) {
16978
          unsetSuccess();
16979
        } else {
483 rajveer 16980
          setSuccess((Long)value);
68 ashish 16981
        }
16982
        break;
16983
 
16984
      case EX:
16985
        if (value == null) {
16986
          unsetEx();
16987
        } else {
16988
          setEx((TransactionServiceException)value);
16989
        }
16990
        break;
16991
 
16992
      }
16993
    }
16994
 
16995
    public void setFieldValue(int fieldID, Object value) {
16996
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
16997
    }
16998
 
16999
    public Object getFieldValue(_Fields field) {
17000
      switch (field) {
17001
      case SUCCESS:
483 rajveer 17002
        return new Long(getSuccess());
68 ashish 17003
 
17004
      case EX:
17005
        return getEx();
17006
 
17007
      }
17008
      throw new IllegalStateException();
17009
    }
17010
 
17011
    public Object getFieldValue(int fieldId) {
17012
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
17013
    }
17014
 
17015
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
17016
    public boolean isSet(_Fields field) {
17017
      switch (field) {
17018
      case SUCCESS:
17019
        return isSetSuccess();
17020
      case EX:
17021
        return isSetEx();
17022
      }
17023
      throw new IllegalStateException();
17024
    }
17025
 
17026
    public boolean isSet(int fieldID) {
17027
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
17028
    }
17029
 
17030
    @Override
17031
    public boolean equals(Object that) {
17032
      if (that == null)
17033
        return false;
483 rajveer 17034
      if (that instanceof createOrder_result)
17035
        return this.equals((createOrder_result)that);
68 ashish 17036
      return false;
17037
    }
17038
 
483 rajveer 17039
    public boolean equals(createOrder_result that) {
68 ashish 17040
      if (that == null)
17041
        return false;
17042
 
17043
      boolean this_present_success = true;
17044
      boolean that_present_success = true;
17045
      if (this_present_success || that_present_success) {
17046
        if (!(this_present_success && that_present_success))
17047
          return false;
17048
        if (this.success != that.success)
17049
          return false;
17050
      }
17051
 
17052
      boolean this_present_ex = true && this.isSetEx();
17053
      boolean that_present_ex = true && that.isSetEx();
17054
      if (this_present_ex || that_present_ex) {
17055
        if (!(this_present_ex && that_present_ex))
17056
          return false;
17057
        if (!this.ex.equals(that.ex))
17058
          return false;
17059
      }
17060
 
17061
      return true;
17062
    }
17063
 
17064
    @Override
17065
    public int hashCode() {
17066
      return 0;
17067
    }
17068
 
483 rajveer 17069
    public int compareTo(createOrder_result other) {
68 ashish 17070
      if (!getClass().equals(other.getClass())) {
17071
        return getClass().getName().compareTo(other.getClass().getName());
17072
      }
17073
 
17074
      int lastComparison = 0;
483 rajveer 17075
      createOrder_result typedOther = (createOrder_result)other;
68 ashish 17076
 
17077
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
17078
      if (lastComparison != 0) {
17079
        return lastComparison;
17080
      }
17081
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
17082
      if (lastComparison != 0) {
17083
        return lastComparison;
17084
      }
17085
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
17086
      if (lastComparison != 0) {
17087
        return lastComparison;
17088
      }
17089
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
17090
      if (lastComparison != 0) {
17091
        return lastComparison;
17092
      }
17093
      return 0;
17094
    }
17095
 
17096
    public void read(TProtocol iprot) throws TException {
17097
      TField field;
17098
      iprot.readStructBegin();
17099
      while (true)
17100
      {
17101
        field = iprot.readFieldBegin();
17102
        if (field.type == TType.STOP) { 
17103
          break;
17104
        }
17105
        _Fields fieldId = _Fields.findByThriftId(field.id);
17106
        if (fieldId == null) {
17107
          TProtocolUtil.skip(iprot, field.type);
17108
        } else {
17109
          switch (fieldId) {
17110
            case SUCCESS:
483 rajveer 17111
              if (field.type == TType.I64) {
17112
                this.success = iprot.readI64();
68 ashish 17113
                setSuccessIsSet(true);
17114
              } else { 
17115
                TProtocolUtil.skip(iprot, field.type);
17116
              }
17117
              break;
17118
            case EX:
17119
              if (field.type == TType.STRUCT) {
17120
                this.ex = new TransactionServiceException();
17121
                this.ex.read(iprot);
17122
              } else { 
17123
                TProtocolUtil.skip(iprot, field.type);
17124
              }
17125
              break;
17126
          }
17127
          iprot.readFieldEnd();
17128
        }
17129
      }
17130
      iprot.readStructEnd();
17131
      validate();
17132
    }
17133
 
17134
    public void write(TProtocol oprot) throws TException {
17135
      oprot.writeStructBegin(STRUCT_DESC);
17136
 
17137
      if (this.isSetSuccess()) {
17138
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
483 rajveer 17139
        oprot.writeI64(this.success);
68 ashish 17140
        oprot.writeFieldEnd();
17141
      } else if (this.isSetEx()) {
17142
        oprot.writeFieldBegin(EX_FIELD_DESC);
17143
        this.ex.write(oprot);
17144
        oprot.writeFieldEnd();
17145
      }
17146
      oprot.writeFieldStop();
17147
      oprot.writeStructEnd();
17148
    }
17149
 
17150
    @Override
17151
    public String toString() {
483 rajveer 17152
      StringBuilder sb = new StringBuilder("createOrder_result(");
68 ashish 17153
      boolean first = true;
17154
 
17155
      sb.append("success:");
17156
      sb.append(this.success);
17157
      first = false;
17158
      if (!first) sb.append(", ");
17159
      sb.append("ex:");
17160
      if (this.ex == null) {
17161
        sb.append("null");
17162
      } else {
17163
        sb.append(this.ex);
17164
      }
17165
      first = false;
17166
      sb.append(")");
17167
      return sb.toString();
17168
    }
17169
 
17170
    public void validate() throws TException {
17171
      // check for required fields
17172
    }
17173
 
17174
  }
17175
 
483 rajveer 17176
  public static class getOrder_args implements TBase<getOrder_args._Fields>, java.io.Serializable, Cloneable, Comparable<getOrder_args>   {
17177
    private static final TStruct STRUCT_DESC = new TStruct("getOrder_args");
68 ashish 17178
 
483 rajveer 17179
    private static final TField ID_FIELD_DESC = new TField("id", TType.I64, (short)1);
68 ashish 17180
 
483 rajveer 17181
    private long id;
68 ashish 17182
 
17183
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17184
    public enum _Fields implements TFieldIdEnum {
483 rajveer 17185
      ID((short)1, "id");
68 ashish 17186
 
17187
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
17188
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17189
 
17190
      static {
17191
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17192
          byId.put((int)field._thriftId, field);
17193
          byName.put(field.getFieldName(), field);
17194
        }
17195
      }
17196
 
17197
      /**
17198
       * Find the _Fields constant that matches fieldId, or null if its not found.
17199
       */
17200
      public static _Fields findByThriftId(int fieldId) {
17201
        return byId.get(fieldId);
17202
      }
17203
 
17204
      /**
17205
       * Find the _Fields constant that matches fieldId, throwing an exception
17206
       * if it is not found.
17207
       */
17208
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17209
        _Fields fields = findByThriftId(fieldId);
17210
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17211
        return fields;
17212
      }
17213
 
17214
      /**
17215
       * Find the _Fields constant that matches name, or null if its not found.
17216
       */
17217
      public static _Fields findByName(String name) {
17218
        return byName.get(name);
17219
      }
17220
 
17221
      private final short _thriftId;
17222
      private final String _fieldName;
17223
 
17224
      _Fields(short thriftId, String fieldName) {
17225
        _thriftId = thriftId;
17226
        _fieldName = fieldName;
17227
      }
17228
 
17229
      public short getThriftFieldId() {
17230
        return _thriftId;
17231
      }
17232
 
17233
      public String getFieldName() {
17234
        return _fieldName;
17235
      }
17236
    }
17237
 
17238
    // isset id assignments
483 rajveer 17239
    private static final int __ID_ISSET_ID = 0;
17240
    private BitSet __isset_bit_vector = new BitSet(1);
68 ashish 17241
 
17242
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 17243
      put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, 
68 ashish 17244
          new FieldValueMetaData(TType.I64)));
17245
    }});
17246
 
17247
    static {
483 rajveer 17248
      FieldMetaData.addStructMetaDataMap(getOrder_args.class, metaDataMap);
68 ashish 17249
    }
17250
 
483 rajveer 17251
    public getOrder_args() {
68 ashish 17252
    }
17253
 
483 rajveer 17254
    public getOrder_args(
17255
      long id)
68 ashish 17256
    {
17257
      this();
483 rajveer 17258
      this.id = id;
17259
      setIdIsSet(true);
68 ashish 17260
    }
17261
 
17262
    /**
17263
     * Performs a deep copy on <i>other</i>.
17264
     */
483 rajveer 17265
    public getOrder_args(getOrder_args other) {
68 ashish 17266
      __isset_bit_vector.clear();
17267
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 17268
      this.id = other.id;
68 ashish 17269
    }
17270
 
483 rajveer 17271
    public getOrder_args deepCopy() {
17272
      return new getOrder_args(this);
68 ashish 17273
    }
17274
 
17275
    @Deprecated
483 rajveer 17276
    public getOrder_args clone() {
17277
      return new getOrder_args(this);
68 ashish 17278
    }
17279
 
483 rajveer 17280
    public long getId() {
17281
      return this.id;
68 ashish 17282
    }
17283
 
483 rajveer 17284
    public getOrder_args setId(long id) {
17285
      this.id = id;
17286
      setIdIsSet(true);
68 ashish 17287
      return this;
17288
    }
17289
 
483 rajveer 17290
    public void unsetId() {
17291
      __isset_bit_vector.clear(__ID_ISSET_ID);
68 ashish 17292
    }
17293
 
483 rajveer 17294
    /** Returns true if field id is set (has been asigned a value) and false otherwise */
17295
    public boolean isSetId() {
17296
      return __isset_bit_vector.get(__ID_ISSET_ID);
68 ashish 17297
    }
17298
 
483 rajveer 17299
    public void setIdIsSet(boolean value) {
17300
      __isset_bit_vector.set(__ID_ISSET_ID, value);
68 ashish 17301
    }
17302
 
17303
    public void setFieldValue(_Fields field, Object value) {
17304
      switch (field) {
483 rajveer 17305
      case ID:
68 ashish 17306
        if (value == null) {
483 rajveer 17307
          unsetId();
68 ashish 17308
        } else {
483 rajveer 17309
          setId((Long)value);
68 ashish 17310
        }
17311
        break;
17312
 
17313
      }
17314
    }
17315
 
17316
    public void setFieldValue(int fieldID, Object value) {
17317
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
17318
    }
17319
 
17320
    public Object getFieldValue(_Fields field) {
17321
      switch (field) {
483 rajveer 17322
      case ID:
17323
        return new Long(getId());
68 ashish 17324
 
17325
      }
17326
      throw new IllegalStateException();
17327
    }
17328
 
17329
    public Object getFieldValue(int fieldId) {
17330
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
17331
    }
17332
 
17333
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
17334
    public boolean isSet(_Fields field) {
17335
      switch (field) {
483 rajveer 17336
      case ID:
17337
        return isSetId();
68 ashish 17338
      }
17339
      throw new IllegalStateException();
17340
    }
17341
 
17342
    public boolean isSet(int fieldID) {
17343
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
17344
    }
17345
 
17346
    @Override
17347
    public boolean equals(Object that) {
17348
      if (that == null)
17349
        return false;
483 rajveer 17350
      if (that instanceof getOrder_args)
17351
        return this.equals((getOrder_args)that);
68 ashish 17352
      return false;
17353
    }
17354
 
483 rajveer 17355
    public boolean equals(getOrder_args that) {
68 ashish 17356
      if (that == null)
17357
        return false;
17358
 
483 rajveer 17359
      boolean this_present_id = true;
17360
      boolean that_present_id = true;
17361
      if (this_present_id || that_present_id) {
17362
        if (!(this_present_id && that_present_id))
68 ashish 17363
          return false;
483 rajveer 17364
        if (this.id != that.id)
68 ashish 17365
          return false;
17366
      }
17367
 
17368
      return true;
17369
    }
17370
 
17371
    @Override
17372
    public int hashCode() {
17373
      return 0;
17374
    }
17375
 
483 rajveer 17376
    public int compareTo(getOrder_args other) {
68 ashish 17377
      if (!getClass().equals(other.getClass())) {
17378
        return getClass().getName().compareTo(other.getClass().getName());
17379
      }
17380
 
17381
      int lastComparison = 0;
483 rajveer 17382
      getOrder_args typedOther = (getOrder_args)other;
68 ashish 17383
 
483 rajveer 17384
      lastComparison = Boolean.valueOf(isSetId()).compareTo(isSetId());
68 ashish 17385
      if (lastComparison != 0) {
17386
        return lastComparison;
17387
      }
483 rajveer 17388
      lastComparison = TBaseHelper.compareTo(id, typedOther.id);
68 ashish 17389
      if (lastComparison != 0) {
17390
        return lastComparison;
17391
      }
17392
      return 0;
17393
    }
17394
 
17395
    public void read(TProtocol iprot) throws TException {
17396
      TField field;
17397
      iprot.readStructBegin();
17398
      while (true)
17399
      {
17400
        field = iprot.readFieldBegin();
17401
        if (field.type == TType.STOP) { 
17402
          break;
17403
        }
17404
        _Fields fieldId = _Fields.findByThriftId(field.id);
17405
        if (fieldId == null) {
17406
          TProtocolUtil.skip(iprot, field.type);
17407
        } else {
17408
          switch (fieldId) {
483 rajveer 17409
            case ID:
68 ashish 17410
              if (field.type == TType.I64) {
483 rajveer 17411
                this.id = iprot.readI64();
17412
                setIdIsSet(true);
68 ashish 17413
              } else { 
17414
                TProtocolUtil.skip(iprot, field.type);
17415
              }
17416
              break;
17417
          }
17418
          iprot.readFieldEnd();
17419
        }
17420
      }
17421
      iprot.readStructEnd();
17422
      validate();
17423
    }
17424
 
17425
    public void write(TProtocol oprot) throws TException {
17426
      validate();
17427
 
17428
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 17429
      oprot.writeFieldBegin(ID_FIELD_DESC);
17430
      oprot.writeI64(this.id);
68 ashish 17431
      oprot.writeFieldEnd();
17432
      oprot.writeFieldStop();
17433
      oprot.writeStructEnd();
17434
    }
17435
 
17436
    @Override
17437
    public String toString() {
483 rajveer 17438
      StringBuilder sb = new StringBuilder("getOrder_args(");
68 ashish 17439
      boolean first = true;
17440
 
483 rajveer 17441
      sb.append("id:");
17442
      sb.append(this.id);
68 ashish 17443
      first = false;
17444
      sb.append(")");
17445
      return sb.toString();
17446
    }
17447
 
17448
    public void validate() throws TException {
17449
      // check for required fields
17450
    }
17451
 
17452
  }
17453
 
483 rajveer 17454
  public static class getOrder_result implements TBase<getOrder_result._Fields>, java.io.Serializable, Cloneable, Comparable<getOrder_result>   {
17455
    private static final TStruct STRUCT_DESC = new TStruct("getOrder_result");
68 ashish 17456
 
483 rajveer 17457
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
68 ashish 17458
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
17459
 
483 rajveer 17460
    private Order success;
68 ashish 17461
    private TransactionServiceException ex;
17462
 
17463
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17464
    public enum _Fields implements TFieldIdEnum {
17465
      SUCCESS((short)0, "success"),
17466
      EX((short)1, "ex");
17467
 
17468
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
17469
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17470
 
17471
      static {
17472
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17473
          byId.put((int)field._thriftId, field);
17474
          byName.put(field.getFieldName(), field);
17475
        }
17476
      }
17477
 
17478
      /**
17479
       * Find the _Fields constant that matches fieldId, or null if its not found.
17480
       */
17481
      public static _Fields findByThriftId(int fieldId) {
17482
        return byId.get(fieldId);
17483
      }
17484
 
17485
      /**
17486
       * Find the _Fields constant that matches fieldId, throwing an exception
17487
       * if it is not found.
17488
       */
17489
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17490
        _Fields fields = findByThriftId(fieldId);
17491
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17492
        return fields;
17493
      }
17494
 
17495
      /**
17496
       * Find the _Fields constant that matches name, or null if its not found.
17497
       */
17498
      public static _Fields findByName(String name) {
17499
        return byName.get(name);
17500
      }
17501
 
17502
      private final short _thriftId;
17503
      private final String _fieldName;
17504
 
17505
      _Fields(short thriftId, String fieldName) {
17506
        _thriftId = thriftId;
17507
        _fieldName = fieldName;
17508
      }
17509
 
17510
      public short getThriftFieldId() {
17511
        return _thriftId;
17512
      }
17513
 
17514
      public String getFieldName() {
17515
        return _fieldName;
17516
      }
17517
    }
17518
 
17519
    // isset id assignments
17520
 
17521
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
17522
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
483 rajveer 17523
          new StructMetaData(TType.STRUCT, Order.class)));
68 ashish 17524
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
17525
          new FieldValueMetaData(TType.STRUCT)));
17526
    }});
17527
 
17528
    static {
483 rajveer 17529
      FieldMetaData.addStructMetaDataMap(getOrder_result.class, metaDataMap);
68 ashish 17530
    }
17531
 
483 rajveer 17532
    public getOrder_result() {
68 ashish 17533
    }
17534
 
483 rajveer 17535
    public getOrder_result(
17536
      Order success,
68 ashish 17537
      TransactionServiceException ex)
17538
    {
17539
      this();
17540
      this.success = success;
17541
      this.ex = ex;
17542
    }
17543
 
17544
    /**
17545
     * Performs a deep copy on <i>other</i>.
17546
     */
483 rajveer 17547
    public getOrder_result(getOrder_result other) {
17548
      if (other.isSetSuccess()) {
17549
        this.success = new Order(other.success);
17550
      }
68 ashish 17551
      if (other.isSetEx()) {
17552
        this.ex = new TransactionServiceException(other.ex);
17553
      }
17554
    }
17555
 
483 rajveer 17556
    public getOrder_result deepCopy() {
17557
      return new getOrder_result(this);
68 ashish 17558
    }
17559
 
17560
    @Deprecated
483 rajveer 17561
    public getOrder_result clone() {
17562
      return new getOrder_result(this);
68 ashish 17563
    }
17564
 
483 rajveer 17565
    public Order getSuccess() {
68 ashish 17566
      return this.success;
17567
    }
17568
 
483 rajveer 17569
    public getOrder_result setSuccess(Order success) {
68 ashish 17570
      this.success = success;
17571
      return this;
17572
    }
17573
 
17574
    public void unsetSuccess() {
483 rajveer 17575
      this.success = null;
68 ashish 17576
    }
17577
 
17578
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
17579
    public boolean isSetSuccess() {
483 rajveer 17580
      return this.success != null;
68 ashish 17581
    }
17582
 
17583
    public void setSuccessIsSet(boolean value) {
483 rajveer 17584
      if (!value) {
17585
        this.success = null;
17586
      }
68 ashish 17587
    }
17588
 
17589
    public TransactionServiceException getEx() {
17590
      return this.ex;
17591
    }
17592
 
483 rajveer 17593
    public getOrder_result setEx(TransactionServiceException ex) {
68 ashish 17594
      this.ex = ex;
17595
      return this;
17596
    }
17597
 
17598
    public void unsetEx() {
17599
      this.ex = null;
17600
    }
17601
 
17602
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
17603
    public boolean isSetEx() {
17604
      return this.ex != null;
17605
    }
17606
 
17607
    public void setExIsSet(boolean value) {
17608
      if (!value) {
17609
        this.ex = null;
17610
      }
17611
    }
17612
 
17613
    public void setFieldValue(_Fields field, Object value) {
17614
      switch (field) {
17615
      case SUCCESS:
17616
        if (value == null) {
17617
          unsetSuccess();
17618
        } else {
483 rajveer 17619
          setSuccess((Order)value);
68 ashish 17620
        }
17621
        break;
17622
 
17623
      case EX:
17624
        if (value == null) {
17625
          unsetEx();
17626
        } else {
17627
          setEx((TransactionServiceException)value);
17628
        }
17629
        break;
17630
 
17631
      }
17632
    }
17633
 
17634
    public void setFieldValue(int fieldID, Object value) {
17635
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
17636
    }
17637
 
17638
    public Object getFieldValue(_Fields field) {
17639
      switch (field) {
17640
      case SUCCESS:
483 rajveer 17641
        return getSuccess();
68 ashish 17642
 
17643
      case EX:
17644
        return getEx();
17645
 
17646
      }
17647
      throw new IllegalStateException();
17648
    }
17649
 
17650
    public Object getFieldValue(int fieldId) {
17651
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
17652
    }
17653
 
17654
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
17655
    public boolean isSet(_Fields field) {
17656
      switch (field) {
17657
      case SUCCESS:
17658
        return isSetSuccess();
17659
      case EX:
17660
        return isSetEx();
17661
      }
17662
      throw new IllegalStateException();
17663
    }
17664
 
17665
    public boolean isSet(int fieldID) {
17666
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
17667
    }
17668
 
17669
    @Override
17670
    public boolean equals(Object that) {
17671
      if (that == null)
17672
        return false;
483 rajveer 17673
      if (that instanceof getOrder_result)
17674
        return this.equals((getOrder_result)that);
68 ashish 17675
      return false;
17676
    }
17677
 
483 rajveer 17678
    public boolean equals(getOrder_result that) {
68 ashish 17679
      if (that == null)
17680
        return false;
17681
 
483 rajveer 17682
      boolean this_present_success = true && this.isSetSuccess();
17683
      boolean that_present_success = true && that.isSetSuccess();
68 ashish 17684
      if (this_present_success || that_present_success) {
17685
        if (!(this_present_success && that_present_success))
17686
          return false;
483 rajveer 17687
        if (!this.success.equals(that.success))
68 ashish 17688
          return false;
17689
      }
17690
 
17691
      boolean this_present_ex = true && this.isSetEx();
17692
      boolean that_present_ex = true && that.isSetEx();
17693
      if (this_present_ex || that_present_ex) {
17694
        if (!(this_present_ex && that_present_ex))
17695
          return false;
17696
        if (!this.ex.equals(that.ex))
17697
          return false;
17698
      }
17699
 
17700
      return true;
17701
    }
17702
 
17703
    @Override
17704
    public int hashCode() {
17705
      return 0;
17706
    }
17707
 
483 rajveer 17708
    public int compareTo(getOrder_result other) {
68 ashish 17709
      if (!getClass().equals(other.getClass())) {
17710
        return getClass().getName().compareTo(other.getClass().getName());
17711
      }
17712
 
17713
      int lastComparison = 0;
483 rajveer 17714
      getOrder_result typedOther = (getOrder_result)other;
68 ashish 17715
 
17716
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
17717
      if (lastComparison != 0) {
17718
        return lastComparison;
17719
      }
17720
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
17721
      if (lastComparison != 0) {
17722
        return lastComparison;
17723
      }
17724
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
17725
      if (lastComparison != 0) {
17726
        return lastComparison;
17727
      }
17728
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
17729
      if (lastComparison != 0) {
17730
        return lastComparison;
17731
      }
17732
      return 0;
17733
    }
17734
 
17735
    public void read(TProtocol iprot) throws TException {
17736
      TField field;
17737
      iprot.readStructBegin();
17738
      while (true)
17739
      {
17740
        field = iprot.readFieldBegin();
17741
        if (field.type == TType.STOP) { 
17742
          break;
17743
        }
17744
        _Fields fieldId = _Fields.findByThriftId(field.id);
17745
        if (fieldId == null) {
17746
          TProtocolUtil.skip(iprot, field.type);
17747
        } else {
17748
          switch (fieldId) {
17749
            case SUCCESS:
483 rajveer 17750
              if (field.type == TType.STRUCT) {
17751
                this.success = new Order();
17752
                this.success.read(iprot);
68 ashish 17753
              } else { 
17754
                TProtocolUtil.skip(iprot, field.type);
17755
              }
17756
              break;
17757
            case EX:
17758
              if (field.type == TType.STRUCT) {
17759
                this.ex = new TransactionServiceException();
17760
                this.ex.read(iprot);
17761
              } else { 
17762
                TProtocolUtil.skip(iprot, field.type);
17763
              }
17764
              break;
17765
          }
17766
          iprot.readFieldEnd();
17767
        }
17768
      }
17769
      iprot.readStructEnd();
17770
      validate();
17771
    }
17772
 
17773
    public void write(TProtocol oprot) throws TException {
17774
      oprot.writeStructBegin(STRUCT_DESC);
17775
 
17776
      if (this.isSetSuccess()) {
17777
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
483 rajveer 17778
        this.success.write(oprot);
68 ashish 17779
        oprot.writeFieldEnd();
17780
      } else if (this.isSetEx()) {
17781
        oprot.writeFieldBegin(EX_FIELD_DESC);
17782
        this.ex.write(oprot);
17783
        oprot.writeFieldEnd();
17784
      }
17785
      oprot.writeFieldStop();
17786
      oprot.writeStructEnd();
17787
    }
17788
 
17789
    @Override
17790
    public String toString() {
483 rajveer 17791
      StringBuilder sb = new StringBuilder("getOrder_result(");
68 ashish 17792
      boolean first = true;
17793
 
17794
      sb.append("success:");
483 rajveer 17795
      if (this.success == null) {
17796
        sb.append("null");
17797
      } else {
17798
        sb.append(this.success);
17799
      }
68 ashish 17800
      first = false;
17801
      if (!first) sb.append(", ");
17802
      sb.append("ex:");
17803
      if (this.ex == null) {
17804
        sb.append("null");
17805
      } else {
17806
        sb.append(this.ex);
17807
      }
17808
      first = false;
17809
      sb.append(")");
17810
      return sb.toString();
17811
    }
17812
 
17813
    public void validate() throws TException {
17814
      // check for required fields
17815
    }
17816
 
17817
  }
17818
 
483 rajveer 17819
  public static class getLineItemsForOrder_args implements TBase<getLineItemsForOrder_args._Fields>, java.io.Serializable, Cloneable, Comparable<getLineItemsForOrder_args>   {
17820
    private static final TStruct STRUCT_DESC = new TStruct("getLineItemsForOrder_args");
68 ashish 17821
 
483 rajveer 17822
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
68 ashish 17823
 
483 rajveer 17824
    private long orderId;
68 ashish 17825
 
17826
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17827
    public enum _Fields implements TFieldIdEnum {
483 rajveer 17828
      ORDER_ID((short)1, "orderId");
68 ashish 17829
 
17830
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
17831
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17832
 
17833
      static {
17834
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17835
          byId.put((int)field._thriftId, field);
17836
          byName.put(field.getFieldName(), field);
17837
        }
17838
      }
17839
 
17840
      /**
17841
       * Find the _Fields constant that matches fieldId, or null if its not found.
17842
       */
17843
      public static _Fields findByThriftId(int fieldId) {
17844
        return byId.get(fieldId);
17845
      }
17846
 
17847
      /**
17848
       * Find the _Fields constant that matches fieldId, throwing an exception
17849
       * if it is not found.
17850
       */
17851
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17852
        _Fields fields = findByThriftId(fieldId);
17853
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17854
        return fields;
17855
      }
17856
 
17857
      /**
17858
       * Find the _Fields constant that matches name, or null if its not found.
17859
       */
17860
      public static _Fields findByName(String name) {
17861
        return byName.get(name);
17862
      }
17863
 
17864
      private final short _thriftId;
17865
      private final String _fieldName;
17866
 
17867
      _Fields(short thriftId, String fieldName) {
17868
        _thriftId = thriftId;
17869
        _fieldName = fieldName;
17870
      }
17871
 
17872
      public short getThriftFieldId() {
17873
        return _thriftId;
17874
      }
17875
 
17876
      public String getFieldName() {
17877
        return _fieldName;
17878
      }
17879
    }
17880
 
17881
    // isset id assignments
483 rajveer 17882
    private static final int __ORDERID_ISSET_ID = 0;
68 ashish 17883
    private BitSet __isset_bit_vector = new BitSet(1);
17884
 
17885
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 17886
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
68 ashish 17887
          new FieldValueMetaData(TType.I64)));
17888
    }});
17889
 
17890
    static {
483 rajveer 17891
      FieldMetaData.addStructMetaDataMap(getLineItemsForOrder_args.class, metaDataMap);
68 ashish 17892
    }
17893
 
483 rajveer 17894
    public getLineItemsForOrder_args() {
68 ashish 17895
    }
17896
 
483 rajveer 17897
    public getLineItemsForOrder_args(
17898
      long orderId)
68 ashish 17899
    {
17900
      this();
483 rajveer 17901
      this.orderId = orderId;
17902
      setOrderIdIsSet(true);
68 ashish 17903
    }
17904
 
17905
    /**
17906
     * Performs a deep copy on <i>other</i>.
17907
     */
483 rajveer 17908
    public getLineItemsForOrder_args(getLineItemsForOrder_args other) {
68 ashish 17909
      __isset_bit_vector.clear();
17910
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 17911
      this.orderId = other.orderId;
68 ashish 17912
    }
17913
 
483 rajveer 17914
    public getLineItemsForOrder_args deepCopy() {
17915
      return new getLineItemsForOrder_args(this);
68 ashish 17916
    }
17917
 
17918
    @Deprecated
483 rajveer 17919
    public getLineItemsForOrder_args clone() {
17920
      return new getLineItemsForOrder_args(this);
68 ashish 17921
    }
17922
 
483 rajveer 17923
    public long getOrderId() {
17924
      return this.orderId;
68 ashish 17925
    }
17926
 
483 rajveer 17927
    public getLineItemsForOrder_args setOrderId(long orderId) {
17928
      this.orderId = orderId;
17929
      setOrderIdIsSet(true);
68 ashish 17930
      return this;
17931
    }
17932
 
483 rajveer 17933
    public void unsetOrderId() {
17934
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
68 ashish 17935
    }
17936
 
483 rajveer 17937
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
17938
    public boolean isSetOrderId() {
17939
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
68 ashish 17940
    }
17941
 
483 rajveer 17942
    public void setOrderIdIsSet(boolean value) {
17943
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
68 ashish 17944
    }
17945
 
17946
    public void setFieldValue(_Fields field, Object value) {
17947
      switch (field) {
483 rajveer 17948
      case ORDER_ID:
68 ashish 17949
        if (value == null) {
483 rajveer 17950
          unsetOrderId();
68 ashish 17951
        } else {
483 rajveer 17952
          setOrderId((Long)value);
68 ashish 17953
        }
17954
        break;
17955
 
17956
      }
17957
    }
17958
 
17959
    public void setFieldValue(int fieldID, Object value) {
17960
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
17961
    }
17962
 
17963
    public Object getFieldValue(_Fields field) {
17964
      switch (field) {
483 rajveer 17965
      case ORDER_ID:
17966
        return new Long(getOrderId());
68 ashish 17967
 
17968
      }
17969
      throw new IllegalStateException();
17970
    }
17971
 
17972
    public Object getFieldValue(int fieldId) {
17973
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
17974
    }
17975
 
17976
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
17977
    public boolean isSet(_Fields field) {
17978
      switch (field) {
483 rajveer 17979
      case ORDER_ID:
17980
        return isSetOrderId();
68 ashish 17981
      }
17982
      throw new IllegalStateException();
17983
    }
17984
 
17985
    public boolean isSet(int fieldID) {
17986
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
17987
    }
17988
 
17989
    @Override
17990
    public boolean equals(Object that) {
17991
      if (that == null)
17992
        return false;
483 rajveer 17993
      if (that instanceof getLineItemsForOrder_args)
17994
        return this.equals((getLineItemsForOrder_args)that);
68 ashish 17995
      return false;
17996
    }
17997
 
483 rajveer 17998
    public boolean equals(getLineItemsForOrder_args that) {
68 ashish 17999
      if (that == null)
18000
        return false;
18001
 
483 rajveer 18002
      boolean this_present_orderId = true;
18003
      boolean that_present_orderId = true;
18004
      if (this_present_orderId || that_present_orderId) {
18005
        if (!(this_present_orderId && that_present_orderId))
68 ashish 18006
          return false;
483 rajveer 18007
        if (this.orderId != that.orderId)
68 ashish 18008
          return false;
18009
      }
18010
 
18011
      return true;
18012
    }
18013
 
18014
    @Override
18015
    public int hashCode() {
18016
      return 0;
18017
    }
18018
 
483 rajveer 18019
    public int compareTo(getLineItemsForOrder_args other) {
68 ashish 18020
      if (!getClass().equals(other.getClass())) {
18021
        return getClass().getName().compareTo(other.getClass().getName());
18022
      }
18023
 
18024
      int lastComparison = 0;
483 rajveer 18025
      getLineItemsForOrder_args typedOther = (getLineItemsForOrder_args)other;
68 ashish 18026
 
483 rajveer 18027
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
68 ashish 18028
      if (lastComparison != 0) {
18029
        return lastComparison;
18030
      }
483 rajveer 18031
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
68 ashish 18032
      if (lastComparison != 0) {
18033
        return lastComparison;
18034
      }
18035
      return 0;
18036
    }
18037
 
18038
    public void read(TProtocol iprot) throws TException {
18039
      TField field;
18040
      iprot.readStructBegin();
18041
      while (true)
18042
      {
18043
        field = iprot.readFieldBegin();
18044
        if (field.type == TType.STOP) { 
18045
          break;
18046
        }
18047
        _Fields fieldId = _Fields.findByThriftId(field.id);
18048
        if (fieldId == null) {
18049
          TProtocolUtil.skip(iprot, field.type);
18050
        } else {
18051
          switch (fieldId) {
483 rajveer 18052
            case ORDER_ID:
68 ashish 18053
              if (field.type == TType.I64) {
483 rajveer 18054
                this.orderId = iprot.readI64();
18055
                setOrderIdIsSet(true);
68 ashish 18056
              } else { 
18057
                TProtocolUtil.skip(iprot, field.type);
18058
              }
18059
              break;
18060
          }
18061
          iprot.readFieldEnd();
18062
        }
18063
      }
18064
      iprot.readStructEnd();
18065
      validate();
18066
    }
18067
 
18068
    public void write(TProtocol oprot) throws TException {
18069
      validate();
18070
 
18071
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 18072
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
18073
      oprot.writeI64(this.orderId);
68 ashish 18074
      oprot.writeFieldEnd();
18075
      oprot.writeFieldStop();
18076
      oprot.writeStructEnd();
18077
    }
18078
 
18079
    @Override
18080
    public String toString() {
483 rajveer 18081
      StringBuilder sb = new StringBuilder("getLineItemsForOrder_args(");
68 ashish 18082
      boolean first = true;
18083
 
483 rajveer 18084
      sb.append("orderId:");
18085
      sb.append(this.orderId);
68 ashish 18086
      first = false;
18087
      sb.append(")");
18088
      return sb.toString();
18089
    }
18090
 
18091
    public void validate() throws TException {
18092
      // check for required fields
18093
    }
18094
 
18095
  }
18096
 
483 rajveer 18097
  public static class getLineItemsForOrder_result implements TBase<getLineItemsForOrder_result._Fields>, java.io.Serializable, Cloneable, Comparable<getLineItemsForOrder_result>   {
18098
    private static final TStruct STRUCT_DESC = new TStruct("getLineItemsForOrder_result");
68 ashish 18099
 
483 rajveer 18100
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
68 ashish 18101
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
18102
 
483 rajveer 18103
    private List<LineItem> success;
68 ashish 18104
    private TransactionServiceException ex;
18105
 
18106
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18107
    public enum _Fields implements TFieldIdEnum {
18108
      SUCCESS((short)0, "success"),
18109
      EX((short)1, "ex");
18110
 
18111
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
18112
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18113
 
18114
      static {
18115
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18116
          byId.put((int)field._thriftId, field);
18117
          byName.put(field.getFieldName(), field);
18118
        }
18119
      }
18120
 
18121
      /**
18122
       * Find the _Fields constant that matches fieldId, or null if its not found.
18123
       */
18124
      public static _Fields findByThriftId(int fieldId) {
18125
        return byId.get(fieldId);
18126
      }
18127
 
18128
      /**
18129
       * Find the _Fields constant that matches fieldId, throwing an exception
18130
       * if it is not found.
18131
       */
18132
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18133
        _Fields fields = findByThriftId(fieldId);
18134
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18135
        return fields;
18136
      }
18137
 
18138
      /**
18139
       * Find the _Fields constant that matches name, or null if its not found.
18140
       */
18141
      public static _Fields findByName(String name) {
18142
        return byName.get(name);
18143
      }
18144
 
18145
      private final short _thriftId;
18146
      private final String _fieldName;
18147
 
18148
      _Fields(short thriftId, String fieldName) {
18149
        _thriftId = thriftId;
18150
        _fieldName = fieldName;
18151
      }
18152
 
18153
      public short getThriftFieldId() {
18154
        return _thriftId;
18155
      }
18156
 
18157
      public String getFieldName() {
18158
        return _fieldName;
18159
      }
18160
    }
18161
 
18162
    // isset id assignments
18163
 
18164
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
18165
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
483 rajveer 18166
          new ListMetaData(TType.LIST, 
18167
              new StructMetaData(TType.STRUCT, LineItem.class))));
68 ashish 18168
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
18169
          new FieldValueMetaData(TType.STRUCT)));
18170
    }});
18171
 
18172
    static {
483 rajveer 18173
      FieldMetaData.addStructMetaDataMap(getLineItemsForOrder_result.class, metaDataMap);
68 ashish 18174
    }
18175
 
483 rajveer 18176
    public getLineItemsForOrder_result() {
68 ashish 18177
    }
18178
 
483 rajveer 18179
    public getLineItemsForOrder_result(
18180
      List<LineItem> success,
68 ashish 18181
      TransactionServiceException ex)
18182
    {
18183
      this();
18184
      this.success = success;
18185
      this.ex = ex;
18186
    }
18187
 
18188
    /**
18189
     * Performs a deep copy on <i>other</i>.
18190
     */
483 rajveer 18191
    public getLineItemsForOrder_result(getLineItemsForOrder_result other) {
18192
      if (other.isSetSuccess()) {
18193
        List<LineItem> __this__success = new ArrayList<LineItem>();
18194
        for (LineItem other_element : other.success) {
18195
          __this__success.add(new LineItem(other_element));
18196
        }
18197
        this.success = __this__success;
18198
      }
68 ashish 18199
      if (other.isSetEx()) {
18200
        this.ex = new TransactionServiceException(other.ex);
18201
      }
18202
    }
18203
 
483 rajveer 18204
    public getLineItemsForOrder_result deepCopy() {
18205
      return new getLineItemsForOrder_result(this);
68 ashish 18206
    }
18207
 
18208
    @Deprecated
483 rajveer 18209
    public getLineItemsForOrder_result clone() {
18210
      return new getLineItemsForOrder_result(this);
68 ashish 18211
    }
18212
 
483 rajveer 18213
    public int getSuccessSize() {
18214
      return (this.success == null) ? 0 : this.success.size();
18215
    }
18216
 
18217
    public java.util.Iterator<LineItem> getSuccessIterator() {
18218
      return (this.success == null) ? null : this.success.iterator();
18219
    }
18220
 
18221
    public void addToSuccess(LineItem elem) {
18222
      if (this.success == null) {
18223
        this.success = new ArrayList<LineItem>();
18224
      }
18225
      this.success.add(elem);
18226
    }
18227
 
18228
    public List<LineItem> getSuccess() {
68 ashish 18229
      return this.success;
18230
    }
18231
 
483 rajveer 18232
    public getLineItemsForOrder_result setSuccess(List<LineItem> success) {
68 ashish 18233
      this.success = success;
18234
      return this;
18235
    }
18236
 
18237
    public void unsetSuccess() {
483 rajveer 18238
      this.success = null;
68 ashish 18239
    }
18240
 
18241
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
18242
    public boolean isSetSuccess() {
483 rajveer 18243
      return this.success != null;
68 ashish 18244
    }
18245
 
18246
    public void setSuccessIsSet(boolean value) {
483 rajveer 18247
      if (!value) {
18248
        this.success = null;
18249
      }
68 ashish 18250
    }
18251
 
18252
    public TransactionServiceException getEx() {
18253
      return this.ex;
18254
    }
18255
 
483 rajveer 18256
    public getLineItemsForOrder_result setEx(TransactionServiceException ex) {
68 ashish 18257
      this.ex = ex;
18258
      return this;
18259
    }
18260
 
18261
    public void unsetEx() {
18262
      this.ex = null;
18263
    }
18264
 
18265
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
18266
    public boolean isSetEx() {
18267
      return this.ex != null;
18268
    }
18269
 
18270
    public void setExIsSet(boolean value) {
18271
      if (!value) {
18272
        this.ex = null;
18273
      }
18274
    }
18275
 
18276
    public void setFieldValue(_Fields field, Object value) {
18277
      switch (field) {
18278
      case SUCCESS:
18279
        if (value == null) {
18280
          unsetSuccess();
18281
        } else {
483 rajveer 18282
          setSuccess((List<LineItem>)value);
68 ashish 18283
        }
18284
        break;
18285
 
18286
      case EX:
18287
        if (value == null) {
18288
          unsetEx();
18289
        } else {
18290
          setEx((TransactionServiceException)value);
18291
        }
18292
        break;
18293
 
18294
      }
18295
    }
18296
 
18297
    public void setFieldValue(int fieldID, Object value) {
18298
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
18299
    }
18300
 
18301
    public Object getFieldValue(_Fields field) {
18302
      switch (field) {
18303
      case SUCCESS:
483 rajveer 18304
        return getSuccess();
68 ashish 18305
 
18306
      case EX:
18307
        return getEx();
18308
 
18309
      }
18310
      throw new IllegalStateException();
18311
    }
18312
 
18313
    public Object getFieldValue(int fieldId) {
18314
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
18315
    }
18316
 
18317
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
18318
    public boolean isSet(_Fields field) {
18319
      switch (field) {
18320
      case SUCCESS:
18321
        return isSetSuccess();
18322
      case EX:
18323
        return isSetEx();
18324
      }
18325
      throw new IllegalStateException();
18326
    }
18327
 
18328
    public boolean isSet(int fieldID) {
18329
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
18330
    }
18331
 
18332
    @Override
18333
    public boolean equals(Object that) {
18334
      if (that == null)
18335
        return false;
483 rajveer 18336
      if (that instanceof getLineItemsForOrder_result)
18337
        return this.equals((getLineItemsForOrder_result)that);
68 ashish 18338
      return false;
18339
    }
18340
 
483 rajveer 18341
    public boolean equals(getLineItemsForOrder_result that) {
68 ashish 18342
      if (that == null)
18343
        return false;
18344
 
483 rajveer 18345
      boolean this_present_success = true && this.isSetSuccess();
18346
      boolean that_present_success = true && that.isSetSuccess();
68 ashish 18347
      if (this_present_success || that_present_success) {
18348
        if (!(this_present_success && that_present_success))
18349
          return false;
483 rajveer 18350
        if (!this.success.equals(that.success))
68 ashish 18351
          return false;
18352
      }
18353
 
18354
      boolean this_present_ex = true && this.isSetEx();
18355
      boolean that_present_ex = true && that.isSetEx();
18356
      if (this_present_ex || that_present_ex) {
18357
        if (!(this_present_ex && that_present_ex))
18358
          return false;
18359
        if (!this.ex.equals(that.ex))
18360
          return false;
18361
      }
18362
 
18363
      return true;
18364
    }
18365
 
18366
    @Override
18367
    public int hashCode() {
18368
      return 0;
18369
    }
18370
 
483 rajveer 18371
    public int compareTo(getLineItemsForOrder_result other) {
68 ashish 18372
      if (!getClass().equals(other.getClass())) {
18373
        return getClass().getName().compareTo(other.getClass().getName());
18374
      }
18375
 
18376
      int lastComparison = 0;
483 rajveer 18377
      getLineItemsForOrder_result typedOther = (getLineItemsForOrder_result)other;
68 ashish 18378
 
18379
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
18380
      if (lastComparison != 0) {
18381
        return lastComparison;
18382
      }
18383
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
18384
      if (lastComparison != 0) {
18385
        return lastComparison;
18386
      }
18387
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
18388
      if (lastComparison != 0) {
18389
        return lastComparison;
18390
      }
18391
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
18392
      if (lastComparison != 0) {
18393
        return lastComparison;
18394
      }
18395
      return 0;
18396
    }
18397
 
18398
    public void read(TProtocol iprot) throws TException {
18399
      TField field;
18400
      iprot.readStructBegin();
18401
      while (true)
18402
      {
18403
        field = iprot.readFieldBegin();
18404
        if (field.type == TType.STOP) { 
18405
          break;
18406
        }
18407
        _Fields fieldId = _Fields.findByThriftId(field.id);
18408
        if (fieldId == null) {
18409
          TProtocolUtil.skip(iprot, field.type);
18410
        } else {
18411
          switch (fieldId) {
18412
            case SUCCESS:
483 rajveer 18413
              if (field.type == TType.LIST) {
18414
                {
1382 varun.gupt 18415
                  TList _list40 = iprot.readListBegin();
18416
                  this.success = new ArrayList<LineItem>(_list40.size);
18417
                  for (int _i41 = 0; _i41 < _list40.size; ++_i41)
483 rajveer 18418
                  {
1382 varun.gupt 18419
                    LineItem _elem42;
18420
                    _elem42 = new LineItem();
18421
                    _elem42.read(iprot);
18422
                    this.success.add(_elem42);
483 rajveer 18423
                  }
18424
                  iprot.readListEnd();
18425
                }
68 ashish 18426
              } else { 
18427
                TProtocolUtil.skip(iprot, field.type);
18428
              }
18429
              break;
18430
            case EX:
18431
              if (field.type == TType.STRUCT) {
18432
                this.ex = new TransactionServiceException();
18433
                this.ex.read(iprot);
18434
              } else { 
18435
                TProtocolUtil.skip(iprot, field.type);
18436
              }
18437
              break;
18438
          }
18439
          iprot.readFieldEnd();
18440
        }
18441
      }
18442
      iprot.readStructEnd();
18443
      validate();
18444
    }
18445
 
18446
    public void write(TProtocol oprot) throws TException {
18447
      oprot.writeStructBegin(STRUCT_DESC);
18448
 
18449
      if (this.isSetSuccess()) {
18450
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
483 rajveer 18451
        {
18452
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
1382 varun.gupt 18453
          for (LineItem _iter43 : this.success)
483 rajveer 18454
          {
1382 varun.gupt 18455
            _iter43.write(oprot);
483 rajveer 18456
          }
18457
          oprot.writeListEnd();
18458
        }
68 ashish 18459
        oprot.writeFieldEnd();
18460
      } else if (this.isSetEx()) {
18461
        oprot.writeFieldBegin(EX_FIELD_DESC);
18462
        this.ex.write(oprot);
18463
        oprot.writeFieldEnd();
18464
      }
18465
      oprot.writeFieldStop();
18466
      oprot.writeStructEnd();
18467
    }
18468
 
18469
    @Override
18470
    public String toString() {
483 rajveer 18471
      StringBuilder sb = new StringBuilder("getLineItemsForOrder_result(");
68 ashish 18472
      boolean first = true;
18473
 
18474
      sb.append("success:");
483 rajveer 18475
      if (this.success == null) {
18476
        sb.append("null");
18477
      } else {
18478
        sb.append(this.success);
18479
      }
68 ashish 18480
      first = false;
18481
      if (!first) sb.append(", ");
18482
      sb.append("ex:");
18483
      if (this.ex == null) {
18484
        sb.append("null");
18485
      } else {
18486
        sb.append(this.ex);
18487
      }
18488
      first = false;
18489
      sb.append(")");
18490
      return sb.toString();
18491
    }
18492
 
18493
    public void validate() throws TException {
18494
      // check for required fields
18495
    }
18496
 
18497
  }
18498
 
1529 ankur.sing 18499
  public static class getOrderForCustomer_args implements TBase<getOrderForCustomer_args._Fields>, java.io.Serializable, Cloneable, Comparable<getOrderForCustomer_args>   {
18500
    private static final TStruct STRUCT_DESC = new TStruct("getOrderForCustomer_args");
18501
 
18502
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
18503
    private static final TField CUSTOMER_ID_FIELD_DESC = new TField("customerId", TType.I64, (short)2);
18504
 
18505
    private long orderId;
18506
    private long customerId;
18507
 
18508
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18509
    public enum _Fields implements TFieldIdEnum {
18510
      ORDER_ID((short)1, "orderId"),
18511
      CUSTOMER_ID((short)2, "customerId");
18512
 
18513
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
18514
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18515
 
18516
      static {
18517
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18518
          byId.put((int)field._thriftId, field);
18519
          byName.put(field.getFieldName(), field);
18520
        }
18521
      }
18522
 
18523
      /**
18524
       * Find the _Fields constant that matches fieldId, or null if its not found.
18525
       */
18526
      public static _Fields findByThriftId(int fieldId) {
18527
        return byId.get(fieldId);
18528
      }
18529
 
18530
      /**
18531
       * Find the _Fields constant that matches fieldId, throwing an exception
18532
       * if it is not found.
18533
       */
18534
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18535
        _Fields fields = findByThriftId(fieldId);
18536
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18537
        return fields;
18538
      }
18539
 
18540
      /**
18541
       * Find the _Fields constant that matches name, or null if its not found.
18542
       */
18543
      public static _Fields findByName(String name) {
18544
        return byName.get(name);
18545
      }
18546
 
18547
      private final short _thriftId;
18548
      private final String _fieldName;
18549
 
18550
      _Fields(short thriftId, String fieldName) {
18551
        _thriftId = thriftId;
18552
        _fieldName = fieldName;
18553
      }
18554
 
18555
      public short getThriftFieldId() {
18556
        return _thriftId;
18557
      }
18558
 
18559
      public String getFieldName() {
18560
        return _fieldName;
18561
      }
18562
    }
18563
 
18564
    // isset id assignments
18565
    private static final int __ORDERID_ISSET_ID = 0;
18566
    private static final int __CUSTOMERID_ISSET_ID = 1;
18567
    private BitSet __isset_bit_vector = new BitSet(2);
18568
 
18569
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
18570
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
18571
          new FieldValueMetaData(TType.I64)));
18572
      put(_Fields.CUSTOMER_ID, new FieldMetaData("customerId", TFieldRequirementType.DEFAULT, 
18573
          new FieldValueMetaData(TType.I64)));
18574
    }});
18575
 
18576
    static {
18577
      FieldMetaData.addStructMetaDataMap(getOrderForCustomer_args.class, metaDataMap);
18578
    }
18579
 
18580
    public getOrderForCustomer_args() {
18581
    }
18582
 
18583
    public getOrderForCustomer_args(
18584
      long orderId,
18585
      long customerId)
18586
    {
18587
      this();
18588
      this.orderId = orderId;
18589
      setOrderIdIsSet(true);
18590
      this.customerId = customerId;
18591
      setCustomerIdIsSet(true);
18592
    }
18593
 
18594
    /**
18595
     * Performs a deep copy on <i>other</i>.
18596
     */
18597
    public getOrderForCustomer_args(getOrderForCustomer_args other) {
18598
      __isset_bit_vector.clear();
18599
      __isset_bit_vector.or(other.__isset_bit_vector);
18600
      this.orderId = other.orderId;
18601
      this.customerId = other.customerId;
18602
    }
18603
 
18604
    public getOrderForCustomer_args deepCopy() {
18605
      return new getOrderForCustomer_args(this);
18606
    }
18607
 
18608
    @Deprecated
18609
    public getOrderForCustomer_args clone() {
18610
      return new getOrderForCustomer_args(this);
18611
    }
18612
 
18613
    public long getOrderId() {
18614
      return this.orderId;
18615
    }
18616
 
18617
    public getOrderForCustomer_args setOrderId(long orderId) {
18618
      this.orderId = orderId;
18619
      setOrderIdIsSet(true);
18620
      return this;
18621
    }
18622
 
18623
    public void unsetOrderId() {
18624
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
18625
    }
18626
 
18627
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
18628
    public boolean isSetOrderId() {
18629
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
18630
    }
18631
 
18632
    public void setOrderIdIsSet(boolean value) {
18633
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
18634
    }
18635
 
18636
    public long getCustomerId() {
18637
      return this.customerId;
18638
    }
18639
 
18640
    public getOrderForCustomer_args setCustomerId(long customerId) {
18641
      this.customerId = customerId;
18642
      setCustomerIdIsSet(true);
18643
      return this;
18644
    }
18645
 
18646
    public void unsetCustomerId() {
18647
      __isset_bit_vector.clear(__CUSTOMERID_ISSET_ID);
18648
    }
18649
 
18650
    /** Returns true if field customerId is set (has been asigned a value) and false otherwise */
18651
    public boolean isSetCustomerId() {
18652
      return __isset_bit_vector.get(__CUSTOMERID_ISSET_ID);
18653
    }
18654
 
18655
    public void setCustomerIdIsSet(boolean value) {
18656
      __isset_bit_vector.set(__CUSTOMERID_ISSET_ID, value);
18657
    }
18658
 
18659
    public void setFieldValue(_Fields field, Object value) {
18660
      switch (field) {
18661
      case ORDER_ID:
18662
        if (value == null) {
18663
          unsetOrderId();
18664
        } else {
18665
          setOrderId((Long)value);
18666
        }
18667
        break;
18668
 
18669
      case CUSTOMER_ID:
18670
        if (value == null) {
18671
          unsetCustomerId();
18672
        } else {
18673
          setCustomerId((Long)value);
18674
        }
18675
        break;
18676
 
18677
      }
18678
    }
18679
 
18680
    public void setFieldValue(int fieldID, Object value) {
18681
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
18682
    }
18683
 
18684
    public Object getFieldValue(_Fields field) {
18685
      switch (field) {
18686
      case ORDER_ID:
18687
        return new Long(getOrderId());
18688
 
18689
      case CUSTOMER_ID:
18690
        return new Long(getCustomerId());
18691
 
18692
      }
18693
      throw new IllegalStateException();
18694
    }
18695
 
18696
    public Object getFieldValue(int fieldId) {
18697
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
18698
    }
18699
 
18700
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
18701
    public boolean isSet(_Fields field) {
18702
      switch (field) {
18703
      case ORDER_ID:
18704
        return isSetOrderId();
18705
      case CUSTOMER_ID:
18706
        return isSetCustomerId();
18707
      }
18708
      throw new IllegalStateException();
18709
    }
18710
 
18711
    public boolean isSet(int fieldID) {
18712
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
18713
    }
18714
 
18715
    @Override
18716
    public boolean equals(Object that) {
18717
      if (that == null)
18718
        return false;
18719
      if (that instanceof getOrderForCustomer_args)
18720
        return this.equals((getOrderForCustomer_args)that);
18721
      return false;
18722
    }
18723
 
18724
    public boolean equals(getOrderForCustomer_args that) {
18725
      if (that == null)
18726
        return false;
18727
 
18728
      boolean this_present_orderId = true;
18729
      boolean that_present_orderId = true;
18730
      if (this_present_orderId || that_present_orderId) {
18731
        if (!(this_present_orderId && that_present_orderId))
18732
          return false;
18733
        if (this.orderId != that.orderId)
18734
          return false;
18735
      }
18736
 
18737
      boolean this_present_customerId = true;
18738
      boolean that_present_customerId = true;
18739
      if (this_present_customerId || that_present_customerId) {
18740
        if (!(this_present_customerId && that_present_customerId))
18741
          return false;
18742
        if (this.customerId != that.customerId)
18743
          return false;
18744
      }
18745
 
18746
      return true;
18747
    }
18748
 
18749
    @Override
18750
    public int hashCode() {
18751
      return 0;
18752
    }
18753
 
18754
    public int compareTo(getOrderForCustomer_args other) {
18755
      if (!getClass().equals(other.getClass())) {
18756
        return getClass().getName().compareTo(other.getClass().getName());
18757
      }
18758
 
18759
      int lastComparison = 0;
18760
      getOrderForCustomer_args typedOther = (getOrderForCustomer_args)other;
18761
 
18762
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
18763
      if (lastComparison != 0) {
18764
        return lastComparison;
18765
      }
18766
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
18767
      if (lastComparison != 0) {
18768
        return lastComparison;
18769
      }
18770
      lastComparison = Boolean.valueOf(isSetCustomerId()).compareTo(isSetCustomerId());
18771
      if (lastComparison != 0) {
18772
        return lastComparison;
18773
      }
18774
      lastComparison = TBaseHelper.compareTo(customerId, typedOther.customerId);
18775
      if (lastComparison != 0) {
18776
        return lastComparison;
18777
      }
18778
      return 0;
18779
    }
18780
 
18781
    public void read(TProtocol iprot) throws TException {
18782
      TField field;
18783
      iprot.readStructBegin();
18784
      while (true)
18785
      {
18786
        field = iprot.readFieldBegin();
18787
        if (field.type == TType.STOP) { 
18788
          break;
18789
        }
18790
        _Fields fieldId = _Fields.findByThriftId(field.id);
18791
        if (fieldId == null) {
18792
          TProtocolUtil.skip(iprot, field.type);
18793
        } else {
18794
          switch (fieldId) {
18795
            case ORDER_ID:
18796
              if (field.type == TType.I64) {
18797
                this.orderId = iprot.readI64();
18798
                setOrderIdIsSet(true);
18799
              } else { 
18800
                TProtocolUtil.skip(iprot, field.type);
18801
              }
18802
              break;
18803
            case CUSTOMER_ID:
18804
              if (field.type == TType.I64) {
18805
                this.customerId = iprot.readI64();
18806
                setCustomerIdIsSet(true);
18807
              } else { 
18808
                TProtocolUtil.skip(iprot, field.type);
18809
              }
18810
              break;
18811
          }
18812
          iprot.readFieldEnd();
18813
        }
18814
      }
18815
      iprot.readStructEnd();
18816
      validate();
18817
    }
18818
 
18819
    public void write(TProtocol oprot) throws TException {
18820
      validate();
18821
 
18822
      oprot.writeStructBegin(STRUCT_DESC);
18823
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
18824
      oprot.writeI64(this.orderId);
18825
      oprot.writeFieldEnd();
18826
      oprot.writeFieldBegin(CUSTOMER_ID_FIELD_DESC);
18827
      oprot.writeI64(this.customerId);
18828
      oprot.writeFieldEnd();
18829
      oprot.writeFieldStop();
18830
      oprot.writeStructEnd();
18831
    }
18832
 
18833
    @Override
18834
    public String toString() {
18835
      StringBuilder sb = new StringBuilder("getOrderForCustomer_args(");
18836
      boolean first = true;
18837
 
18838
      sb.append("orderId:");
18839
      sb.append(this.orderId);
18840
      first = false;
18841
      if (!first) sb.append(", ");
18842
      sb.append("customerId:");
18843
      sb.append(this.customerId);
18844
      first = false;
18845
      sb.append(")");
18846
      return sb.toString();
18847
    }
18848
 
18849
    public void validate() throws TException {
18850
      // check for required fields
18851
    }
18852
 
18853
  }
18854
 
18855
  public static class getOrderForCustomer_result implements TBase<getOrderForCustomer_result._Fields>, java.io.Serializable, Cloneable, Comparable<getOrderForCustomer_result>   {
18856
    private static final TStruct STRUCT_DESC = new TStruct("getOrderForCustomer_result");
18857
 
18858
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
18859
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
18860
 
18861
    private Order success;
18862
    private TransactionServiceException ex;
18863
 
18864
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18865
    public enum _Fields implements TFieldIdEnum {
18866
      SUCCESS((short)0, "success"),
18867
      EX((short)1, "ex");
18868
 
18869
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
18870
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18871
 
18872
      static {
18873
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18874
          byId.put((int)field._thriftId, field);
18875
          byName.put(field.getFieldName(), field);
18876
        }
18877
      }
18878
 
18879
      /**
18880
       * Find the _Fields constant that matches fieldId, or null if its not found.
18881
       */
18882
      public static _Fields findByThriftId(int fieldId) {
18883
        return byId.get(fieldId);
18884
      }
18885
 
18886
      /**
18887
       * Find the _Fields constant that matches fieldId, throwing an exception
18888
       * if it is not found.
18889
       */
18890
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18891
        _Fields fields = findByThriftId(fieldId);
18892
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18893
        return fields;
18894
      }
18895
 
18896
      /**
18897
       * Find the _Fields constant that matches name, or null if its not found.
18898
       */
18899
      public static _Fields findByName(String name) {
18900
        return byName.get(name);
18901
      }
18902
 
18903
      private final short _thriftId;
18904
      private final String _fieldName;
18905
 
18906
      _Fields(short thriftId, String fieldName) {
18907
        _thriftId = thriftId;
18908
        _fieldName = fieldName;
18909
      }
18910
 
18911
      public short getThriftFieldId() {
18912
        return _thriftId;
18913
      }
18914
 
18915
      public String getFieldName() {
18916
        return _fieldName;
18917
      }
18918
    }
18919
 
18920
    // isset id assignments
18921
 
18922
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
18923
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
18924
          new StructMetaData(TType.STRUCT, Order.class)));
18925
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
18926
          new FieldValueMetaData(TType.STRUCT)));
18927
    }});
18928
 
18929
    static {
18930
      FieldMetaData.addStructMetaDataMap(getOrderForCustomer_result.class, metaDataMap);
18931
    }
18932
 
18933
    public getOrderForCustomer_result() {
18934
    }
18935
 
18936
    public getOrderForCustomer_result(
18937
      Order success,
18938
      TransactionServiceException ex)
18939
    {
18940
      this();
18941
      this.success = success;
18942
      this.ex = ex;
18943
    }
18944
 
18945
    /**
18946
     * Performs a deep copy on <i>other</i>.
18947
     */
18948
    public getOrderForCustomer_result(getOrderForCustomer_result other) {
18949
      if (other.isSetSuccess()) {
18950
        this.success = new Order(other.success);
18951
      }
18952
      if (other.isSetEx()) {
18953
        this.ex = new TransactionServiceException(other.ex);
18954
      }
18955
    }
18956
 
18957
    public getOrderForCustomer_result deepCopy() {
18958
      return new getOrderForCustomer_result(this);
18959
    }
18960
 
18961
    @Deprecated
18962
    public getOrderForCustomer_result clone() {
18963
      return new getOrderForCustomer_result(this);
18964
    }
18965
 
18966
    public Order getSuccess() {
18967
      return this.success;
18968
    }
18969
 
18970
    public getOrderForCustomer_result setSuccess(Order success) {
18971
      this.success = success;
18972
      return this;
18973
    }
18974
 
18975
    public void unsetSuccess() {
18976
      this.success = null;
18977
    }
18978
 
18979
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
18980
    public boolean isSetSuccess() {
18981
      return this.success != null;
18982
    }
18983
 
18984
    public void setSuccessIsSet(boolean value) {
18985
      if (!value) {
18986
        this.success = null;
18987
      }
18988
    }
18989
 
18990
    public TransactionServiceException getEx() {
18991
      return this.ex;
18992
    }
18993
 
18994
    public getOrderForCustomer_result setEx(TransactionServiceException ex) {
18995
      this.ex = ex;
18996
      return this;
18997
    }
18998
 
18999
    public void unsetEx() {
19000
      this.ex = null;
19001
    }
19002
 
19003
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
19004
    public boolean isSetEx() {
19005
      return this.ex != null;
19006
    }
19007
 
19008
    public void setExIsSet(boolean value) {
19009
      if (!value) {
19010
        this.ex = null;
19011
      }
19012
    }
19013
 
19014
    public void setFieldValue(_Fields field, Object value) {
19015
      switch (field) {
19016
      case SUCCESS:
19017
        if (value == null) {
19018
          unsetSuccess();
19019
        } else {
19020
          setSuccess((Order)value);
19021
        }
19022
        break;
19023
 
19024
      case EX:
19025
        if (value == null) {
19026
          unsetEx();
19027
        } else {
19028
          setEx((TransactionServiceException)value);
19029
        }
19030
        break;
19031
 
19032
      }
19033
    }
19034
 
19035
    public void setFieldValue(int fieldID, Object value) {
19036
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
19037
    }
19038
 
19039
    public Object getFieldValue(_Fields field) {
19040
      switch (field) {
19041
      case SUCCESS:
19042
        return getSuccess();
19043
 
19044
      case EX:
19045
        return getEx();
19046
 
19047
      }
19048
      throw new IllegalStateException();
19049
    }
19050
 
19051
    public Object getFieldValue(int fieldId) {
19052
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
19053
    }
19054
 
19055
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
19056
    public boolean isSet(_Fields field) {
19057
      switch (field) {
19058
      case SUCCESS:
19059
        return isSetSuccess();
19060
      case EX:
19061
        return isSetEx();
19062
      }
19063
      throw new IllegalStateException();
19064
    }
19065
 
19066
    public boolean isSet(int fieldID) {
19067
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
19068
    }
19069
 
19070
    @Override
19071
    public boolean equals(Object that) {
19072
      if (that == null)
19073
        return false;
19074
      if (that instanceof getOrderForCustomer_result)
19075
        return this.equals((getOrderForCustomer_result)that);
19076
      return false;
19077
    }
19078
 
19079
    public boolean equals(getOrderForCustomer_result that) {
19080
      if (that == null)
19081
        return false;
19082
 
19083
      boolean this_present_success = true && this.isSetSuccess();
19084
      boolean that_present_success = true && that.isSetSuccess();
19085
      if (this_present_success || that_present_success) {
19086
        if (!(this_present_success && that_present_success))
19087
          return false;
19088
        if (!this.success.equals(that.success))
19089
          return false;
19090
      }
19091
 
19092
      boolean this_present_ex = true && this.isSetEx();
19093
      boolean that_present_ex = true && that.isSetEx();
19094
      if (this_present_ex || that_present_ex) {
19095
        if (!(this_present_ex && that_present_ex))
19096
          return false;
19097
        if (!this.ex.equals(that.ex))
19098
          return false;
19099
      }
19100
 
19101
      return true;
19102
    }
19103
 
19104
    @Override
19105
    public int hashCode() {
19106
      return 0;
19107
    }
19108
 
19109
    public int compareTo(getOrderForCustomer_result other) {
19110
      if (!getClass().equals(other.getClass())) {
19111
        return getClass().getName().compareTo(other.getClass().getName());
19112
      }
19113
 
19114
      int lastComparison = 0;
19115
      getOrderForCustomer_result typedOther = (getOrderForCustomer_result)other;
19116
 
19117
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
19118
      if (lastComparison != 0) {
19119
        return lastComparison;
19120
      }
19121
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
19122
      if (lastComparison != 0) {
19123
        return lastComparison;
19124
      }
19125
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
19126
      if (lastComparison != 0) {
19127
        return lastComparison;
19128
      }
19129
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
19130
      if (lastComparison != 0) {
19131
        return lastComparison;
19132
      }
19133
      return 0;
19134
    }
19135
 
19136
    public void read(TProtocol iprot) throws TException {
19137
      TField field;
19138
      iprot.readStructBegin();
19139
      while (true)
19140
      {
19141
        field = iprot.readFieldBegin();
19142
        if (field.type == TType.STOP) { 
19143
          break;
19144
        }
19145
        _Fields fieldId = _Fields.findByThriftId(field.id);
19146
        if (fieldId == null) {
19147
          TProtocolUtil.skip(iprot, field.type);
19148
        } else {
19149
          switch (fieldId) {
19150
            case SUCCESS:
19151
              if (field.type == TType.STRUCT) {
19152
                this.success = new Order();
19153
                this.success.read(iprot);
19154
              } else { 
19155
                TProtocolUtil.skip(iprot, field.type);
19156
              }
19157
              break;
19158
            case EX:
19159
              if (field.type == TType.STRUCT) {
19160
                this.ex = new TransactionServiceException();
19161
                this.ex.read(iprot);
19162
              } else { 
19163
                TProtocolUtil.skip(iprot, field.type);
19164
              }
19165
              break;
19166
          }
19167
          iprot.readFieldEnd();
19168
        }
19169
      }
19170
      iprot.readStructEnd();
19171
      validate();
19172
    }
19173
 
19174
    public void write(TProtocol oprot) throws TException {
19175
      oprot.writeStructBegin(STRUCT_DESC);
19176
 
19177
      if (this.isSetSuccess()) {
19178
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
19179
        this.success.write(oprot);
19180
        oprot.writeFieldEnd();
19181
      } else if (this.isSetEx()) {
19182
        oprot.writeFieldBegin(EX_FIELD_DESC);
19183
        this.ex.write(oprot);
19184
        oprot.writeFieldEnd();
19185
      }
19186
      oprot.writeFieldStop();
19187
      oprot.writeStructEnd();
19188
    }
19189
 
19190
    @Override
19191
    public String toString() {
19192
      StringBuilder sb = new StringBuilder("getOrderForCustomer_result(");
19193
      boolean first = true;
19194
 
19195
      sb.append("success:");
19196
      if (this.success == null) {
19197
        sb.append("null");
19198
      } else {
19199
        sb.append(this.success);
19200
      }
19201
      first = false;
19202
      if (!first) sb.append(", ");
19203
      sb.append("ex:");
19204
      if (this.ex == null) {
19205
        sb.append("null");
19206
      } else {
19207
        sb.append(this.ex);
19208
      }
19209
      first = false;
19210
      sb.append(")");
19211
      return sb.toString();
19212
    }
19213
 
19214
    public void validate() throws TException {
19215
      // check for required fields
19216
    }
19217
 
19218
  }
19219
 
1221 chandransh 19220
  public static class batchOrders_args implements TBase<batchOrders_args._Fields>, java.io.Serializable, Cloneable, Comparable<batchOrders_args>   {
19221
    private static final TStruct STRUCT_DESC = new TStruct("batchOrders_args");
19222
 
19223
    private static final TField WAREHOUSE_ID_FIELD_DESC = new TField("warehouseId", TType.I64, (short)1);
19224
 
19225
    private long warehouseId;
19226
 
19227
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19228
    public enum _Fields implements TFieldIdEnum {
19229
      WAREHOUSE_ID((short)1, "warehouseId");
19230
 
19231
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
19232
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19233
 
19234
      static {
19235
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19236
          byId.put((int)field._thriftId, field);
19237
          byName.put(field.getFieldName(), field);
19238
        }
19239
      }
19240
 
19241
      /**
19242
       * Find the _Fields constant that matches fieldId, or null if its not found.
19243
       */
19244
      public static _Fields findByThriftId(int fieldId) {
19245
        return byId.get(fieldId);
19246
      }
19247
 
19248
      /**
19249
       * Find the _Fields constant that matches fieldId, throwing an exception
19250
       * if it is not found.
19251
       */
19252
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19253
        _Fields fields = findByThriftId(fieldId);
19254
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19255
        return fields;
19256
      }
19257
 
19258
      /**
19259
       * Find the _Fields constant that matches name, or null if its not found.
19260
       */
19261
      public static _Fields findByName(String name) {
19262
        return byName.get(name);
19263
      }
19264
 
19265
      private final short _thriftId;
19266
      private final String _fieldName;
19267
 
19268
      _Fields(short thriftId, String fieldName) {
19269
        _thriftId = thriftId;
19270
        _fieldName = fieldName;
19271
      }
19272
 
19273
      public short getThriftFieldId() {
19274
        return _thriftId;
19275
      }
19276
 
19277
      public String getFieldName() {
19278
        return _fieldName;
19279
      }
19280
    }
19281
 
19282
    // isset id assignments
19283
    private static final int __WAREHOUSEID_ISSET_ID = 0;
19284
    private BitSet __isset_bit_vector = new BitSet(1);
19285
 
19286
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
19287
      put(_Fields.WAREHOUSE_ID, new FieldMetaData("warehouseId", TFieldRequirementType.DEFAULT, 
19288
          new FieldValueMetaData(TType.I64)));
19289
    }});
19290
 
19291
    static {
19292
      FieldMetaData.addStructMetaDataMap(batchOrders_args.class, metaDataMap);
19293
    }
19294
 
19295
    public batchOrders_args() {
19296
    }
19297
 
19298
    public batchOrders_args(
19299
      long warehouseId)
19300
    {
19301
      this();
19302
      this.warehouseId = warehouseId;
19303
      setWarehouseIdIsSet(true);
19304
    }
19305
 
19306
    /**
19307
     * Performs a deep copy on <i>other</i>.
19308
     */
19309
    public batchOrders_args(batchOrders_args other) {
19310
      __isset_bit_vector.clear();
19311
      __isset_bit_vector.or(other.__isset_bit_vector);
19312
      this.warehouseId = other.warehouseId;
19313
    }
19314
 
19315
    public batchOrders_args deepCopy() {
19316
      return new batchOrders_args(this);
19317
    }
19318
 
19319
    @Deprecated
19320
    public batchOrders_args clone() {
19321
      return new batchOrders_args(this);
19322
    }
19323
 
19324
    public long getWarehouseId() {
19325
      return this.warehouseId;
19326
    }
19327
 
19328
    public batchOrders_args setWarehouseId(long warehouseId) {
19329
      this.warehouseId = warehouseId;
19330
      setWarehouseIdIsSet(true);
19331
      return this;
19332
    }
19333
 
19334
    public void unsetWarehouseId() {
19335
      __isset_bit_vector.clear(__WAREHOUSEID_ISSET_ID);
19336
    }
19337
 
19338
    /** Returns true if field warehouseId is set (has been asigned a value) and false otherwise */
19339
    public boolean isSetWarehouseId() {
19340
      return __isset_bit_vector.get(__WAREHOUSEID_ISSET_ID);
19341
    }
19342
 
19343
    public void setWarehouseIdIsSet(boolean value) {
19344
      __isset_bit_vector.set(__WAREHOUSEID_ISSET_ID, value);
19345
    }
19346
 
19347
    public void setFieldValue(_Fields field, Object value) {
19348
      switch (field) {
19349
      case WAREHOUSE_ID:
19350
        if (value == null) {
19351
          unsetWarehouseId();
19352
        } else {
19353
          setWarehouseId((Long)value);
19354
        }
19355
        break;
19356
 
19357
      }
19358
    }
19359
 
19360
    public void setFieldValue(int fieldID, Object value) {
19361
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
19362
    }
19363
 
19364
    public Object getFieldValue(_Fields field) {
19365
      switch (field) {
19366
      case WAREHOUSE_ID:
19367
        return new Long(getWarehouseId());
19368
 
19369
      }
19370
      throw new IllegalStateException();
19371
    }
19372
 
19373
    public Object getFieldValue(int fieldId) {
19374
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
19375
    }
19376
 
19377
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
19378
    public boolean isSet(_Fields field) {
19379
      switch (field) {
19380
      case WAREHOUSE_ID:
19381
        return isSetWarehouseId();
19382
      }
19383
      throw new IllegalStateException();
19384
    }
19385
 
19386
    public boolean isSet(int fieldID) {
19387
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
19388
    }
19389
 
19390
    @Override
19391
    public boolean equals(Object that) {
19392
      if (that == null)
19393
        return false;
19394
      if (that instanceof batchOrders_args)
19395
        return this.equals((batchOrders_args)that);
19396
      return false;
19397
    }
19398
 
19399
    public boolean equals(batchOrders_args that) {
19400
      if (that == null)
19401
        return false;
19402
 
19403
      boolean this_present_warehouseId = true;
19404
      boolean that_present_warehouseId = true;
19405
      if (this_present_warehouseId || that_present_warehouseId) {
19406
        if (!(this_present_warehouseId && that_present_warehouseId))
19407
          return false;
19408
        if (this.warehouseId != that.warehouseId)
19409
          return false;
19410
      }
19411
 
19412
      return true;
19413
    }
19414
 
19415
    @Override
19416
    public int hashCode() {
19417
      return 0;
19418
    }
19419
 
19420
    public int compareTo(batchOrders_args other) {
19421
      if (!getClass().equals(other.getClass())) {
19422
        return getClass().getName().compareTo(other.getClass().getName());
19423
      }
19424
 
19425
      int lastComparison = 0;
19426
      batchOrders_args typedOther = (batchOrders_args)other;
19427
 
19428
      lastComparison = Boolean.valueOf(isSetWarehouseId()).compareTo(isSetWarehouseId());
19429
      if (lastComparison != 0) {
19430
        return lastComparison;
19431
      }
19432
      lastComparison = TBaseHelper.compareTo(warehouseId, typedOther.warehouseId);
19433
      if (lastComparison != 0) {
19434
        return lastComparison;
19435
      }
19436
      return 0;
19437
    }
19438
 
19439
    public void read(TProtocol iprot) throws TException {
19440
      TField field;
19441
      iprot.readStructBegin();
19442
      while (true)
19443
      {
19444
        field = iprot.readFieldBegin();
19445
        if (field.type == TType.STOP) { 
19446
          break;
19447
        }
19448
        _Fields fieldId = _Fields.findByThriftId(field.id);
19449
        if (fieldId == null) {
19450
          TProtocolUtil.skip(iprot, field.type);
19451
        } else {
19452
          switch (fieldId) {
19453
            case WAREHOUSE_ID:
19454
              if (field.type == TType.I64) {
19455
                this.warehouseId = iprot.readI64();
19456
                setWarehouseIdIsSet(true);
19457
              } else { 
19458
                TProtocolUtil.skip(iprot, field.type);
19459
              }
19460
              break;
19461
          }
19462
          iprot.readFieldEnd();
19463
        }
19464
      }
19465
      iprot.readStructEnd();
19466
      validate();
19467
    }
19468
 
19469
    public void write(TProtocol oprot) throws TException {
19470
      validate();
19471
 
19472
      oprot.writeStructBegin(STRUCT_DESC);
19473
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
19474
      oprot.writeI64(this.warehouseId);
19475
      oprot.writeFieldEnd();
19476
      oprot.writeFieldStop();
19477
      oprot.writeStructEnd();
19478
    }
19479
 
19480
    @Override
19481
    public String toString() {
19482
      StringBuilder sb = new StringBuilder("batchOrders_args(");
19483
      boolean first = true;
19484
 
19485
      sb.append("warehouseId:");
19486
      sb.append(this.warehouseId);
19487
      first = false;
19488
      sb.append(")");
19489
      return sb.toString();
19490
    }
19491
 
19492
    public void validate() throws TException {
19493
      // check for required fields
19494
    }
19495
 
19496
  }
19497
 
19498
  public static class batchOrders_result implements TBase<batchOrders_result._Fields>, java.io.Serializable, Cloneable, Comparable<batchOrders_result>   {
19499
    private static final TStruct STRUCT_DESC = new TStruct("batchOrders_result");
19500
 
19501
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
19502
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
19503
 
19504
    private List<Order> success;
19505
    private TransactionServiceException ex;
19506
 
19507
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19508
    public enum _Fields implements TFieldIdEnum {
19509
      SUCCESS((short)0, "success"),
19510
      EX((short)1, "ex");
19511
 
19512
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
19513
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19514
 
19515
      static {
19516
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19517
          byId.put((int)field._thriftId, field);
19518
          byName.put(field.getFieldName(), field);
19519
        }
19520
      }
19521
 
19522
      /**
19523
       * Find the _Fields constant that matches fieldId, or null if its not found.
19524
       */
19525
      public static _Fields findByThriftId(int fieldId) {
19526
        return byId.get(fieldId);
19527
      }
19528
 
19529
      /**
19530
       * Find the _Fields constant that matches fieldId, throwing an exception
19531
       * if it is not found.
19532
       */
19533
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19534
        _Fields fields = findByThriftId(fieldId);
19535
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19536
        return fields;
19537
      }
19538
 
19539
      /**
19540
       * Find the _Fields constant that matches name, or null if its not found.
19541
       */
19542
      public static _Fields findByName(String name) {
19543
        return byName.get(name);
19544
      }
19545
 
19546
      private final short _thriftId;
19547
      private final String _fieldName;
19548
 
19549
      _Fields(short thriftId, String fieldName) {
19550
        _thriftId = thriftId;
19551
        _fieldName = fieldName;
19552
      }
19553
 
19554
      public short getThriftFieldId() {
19555
        return _thriftId;
19556
      }
19557
 
19558
      public String getFieldName() {
19559
        return _fieldName;
19560
      }
19561
    }
19562
 
19563
    // isset id assignments
19564
 
19565
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
19566
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
19567
          new ListMetaData(TType.LIST, 
19568
              new StructMetaData(TType.STRUCT, Order.class))));
19569
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
19570
          new FieldValueMetaData(TType.STRUCT)));
19571
    }});
19572
 
19573
    static {
19574
      FieldMetaData.addStructMetaDataMap(batchOrders_result.class, metaDataMap);
19575
    }
19576
 
19577
    public batchOrders_result() {
19578
    }
19579
 
19580
    public batchOrders_result(
19581
      List<Order> success,
19582
      TransactionServiceException ex)
19583
    {
19584
      this();
19585
      this.success = success;
19586
      this.ex = ex;
19587
    }
19588
 
19589
    /**
19590
     * Performs a deep copy on <i>other</i>.
19591
     */
19592
    public batchOrders_result(batchOrders_result other) {
19593
      if (other.isSetSuccess()) {
19594
        List<Order> __this__success = new ArrayList<Order>();
19595
        for (Order other_element : other.success) {
19596
          __this__success.add(new Order(other_element));
19597
        }
19598
        this.success = __this__success;
19599
      }
19600
      if (other.isSetEx()) {
19601
        this.ex = new TransactionServiceException(other.ex);
19602
      }
19603
    }
19604
 
19605
    public batchOrders_result deepCopy() {
19606
      return new batchOrders_result(this);
19607
    }
19608
 
19609
    @Deprecated
19610
    public batchOrders_result clone() {
19611
      return new batchOrders_result(this);
19612
    }
19613
 
19614
    public int getSuccessSize() {
19615
      return (this.success == null) ? 0 : this.success.size();
19616
    }
19617
 
19618
    public java.util.Iterator<Order> getSuccessIterator() {
19619
      return (this.success == null) ? null : this.success.iterator();
19620
    }
19621
 
19622
    public void addToSuccess(Order elem) {
19623
      if (this.success == null) {
19624
        this.success = new ArrayList<Order>();
19625
      }
19626
      this.success.add(elem);
19627
    }
19628
 
19629
    public List<Order> getSuccess() {
19630
      return this.success;
19631
    }
19632
 
19633
    public batchOrders_result setSuccess(List<Order> success) {
19634
      this.success = success;
19635
      return this;
19636
    }
19637
 
19638
    public void unsetSuccess() {
19639
      this.success = null;
19640
    }
19641
 
19642
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
19643
    public boolean isSetSuccess() {
19644
      return this.success != null;
19645
    }
19646
 
19647
    public void setSuccessIsSet(boolean value) {
19648
      if (!value) {
19649
        this.success = null;
19650
      }
19651
    }
19652
 
19653
    public TransactionServiceException getEx() {
19654
      return this.ex;
19655
    }
19656
 
19657
    public batchOrders_result setEx(TransactionServiceException ex) {
19658
      this.ex = ex;
19659
      return this;
19660
    }
19661
 
19662
    public void unsetEx() {
19663
      this.ex = null;
19664
    }
19665
 
19666
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
19667
    public boolean isSetEx() {
19668
      return this.ex != null;
19669
    }
19670
 
19671
    public void setExIsSet(boolean value) {
19672
      if (!value) {
19673
        this.ex = null;
19674
      }
19675
    }
19676
 
19677
    public void setFieldValue(_Fields field, Object value) {
19678
      switch (field) {
19679
      case SUCCESS:
19680
        if (value == null) {
19681
          unsetSuccess();
19682
        } else {
19683
          setSuccess((List<Order>)value);
19684
        }
19685
        break;
19686
 
19687
      case EX:
19688
        if (value == null) {
19689
          unsetEx();
19690
        } else {
19691
          setEx((TransactionServiceException)value);
19692
        }
19693
        break;
19694
 
19695
      }
19696
    }
19697
 
19698
    public void setFieldValue(int fieldID, Object value) {
19699
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
19700
    }
19701
 
19702
    public Object getFieldValue(_Fields field) {
19703
      switch (field) {
19704
      case SUCCESS:
19705
        return getSuccess();
19706
 
19707
      case EX:
19708
        return getEx();
19709
 
19710
      }
19711
      throw new IllegalStateException();
19712
    }
19713
 
19714
    public Object getFieldValue(int fieldId) {
19715
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
19716
    }
19717
 
19718
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
19719
    public boolean isSet(_Fields field) {
19720
      switch (field) {
19721
      case SUCCESS:
19722
        return isSetSuccess();
19723
      case EX:
19724
        return isSetEx();
19725
      }
19726
      throw new IllegalStateException();
19727
    }
19728
 
19729
    public boolean isSet(int fieldID) {
19730
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
19731
    }
19732
 
19733
    @Override
19734
    public boolean equals(Object that) {
19735
      if (that == null)
19736
        return false;
19737
      if (that instanceof batchOrders_result)
19738
        return this.equals((batchOrders_result)that);
19739
      return false;
19740
    }
19741
 
19742
    public boolean equals(batchOrders_result that) {
19743
      if (that == null)
19744
        return false;
19745
 
19746
      boolean this_present_success = true && this.isSetSuccess();
19747
      boolean that_present_success = true && that.isSetSuccess();
19748
      if (this_present_success || that_present_success) {
19749
        if (!(this_present_success && that_present_success))
19750
          return false;
19751
        if (!this.success.equals(that.success))
19752
          return false;
19753
      }
19754
 
19755
      boolean this_present_ex = true && this.isSetEx();
19756
      boolean that_present_ex = true && that.isSetEx();
19757
      if (this_present_ex || that_present_ex) {
19758
        if (!(this_present_ex && that_present_ex))
19759
          return false;
19760
        if (!this.ex.equals(that.ex))
19761
          return false;
19762
      }
19763
 
19764
      return true;
19765
    }
19766
 
19767
    @Override
19768
    public int hashCode() {
19769
      return 0;
19770
    }
19771
 
19772
    public int compareTo(batchOrders_result other) {
19773
      if (!getClass().equals(other.getClass())) {
19774
        return getClass().getName().compareTo(other.getClass().getName());
19775
      }
19776
 
19777
      int lastComparison = 0;
19778
      batchOrders_result typedOther = (batchOrders_result)other;
19779
 
19780
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
19781
      if (lastComparison != 0) {
19782
        return lastComparison;
19783
      }
19784
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
19785
      if (lastComparison != 0) {
19786
        return lastComparison;
19787
      }
19788
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
19789
      if (lastComparison != 0) {
19790
        return lastComparison;
19791
      }
19792
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
19793
      if (lastComparison != 0) {
19794
        return lastComparison;
19795
      }
19796
      return 0;
19797
    }
19798
 
19799
    public void read(TProtocol iprot) throws TException {
19800
      TField field;
19801
      iprot.readStructBegin();
19802
      while (true)
19803
      {
19804
        field = iprot.readFieldBegin();
19805
        if (field.type == TType.STOP) { 
19806
          break;
19807
        }
19808
        _Fields fieldId = _Fields.findByThriftId(field.id);
19809
        if (fieldId == null) {
19810
          TProtocolUtil.skip(iprot, field.type);
19811
        } else {
19812
          switch (fieldId) {
19813
            case SUCCESS:
19814
              if (field.type == TType.LIST) {
19815
                {
1382 varun.gupt 19816
                  TList _list44 = iprot.readListBegin();
19817
                  this.success = new ArrayList<Order>(_list44.size);
19818
                  for (int _i45 = 0; _i45 < _list44.size; ++_i45)
1221 chandransh 19819
                  {
1382 varun.gupt 19820
                    Order _elem46;
19821
                    _elem46 = new Order();
19822
                    _elem46.read(iprot);
19823
                    this.success.add(_elem46);
1221 chandransh 19824
                  }
19825
                  iprot.readListEnd();
19826
                }
19827
              } else { 
19828
                TProtocolUtil.skip(iprot, field.type);
19829
              }
19830
              break;
19831
            case EX:
19832
              if (field.type == TType.STRUCT) {
19833
                this.ex = new TransactionServiceException();
19834
                this.ex.read(iprot);
19835
              } else { 
19836
                TProtocolUtil.skip(iprot, field.type);
19837
              }
19838
              break;
19839
          }
19840
          iprot.readFieldEnd();
19841
        }
19842
      }
19843
      iprot.readStructEnd();
19844
      validate();
19845
    }
19846
 
19847
    public void write(TProtocol oprot) throws TException {
19848
      oprot.writeStructBegin(STRUCT_DESC);
19849
 
19850
      if (this.isSetSuccess()) {
19851
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
19852
        {
19853
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
1382 varun.gupt 19854
          for (Order _iter47 : this.success)
1221 chandransh 19855
          {
1382 varun.gupt 19856
            _iter47.write(oprot);
1221 chandransh 19857
          }
19858
          oprot.writeListEnd();
19859
        }
19860
        oprot.writeFieldEnd();
19861
      } else if (this.isSetEx()) {
19862
        oprot.writeFieldBegin(EX_FIELD_DESC);
19863
        this.ex.write(oprot);
19864
        oprot.writeFieldEnd();
19865
      }
19866
      oprot.writeFieldStop();
19867
      oprot.writeStructEnd();
19868
    }
19869
 
19870
    @Override
19871
    public String toString() {
19872
      StringBuilder sb = new StringBuilder("batchOrders_result(");
19873
      boolean first = true;
19874
 
19875
      sb.append("success:");
19876
      if (this.success == null) {
19877
        sb.append("null");
19878
      } else {
19879
        sb.append(this.success);
19880
      }
19881
      first = false;
19882
      if (!first) sb.append(", ");
19883
      sb.append("ex:");
19884
      if (this.ex == null) {
19885
        sb.append("null");
19886
      } else {
19887
        sb.append(this.ex);
19888
      }
19889
      first = false;
19890
      sb.append(")");
19891
      return sb.toString();
19892
    }
19893
 
19894
    public void validate() throws TException {
19895
      // check for required fields
19896
    }
19897
 
19898
  }
19899
 
1209 chandransh 19900
  public static class markOrderAsOutOfStock_args implements TBase<markOrderAsOutOfStock_args._Fields>, java.io.Serializable, Cloneable, Comparable<markOrderAsOutOfStock_args>   {
19901
    private static final TStruct STRUCT_DESC = new TStruct("markOrderAsOutOfStock_args");
19902
 
19903
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
19904
 
19905
    private long orderId;
19906
 
19907
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19908
    public enum _Fields implements TFieldIdEnum {
19909
      ORDER_ID((short)1, "orderId");
19910
 
19911
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
19912
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19913
 
19914
      static {
19915
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19916
          byId.put((int)field._thriftId, field);
19917
          byName.put(field.getFieldName(), field);
19918
        }
19919
      }
19920
 
19921
      /**
19922
       * Find the _Fields constant that matches fieldId, or null if its not found.
19923
       */
19924
      public static _Fields findByThriftId(int fieldId) {
19925
        return byId.get(fieldId);
19926
      }
19927
 
19928
      /**
19929
       * Find the _Fields constant that matches fieldId, throwing an exception
19930
       * if it is not found.
19931
       */
19932
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19933
        _Fields fields = findByThriftId(fieldId);
19934
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19935
        return fields;
19936
      }
19937
 
19938
      /**
19939
       * Find the _Fields constant that matches name, or null if its not found.
19940
       */
19941
      public static _Fields findByName(String name) {
19942
        return byName.get(name);
19943
      }
19944
 
19945
      private final short _thriftId;
19946
      private final String _fieldName;
19947
 
19948
      _Fields(short thriftId, String fieldName) {
19949
        _thriftId = thriftId;
19950
        _fieldName = fieldName;
19951
      }
19952
 
19953
      public short getThriftFieldId() {
19954
        return _thriftId;
19955
      }
19956
 
19957
      public String getFieldName() {
19958
        return _fieldName;
19959
      }
19960
    }
19961
 
19962
    // isset id assignments
19963
    private static final int __ORDERID_ISSET_ID = 0;
19964
    private BitSet __isset_bit_vector = new BitSet(1);
19965
 
19966
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
19967
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
19968
          new FieldValueMetaData(TType.I64)));
19969
    }});
19970
 
19971
    static {
19972
      FieldMetaData.addStructMetaDataMap(markOrderAsOutOfStock_args.class, metaDataMap);
19973
    }
19974
 
19975
    public markOrderAsOutOfStock_args() {
19976
    }
19977
 
19978
    public markOrderAsOutOfStock_args(
19979
      long orderId)
19980
    {
19981
      this();
19982
      this.orderId = orderId;
19983
      setOrderIdIsSet(true);
19984
    }
19985
 
19986
    /**
19987
     * Performs a deep copy on <i>other</i>.
19988
     */
19989
    public markOrderAsOutOfStock_args(markOrderAsOutOfStock_args other) {
19990
      __isset_bit_vector.clear();
19991
      __isset_bit_vector.or(other.__isset_bit_vector);
19992
      this.orderId = other.orderId;
19993
    }
19994
 
19995
    public markOrderAsOutOfStock_args deepCopy() {
19996
      return new markOrderAsOutOfStock_args(this);
19997
    }
19998
 
19999
    @Deprecated
20000
    public markOrderAsOutOfStock_args clone() {
20001
      return new markOrderAsOutOfStock_args(this);
20002
    }
20003
 
20004
    public long getOrderId() {
20005
      return this.orderId;
20006
    }
20007
 
20008
    public markOrderAsOutOfStock_args setOrderId(long orderId) {
20009
      this.orderId = orderId;
20010
      setOrderIdIsSet(true);
20011
      return this;
20012
    }
20013
 
20014
    public void unsetOrderId() {
20015
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
20016
    }
20017
 
20018
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
20019
    public boolean isSetOrderId() {
20020
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
20021
    }
20022
 
20023
    public void setOrderIdIsSet(boolean value) {
20024
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
20025
    }
20026
 
20027
    public void setFieldValue(_Fields field, Object value) {
20028
      switch (field) {
20029
      case ORDER_ID:
20030
        if (value == null) {
20031
          unsetOrderId();
20032
        } else {
20033
          setOrderId((Long)value);
20034
        }
20035
        break;
20036
 
20037
      }
20038
    }
20039
 
20040
    public void setFieldValue(int fieldID, Object value) {
20041
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
20042
    }
20043
 
20044
    public Object getFieldValue(_Fields field) {
20045
      switch (field) {
20046
      case ORDER_ID:
20047
        return new Long(getOrderId());
20048
 
20049
      }
20050
      throw new IllegalStateException();
20051
    }
20052
 
20053
    public Object getFieldValue(int fieldId) {
20054
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
20055
    }
20056
 
20057
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
20058
    public boolean isSet(_Fields field) {
20059
      switch (field) {
20060
      case ORDER_ID:
20061
        return isSetOrderId();
20062
      }
20063
      throw new IllegalStateException();
20064
    }
20065
 
20066
    public boolean isSet(int fieldID) {
20067
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
20068
    }
20069
 
20070
    @Override
20071
    public boolean equals(Object that) {
20072
      if (that == null)
20073
        return false;
20074
      if (that instanceof markOrderAsOutOfStock_args)
20075
        return this.equals((markOrderAsOutOfStock_args)that);
20076
      return false;
20077
    }
20078
 
20079
    public boolean equals(markOrderAsOutOfStock_args that) {
20080
      if (that == null)
20081
        return false;
20082
 
20083
      boolean this_present_orderId = true;
20084
      boolean that_present_orderId = true;
20085
      if (this_present_orderId || that_present_orderId) {
20086
        if (!(this_present_orderId && that_present_orderId))
20087
          return false;
20088
        if (this.orderId != that.orderId)
20089
          return false;
20090
      }
20091
 
20092
      return true;
20093
    }
20094
 
20095
    @Override
20096
    public int hashCode() {
20097
      return 0;
20098
    }
20099
 
20100
    public int compareTo(markOrderAsOutOfStock_args other) {
20101
      if (!getClass().equals(other.getClass())) {
20102
        return getClass().getName().compareTo(other.getClass().getName());
20103
      }
20104
 
20105
      int lastComparison = 0;
20106
      markOrderAsOutOfStock_args typedOther = (markOrderAsOutOfStock_args)other;
20107
 
20108
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
20109
      if (lastComparison != 0) {
20110
        return lastComparison;
20111
      }
20112
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
20113
      if (lastComparison != 0) {
20114
        return lastComparison;
20115
      }
20116
      return 0;
20117
    }
20118
 
20119
    public void read(TProtocol iprot) throws TException {
20120
      TField field;
20121
      iprot.readStructBegin();
20122
      while (true)
20123
      {
20124
        field = iprot.readFieldBegin();
20125
        if (field.type == TType.STOP) { 
20126
          break;
20127
        }
20128
        _Fields fieldId = _Fields.findByThriftId(field.id);
20129
        if (fieldId == null) {
20130
          TProtocolUtil.skip(iprot, field.type);
20131
        } else {
20132
          switch (fieldId) {
20133
            case ORDER_ID:
20134
              if (field.type == TType.I64) {
20135
                this.orderId = iprot.readI64();
20136
                setOrderIdIsSet(true);
20137
              } else { 
20138
                TProtocolUtil.skip(iprot, field.type);
20139
              }
20140
              break;
20141
          }
20142
          iprot.readFieldEnd();
20143
        }
20144
      }
20145
      iprot.readStructEnd();
20146
      validate();
20147
    }
20148
 
20149
    public void write(TProtocol oprot) throws TException {
20150
      validate();
20151
 
20152
      oprot.writeStructBegin(STRUCT_DESC);
20153
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
20154
      oprot.writeI64(this.orderId);
20155
      oprot.writeFieldEnd();
20156
      oprot.writeFieldStop();
20157
      oprot.writeStructEnd();
20158
    }
20159
 
20160
    @Override
20161
    public String toString() {
20162
      StringBuilder sb = new StringBuilder("markOrderAsOutOfStock_args(");
20163
      boolean first = true;
20164
 
20165
      sb.append("orderId:");
20166
      sb.append(this.orderId);
20167
      first = false;
20168
      sb.append(")");
20169
      return sb.toString();
20170
    }
20171
 
20172
    public void validate() throws TException {
20173
      // check for required fields
20174
    }
20175
 
20176
  }
20177
 
20178
  public static class markOrderAsOutOfStock_result implements TBase<markOrderAsOutOfStock_result._Fields>, java.io.Serializable, Cloneable, Comparable<markOrderAsOutOfStock_result>   {
20179
    private static final TStruct STRUCT_DESC = new TStruct("markOrderAsOutOfStock_result");
20180
 
20181
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
20182
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
20183
 
20184
    private boolean success;
20185
    private TransactionServiceException ex;
20186
 
20187
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
20188
    public enum _Fields implements TFieldIdEnum {
20189
      SUCCESS((short)0, "success"),
20190
      EX((short)1, "ex");
20191
 
20192
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
20193
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
20194
 
20195
      static {
20196
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
20197
          byId.put((int)field._thriftId, field);
20198
          byName.put(field.getFieldName(), field);
20199
        }
20200
      }
20201
 
20202
      /**
20203
       * Find the _Fields constant that matches fieldId, or null if its not found.
20204
       */
20205
      public static _Fields findByThriftId(int fieldId) {
20206
        return byId.get(fieldId);
20207
      }
20208
 
20209
      /**
20210
       * Find the _Fields constant that matches fieldId, throwing an exception
20211
       * if it is not found.
20212
       */
20213
      public static _Fields findByThriftIdOrThrow(int fieldId) {
20214
        _Fields fields = findByThriftId(fieldId);
20215
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
20216
        return fields;
20217
      }
20218
 
20219
      /**
20220
       * Find the _Fields constant that matches name, or null if its not found.
20221
       */
20222
      public static _Fields findByName(String name) {
20223
        return byName.get(name);
20224
      }
20225
 
20226
      private final short _thriftId;
20227
      private final String _fieldName;
20228
 
20229
      _Fields(short thriftId, String fieldName) {
20230
        _thriftId = thriftId;
20231
        _fieldName = fieldName;
20232
      }
20233
 
20234
      public short getThriftFieldId() {
20235
        return _thriftId;
20236
      }
20237
 
20238
      public String getFieldName() {
20239
        return _fieldName;
20240
      }
20241
    }
20242
 
20243
    // isset id assignments
20244
    private static final int __SUCCESS_ISSET_ID = 0;
20245
    private BitSet __isset_bit_vector = new BitSet(1);
20246
 
20247
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
20248
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
20249
          new FieldValueMetaData(TType.BOOL)));
20250
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
20251
          new FieldValueMetaData(TType.STRUCT)));
20252
    }});
20253
 
20254
    static {
20255
      FieldMetaData.addStructMetaDataMap(markOrderAsOutOfStock_result.class, metaDataMap);
20256
    }
20257
 
20258
    public markOrderAsOutOfStock_result() {
20259
    }
20260
 
20261
    public markOrderAsOutOfStock_result(
20262
      boolean success,
20263
      TransactionServiceException ex)
20264
    {
20265
      this();
20266
      this.success = success;
20267
      setSuccessIsSet(true);
20268
      this.ex = ex;
20269
    }
20270
 
20271
    /**
20272
     * Performs a deep copy on <i>other</i>.
20273
     */
20274
    public markOrderAsOutOfStock_result(markOrderAsOutOfStock_result other) {
20275
      __isset_bit_vector.clear();
20276
      __isset_bit_vector.or(other.__isset_bit_vector);
20277
      this.success = other.success;
20278
      if (other.isSetEx()) {
20279
        this.ex = new TransactionServiceException(other.ex);
20280
      }
20281
    }
20282
 
20283
    public markOrderAsOutOfStock_result deepCopy() {
20284
      return new markOrderAsOutOfStock_result(this);
20285
    }
20286
 
20287
    @Deprecated
20288
    public markOrderAsOutOfStock_result clone() {
20289
      return new markOrderAsOutOfStock_result(this);
20290
    }
20291
 
20292
    public boolean isSuccess() {
20293
      return this.success;
20294
    }
20295
 
20296
    public markOrderAsOutOfStock_result setSuccess(boolean success) {
20297
      this.success = success;
20298
      setSuccessIsSet(true);
20299
      return this;
20300
    }
20301
 
20302
    public void unsetSuccess() {
20303
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
20304
    }
20305
 
20306
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
20307
    public boolean isSetSuccess() {
20308
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
20309
    }
20310
 
20311
    public void setSuccessIsSet(boolean value) {
20312
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
20313
    }
20314
 
20315
    public TransactionServiceException getEx() {
20316
      return this.ex;
20317
    }
20318
 
20319
    public markOrderAsOutOfStock_result setEx(TransactionServiceException ex) {
20320
      this.ex = ex;
20321
      return this;
20322
    }
20323
 
20324
    public void unsetEx() {
20325
      this.ex = null;
20326
    }
20327
 
20328
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
20329
    public boolean isSetEx() {
20330
      return this.ex != null;
20331
    }
20332
 
20333
    public void setExIsSet(boolean value) {
20334
      if (!value) {
20335
        this.ex = null;
20336
      }
20337
    }
20338
 
20339
    public void setFieldValue(_Fields field, Object value) {
20340
      switch (field) {
20341
      case SUCCESS:
20342
        if (value == null) {
20343
          unsetSuccess();
20344
        } else {
20345
          setSuccess((Boolean)value);
20346
        }
20347
        break;
20348
 
20349
      case EX:
20350
        if (value == null) {
20351
          unsetEx();
20352
        } else {
20353
          setEx((TransactionServiceException)value);
20354
        }
20355
        break;
20356
 
20357
      }
20358
    }
20359
 
20360
    public void setFieldValue(int fieldID, Object value) {
20361
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
20362
    }
20363
 
20364
    public Object getFieldValue(_Fields field) {
20365
      switch (field) {
20366
      case SUCCESS:
20367
        return new Boolean(isSuccess());
20368
 
20369
      case EX:
20370
        return getEx();
20371
 
20372
      }
20373
      throw new IllegalStateException();
20374
    }
20375
 
20376
    public Object getFieldValue(int fieldId) {
20377
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
20378
    }
20379
 
20380
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
20381
    public boolean isSet(_Fields field) {
20382
      switch (field) {
20383
      case SUCCESS:
20384
        return isSetSuccess();
20385
      case EX:
20386
        return isSetEx();
20387
      }
20388
      throw new IllegalStateException();
20389
    }
20390
 
20391
    public boolean isSet(int fieldID) {
20392
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
20393
    }
20394
 
20395
    @Override
20396
    public boolean equals(Object that) {
20397
      if (that == null)
20398
        return false;
20399
      if (that instanceof markOrderAsOutOfStock_result)
20400
        return this.equals((markOrderAsOutOfStock_result)that);
20401
      return false;
20402
    }
20403
 
20404
    public boolean equals(markOrderAsOutOfStock_result that) {
20405
      if (that == null)
20406
        return false;
20407
 
20408
      boolean this_present_success = true;
20409
      boolean that_present_success = true;
20410
      if (this_present_success || that_present_success) {
20411
        if (!(this_present_success && that_present_success))
20412
          return false;
20413
        if (this.success != that.success)
20414
          return false;
20415
      }
20416
 
20417
      boolean this_present_ex = true && this.isSetEx();
20418
      boolean that_present_ex = true && that.isSetEx();
20419
      if (this_present_ex || that_present_ex) {
20420
        if (!(this_present_ex && that_present_ex))
20421
          return false;
20422
        if (!this.ex.equals(that.ex))
20423
          return false;
20424
      }
20425
 
20426
      return true;
20427
    }
20428
 
20429
    @Override
20430
    public int hashCode() {
20431
      return 0;
20432
    }
20433
 
20434
    public int compareTo(markOrderAsOutOfStock_result other) {
20435
      if (!getClass().equals(other.getClass())) {
20436
        return getClass().getName().compareTo(other.getClass().getName());
20437
      }
20438
 
20439
      int lastComparison = 0;
20440
      markOrderAsOutOfStock_result typedOther = (markOrderAsOutOfStock_result)other;
20441
 
20442
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
20443
      if (lastComparison != 0) {
20444
        return lastComparison;
20445
      }
20446
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
20447
      if (lastComparison != 0) {
20448
        return lastComparison;
20449
      }
20450
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
20451
      if (lastComparison != 0) {
20452
        return lastComparison;
20453
      }
20454
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
20455
      if (lastComparison != 0) {
20456
        return lastComparison;
20457
      }
20458
      return 0;
20459
    }
20460
 
20461
    public void read(TProtocol iprot) throws TException {
20462
      TField field;
20463
      iprot.readStructBegin();
20464
      while (true)
20465
      {
20466
        field = iprot.readFieldBegin();
20467
        if (field.type == TType.STOP) { 
20468
          break;
20469
        }
20470
        _Fields fieldId = _Fields.findByThriftId(field.id);
20471
        if (fieldId == null) {
20472
          TProtocolUtil.skip(iprot, field.type);
20473
        } else {
20474
          switch (fieldId) {
20475
            case SUCCESS:
20476
              if (field.type == TType.BOOL) {
20477
                this.success = iprot.readBool();
20478
                setSuccessIsSet(true);
20479
              } else { 
20480
                TProtocolUtil.skip(iprot, field.type);
20481
              }
20482
              break;
20483
            case EX:
20484
              if (field.type == TType.STRUCT) {
20485
                this.ex = new TransactionServiceException();
20486
                this.ex.read(iprot);
20487
              } else { 
20488
                TProtocolUtil.skip(iprot, field.type);
20489
              }
20490
              break;
20491
          }
20492
          iprot.readFieldEnd();
20493
        }
20494
      }
20495
      iprot.readStructEnd();
20496
      validate();
20497
    }
20498
 
20499
    public void write(TProtocol oprot) throws TException {
20500
      oprot.writeStructBegin(STRUCT_DESC);
20501
 
20502
      if (this.isSetSuccess()) {
20503
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
20504
        oprot.writeBool(this.success);
20505
        oprot.writeFieldEnd();
20506
      } else if (this.isSetEx()) {
20507
        oprot.writeFieldBegin(EX_FIELD_DESC);
20508
        this.ex.write(oprot);
20509
        oprot.writeFieldEnd();
20510
      }
20511
      oprot.writeFieldStop();
20512
      oprot.writeStructEnd();
20513
    }
20514
 
20515
    @Override
20516
    public String toString() {
20517
      StringBuilder sb = new StringBuilder("markOrderAsOutOfStock_result(");
20518
      boolean first = true;
20519
 
20520
      sb.append("success:");
20521
      sb.append(this.success);
20522
      first = false;
20523
      if (!first) sb.append(", ");
20524
      sb.append("ex:");
20525
      if (this.ex == null) {
20526
        sb.append("null");
20527
      } else {
20528
        sb.append(this.ex);
20529
      }
20530
      first = false;
20531
      sb.append(")");
20532
      return sb.toString();
20533
    }
20534
 
20535
    public void validate() throws TException {
20536
      // check for required fields
20537
    }
20538
 
20539
  }
20540
 
758 chandransh 20541
  public static class markOrdersAsManifested_args implements TBase<markOrdersAsManifested_args._Fields>, java.io.Serializable, Cloneable, Comparable<markOrdersAsManifested_args>   {
20542
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsManifested_args");
20543
 
20544
    private static final TField WAREHOUSE_ID_FIELD_DESC = new TField("warehouseId", TType.I64, (short)1);
20545
    private static final TField PROVIDER_ID_FIELD_DESC = new TField("providerId", TType.I64, (short)2);
20546
 
20547
    private long warehouseId;
20548
    private long providerId;
20549
 
20550
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
20551
    public enum _Fields implements TFieldIdEnum {
20552
      WAREHOUSE_ID((short)1, "warehouseId"),
20553
      PROVIDER_ID((short)2, "providerId");
20554
 
20555
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
20556
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
20557
 
20558
      static {
20559
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
20560
          byId.put((int)field._thriftId, field);
20561
          byName.put(field.getFieldName(), field);
20562
        }
20563
      }
20564
 
20565
      /**
20566
       * Find the _Fields constant that matches fieldId, or null if its not found.
20567
       */
20568
      public static _Fields findByThriftId(int fieldId) {
20569
        return byId.get(fieldId);
20570
      }
20571
 
20572
      /**
20573
       * Find the _Fields constant that matches fieldId, throwing an exception
20574
       * if it is not found.
20575
       */
20576
      public static _Fields findByThriftIdOrThrow(int fieldId) {
20577
        _Fields fields = findByThriftId(fieldId);
20578
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
20579
        return fields;
20580
      }
20581
 
20582
      /**
20583
       * Find the _Fields constant that matches name, or null if its not found.
20584
       */
20585
      public static _Fields findByName(String name) {
20586
        return byName.get(name);
20587
      }
20588
 
20589
      private final short _thriftId;
20590
      private final String _fieldName;
20591
 
20592
      _Fields(short thriftId, String fieldName) {
20593
        _thriftId = thriftId;
20594
        _fieldName = fieldName;
20595
      }
20596
 
20597
      public short getThriftFieldId() {
20598
        return _thriftId;
20599
      }
20600
 
20601
      public String getFieldName() {
20602
        return _fieldName;
20603
      }
20604
    }
20605
 
20606
    // isset id assignments
20607
    private static final int __WAREHOUSEID_ISSET_ID = 0;
20608
    private static final int __PROVIDERID_ISSET_ID = 1;
20609
    private BitSet __isset_bit_vector = new BitSet(2);
20610
 
20611
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
20612
      put(_Fields.WAREHOUSE_ID, new FieldMetaData("warehouseId", TFieldRequirementType.DEFAULT, 
20613
          new FieldValueMetaData(TType.I64)));
20614
      put(_Fields.PROVIDER_ID, new FieldMetaData("providerId", TFieldRequirementType.DEFAULT, 
20615
          new FieldValueMetaData(TType.I64)));
20616
    }});
20617
 
20618
    static {
20619
      FieldMetaData.addStructMetaDataMap(markOrdersAsManifested_args.class, metaDataMap);
20620
    }
20621
 
20622
    public markOrdersAsManifested_args() {
20623
    }
20624
 
20625
    public markOrdersAsManifested_args(
20626
      long warehouseId,
20627
      long providerId)
20628
    {
20629
      this();
20630
      this.warehouseId = warehouseId;
20631
      setWarehouseIdIsSet(true);
20632
      this.providerId = providerId;
20633
      setProviderIdIsSet(true);
20634
    }
20635
 
20636
    /**
20637
     * Performs a deep copy on <i>other</i>.
20638
     */
20639
    public markOrdersAsManifested_args(markOrdersAsManifested_args other) {
20640
      __isset_bit_vector.clear();
20641
      __isset_bit_vector.or(other.__isset_bit_vector);
20642
      this.warehouseId = other.warehouseId;
20643
      this.providerId = other.providerId;
20644
    }
20645
 
20646
    public markOrdersAsManifested_args deepCopy() {
20647
      return new markOrdersAsManifested_args(this);
20648
    }
20649
 
20650
    @Deprecated
20651
    public markOrdersAsManifested_args clone() {
20652
      return new markOrdersAsManifested_args(this);
20653
    }
20654
 
20655
    public long getWarehouseId() {
20656
      return this.warehouseId;
20657
    }
20658
 
20659
    public markOrdersAsManifested_args setWarehouseId(long warehouseId) {
20660
      this.warehouseId = warehouseId;
20661
      setWarehouseIdIsSet(true);
20662
      return this;
20663
    }
20664
 
20665
    public void unsetWarehouseId() {
20666
      __isset_bit_vector.clear(__WAREHOUSEID_ISSET_ID);
20667
    }
20668
 
20669
    /** Returns true if field warehouseId is set (has been asigned a value) and false otherwise */
20670
    public boolean isSetWarehouseId() {
20671
      return __isset_bit_vector.get(__WAREHOUSEID_ISSET_ID);
20672
    }
20673
 
20674
    public void setWarehouseIdIsSet(boolean value) {
20675
      __isset_bit_vector.set(__WAREHOUSEID_ISSET_ID, value);
20676
    }
20677
 
20678
    public long getProviderId() {
20679
      return this.providerId;
20680
    }
20681
 
20682
    public markOrdersAsManifested_args setProviderId(long providerId) {
20683
      this.providerId = providerId;
20684
      setProviderIdIsSet(true);
20685
      return this;
20686
    }
20687
 
20688
    public void unsetProviderId() {
20689
      __isset_bit_vector.clear(__PROVIDERID_ISSET_ID);
20690
    }
20691
 
20692
    /** Returns true if field providerId is set (has been asigned a value) and false otherwise */
20693
    public boolean isSetProviderId() {
20694
      return __isset_bit_vector.get(__PROVIDERID_ISSET_ID);
20695
    }
20696
 
20697
    public void setProviderIdIsSet(boolean value) {
20698
      __isset_bit_vector.set(__PROVIDERID_ISSET_ID, value);
20699
    }
20700
 
20701
    public void setFieldValue(_Fields field, Object value) {
20702
      switch (field) {
20703
      case WAREHOUSE_ID:
20704
        if (value == null) {
20705
          unsetWarehouseId();
20706
        } else {
20707
          setWarehouseId((Long)value);
20708
        }
20709
        break;
20710
 
20711
      case PROVIDER_ID:
20712
        if (value == null) {
20713
          unsetProviderId();
20714
        } else {
20715
          setProviderId((Long)value);
20716
        }
20717
        break;
20718
 
20719
      }
20720
    }
20721
 
20722
    public void setFieldValue(int fieldID, Object value) {
20723
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
20724
    }
20725
 
20726
    public Object getFieldValue(_Fields field) {
20727
      switch (field) {
20728
      case WAREHOUSE_ID:
20729
        return new Long(getWarehouseId());
20730
 
20731
      case PROVIDER_ID:
20732
        return new Long(getProviderId());
20733
 
20734
      }
20735
      throw new IllegalStateException();
20736
    }
20737
 
20738
    public Object getFieldValue(int fieldId) {
20739
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
20740
    }
20741
 
20742
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
20743
    public boolean isSet(_Fields field) {
20744
      switch (field) {
20745
      case WAREHOUSE_ID:
20746
        return isSetWarehouseId();
20747
      case PROVIDER_ID:
20748
        return isSetProviderId();
20749
      }
20750
      throw new IllegalStateException();
20751
    }
20752
 
20753
    public boolean isSet(int fieldID) {
20754
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
20755
    }
20756
 
20757
    @Override
20758
    public boolean equals(Object that) {
20759
      if (that == null)
20760
        return false;
20761
      if (that instanceof markOrdersAsManifested_args)
20762
        return this.equals((markOrdersAsManifested_args)that);
20763
      return false;
20764
    }
20765
 
20766
    public boolean equals(markOrdersAsManifested_args that) {
20767
      if (that == null)
20768
        return false;
20769
 
20770
      boolean this_present_warehouseId = true;
20771
      boolean that_present_warehouseId = true;
20772
      if (this_present_warehouseId || that_present_warehouseId) {
20773
        if (!(this_present_warehouseId && that_present_warehouseId))
20774
          return false;
20775
        if (this.warehouseId != that.warehouseId)
20776
          return false;
20777
      }
20778
 
20779
      boolean this_present_providerId = true;
20780
      boolean that_present_providerId = true;
20781
      if (this_present_providerId || that_present_providerId) {
20782
        if (!(this_present_providerId && that_present_providerId))
20783
          return false;
20784
        if (this.providerId != that.providerId)
20785
          return false;
20786
      }
20787
 
20788
      return true;
20789
    }
20790
 
20791
    @Override
20792
    public int hashCode() {
20793
      return 0;
20794
    }
20795
 
20796
    public int compareTo(markOrdersAsManifested_args other) {
20797
      if (!getClass().equals(other.getClass())) {
20798
        return getClass().getName().compareTo(other.getClass().getName());
20799
      }
20800
 
20801
      int lastComparison = 0;
20802
      markOrdersAsManifested_args typedOther = (markOrdersAsManifested_args)other;
20803
 
20804
      lastComparison = Boolean.valueOf(isSetWarehouseId()).compareTo(isSetWarehouseId());
20805
      if (lastComparison != 0) {
20806
        return lastComparison;
20807
      }
20808
      lastComparison = TBaseHelper.compareTo(warehouseId, typedOther.warehouseId);
20809
      if (lastComparison != 0) {
20810
        return lastComparison;
20811
      }
20812
      lastComparison = Boolean.valueOf(isSetProviderId()).compareTo(isSetProviderId());
20813
      if (lastComparison != 0) {
20814
        return lastComparison;
20815
      }
20816
      lastComparison = TBaseHelper.compareTo(providerId, typedOther.providerId);
20817
      if (lastComparison != 0) {
20818
        return lastComparison;
20819
      }
20820
      return 0;
20821
    }
20822
 
20823
    public void read(TProtocol iprot) throws TException {
20824
      TField field;
20825
      iprot.readStructBegin();
20826
      while (true)
20827
      {
20828
        field = iprot.readFieldBegin();
20829
        if (field.type == TType.STOP) { 
20830
          break;
20831
        }
20832
        _Fields fieldId = _Fields.findByThriftId(field.id);
20833
        if (fieldId == null) {
20834
          TProtocolUtil.skip(iprot, field.type);
20835
        } else {
20836
          switch (fieldId) {
20837
            case WAREHOUSE_ID:
20838
              if (field.type == TType.I64) {
20839
                this.warehouseId = iprot.readI64();
20840
                setWarehouseIdIsSet(true);
20841
              } else { 
20842
                TProtocolUtil.skip(iprot, field.type);
20843
              }
20844
              break;
20845
            case PROVIDER_ID:
20846
              if (field.type == TType.I64) {
20847
                this.providerId = iprot.readI64();
20848
                setProviderIdIsSet(true);
20849
              } else { 
20850
                TProtocolUtil.skip(iprot, field.type);
20851
              }
20852
              break;
20853
          }
20854
          iprot.readFieldEnd();
20855
        }
20856
      }
20857
      iprot.readStructEnd();
20858
      validate();
20859
    }
20860
 
20861
    public void write(TProtocol oprot) throws TException {
20862
      validate();
20863
 
20864
      oprot.writeStructBegin(STRUCT_DESC);
20865
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
20866
      oprot.writeI64(this.warehouseId);
20867
      oprot.writeFieldEnd();
20868
      oprot.writeFieldBegin(PROVIDER_ID_FIELD_DESC);
20869
      oprot.writeI64(this.providerId);
20870
      oprot.writeFieldEnd();
20871
      oprot.writeFieldStop();
20872
      oprot.writeStructEnd();
20873
    }
20874
 
20875
    @Override
20876
    public String toString() {
20877
      StringBuilder sb = new StringBuilder("markOrdersAsManifested_args(");
20878
      boolean first = true;
20879
 
20880
      sb.append("warehouseId:");
20881
      sb.append(this.warehouseId);
20882
      first = false;
20883
      if (!first) sb.append(", ");
20884
      sb.append("providerId:");
20885
      sb.append(this.providerId);
20886
      first = false;
20887
      sb.append(")");
20888
      return sb.toString();
20889
    }
20890
 
20891
    public void validate() throws TException {
20892
      // check for required fields
20893
    }
20894
 
20895
  }
20896
 
20897
  public static class markOrdersAsManifested_result implements TBase<markOrdersAsManifested_result._Fields>, java.io.Serializable, Cloneable, Comparable<markOrdersAsManifested_result>   {
20898
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsManifested_result");
20899
 
20900
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
20901
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
20902
 
20903
    private boolean success;
20904
    private TransactionServiceException ex;
20905
 
20906
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
20907
    public enum _Fields implements TFieldIdEnum {
20908
      SUCCESS((short)0, "success"),
20909
      EX((short)1, "ex");
20910
 
20911
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
20912
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
20913
 
20914
      static {
20915
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
20916
          byId.put((int)field._thriftId, field);
20917
          byName.put(field.getFieldName(), field);
20918
        }
20919
      }
20920
 
20921
      /**
20922
       * Find the _Fields constant that matches fieldId, or null if its not found.
20923
       */
20924
      public static _Fields findByThriftId(int fieldId) {
20925
        return byId.get(fieldId);
20926
      }
20927
 
20928
      /**
20929
       * Find the _Fields constant that matches fieldId, throwing an exception
20930
       * if it is not found.
20931
       */
20932
      public static _Fields findByThriftIdOrThrow(int fieldId) {
20933
        _Fields fields = findByThriftId(fieldId);
20934
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
20935
        return fields;
20936
      }
20937
 
20938
      /**
20939
       * Find the _Fields constant that matches name, or null if its not found.
20940
       */
20941
      public static _Fields findByName(String name) {
20942
        return byName.get(name);
20943
      }
20944
 
20945
      private final short _thriftId;
20946
      private final String _fieldName;
20947
 
20948
      _Fields(short thriftId, String fieldName) {
20949
        _thriftId = thriftId;
20950
        _fieldName = fieldName;
20951
      }
20952
 
20953
      public short getThriftFieldId() {
20954
        return _thriftId;
20955
      }
20956
 
20957
      public String getFieldName() {
20958
        return _fieldName;
20959
      }
20960
    }
20961
 
20962
    // isset id assignments
20963
    private static final int __SUCCESS_ISSET_ID = 0;
20964
    private BitSet __isset_bit_vector = new BitSet(1);
20965
 
20966
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
20967
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
20968
          new FieldValueMetaData(TType.BOOL)));
20969
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
20970
          new FieldValueMetaData(TType.STRUCT)));
20971
    }});
20972
 
20973
    static {
20974
      FieldMetaData.addStructMetaDataMap(markOrdersAsManifested_result.class, metaDataMap);
20975
    }
20976
 
20977
    public markOrdersAsManifested_result() {
20978
    }
20979
 
20980
    public markOrdersAsManifested_result(
20981
      boolean success,
20982
      TransactionServiceException ex)
20983
    {
20984
      this();
20985
      this.success = success;
20986
      setSuccessIsSet(true);
20987
      this.ex = ex;
20988
    }
20989
 
20990
    /**
20991
     * Performs a deep copy on <i>other</i>.
20992
     */
20993
    public markOrdersAsManifested_result(markOrdersAsManifested_result other) {
20994
      __isset_bit_vector.clear();
20995
      __isset_bit_vector.or(other.__isset_bit_vector);
20996
      this.success = other.success;
20997
      if (other.isSetEx()) {
20998
        this.ex = new TransactionServiceException(other.ex);
20999
      }
21000
    }
21001
 
21002
    public markOrdersAsManifested_result deepCopy() {
21003
      return new markOrdersAsManifested_result(this);
21004
    }
21005
 
21006
    @Deprecated
21007
    public markOrdersAsManifested_result clone() {
21008
      return new markOrdersAsManifested_result(this);
21009
    }
21010
 
21011
    public boolean isSuccess() {
21012
      return this.success;
21013
    }
21014
 
21015
    public markOrdersAsManifested_result setSuccess(boolean success) {
21016
      this.success = success;
21017
      setSuccessIsSet(true);
21018
      return this;
21019
    }
21020
 
21021
    public void unsetSuccess() {
21022
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
21023
    }
21024
 
21025
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
21026
    public boolean isSetSuccess() {
21027
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
21028
    }
21029
 
21030
    public void setSuccessIsSet(boolean value) {
21031
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
21032
    }
21033
 
21034
    public TransactionServiceException getEx() {
21035
      return this.ex;
21036
    }
21037
 
21038
    public markOrdersAsManifested_result setEx(TransactionServiceException ex) {
21039
      this.ex = ex;
21040
      return this;
21041
    }
21042
 
21043
    public void unsetEx() {
21044
      this.ex = null;
21045
    }
21046
 
21047
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
21048
    public boolean isSetEx() {
21049
      return this.ex != null;
21050
    }
21051
 
21052
    public void setExIsSet(boolean value) {
21053
      if (!value) {
21054
        this.ex = null;
21055
      }
21056
    }
21057
 
21058
    public void setFieldValue(_Fields field, Object value) {
21059
      switch (field) {
21060
      case SUCCESS:
21061
        if (value == null) {
21062
          unsetSuccess();
21063
        } else {
21064
          setSuccess((Boolean)value);
21065
        }
21066
        break;
21067
 
21068
      case EX:
21069
        if (value == null) {
21070
          unsetEx();
21071
        } else {
21072
          setEx((TransactionServiceException)value);
21073
        }
21074
        break;
21075
 
21076
      }
21077
    }
21078
 
21079
    public void setFieldValue(int fieldID, Object value) {
21080
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
21081
    }
21082
 
21083
    public Object getFieldValue(_Fields field) {
21084
      switch (field) {
21085
      case SUCCESS:
21086
        return new Boolean(isSuccess());
21087
 
21088
      case EX:
21089
        return getEx();
21090
 
21091
      }
21092
      throw new IllegalStateException();
21093
    }
21094
 
21095
    public Object getFieldValue(int fieldId) {
21096
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
21097
    }
21098
 
21099
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
21100
    public boolean isSet(_Fields field) {
21101
      switch (field) {
21102
      case SUCCESS:
21103
        return isSetSuccess();
21104
      case EX:
21105
        return isSetEx();
21106
      }
21107
      throw new IllegalStateException();
21108
    }
21109
 
21110
    public boolean isSet(int fieldID) {
21111
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
21112
    }
21113
 
21114
    @Override
21115
    public boolean equals(Object that) {
21116
      if (that == null)
21117
        return false;
21118
      if (that instanceof markOrdersAsManifested_result)
21119
        return this.equals((markOrdersAsManifested_result)that);
21120
      return false;
21121
    }
21122
 
21123
    public boolean equals(markOrdersAsManifested_result that) {
21124
      if (that == null)
21125
        return false;
21126
 
21127
      boolean this_present_success = true;
21128
      boolean that_present_success = true;
21129
      if (this_present_success || that_present_success) {
21130
        if (!(this_present_success && that_present_success))
21131
          return false;
21132
        if (this.success != that.success)
21133
          return false;
21134
      }
21135
 
21136
      boolean this_present_ex = true && this.isSetEx();
21137
      boolean that_present_ex = true && that.isSetEx();
21138
      if (this_present_ex || that_present_ex) {
21139
        if (!(this_present_ex && that_present_ex))
21140
          return false;
21141
        if (!this.ex.equals(that.ex))
21142
          return false;
21143
      }
21144
 
21145
      return true;
21146
    }
21147
 
21148
    @Override
21149
    public int hashCode() {
21150
      return 0;
21151
    }
21152
 
21153
    public int compareTo(markOrdersAsManifested_result other) {
21154
      if (!getClass().equals(other.getClass())) {
21155
        return getClass().getName().compareTo(other.getClass().getName());
21156
      }
21157
 
21158
      int lastComparison = 0;
21159
      markOrdersAsManifested_result typedOther = (markOrdersAsManifested_result)other;
21160
 
21161
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
21162
      if (lastComparison != 0) {
21163
        return lastComparison;
21164
      }
21165
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
21166
      if (lastComparison != 0) {
21167
        return lastComparison;
21168
      }
21169
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
21170
      if (lastComparison != 0) {
21171
        return lastComparison;
21172
      }
21173
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
21174
      if (lastComparison != 0) {
21175
        return lastComparison;
21176
      }
21177
      return 0;
21178
    }
21179
 
21180
    public void read(TProtocol iprot) throws TException {
21181
      TField field;
21182
      iprot.readStructBegin();
21183
      while (true)
21184
      {
21185
        field = iprot.readFieldBegin();
21186
        if (field.type == TType.STOP) { 
21187
          break;
21188
        }
21189
        _Fields fieldId = _Fields.findByThriftId(field.id);
21190
        if (fieldId == null) {
21191
          TProtocolUtil.skip(iprot, field.type);
21192
        } else {
21193
          switch (fieldId) {
21194
            case SUCCESS:
21195
              if (field.type == TType.BOOL) {
21196
                this.success = iprot.readBool();
21197
                setSuccessIsSet(true);
21198
              } else { 
21199
                TProtocolUtil.skip(iprot, field.type);
21200
              }
21201
              break;
21202
            case EX:
21203
              if (field.type == TType.STRUCT) {
21204
                this.ex = new TransactionServiceException();
21205
                this.ex.read(iprot);
21206
              } else { 
21207
                TProtocolUtil.skip(iprot, field.type);
21208
              }
21209
              break;
21210
          }
21211
          iprot.readFieldEnd();
21212
        }
21213
      }
21214
      iprot.readStructEnd();
21215
      validate();
21216
    }
21217
 
21218
    public void write(TProtocol oprot) throws TException {
21219
      oprot.writeStructBegin(STRUCT_DESC);
21220
 
21221
      if (this.isSetSuccess()) {
21222
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
21223
        oprot.writeBool(this.success);
21224
        oprot.writeFieldEnd();
21225
      } else if (this.isSetEx()) {
21226
        oprot.writeFieldBegin(EX_FIELD_DESC);
21227
        this.ex.write(oprot);
21228
        oprot.writeFieldEnd();
21229
      }
21230
      oprot.writeFieldStop();
21231
      oprot.writeStructEnd();
21232
    }
21233
 
21234
    @Override
21235
    public String toString() {
21236
      StringBuilder sb = new StringBuilder("markOrdersAsManifested_result(");
21237
      boolean first = true;
21238
 
21239
      sb.append("success:");
21240
      sb.append(this.success);
21241
      first = false;
21242
      if (!first) sb.append(", ");
21243
      sb.append("ex:");
21244
      if (this.ex == null) {
21245
        sb.append("null");
21246
      } else {
21247
        sb.append(this.ex);
21248
      }
21249
      first = false;
21250
      sb.append(")");
21251
      return sb.toString();
21252
    }
21253
 
21254
    public void validate() throws TException {
21255
      // check for required fields
21256
    }
21257
 
21258
  }
21259
 
1114 chandransh 21260
  public static class markOrdersAsPickedUp_args implements TBase<markOrdersAsPickedUp_args._Fields>, java.io.Serializable, Cloneable   {
21261
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsPickedUp_args");
21262
 
21263
    private static final TField PROVIDER_ID_FIELD_DESC = new TField("providerId", TType.I64, (short)1);
21264
    private static final TField PICKUP_DETAILS_FIELD_DESC = new TField("pickupDetails", TType.MAP, (short)2);
21265
 
21266
    private long providerId;
1245 chandransh 21267
    private Map<String,String> pickupDetails;
1114 chandransh 21268
 
21269
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
21270
    public enum _Fields implements TFieldIdEnum {
21271
      PROVIDER_ID((short)1, "providerId"),
21272
      PICKUP_DETAILS((short)2, "pickupDetails");
21273
 
21274
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
21275
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
21276
 
21277
      static {
21278
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
21279
          byId.put((int)field._thriftId, field);
21280
          byName.put(field.getFieldName(), field);
21281
        }
21282
      }
21283
 
21284
      /**
21285
       * Find the _Fields constant that matches fieldId, or null if its not found.
21286
       */
21287
      public static _Fields findByThriftId(int fieldId) {
21288
        return byId.get(fieldId);
21289
      }
21290
 
21291
      /**
21292
       * Find the _Fields constant that matches fieldId, throwing an exception
21293
       * if it is not found.
21294
       */
21295
      public static _Fields findByThriftIdOrThrow(int fieldId) {
21296
        _Fields fields = findByThriftId(fieldId);
21297
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
21298
        return fields;
21299
      }
21300
 
21301
      /**
21302
       * Find the _Fields constant that matches name, or null if its not found.
21303
       */
21304
      public static _Fields findByName(String name) {
21305
        return byName.get(name);
21306
      }
21307
 
21308
      private final short _thriftId;
21309
      private final String _fieldName;
21310
 
21311
      _Fields(short thriftId, String fieldName) {
21312
        _thriftId = thriftId;
21313
        _fieldName = fieldName;
21314
      }
21315
 
21316
      public short getThriftFieldId() {
21317
        return _thriftId;
21318
      }
21319
 
21320
      public String getFieldName() {
21321
        return _fieldName;
21322
      }
21323
    }
21324
 
21325
    // isset id assignments
21326
    private static final int __PROVIDERID_ISSET_ID = 0;
21327
    private BitSet __isset_bit_vector = new BitSet(1);
21328
 
21329
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
21330
      put(_Fields.PROVIDER_ID, new FieldMetaData("providerId", TFieldRequirementType.DEFAULT, 
21331
          new FieldValueMetaData(TType.I64)));
21332
      put(_Fields.PICKUP_DETAILS, new FieldMetaData("pickupDetails", TFieldRequirementType.DEFAULT, 
21333
          new MapMetaData(TType.MAP, 
21334
              new FieldValueMetaData(TType.STRING), 
1245 chandransh 21335
              new FieldValueMetaData(TType.STRING))));
1114 chandransh 21336
    }});
21337
 
21338
    static {
21339
      FieldMetaData.addStructMetaDataMap(markOrdersAsPickedUp_args.class, metaDataMap);
21340
    }
21341
 
21342
    public markOrdersAsPickedUp_args() {
21343
    }
21344
 
21345
    public markOrdersAsPickedUp_args(
21346
      long providerId,
1245 chandransh 21347
      Map<String,String> pickupDetails)
1114 chandransh 21348
    {
21349
      this();
21350
      this.providerId = providerId;
21351
      setProviderIdIsSet(true);
21352
      this.pickupDetails = pickupDetails;
21353
    }
21354
 
21355
    /**
21356
     * Performs a deep copy on <i>other</i>.
21357
     */
21358
    public markOrdersAsPickedUp_args(markOrdersAsPickedUp_args other) {
21359
      __isset_bit_vector.clear();
21360
      __isset_bit_vector.or(other.__isset_bit_vector);
21361
      this.providerId = other.providerId;
21362
      if (other.isSetPickupDetails()) {
1245 chandransh 21363
        Map<String,String> __this__pickupDetails = new HashMap<String,String>();
21364
        for (Map.Entry<String, String> other_element : other.pickupDetails.entrySet()) {
1114 chandransh 21365
 
21366
          String other_element_key = other_element.getKey();
1245 chandransh 21367
          String other_element_value = other_element.getValue();
1114 chandransh 21368
 
21369
          String __this__pickupDetails_copy_key = other_element_key;
21370
 
1245 chandransh 21371
          String __this__pickupDetails_copy_value = other_element_value;
1114 chandransh 21372
 
21373
          __this__pickupDetails.put(__this__pickupDetails_copy_key, __this__pickupDetails_copy_value);
21374
        }
21375
        this.pickupDetails = __this__pickupDetails;
21376
      }
21377
    }
21378
 
21379
    public markOrdersAsPickedUp_args deepCopy() {
21380
      return new markOrdersAsPickedUp_args(this);
21381
    }
21382
 
21383
    @Deprecated
21384
    public markOrdersAsPickedUp_args clone() {
21385
      return new markOrdersAsPickedUp_args(this);
21386
    }
21387
 
21388
    public long getProviderId() {
21389
      return this.providerId;
21390
    }
21391
 
21392
    public markOrdersAsPickedUp_args setProviderId(long providerId) {
21393
      this.providerId = providerId;
21394
      setProviderIdIsSet(true);
21395
      return this;
21396
    }
21397
 
21398
    public void unsetProviderId() {
21399
      __isset_bit_vector.clear(__PROVIDERID_ISSET_ID);
21400
    }
21401
 
21402
    /** Returns true if field providerId is set (has been asigned a value) and false otherwise */
21403
    public boolean isSetProviderId() {
21404
      return __isset_bit_vector.get(__PROVIDERID_ISSET_ID);
21405
    }
21406
 
21407
    public void setProviderIdIsSet(boolean value) {
21408
      __isset_bit_vector.set(__PROVIDERID_ISSET_ID, value);
21409
    }
21410
 
21411
    public int getPickupDetailsSize() {
21412
      return (this.pickupDetails == null) ? 0 : this.pickupDetails.size();
21413
    }
21414
 
1245 chandransh 21415
    public void putToPickupDetails(String key, String val) {
1114 chandransh 21416
      if (this.pickupDetails == null) {
1245 chandransh 21417
        this.pickupDetails = new HashMap<String,String>();
1114 chandransh 21418
      }
21419
      this.pickupDetails.put(key, val);
21420
    }
21421
 
1245 chandransh 21422
    public Map<String,String> getPickupDetails() {
1114 chandransh 21423
      return this.pickupDetails;
21424
    }
21425
 
1245 chandransh 21426
    public markOrdersAsPickedUp_args setPickupDetails(Map<String,String> pickupDetails) {
1114 chandransh 21427
      this.pickupDetails = pickupDetails;
21428
      return this;
21429
    }
21430
 
21431
    public void unsetPickupDetails() {
21432
      this.pickupDetails = null;
21433
    }
21434
 
21435
    /** Returns true if field pickupDetails is set (has been asigned a value) and false otherwise */
21436
    public boolean isSetPickupDetails() {
21437
      return this.pickupDetails != null;
21438
    }
21439
 
21440
    public void setPickupDetailsIsSet(boolean value) {
21441
      if (!value) {
21442
        this.pickupDetails = null;
21443
      }
21444
    }
21445
 
21446
    public void setFieldValue(_Fields field, Object value) {
21447
      switch (field) {
21448
      case PROVIDER_ID:
21449
        if (value == null) {
21450
          unsetProviderId();
21451
        } else {
21452
          setProviderId((Long)value);
21453
        }
21454
        break;
21455
 
21456
      case PICKUP_DETAILS:
21457
        if (value == null) {
21458
          unsetPickupDetails();
21459
        } else {
1245 chandransh 21460
          setPickupDetails((Map<String,String>)value);
1114 chandransh 21461
        }
21462
        break;
21463
 
21464
      }
21465
    }
21466
 
21467
    public void setFieldValue(int fieldID, Object value) {
21468
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
21469
    }
21470
 
21471
    public Object getFieldValue(_Fields field) {
21472
      switch (field) {
21473
      case PROVIDER_ID:
21474
        return new Long(getProviderId());
21475
 
21476
      case PICKUP_DETAILS:
21477
        return getPickupDetails();
21478
 
21479
      }
21480
      throw new IllegalStateException();
21481
    }
21482
 
21483
    public Object getFieldValue(int fieldId) {
21484
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
21485
    }
21486
 
21487
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
21488
    public boolean isSet(_Fields field) {
21489
      switch (field) {
21490
      case PROVIDER_ID:
21491
        return isSetProviderId();
21492
      case PICKUP_DETAILS:
21493
        return isSetPickupDetails();
21494
      }
21495
      throw new IllegalStateException();
21496
    }
21497
 
21498
    public boolean isSet(int fieldID) {
21499
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
21500
    }
21501
 
21502
    @Override
21503
    public boolean equals(Object that) {
21504
      if (that == null)
21505
        return false;
21506
      if (that instanceof markOrdersAsPickedUp_args)
21507
        return this.equals((markOrdersAsPickedUp_args)that);
21508
      return false;
21509
    }
21510
 
21511
    public boolean equals(markOrdersAsPickedUp_args that) {
21512
      if (that == null)
21513
        return false;
21514
 
21515
      boolean this_present_providerId = true;
21516
      boolean that_present_providerId = true;
21517
      if (this_present_providerId || that_present_providerId) {
21518
        if (!(this_present_providerId && that_present_providerId))
21519
          return false;
21520
        if (this.providerId != that.providerId)
21521
          return false;
21522
      }
21523
 
21524
      boolean this_present_pickupDetails = true && this.isSetPickupDetails();
21525
      boolean that_present_pickupDetails = true && that.isSetPickupDetails();
21526
      if (this_present_pickupDetails || that_present_pickupDetails) {
21527
        if (!(this_present_pickupDetails && that_present_pickupDetails))
21528
          return false;
21529
        if (!this.pickupDetails.equals(that.pickupDetails))
21530
          return false;
21531
      }
21532
 
21533
      return true;
21534
    }
21535
 
21536
    @Override
21537
    public int hashCode() {
21538
      return 0;
21539
    }
21540
 
21541
    public void read(TProtocol iprot) throws TException {
21542
      TField field;
21543
      iprot.readStructBegin();
21544
      while (true)
21545
      {
21546
        field = iprot.readFieldBegin();
21547
        if (field.type == TType.STOP) { 
21548
          break;
21549
        }
21550
        _Fields fieldId = _Fields.findByThriftId(field.id);
21551
        if (fieldId == null) {
21552
          TProtocolUtil.skip(iprot, field.type);
21553
        } else {
21554
          switch (fieldId) {
21555
            case PROVIDER_ID:
21556
              if (field.type == TType.I64) {
21557
                this.providerId = iprot.readI64();
21558
                setProviderIdIsSet(true);
21559
              } else { 
21560
                TProtocolUtil.skip(iprot, field.type);
21561
              }
21562
              break;
21563
            case PICKUP_DETAILS:
21564
              if (field.type == TType.MAP) {
21565
                {
1382 varun.gupt 21566
                  TMap _map48 = iprot.readMapBegin();
21567
                  this.pickupDetails = new HashMap<String,String>(2*_map48.size);
21568
                  for (int _i49 = 0; _i49 < _map48.size; ++_i49)
1114 chandransh 21569
                  {
1382 varun.gupt 21570
                    String _key50;
21571
                    String _val51;
21572
                    _key50 = iprot.readString();
21573
                    _val51 = iprot.readString();
21574
                    this.pickupDetails.put(_key50, _val51);
1114 chandransh 21575
                  }
21576
                  iprot.readMapEnd();
21577
                }
21578
              } else { 
21579
                TProtocolUtil.skip(iprot, field.type);
21580
              }
21581
              break;
21582
          }
21583
          iprot.readFieldEnd();
21584
        }
21585
      }
21586
      iprot.readStructEnd();
21587
      validate();
21588
    }
21589
 
21590
    public void write(TProtocol oprot) throws TException {
21591
      validate();
21592
 
21593
      oprot.writeStructBegin(STRUCT_DESC);
21594
      oprot.writeFieldBegin(PROVIDER_ID_FIELD_DESC);
21595
      oprot.writeI64(this.providerId);
21596
      oprot.writeFieldEnd();
21597
      if (this.pickupDetails != null) {
21598
        oprot.writeFieldBegin(PICKUP_DETAILS_FIELD_DESC);
21599
        {
1245 chandransh 21600
          oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.pickupDetails.size()));
1382 varun.gupt 21601
          for (Map.Entry<String, String> _iter52 : this.pickupDetails.entrySet())
1114 chandransh 21602
          {
1382 varun.gupt 21603
            oprot.writeString(_iter52.getKey());
21604
            oprot.writeString(_iter52.getValue());
1114 chandransh 21605
          }
21606
          oprot.writeMapEnd();
21607
        }
21608
        oprot.writeFieldEnd();
21609
      }
21610
      oprot.writeFieldStop();
21611
      oprot.writeStructEnd();
21612
    }
21613
 
21614
    @Override
21615
    public String toString() {
21616
      StringBuilder sb = new StringBuilder("markOrdersAsPickedUp_args(");
21617
      boolean first = true;
21618
 
21619
      sb.append("providerId:");
21620
      sb.append(this.providerId);
21621
      first = false;
21622
      if (!first) sb.append(", ");
21623
      sb.append("pickupDetails:");
21624
      if (this.pickupDetails == null) {
21625
        sb.append("null");
21626
      } else {
21627
        sb.append(this.pickupDetails);
21628
      }
21629
      first = false;
21630
      sb.append(")");
21631
      return sb.toString();
21632
    }
21633
 
21634
    public void validate() throws TException {
21635
      // check for required fields
21636
    }
21637
 
21638
  }
21639
 
21640
  public static class markOrdersAsPickedUp_result implements TBase<markOrdersAsPickedUp_result._Fields>, java.io.Serializable, Cloneable, Comparable<markOrdersAsPickedUp_result>   {
21641
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsPickedUp_result");
21642
 
21643
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
21644
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
21645
 
21646
    private List<Order> success;
21647
    private TransactionServiceException ex;
21648
 
21649
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
21650
    public enum _Fields implements TFieldIdEnum {
21651
      SUCCESS((short)0, "success"),
21652
      EX((short)1, "ex");
21653
 
21654
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
21655
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
21656
 
21657
      static {
21658
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
21659
          byId.put((int)field._thriftId, field);
21660
          byName.put(field.getFieldName(), field);
21661
        }
21662
      }
21663
 
21664
      /**
21665
       * Find the _Fields constant that matches fieldId, or null if its not found.
21666
       */
21667
      public static _Fields findByThriftId(int fieldId) {
21668
        return byId.get(fieldId);
21669
      }
21670
 
21671
      /**
21672
       * Find the _Fields constant that matches fieldId, throwing an exception
21673
       * if it is not found.
21674
       */
21675
      public static _Fields findByThriftIdOrThrow(int fieldId) {
21676
        _Fields fields = findByThriftId(fieldId);
21677
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
21678
        return fields;
21679
      }
21680
 
21681
      /**
21682
       * Find the _Fields constant that matches name, or null if its not found.
21683
       */
21684
      public static _Fields findByName(String name) {
21685
        return byName.get(name);
21686
      }
21687
 
21688
      private final short _thriftId;
21689
      private final String _fieldName;
21690
 
21691
      _Fields(short thriftId, String fieldName) {
21692
        _thriftId = thriftId;
21693
        _fieldName = fieldName;
21694
      }
21695
 
21696
      public short getThriftFieldId() {
21697
        return _thriftId;
21698
      }
21699
 
21700
      public String getFieldName() {
21701
        return _fieldName;
21702
      }
21703
    }
21704
 
21705
    // isset id assignments
21706
 
21707
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
21708
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
21709
          new ListMetaData(TType.LIST, 
21710
              new StructMetaData(TType.STRUCT, Order.class))));
21711
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
21712
          new FieldValueMetaData(TType.STRUCT)));
21713
    }});
21714
 
21715
    static {
21716
      FieldMetaData.addStructMetaDataMap(markOrdersAsPickedUp_result.class, metaDataMap);
21717
    }
21718
 
21719
    public markOrdersAsPickedUp_result() {
21720
    }
21721
 
21722
    public markOrdersAsPickedUp_result(
21723
      List<Order> success,
21724
      TransactionServiceException ex)
21725
    {
21726
      this();
21727
      this.success = success;
21728
      this.ex = ex;
21729
    }
21730
 
21731
    /**
21732
     * Performs a deep copy on <i>other</i>.
21733
     */
21734
    public markOrdersAsPickedUp_result(markOrdersAsPickedUp_result other) {
21735
      if (other.isSetSuccess()) {
21736
        List<Order> __this__success = new ArrayList<Order>();
21737
        for (Order other_element : other.success) {
21738
          __this__success.add(new Order(other_element));
21739
        }
21740
        this.success = __this__success;
21741
      }
21742
      if (other.isSetEx()) {
21743
        this.ex = new TransactionServiceException(other.ex);
21744
      }
21745
    }
21746
 
21747
    public markOrdersAsPickedUp_result deepCopy() {
21748
      return new markOrdersAsPickedUp_result(this);
21749
    }
21750
 
21751
    @Deprecated
21752
    public markOrdersAsPickedUp_result clone() {
21753
      return new markOrdersAsPickedUp_result(this);
21754
    }
21755
 
21756
    public int getSuccessSize() {
21757
      return (this.success == null) ? 0 : this.success.size();
21758
    }
21759
 
21760
    public java.util.Iterator<Order> getSuccessIterator() {
21761
      return (this.success == null) ? null : this.success.iterator();
21762
    }
21763
 
21764
    public void addToSuccess(Order elem) {
21765
      if (this.success == null) {
21766
        this.success = new ArrayList<Order>();
21767
      }
21768
      this.success.add(elem);
21769
    }
21770
 
21771
    public List<Order> getSuccess() {
21772
      return this.success;
21773
    }
21774
 
21775
    public markOrdersAsPickedUp_result setSuccess(List<Order> success) {
21776
      this.success = success;
21777
      return this;
21778
    }
21779
 
21780
    public void unsetSuccess() {
21781
      this.success = null;
21782
    }
21783
 
21784
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
21785
    public boolean isSetSuccess() {
21786
      return this.success != null;
21787
    }
21788
 
21789
    public void setSuccessIsSet(boolean value) {
21790
      if (!value) {
21791
        this.success = null;
21792
      }
21793
    }
21794
 
21795
    public TransactionServiceException getEx() {
21796
      return this.ex;
21797
    }
21798
 
21799
    public markOrdersAsPickedUp_result setEx(TransactionServiceException ex) {
21800
      this.ex = ex;
21801
      return this;
21802
    }
21803
 
21804
    public void unsetEx() {
21805
      this.ex = null;
21806
    }
21807
 
21808
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
21809
    public boolean isSetEx() {
21810
      return this.ex != null;
21811
    }
21812
 
21813
    public void setExIsSet(boolean value) {
21814
      if (!value) {
21815
        this.ex = null;
21816
      }
21817
    }
21818
 
21819
    public void setFieldValue(_Fields field, Object value) {
21820
      switch (field) {
21821
      case SUCCESS:
21822
        if (value == null) {
21823
          unsetSuccess();
21824
        } else {
21825
          setSuccess((List<Order>)value);
21826
        }
21827
        break;
21828
 
21829
      case EX:
21830
        if (value == null) {
21831
          unsetEx();
21832
        } else {
21833
          setEx((TransactionServiceException)value);
21834
        }
21835
        break;
21836
 
21837
      }
21838
    }
21839
 
21840
    public void setFieldValue(int fieldID, Object value) {
21841
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
21842
    }
21843
 
21844
    public Object getFieldValue(_Fields field) {
21845
      switch (field) {
21846
      case SUCCESS:
21847
        return getSuccess();
21848
 
21849
      case EX:
21850
        return getEx();
21851
 
21852
      }
21853
      throw new IllegalStateException();
21854
    }
21855
 
21856
    public Object getFieldValue(int fieldId) {
21857
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
21858
    }
21859
 
21860
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
21861
    public boolean isSet(_Fields field) {
21862
      switch (field) {
21863
      case SUCCESS:
21864
        return isSetSuccess();
21865
      case EX:
21866
        return isSetEx();
21867
      }
21868
      throw new IllegalStateException();
21869
    }
21870
 
21871
    public boolean isSet(int fieldID) {
21872
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
21873
    }
21874
 
21875
    @Override
21876
    public boolean equals(Object that) {
21877
      if (that == null)
21878
        return false;
21879
      if (that instanceof markOrdersAsPickedUp_result)
21880
        return this.equals((markOrdersAsPickedUp_result)that);
21881
      return false;
21882
    }
21883
 
21884
    public boolean equals(markOrdersAsPickedUp_result that) {
21885
      if (that == null)
21886
        return false;
21887
 
21888
      boolean this_present_success = true && this.isSetSuccess();
21889
      boolean that_present_success = true && that.isSetSuccess();
21890
      if (this_present_success || that_present_success) {
21891
        if (!(this_present_success && that_present_success))
21892
          return false;
21893
        if (!this.success.equals(that.success))
21894
          return false;
21895
      }
21896
 
21897
      boolean this_present_ex = true && this.isSetEx();
21898
      boolean that_present_ex = true && that.isSetEx();
21899
      if (this_present_ex || that_present_ex) {
21900
        if (!(this_present_ex && that_present_ex))
21901
          return false;
21902
        if (!this.ex.equals(that.ex))
21903
          return false;
21904
      }
21905
 
21906
      return true;
21907
    }
21908
 
21909
    @Override
21910
    public int hashCode() {
21911
      return 0;
21912
    }
21913
 
21914
    public int compareTo(markOrdersAsPickedUp_result other) {
21915
      if (!getClass().equals(other.getClass())) {
21916
        return getClass().getName().compareTo(other.getClass().getName());
21917
      }
21918
 
21919
      int lastComparison = 0;
21920
      markOrdersAsPickedUp_result typedOther = (markOrdersAsPickedUp_result)other;
21921
 
21922
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
21923
      if (lastComparison != 0) {
21924
        return lastComparison;
21925
      }
21926
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
21927
      if (lastComparison != 0) {
21928
        return lastComparison;
21929
      }
21930
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
21931
      if (lastComparison != 0) {
21932
        return lastComparison;
21933
      }
21934
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
21935
      if (lastComparison != 0) {
21936
        return lastComparison;
21937
      }
21938
      return 0;
21939
    }
21940
 
21941
    public void read(TProtocol iprot) throws TException {
21942
      TField field;
21943
      iprot.readStructBegin();
21944
      while (true)
21945
      {
21946
        field = iprot.readFieldBegin();
21947
        if (field.type == TType.STOP) { 
21948
          break;
21949
        }
21950
        _Fields fieldId = _Fields.findByThriftId(field.id);
21951
        if (fieldId == null) {
21952
          TProtocolUtil.skip(iprot, field.type);
21953
        } else {
21954
          switch (fieldId) {
21955
            case SUCCESS:
21956
              if (field.type == TType.LIST) {
21957
                {
1382 varun.gupt 21958
                  TList _list53 = iprot.readListBegin();
21959
                  this.success = new ArrayList<Order>(_list53.size);
21960
                  for (int _i54 = 0; _i54 < _list53.size; ++_i54)
1114 chandransh 21961
                  {
1382 varun.gupt 21962
                    Order _elem55;
21963
                    _elem55 = new Order();
21964
                    _elem55.read(iprot);
21965
                    this.success.add(_elem55);
1114 chandransh 21966
                  }
21967
                  iprot.readListEnd();
21968
                }
21969
              } else { 
21970
                TProtocolUtil.skip(iprot, field.type);
21971
              }
21972
              break;
21973
            case EX:
21974
              if (field.type == TType.STRUCT) {
21975
                this.ex = new TransactionServiceException();
21976
                this.ex.read(iprot);
21977
              } else { 
21978
                TProtocolUtil.skip(iprot, field.type);
21979
              }
21980
              break;
21981
          }
21982
          iprot.readFieldEnd();
21983
        }
21984
      }
21985
      iprot.readStructEnd();
21986
      validate();
21987
    }
21988
 
21989
    public void write(TProtocol oprot) throws TException {
21990
      oprot.writeStructBegin(STRUCT_DESC);
21991
 
21992
      if (this.isSetSuccess()) {
21993
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
21994
        {
21995
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
1382 varun.gupt 21996
          for (Order _iter56 : this.success)
1114 chandransh 21997
          {
1382 varun.gupt 21998
            _iter56.write(oprot);
1114 chandransh 21999
          }
22000
          oprot.writeListEnd();
22001
        }
22002
        oprot.writeFieldEnd();
22003
      } else if (this.isSetEx()) {
22004
        oprot.writeFieldBegin(EX_FIELD_DESC);
22005
        this.ex.write(oprot);
22006
        oprot.writeFieldEnd();
22007
      }
22008
      oprot.writeFieldStop();
22009
      oprot.writeStructEnd();
22010
    }
22011
 
22012
    @Override
22013
    public String toString() {
22014
      StringBuilder sb = new StringBuilder("markOrdersAsPickedUp_result(");
22015
      boolean first = true;
22016
 
22017
      sb.append("success:");
22018
      if (this.success == null) {
22019
        sb.append("null");
22020
      } else {
22021
        sb.append(this.success);
22022
      }
22023
      first = false;
22024
      if (!first) sb.append(", ");
22025
      sb.append("ex:");
22026
      if (this.ex == null) {
22027
        sb.append("null");
22028
      } else {
22029
        sb.append(this.ex);
22030
      }
22031
      first = false;
22032
      sb.append(")");
22033
      return sb.toString();
22034
    }
22035
 
22036
    public void validate() throws TException {
22037
      // check for required fields
22038
    }
22039
 
22040
  }
22041
 
1133 chandransh 22042
  public static class markOrdersAsDelivered_args implements TBase<markOrdersAsDelivered_args._Fields>, java.io.Serializable, Cloneable   {
22043
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsDelivered_args");
22044
 
22045
    private static final TField PROVIDER_ID_FIELD_DESC = new TField("providerId", TType.I64, (short)1);
22046
    private static final TField DELIVERED_ORDERS_FIELD_DESC = new TField("deliveredOrders", TType.MAP, (short)2);
22047
 
22048
    private long providerId;
22049
    private Map<String,String> deliveredOrders;
22050
 
22051
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
22052
    public enum _Fields implements TFieldIdEnum {
22053
      PROVIDER_ID((short)1, "providerId"),
22054
      DELIVERED_ORDERS((short)2, "deliveredOrders");
22055
 
22056
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
22057
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
22058
 
22059
      static {
22060
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
22061
          byId.put((int)field._thriftId, field);
22062
          byName.put(field.getFieldName(), field);
22063
        }
22064
      }
22065
 
22066
      /**
22067
       * Find the _Fields constant that matches fieldId, or null if its not found.
22068
       */
22069
      public static _Fields findByThriftId(int fieldId) {
22070
        return byId.get(fieldId);
22071
      }
22072
 
22073
      /**
22074
       * Find the _Fields constant that matches fieldId, throwing an exception
22075
       * if it is not found.
22076
       */
22077
      public static _Fields findByThriftIdOrThrow(int fieldId) {
22078
        _Fields fields = findByThriftId(fieldId);
22079
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
22080
        return fields;
22081
      }
22082
 
22083
      /**
22084
       * Find the _Fields constant that matches name, or null if its not found.
22085
       */
22086
      public static _Fields findByName(String name) {
22087
        return byName.get(name);
22088
      }
22089
 
22090
      private final short _thriftId;
22091
      private final String _fieldName;
22092
 
22093
      _Fields(short thriftId, String fieldName) {
22094
        _thriftId = thriftId;
22095
        _fieldName = fieldName;
22096
      }
22097
 
22098
      public short getThriftFieldId() {
22099
        return _thriftId;
22100
      }
22101
 
22102
      public String getFieldName() {
22103
        return _fieldName;
22104
      }
22105
    }
22106
 
22107
    // isset id assignments
22108
    private static final int __PROVIDERID_ISSET_ID = 0;
22109
    private BitSet __isset_bit_vector = new BitSet(1);
22110
 
22111
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
22112
      put(_Fields.PROVIDER_ID, new FieldMetaData("providerId", TFieldRequirementType.DEFAULT, 
22113
          new FieldValueMetaData(TType.I64)));
22114
      put(_Fields.DELIVERED_ORDERS, new FieldMetaData("deliveredOrders", TFieldRequirementType.DEFAULT, 
22115
          new MapMetaData(TType.MAP, 
22116
              new FieldValueMetaData(TType.STRING), 
22117
              new FieldValueMetaData(TType.STRING))));
22118
    }});
22119
 
22120
    static {
22121
      FieldMetaData.addStructMetaDataMap(markOrdersAsDelivered_args.class, metaDataMap);
22122
    }
22123
 
22124
    public markOrdersAsDelivered_args() {
22125
    }
22126
 
22127
    public markOrdersAsDelivered_args(
22128
      long providerId,
22129
      Map<String,String> deliveredOrders)
22130
    {
22131
      this();
22132
      this.providerId = providerId;
22133
      setProviderIdIsSet(true);
22134
      this.deliveredOrders = deliveredOrders;
22135
    }
22136
 
22137
    /**
22138
     * Performs a deep copy on <i>other</i>.
22139
     */
22140
    public markOrdersAsDelivered_args(markOrdersAsDelivered_args other) {
22141
      __isset_bit_vector.clear();
22142
      __isset_bit_vector.or(other.__isset_bit_vector);
22143
      this.providerId = other.providerId;
22144
      if (other.isSetDeliveredOrders()) {
22145
        Map<String,String> __this__deliveredOrders = new HashMap<String,String>();
22146
        for (Map.Entry<String, String> other_element : other.deliveredOrders.entrySet()) {
22147
 
22148
          String other_element_key = other_element.getKey();
22149
          String other_element_value = other_element.getValue();
22150
 
22151
          String __this__deliveredOrders_copy_key = other_element_key;
22152
 
22153
          String __this__deliveredOrders_copy_value = other_element_value;
22154
 
22155
          __this__deliveredOrders.put(__this__deliveredOrders_copy_key, __this__deliveredOrders_copy_value);
22156
        }
22157
        this.deliveredOrders = __this__deliveredOrders;
22158
      }
22159
    }
22160
 
22161
    public markOrdersAsDelivered_args deepCopy() {
22162
      return new markOrdersAsDelivered_args(this);
22163
    }
22164
 
22165
    @Deprecated
22166
    public markOrdersAsDelivered_args clone() {
22167
      return new markOrdersAsDelivered_args(this);
22168
    }
22169
 
22170
    public long getProviderId() {
22171
      return this.providerId;
22172
    }
22173
 
22174
    public markOrdersAsDelivered_args setProviderId(long providerId) {
22175
      this.providerId = providerId;
22176
      setProviderIdIsSet(true);
22177
      return this;
22178
    }
22179
 
22180
    public void unsetProviderId() {
22181
      __isset_bit_vector.clear(__PROVIDERID_ISSET_ID);
22182
    }
22183
 
22184
    /** Returns true if field providerId is set (has been asigned a value) and false otherwise */
22185
    public boolean isSetProviderId() {
22186
      return __isset_bit_vector.get(__PROVIDERID_ISSET_ID);
22187
    }
22188
 
22189
    public void setProviderIdIsSet(boolean value) {
22190
      __isset_bit_vector.set(__PROVIDERID_ISSET_ID, value);
22191
    }
22192
 
22193
    public int getDeliveredOrdersSize() {
22194
      return (this.deliveredOrders == null) ? 0 : this.deliveredOrders.size();
22195
    }
22196
 
22197
    public void putToDeliveredOrders(String key, String val) {
22198
      if (this.deliveredOrders == null) {
22199
        this.deliveredOrders = new HashMap<String,String>();
22200
      }
22201
      this.deliveredOrders.put(key, val);
22202
    }
22203
 
22204
    public Map<String,String> getDeliveredOrders() {
22205
      return this.deliveredOrders;
22206
    }
22207
 
22208
    public markOrdersAsDelivered_args setDeliveredOrders(Map<String,String> deliveredOrders) {
22209
      this.deliveredOrders = deliveredOrders;
22210
      return this;
22211
    }
22212
 
22213
    public void unsetDeliveredOrders() {
22214
      this.deliveredOrders = null;
22215
    }
22216
 
22217
    /** Returns true if field deliveredOrders is set (has been asigned a value) and false otherwise */
22218
    public boolean isSetDeliveredOrders() {
22219
      return this.deliveredOrders != null;
22220
    }
22221
 
22222
    public void setDeliveredOrdersIsSet(boolean value) {
22223
      if (!value) {
22224
        this.deliveredOrders = null;
22225
      }
22226
    }
22227
 
22228
    public void setFieldValue(_Fields field, Object value) {
22229
      switch (field) {
22230
      case PROVIDER_ID:
22231
        if (value == null) {
22232
          unsetProviderId();
22233
        } else {
22234
          setProviderId((Long)value);
22235
        }
22236
        break;
22237
 
22238
      case DELIVERED_ORDERS:
22239
        if (value == null) {
22240
          unsetDeliveredOrders();
22241
        } else {
22242
          setDeliveredOrders((Map<String,String>)value);
22243
        }
22244
        break;
22245
 
22246
      }
22247
    }
22248
 
22249
    public void setFieldValue(int fieldID, Object value) {
22250
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
22251
    }
22252
 
22253
    public Object getFieldValue(_Fields field) {
22254
      switch (field) {
22255
      case PROVIDER_ID:
22256
        return new Long(getProviderId());
22257
 
22258
      case DELIVERED_ORDERS:
22259
        return getDeliveredOrders();
22260
 
22261
      }
22262
      throw new IllegalStateException();
22263
    }
22264
 
22265
    public Object getFieldValue(int fieldId) {
22266
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
22267
    }
22268
 
22269
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
22270
    public boolean isSet(_Fields field) {
22271
      switch (field) {
22272
      case PROVIDER_ID:
22273
        return isSetProviderId();
22274
      case DELIVERED_ORDERS:
22275
        return isSetDeliveredOrders();
22276
      }
22277
      throw new IllegalStateException();
22278
    }
22279
 
22280
    public boolean isSet(int fieldID) {
22281
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
22282
    }
22283
 
22284
    @Override
22285
    public boolean equals(Object that) {
22286
      if (that == null)
22287
        return false;
22288
      if (that instanceof markOrdersAsDelivered_args)
22289
        return this.equals((markOrdersAsDelivered_args)that);
22290
      return false;
22291
    }
22292
 
22293
    public boolean equals(markOrdersAsDelivered_args that) {
22294
      if (that == null)
22295
        return false;
22296
 
22297
      boolean this_present_providerId = true;
22298
      boolean that_present_providerId = true;
22299
      if (this_present_providerId || that_present_providerId) {
22300
        if (!(this_present_providerId && that_present_providerId))
22301
          return false;
22302
        if (this.providerId != that.providerId)
22303
          return false;
22304
      }
22305
 
22306
      boolean this_present_deliveredOrders = true && this.isSetDeliveredOrders();
22307
      boolean that_present_deliveredOrders = true && that.isSetDeliveredOrders();
22308
      if (this_present_deliveredOrders || that_present_deliveredOrders) {
22309
        if (!(this_present_deliveredOrders && that_present_deliveredOrders))
22310
          return false;
22311
        if (!this.deliveredOrders.equals(that.deliveredOrders))
22312
          return false;
22313
      }
22314
 
22315
      return true;
22316
    }
22317
 
22318
    @Override
22319
    public int hashCode() {
22320
      return 0;
22321
    }
22322
 
22323
    public void read(TProtocol iprot) throws TException {
22324
      TField field;
22325
      iprot.readStructBegin();
22326
      while (true)
22327
      {
22328
        field = iprot.readFieldBegin();
22329
        if (field.type == TType.STOP) { 
22330
          break;
22331
        }
22332
        _Fields fieldId = _Fields.findByThriftId(field.id);
22333
        if (fieldId == null) {
22334
          TProtocolUtil.skip(iprot, field.type);
22335
        } else {
22336
          switch (fieldId) {
22337
            case PROVIDER_ID:
22338
              if (field.type == TType.I64) {
22339
                this.providerId = iprot.readI64();
22340
                setProviderIdIsSet(true);
22341
              } else { 
22342
                TProtocolUtil.skip(iprot, field.type);
22343
              }
22344
              break;
22345
            case DELIVERED_ORDERS:
22346
              if (field.type == TType.MAP) {
22347
                {
1382 varun.gupt 22348
                  TMap _map57 = iprot.readMapBegin();
22349
                  this.deliveredOrders = new HashMap<String,String>(2*_map57.size);
22350
                  for (int _i58 = 0; _i58 < _map57.size; ++_i58)
1133 chandransh 22351
                  {
1382 varun.gupt 22352
                    String _key59;
22353
                    String _val60;
22354
                    _key59 = iprot.readString();
22355
                    _val60 = iprot.readString();
22356
                    this.deliveredOrders.put(_key59, _val60);
1133 chandransh 22357
                  }
22358
                  iprot.readMapEnd();
22359
                }
22360
              } else { 
22361
                TProtocolUtil.skip(iprot, field.type);
22362
              }
22363
              break;
22364
          }
22365
          iprot.readFieldEnd();
22366
        }
22367
      }
22368
      iprot.readStructEnd();
22369
      validate();
22370
    }
22371
 
22372
    public void write(TProtocol oprot) throws TException {
22373
      validate();
22374
 
22375
      oprot.writeStructBegin(STRUCT_DESC);
22376
      oprot.writeFieldBegin(PROVIDER_ID_FIELD_DESC);
22377
      oprot.writeI64(this.providerId);
22378
      oprot.writeFieldEnd();
22379
      if (this.deliveredOrders != null) {
22380
        oprot.writeFieldBegin(DELIVERED_ORDERS_FIELD_DESC);
22381
        {
22382
          oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.deliveredOrders.size()));
1382 varun.gupt 22383
          for (Map.Entry<String, String> _iter61 : this.deliveredOrders.entrySet())
1133 chandransh 22384
          {
1382 varun.gupt 22385
            oprot.writeString(_iter61.getKey());
22386
            oprot.writeString(_iter61.getValue());
1133 chandransh 22387
          }
22388
          oprot.writeMapEnd();
22389
        }
22390
        oprot.writeFieldEnd();
22391
      }
22392
      oprot.writeFieldStop();
22393
      oprot.writeStructEnd();
22394
    }
22395
 
22396
    @Override
22397
    public String toString() {
22398
      StringBuilder sb = new StringBuilder("markOrdersAsDelivered_args(");
22399
      boolean first = true;
22400
 
22401
      sb.append("providerId:");
22402
      sb.append(this.providerId);
22403
      first = false;
22404
      if (!first) sb.append(", ");
22405
      sb.append("deliveredOrders:");
22406
      if (this.deliveredOrders == null) {
22407
        sb.append("null");
22408
      } else {
22409
        sb.append(this.deliveredOrders);
22410
      }
22411
      first = false;
22412
      sb.append(")");
22413
      return sb.toString();
22414
    }
22415
 
22416
    public void validate() throws TException {
22417
      // check for required fields
22418
    }
22419
 
22420
  }
22421
 
22422
  public static class markOrdersAsDelivered_result implements TBase<markOrdersAsDelivered_result._Fields>, java.io.Serializable, Cloneable, Comparable<markOrdersAsDelivered_result>   {
22423
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsDelivered_result");
22424
 
22425
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
22426
 
22427
    private TransactionServiceException ex;
22428
 
22429
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
22430
    public enum _Fields implements TFieldIdEnum {
22431
      EX((short)1, "ex");
22432
 
22433
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
22434
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
22435
 
22436
      static {
22437
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
22438
          byId.put((int)field._thriftId, field);
22439
          byName.put(field.getFieldName(), field);
22440
        }
22441
      }
22442
 
22443
      /**
22444
       * Find the _Fields constant that matches fieldId, or null if its not found.
22445
       */
22446
      public static _Fields findByThriftId(int fieldId) {
22447
        return byId.get(fieldId);
22448
      }
22449
 
22450
      /**
22451
       * Find the _Fields constant that matches fieldId, throwing an exception
22452
       * if it is not found.
22453
       */
22454
      public static _Fields findByThriftIdOrThrow(int fieldId) {
22455
        _Fields fields = findByThriftId(fieldId);
22456
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
22457
        return fields;
22458
      }
22459
 
22460
      /**
22461
       * Find the _Fields constant that matches name, or null if its not found.
22462
       */
22463
      public static _Fields findByName(String name) {
22464
        return byName.get(name);
22465
      }
22466
 
22467
      private final short _thriftId;
22468
      private final String _fieldName;
22469
 
22470
      _Fields(short thriftId, String fieldName) {
22471
        _thriftId = thriftId;
22472
        _fieldName = fieldName;
22473
      }
22474
 
22475
      public short getThriftFieldId() {
22476
        return _thriftId;
22477
      }
22478
 
22479
      public String getFieldName() {
22480
        return _fieldName;
22481
      }
22482
    }
22483
 
22484
    // isset id assignments
22485
 
22486
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
22487
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
22488
          new FieldValueMetaData(TType.STRUCT)));
22489
    }});
22490
 
22491
    static {
22492
      FieldMetaData.addStructMetaDataMap(markOrdersAsDelivered_result.class, metaDataMap);
22493
    }
22494
 
22495
    public markOrdersAsDelivered_result() {
22496
    }
22497
 
22498
    public markOrdersAsDelivered_result(
22499
      TransactionServiceException ex)
22500
    {
22501
      this();
22502
      this.ex = ex;
22503
    }
22504
 
22505
    /**
22506
     * Performs a deep copy on <i>other</i>.
22507
     */
22508
    public markOrdersAsDelivered_result(markOrdersAsDelivered_result other) {
22509
      if (other.isSetEx()) {
22510
        this.ex = new TransactionServiceException(other.ex);
22511
      }
22512
    }
22513
 
22514
    public markOrdersAsDelivered_result deepCopy() {
22515
      return new markOrdersAsDelivered_result(this);
22516
    }
22517
 
22518
    @Deprecated
22519
    public markOrdersAsDelivered_result clone() {
22520
      return new markOrdersAsDelivered_result(this);
22521
    }
22522
 
22523
    public TransactionServiceException getEx() {
22524
      return this.ex;
22525
    }
22526
 
22527
    public markOrdersAsDelivered_result setEx(TransactionServiceException ex) {
22528
      this.ex = ex;
22529
      return this;
22530
    }
22531
 
22532
    public void unsetEx() {
22533
      this.ex = null;
22534
    }
22535
 
22536
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
22537
    public boolean isSetEx() {
22538
      return this.ex != null;
22539
    }
22540
 
22541
    public void setExIsSet(boolean value) {
22542
      if (!value) {
22543
        this.ex = null;
22544
      }
22545
    }
22546
 
22547
    public void setFieldValue(_Fields field, Object value) {
22548
      switch (field) {
22549
      case EX:
22550
        if (value == null) {
22551
          unsetEx();
22552
        } else {
22553
          setEx((TransactionServiceException)value);
22554
        }
22555
        break;
22556
 
22557
      }
22558
    }
22559
 
22560
    public void setFieldValue(int fieldID, Object value) {
22561
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
22562
    }
22563
 
22564
    public Object getFieldValue(_Fields field) {
22565
      switch (field) {
22566
      case EX:
22567
        return getEx();
22568
 
22569
      }
22570
      throw new IllegalStateException();
22571
    }
22572
 
22573
    public Object getFieldValue(int fieldId) {
22574
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
22575
    }
22576
 
22577
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
22578
    public boolean isSet(_Fields field) {
22579
      switch (field) {
22580
      case EX:
22581
        return isSetEx();
22582
      }
22583
      throw new IllegalStateException();
22584
    }
22585
 
22586
    public boolean isSet(int fieldID) {
22587
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
22588
    }
22589
 
22590
    @Override
22591
    public boolean equals(Object that) {
22592
      if (that == null)
22593
        return false;
22594
      if (that instanceof markOrdersAsDelivered_result)
22595
        return this.equals((markOrdersAsDelivered_result)that);
22596
      return false;
22597
    }
22598
 
22599
    public boolean equals(markOrdersAsDelivered_result that) {
22600
      if (that == null)
22601
        return false;
22602
 
22603
      boolean this_present_ex = true && this.isSetEx();
22604
      boolean that_present_ex = true && that.isSetEx();
22605
      if (this_present_ex || that_present_ex) {
22606
        if (!(this_present_ex && that_present_ex))
22607
          return false;
22608
        if (!this.ex.equals(that.ex))
22609
          return false;
22610
      }
22611
 
22612
      return true;
22613
    }
22614
 
22615
    @Override
22616
    public int hashCode() {
22617
      return 0;
22618
    }
22619
 
22620
    public int compareTo(markOrdersAsDelivered_result other) {
22621
      if (!getClass().equals(other.getClass())) {
22622
        return getClass().getName().compareTo(other.getClass().getName());
22623
      }
22624
 
22625
      int lastComparison = 0;
22626
      markOrdersAsDelivered_result typedOther = (markOrdersAsDelivered_result)other;
22627
 
22628
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
22629
      if (lastComparison != 0) {
22630
        return lastComparison;
22631
      }
22632
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
22633
      if (lastComparison != 0) {
22634
        return lastComparison;
22635
      }
22636
      return 0;
22637
    }
22638
 
22639
    public void read(TProtocol iprot) throws TException {
22640
      TField field;
22641
      iprot.readStructBegin();
22642
      while (true)
22643
      {
22644
        field = iprot.readFieldBegin();
22645
        if (field.type == TType.STOP) { 
22646
          break;
22647
        }
22648
        _Fields fieldId = _Fields.findByThriftId(field.id);
22649
        if (fieldId == null) {
22650
          TProtocolUtil.skip(iprot, field.type);
22651
        } else {
22652
          switch (fieldId) {
22653
            case EX:
22654
              if (field.type == TType.STRUCT) {
22655
                this.ex = new TransactionServiceException();
22656
                this.ex.read(iprot);
22657
              } else { 
22658
                TProtocolUtil.skip(iprot, field.type);
22659
              }
22660
              break;
22661
          }
22662
          iprot.readFieldEnd();
22663
        }
22664
      }
22665
      iprot.readStructEnd();
22666
      validate();
22667
    }
22668
 
22669
    public void write(TProtocol oprot) throws TException {
22670
      oprot.writeStructBegin(STRUCT_DESC);
22671
 
22672
      if (this.isSetEx()) {
22673
        oprot.writeFieldBegin(EX_FIELD_DESC);
22674
        this.ex.write(oprot);
22675
        oprot.writeFieldEnd();
22676
      }
22677
      oprot.writeFieldStop();
22678
      oprot.writeStructEnd();
22679
    }
22680
 
22681
    @Override
22682
    public String toString() {
22683
      StringBuilder sb = new StringBuilder("markOrdersAsDelivered_result(");
22684
      boolean first = true;
22685
 
22686
      sb.append("ex:");
22687
      if (this.ex == null) {
22688
        sb.append("null");
22689
      } else {
22690
        sb.append(this.ex);
22691
      }
22692
      first = false;
22693
      sb.append(")");
22694
      return sb.toString();
22695
    }
22696
 
22697
    public void validate() throws TException {
22698
      // check for required fields
22699
    }
22700
 
22701
  }
22702
 
22703
  public static class markOrdersAsFailed_args implements TBase<markOrdersAsFailed_args._Fields>, java.io.Serializable, Cloneable   {
22704
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsFailed_args");
22705
 
22706
    private static final TField PROVIDER_ID_FIELD_DESC = new TField("providerId", TType.I64, (short)1);
22707
    private static final TField RETURNED_ORDERS_FIELD_DESC = new TField("returnedOrders", TType.MAP, (short)2);
22708
 
22709
    private long providerId;
22710
    private Map<String,String> returnedOrders;
22711
 
22712
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
22713
    public enum _Fields implements TFieldIdEnum {
22714
      PROVIDER_ID((short)1, "providerId"),
22715
      RETURNED_ORDERS((short)2, "returnedOrders");
22716
 
22717
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
22718
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
22719
 
22720
      static {
22721
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
22722
          byId.put((int)field._thriftId, field);
22723
          byName.put(field.getFieldName(), field);
22724
        }
22725
      }
22726
 
22727
      /**
22728
       * Find the _Fields constant that matches fieldId, or null if its not found.
22729
       */
22730
      public static _Fields findByThriftId(int fieldId) {
22731
        return byId.get(fieldId);
22732
      }
22733
 
22734
      /**
22735
       * Find the _Fields constant that matches fieldId, throwing an exception
22736
       * if it is not found.
22737
       */
22738
      public static _Fields findByThriftIdOrThrow(int fieldId) {
22739
        _Fields fields = findByThriftId(fieldId);
22740
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
22741
        return fields;
22742
      }
22743
 
22744
      /**
22745
       * Find the _Fields constant that matches name, or null if its not found.
22746
       */
22747
      public static _Fields findByName(String name) {
22748
        return byName.get(name);
22749
      }
22750
 
22751
      private final short _thriftId;
22752
      private final String _fieldName;
22753
 
22754
      _Fields(short thriftId, String fieldName) {
22755
        _thriftId = thriftId;
22756
        _fieldName = fieldName;
22757
      }
22758
 
22759
      public short getThriftFieldId() {
22760
        return _thriftId;
22761
      }
22762
 
22763
      public String getFieldName() {
22764
        return _fieldName;
22765
      }
22766
    }
22767
 
22768
    // isset id assignments
22769
    private static final int __PROVIDERID_ISSET_ID = 0;
22770
    private BitSet __isset_bit_vector = new BitSet(1);
22771
 
22772
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
22773
      put(_Fields.PROVIDER_ID, new FieldMetaData("providerId", TFieldRequirementType.DEFAULT, 
22774
          new FieldValueMetaData(TType.I64)));
22775
      put(_Fields.RETURNED_ORDERS, new FieldMetaData("returnedOrders", TFieldRequirementType.DEFAULT, 
22776
          new MapMetaData(TType.MAP, 
22777
              new FieldValueMetaData(TType.STRING), 
22778
              new FieldValueMetaData(TType.STRING))));
22779
    }});
22780
 
22781
    static {
22782
      FieldMetaData.addStructMetaDataMap(markOrdersAsFailed_args.class, metaDataMap);
22783
    }
22784
 
22785
    public markOrdersAsFailed_args() {
22786
    }
22787
 
22788
    public markOrdersAsFailed_args(
22789
      long providerId,
22790
      Map<String,String> returnedOrders)
22791
    {
22792
      this();
22793
      this.providerId = providerId;
22794
      setProviderIdIsSet(true);
22795
      this.returnedOrders = returnedOrders;
22796
    }
22797
 
22798
    /**
22799
     * Performs a deep copy on <i>other</i>.
22800
     */
22801
    public markOrdersAsFailed_args(markOrdersAsFailed_args other) {
22802
      __isset_bit_vector.clear();
22803
      __isset_bit_vector.or(other.__isset_bit_vector);
22804
      this.providerId = other.providerId;
22805
      if (other.isSetReturnedOrders()) {
22806
        Map<String,String> __this__returnedOrders = new HashMap<String,String>();
22807
        for (Map.Entry<String, String> other_element : other.returnedOrders.entrySet()) {
22808
 
22809
          String other_element_key = other_element.getKey();
22810
          String other_element_value = other_element.getValue();
22811
 
22812
          String __this__returnedOrders_copy_key = other_element_key;
22813
 
22814
          String __this__returnedOrders_copy_value = other_element_value;
22815
 
22816
          __this__returnedOrders.put(__this__returnedOrders_copy_key, __this__returnedOrders_copy_value);
22817
        }
22818
        this.returnedOrders = __this__returnedOrders;
22819
      }
22820
    }
22821
 
22822
    public markOrdersAsFailed_args deepCopy() {
22823
      return new markOrdersAsFailed_args(this);
22824
    }
22825
 
22826
    @Deprecated
22827
    public markOrdersAsFailed_args clone() {
22828
      return new markOrdersAsFailed_args(this);
22829
    }
22830
 
22831
    public long getProviderId() {
22832
      return this.providerId;
22833
    }
22834
 
22835
    public markOrdersAsFailed_args setProviderId(long providerId) {
22836
      this.providerId = providerId;
22837
      setProviderIdIsSet(true);
22838
      return this;
22839
    }
22840
 
22841
    public void unsetProviderId() {
22842
      __isset_bit_vector.clear(__PROVIDERID_ISSET_ID);
22843
    }
22844
 
22845
    /** Returns true if field providerId is set (has been asigned a value) and false otherwise */
22846
    public boolean isSetProviderId() {
22847
      return __isset_bit_vector.get(__PROVIDERID_ISSET_ID);
22848
    }
22849
 
22850
    public void setProviderIdIsSet(boolean value) {
22851
      __isset_bit_vector.set(__PROVIDERID_ISSET_ID, value);
22852
    }
22853
 
22854
    public int getReturnedOrdersSize() {
22855
      return (this.returnedOrders == null) ? 0 : this.returnedOrders.size();
22856
    }
22857
 
22858
    public void putToReturnedOrders(String key, String val) {
22859
      if (this.returnedOrders == null) {
22860
        this.returnedOrders = new HashMap<String,String>();
22861
      }
22862
      this.returnedOrders.put(key, val);
22863
    }
22864
 
22865
    public Map<String,String> getReturnedOrders() {
22866
      return this.returnedOrders;
22867
    }
22868
 
22869
    public markOrdersAsFailed_args setReturnedOrders(Map<String,String> returnedOrders) {
22870
      this.returnedOrders = returnedOrders;
22871
      return this;
22872
    }
22873
 
22874
    public void unsetReturnedOrders() {
22875
      this.returnedOrders = null;
22876
    }
22877
 
22878
    /** Returns true if field returnedOrders is set (has been asigned a value) and false otherwise */
22879
    public boolean isSetReturnedOrders() {
22880
      return this.returnedOrders != null;
22881
    }
22882
 
22883
    public void setReturnedOrdersIsSet(boolean value) {
22884
      if (!value) {
22885
        this.returnedOrders = null;
22886
      }
22887
    }
22888
 
22889
    public void setFieldValue(_Fields field, Object value) {
22890
      switch (field) {
22891
      case PROVIDER_ID:
22892
        if (value == null) {
22893
          unsetProviderId();
22894
        } else {
22895
          setProviderId((Long)value);
22896
        }
22897
        break;
22898
 
22899
      case RETURNED_ORDERS:
22900
        if (value == null) {
22901
          unsetReturnedOrders();
22902
        } else {
22903
          setReturnedOrders((Map<String,String>)value);
22904
        }
22905
        break;
22906
 
22907
      }
22908
    }
22909
 
22910
    public void setFieldValue(int fieldID, Object value) {
22911
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
22912
    }
22913
 
22914
    public Object getFieldValue(_Fields field) {
22915
      switch (field) {
22916
      case PROVIDER_ID:
22917
        return new Long(getProviderId());
22918
 
22919
      case RETURNED_ORDERS:
22920
        return getReturnedOrders();
22921
 
22922
      }
22923
      throw new IllegalStateException();
22924
    }
22925
 
22926
    public Object getFieldValue(int fieldId) {
22927
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
22928
    }
22929
 
22930
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
22931
    public boolean isSet(_Fields field) {
22932
      switch (field) {
22933
      case PROVIDER_ID:
22934
        return isSetProviderId();
22935
      case RETURNED_ORDERS:
22936
        return isSetReturnedOrders();
22937
      }
22938
      throw new IllegalStateException();
22939
    }
22940
 
22941
    public boolean isSet(int fieldID) {
22942
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
22943
    }
22944
 
22945
    @Override
22946
    public boolean equals(Object that) {
22947
      if (that == null)
22948
        return false;
22949
      if (that instanceof markOrdersAsFailed_args)
22950
        return this.equals((markOrdersAsFailed_args)that);
22951
      return false;
22952
    }
22953
 
22954
    public boolean equals(markOrdersAsFailed_args that) {
22955
      if (that == null)
22956
        return false;
22957
 
22958
      boolean this_present_providerId = true;
22959
      boolean that_present_providerId = true;
22960
      if (this_present_providerId || that_present_providerId) {
22961
        if (!(this_present_providerId && that_present_providerId))
22962
          return false;
22963
        if (this.providerId != that.providerId)
22964
          return false;
22965
      }
22966
 
22967
      boolean this_present_returnedOrders = true && this.isSetReturnedOrders();
22968
      boolean that_present_returnedOrders = true && that.isSetReturnedOrders();
22969
      if (this_present_returnedOrders || that_present_returnedOrders) {
22970
        if (!(this_present_returnedOrders && that_present_returnedOrders))
22971
          return false;
22972
        if (!this.returnedOrders.equals(that.returnedOrders))
22973
          return false;
22974
      }
22975
 
22976
      return true;
22977
    }
22978
 
22979
    @Override
22980
    public int hashCode() {
22981
      return 0;
22982
    }
22983
 
22984
    public void read(TProtocol iprot) throws TException {
22985
      TField field;
22986
      iprot.readStructBegin();
22987
      while (true)
22988
      {
22989
        field = iprot.readFieldBegin();
22990
        if (field.type == TType.STOP) { 
22991
          break;
22992
        }
22993
        _Fields fieldId = _Fields.findByThriftId(field.id);
22994
        if (fieldId == null) {
22995
          TProtocolUtil.skip(iprot, field.type);
22996
        } else {
22997
          switch (fieldId) {
22998
            case PROVIDER_ID:
22999
              if (field.type == TType.I64) {
23000
                this.providerId = iprot.readI64();
23001
                setProviderIdIsSet(true);
23002
              } else { 
23003
                TProtocolUtil.skip(iprot, field.type);
23004
              }
23005
              break;
23006
            case RETURNED_ORDERS:
23007
              if (field.type == TType.MAP) {
23008
                {
1382 varun.gupt 23009
                  TMap _map62 = iprot.readMapBegin();
23010
                  this.returnedOrders = new HashMap<String,String>(2*_map62.size);
23011
                  for (int _i63 = 0; _i63 < _map62.size; ++_i63)
1133 chandransh 23012
                  {
1382 varun.gupt 23013
                    String _key64;
23014
                    String _val65;
23015
                    _key64 = iprot.readString();
23016
                    _val65 = iprot.readString();
23017
                    this.returnedOrders.put(_key64, _val65);
1133 chandransh 23018
                  }
23019
                  iprot.readMapEnd();
23020
                }
23021
              } else { 
23022
                TProtocolUtil.skip(iprot, field.type);
23023
              }
23024
              break;
23025
          }
23026
          iprot.readFieldEnd();
23027
        }
23028
      }
23029
      iprot.readStructEnd();
23030
      validate();
23031
    }
23032
 
23033
    public void write(TProtocol oprot) throws TException {
23034
      validate();
23035
 
23036
      oprot.writeStructBegin(STRUCT_DESC);
23037
      oprot.writeFieldBegin(PROVIDER_ID_FIELD_DESC);
23038
      oprot.writeI64(this.providerId);
23039
      oprot.writeFieldEnd();
23040
      if (this.returnedOrders != null) {
23041
        oprot.writeFieldBegin(RETURNED_ORDERS_FIELD_DESC);
23042
        {
23043
          oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.returnedOrders.size()));
1382 varun.gupt 23044
          for (Map.Entry<String, String> _iter66 : this.returnedOrders.entrySet())
1133 chandransh 23045
          {
1382 varun.gupt 23046
            oprot.writeString(_iter66.getKey());
23047
            oprot.writeString(_iter66.getValue());
1133 chandransh 23048
          }
23049
          oprot.writeMapEnd();
23050
        }
23051
        oprot.writeFieldEnd();
23052
      }
23053
      oprot.writeFieldStop();
23054
      oprot.writeStructEnd();
23055
    }
23056
 
23057
    @Override
23058
    public String toString() {
23059
      StringBuilder sb = new StringBuilder("markOrdersAsFailed_args(");
23060
      boolean first = true;
23061
 
23062
      sb.append("providerId:");
23063
      sb.append(this.providerId);
23064
      first = false;
23065
      if (!first) sb.append(", ");
23066
      sb.append("returnedOrders:");
23067
      if (this.returnedOrders == null) {
23068
        sb.append("null");
23069
      } else {
23070
        sb.append(this.returnedOrders);
23071
      }
23072
      first = false;
23073
      sb.append(")");
23074
      return sb.toString();
23075
    }
23076
 
23077
    public void validate() throws TException {
23078
      // check for required fields
23079
    }
23080
 
23081
  }
23082
 
23083
  public static class markOrdersAsFailed_result implements TBase<markOrdersAsFailed_result._Fields>, java.io.Serializable, Cloneable, Comparable<markOrdersAsFailed_result>   {
23084
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsFailed_result");
23085
 
23086
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
23087
 
23088
    private TransactionServiceException ex;
23089
 
23090
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
23091
    public enum _Fields implements TFieldIdEnum {
23092
      EX((short)1, "ex");
23093
 
23094
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
23095
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
23096
 
23097
      static {
23098
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
23099
          byId.put((int)field._thriftId, field);
23100
          byName.put(field.getFieldName(), field);
23101
        }
23102
      }
23103
 
23104
      /**
23105
       * Find the _Fields constant that matches fieldId, or null if its not found.
23106
       */
23107
      public static _Fields findByThriftId(int fieldId) {
23108
        return byId.get(fieldId);
23109
      }
23110
 
23111
      /**
23112
       * Find the _Fields constant that matches fieldId, throwing an exception
23113
       * if it is not found.
23114
       */
23115
      public static _Fields findByThriftIdOrThrow(int fieldId) {
23116
        _Fields fields = findByThriftId(fieldId);
23117
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
23118
        return fields;
23119
      }
23120
 
23121
      /**
23122
       * Find the _Fields constant that matches name, or null if its not found.
23123
       */
23124
      public static _Fields findByName(String name) {
23125
        return byName.get(name);
23126
      }
23127
 
23128
      private final short _thriftId;
23129
      private final String _fieldName;
23130
 
23131
      _Fields(short thriftId, String fieldName) {
23132
        _thriftId = thriftId;
23133
        _fieldName = fieldName;
23134
      }
23135
 
23136
      public short getThriftFieldId() {
23137
        return _thriftId;
23138
      }
23139
 
23140
      public String getFieldName() {
23141
        return _fieldName;
23142
      }
23143
    }
23144
 
23145
    // isset id assignments
23146
 
23147
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
23148
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
23149
          new FieldValueMetaData(TType.STRUCT)));
23150
    }});
23151
 
23152
    static {
23153
      FieldMetaData.addStructMetaDataMap(markOrdersAsFailed_result.class, metaDataMap);
23154
    }
23155
 
23156
    public markOrdersAsFailed_result() {
23157
    }
23158
 
23159
    public markOrdersAsFailed_result(
23160
      TransactionServiceException ex)
23161
    {
23162
      this();
23163
      this.ex = ex;
23164
    }
23165
 
23166
    /**
23167
     * Performs a deep copy on <i>other</i>.
23168
     */
23169
    public markOrdersAsFailed_result(markOrdersAsFailed_result other) {
23170
      if (other.isSetEx()) {
23171
        this.ex = new TransactionServiceException(other.ex);
23172
      }
23173
    }
23174
 
23175
    public markOrdersAsFailed_result deepCopy() {
23176
      return new markOrdersAsFailed_result(this);
23177
    }
23178
 
23179
    @Deprecated
23180
    public markOrdersAsFailed_result clone() {
23181
      return new markOrdersAsFailed_result(this);
23182
    }
23183
 
23184
    public TransactionServiceException getEx() {
23185
      return this.ex;
23186
    }
23187
 
23188
    public markOrdersAsFailed_result setEx(TransactionServiceException ex) {
23189
      this.ex = ex;
23190
      return this;
23191
    }
23192
 
23193
    public void unsetEx() {
23194
      this.ex = null;
23195
    }
23196
 
23197
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
23198
    public boolean isSetEx() {
23199
      return this.ex != null;
23200
    }
23201
 
23202
    public void setExIsSet(boolean value) {
23203
      if (!value) {
23204
        this.ex = null;
23205
      }
23206
    }
23207
 
23208
    public void setFieldValue(_Fields field, Object value) {
23209
      switch (field) {
23210
      case EX:
23211
        if (value == null) {
23212
          unsetEx();
23213
        } else {
23214
          setEx((TransactionServiceException)value);
23215
        }
23216
        break;
23217
 
23218
      }
23219
    }
23220
 
23221
    public void setFieldValue(int fieldID, Object value) {
23222
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
23223
    }
23224
 
23225
    public Object getFieldValue(_Fields field) {
23226
      switch (field) {
23227
      case EX:
23228
        return getEx();
23229
 
23230
      }
23231
      throw new IllegalStateException();
23232
    }
23233
 
23234
    public Object getFieldValue(int fieldId) {
23235
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
23236
    }
23237
 
23238
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
23239
    public boolean isSet(_Fields field) {
23240
      switch (field) {
23241
      case EX:
23242
        return isSetEx();
23243
      }
23244
      throw new IllegalStateException();
23245
    }
23246
 
23247
    public boolean isSet(int fieldID) {
23248
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
23249
    }
23250
 
23251
    @Override
23252
    public boolean equals(Object that) {
23253
      if (that == null)
23254
        return false;
23255
      if (that instanceof markOrdersAsFailed_result)
23256
        return this.equals((markOrdersAsFailed_result)that);
23257
      return false;
23258
    }
23259
 
23260
    public boolean equals(markOrdersAsFailed_result that) {
23261
      if (that == null)
23262
        return false;
23263
 
23264
      boolean this_present_ex = true && this.isSetEx();
23265
      boolean that_present_ex = true && that.isSetEx();
23266
      if (this_present_ex || that_present_ex) {
23267
        if (!(this_present_ex && that_present_ex))
23268
          return false;
23269
        if (!this.ex.equals(that.ex))
23270
          return false;
23271
      }
23272
 
23273
      return true;
23274
    }
23275
 
23276
    @Override
23277
    public int hashCode() {
23278
      return 0;
23279
    }
23280
 
23281
    public int compareTo(markOrdersAsFailed_result other) {
23282
      if (!getClass().equals(other.getClass())) {
23283
        return getClass().getName().compareTo(other.getClass().getName());
23284
      }
23285
 
23286
      int lastComparison = 0;
23287
      markOrdersAsFailed_result typedOther = (markOrdersAsFailed_result)other;
23288
 
23289
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
23290
      if (lastComparison != 0) {
23291
        return lastComparison;
23292
      }
23293
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
23294
      if (lastComparison != 0) {
23295
        return lastComparison;
23296
      }
23297
      return 0;
23298
    }
23299
 
23300
    public void read(TProtocol iprot) throws TException {
23301
      TField field;
23302
      iprot.readStructBegin();
23303
      while (true)
23304
      {
23305
        field = iprot.readFieldBegin();
23306
        if (field.type == TType.STOP) { 
23307
          break;
23308
        }
23309
        _Fields fieldId = _Fields.findByThriftId(field.id);
23310
        if (fieldId == null) {
23311
          TProtocolUtil.skip(iprot, field.type);
23312
        } else {
23313
          switch (fieldId) {
23314
            case EX:
23315
              if (field.type == TType.STRUCT) {
23316
                this.ex = new TransactionServiceException();
23317
                this.ex.read(iprot);
23318
              } else { 
23319
                TProtocolUtil.skip(iprot, field.type);
23320
              }
23321
              break;
23322
          }
23323
          iprot.readFieldEnd();
23324
        }
23325
      }
23326
      iprot.readStructEnd();
23327
      validate();
23328
    }
23329
 
23330
    public void write(TProtocol oprot) throws TException {
23331
      oprot.writeStructBegin(STRUCT_DESC);
23332
 
23333
      if (this.isSetEx()) {
23334
        oprot.writeFieldBegin(EX_FIELD_DESC);
23335
        this.ex.write(oprot);
23336
        oprot.writeFieldEnd();
23337
      }
23338
      oprot.writeFieldStop();
23339
      oprot.writeStructEnd();
23340
    }
23341
 
23342
    @Override
23343
    public String toString() {
23344
      StringBuilder sb = new StringBuilder("markOrdersAsFailed_result(");
23345
      boolean first = true;
23346
 
23347
      sb.append("ex:");
23348
      if (this.ex == null) {
23349
        sb.append("null");
23350
      } else {
23351
        sb.append(this.ex);
23352
      }
23353
      first = false;
23354
      sb.append(")");
23355
      return sb.toString();
23356
    }
23357
 
23358
    public void validate() throws TException {
23359
      // check for required fields
23360
    }
23361
 
23362
  }
23363
 
1245 chandransh 23364
  public static class updateNonDeliveryReason_args implements TBase<updateNonDeliveryReason_args._Fields>, java.io.Serializable, Cloneable   {
23365
    private static final TStruct STRUCT_DESC = new TStruct("updateNonDeliveryReason_args");
23366
 
23367
    private static final TField PROVIDER_ID_FIELD_DESC = new TField("providerId", TType.I64, (short)1);
23368
    private static final TField UNDELIVERED_ORDERS_FIELD_DESC = new TField("undeliveredOrders", TType.MAP, (short)2);
23369
 
23370
    private long providerId;
23371
    private Map<String,String> undeliveredOrders;
23372
 
23373
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
23374
    public enum _Fields implements TFieldIdEnum {
23375
      PROVIDER_ID((short)1, "providerId"),
23376
      UNDELIVERED_ORDERS((short)2, "undeliveredOrders");
23377
 
23378
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
23379
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
23380
 
23381
      static {
23382
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
23383
          byId.put((int)field._thriftId, field);
23384
          byName.put(field.getFieldName(), field);
23385
        }
23386
      }
23387
 
23388
      /**
23389
       * Find the _Fields constant that matches fieldId, or null if its not found.
23390
       */
23391
      public static _Fields findByThriftId(int fieldId) {
23392
        return byId.get(fieldId);
23393
      }
23394
 
23395
      /**
23396
       * Find the _Fields constant that matches fieldId, throwing an exception
23397
       * if it is not found.
23398
       */
23399
      public static _Fields findByThriftIdOrThrow(int fieldId) {
23400
        _Fields fields = findByThriftId(fieldId);
23401
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
23402
        return fields;
23403
      }
23404
 
23405
      /**
23406
       * Find the _Fields constant that matches name, or null if its not found.
23407
       */
23408
      public static _Fields findByName(String name) {
23409
        return byName.get(name);
23410
      }
23411
 
23412
      private final short _thriftId;
23413
      private final String _fieldName;
23414
 
23415
      _Fields(short thriftId, String fieldName) {
23416
        _thriftId = thriftId;
23417
        _fieldName = fieldName;
23418
      }
23419
 
23420
      public short getThriftFieldId() {
23421
        return _thriftId;
23422
      }
23423
 
23424
      public String getFieldName() {
23425
        return _fieldName;
23426
      }
23427
    }
23428
 
23429
    // isset id assignments
23430
    private static final int __PROVIDERID_ISSET_ID = 0;
23431
    private BitSet __isset_bit_vector = new BitSet(1);
23432
 
23433
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
23434
      put(_Fields.PROVIDER_ID, new FieldMetaData("providerId", TFieldRequirementType.DEFAULT, 
23435
          new FieldValueMetaData(TType.I64)));
23436
      put(_Fields.UNDELIVERED_ORDERS, new FieldMetaData("undeliveredOrders", TFieldRequirementType.DEFAULT, 
23437
          new MapMetaData(TType.MAP, 
23438
              new FieldValueMetaData(TType.STRING), 
23439
              new FieldValueMetaData(TType.STRING))));
23440
    }});
23441
 
23442
    static {
23443
      FieldMetaData.addStructMetaDataMap(updateNonDeliveryReason_args.class, metaDataMap);
23444
    }
23445
 
23446
    public updateNonDeliveryReason_args() {
23447
    }
23448
 
23449
    public updateNonDeliveryReason_args(
23450
      long providerId,
23451
      Map<String,String> undeliveredOrders)
23452
    {
23453
      this();
23454
      this.providerId = providerId;
23455
      setProviderIdIsSet(true);
23456
      this.undeliveredOrders = undeliveredOrders;
23457
    }
23458
 
23459
    /**
23460
     * Performs a deep copy on <i>other</i>.
23461
     */
23462
    public updateNonDeliveryReason_args(updateNonDeliveryReason_args other) {
23463
      __isset_bit_vector.clear();
23464
      __isset_bit_vector.or(other.__isset_bit_vector);
23465
      this.providerId = other.providerId;
23466
      if (other.isSetUndeliveredOrders()) {
23467
        Map<String,String> __this__undeliveredOrders = new HashMap<String,String>();
23468
        for (Map.Entry<String, String> other_element : other.undeliveredOrders.entrySet()) {
23469
 
23470
          String other_element_key = other_element.getKey();
23471
          String other_element_value = other_element.getValue();
23472
 
23473
          String __this__undeliveredOrders_copy_key = other_element_key;
23474
 
23475
          String __this__undeliveredOrders_copy_value = other_element_value;
23476
 
23477
          __this__undeliveredOrders.put(__this__undeliveredOrders_copy_key, __this__undeliveredOrders_copy_value);
23478
        }
23479
        this.undeliveredOrders = __this__undeliveredOrders;
23480
      }
23481
    }
23482
 
23483
    public updateNonDeliveryReason_args deepCopy() {
23484
      return new updateNonDeliveryReason_args(this);
23485
    }
23486
 
23487
    @Deprecated
23488
    public updateNonDeliveryReason_args clone() {
23489
      return new updateNonDeliveryReason_args(this);
23490
    }
23491
 
23492
    public long getProviderId() {
23493
      return this.providerId;
23494
    }
23495
 
23496
    public updateNonDeliveryReason_args setProviderId(long providerId) {
23497
      this.providerId = providerId;
23498
      setProviderIdIsSet(true);
23499
      return this;
23500
    }
23501
 
23502
    public void unsetProviderId() {
23503
      __isset_bit_vector.clear(__PROVIDERID_ISSET_ID);
23504
    }
23505
 
23506
    /** Returns true if field providerId is set (has been asigned a value) and false otherwise */
23507
    public boolean isSetProviderId() {
23508
      return __isset_bit_vector.get(__PROVIDERID_ISSET_ID);
23509
    }
23510
 
23511
    public void setProviderIdIsSet(boolean value) {
23512
      __isset_bit_vector.set(__PROVIDERID_ISSET_ID, value);
23513
    }
23514
 
23515
    public int getUndeliveredOrdersSize() {
23516
      return (this.undeliveredOrders == null) ? 0 : this.undeliveredOrders.size();
23517
    }
23518
 
23519
    public void putToUndeliveredOrders(String key, String val) {
23520
      if (this.undeliveredOrders == null) {
23521
        this.undeliveredOrders = new HashMap<String,String>();
23522
      }
23523
      this.undeliveredOrders.put(key, val);
23524
    }
23525
 
23526
    public Map<String,String> getUndeliveredOrders() {
23527
      return this.undeliveredOrders;
23528
    }
23529
 
23530
    public updateNonDeliveryReason_args setUndeliveredOrders(Map<String,String> undeliveredOrders) {
23531
      this.undeliveredOrders = undeliveredOrders;
23532
      return this;
23533
    }
23534
 
23535
    public void unsetUndeliveredOrders() {
23536
      this.undeliveredOrders = null;
23537
    }
23538
 
23539
    /** Returns true if field undeliveredOrders is set (has been asigned a value) and false otherwise */
23540
    public boolean isSetUndeliveredOrders() {
23541
      return this.undeliveredOrders != null;
23542
    }
23543
 
23544
    public void setUndeliveredOrdersIsSet(boolean value) {
23545
      if (!value) {
23546
        this.undeliveredOrders = null;
23547
      }
23548
    }
23549
 
23550
    public void setFieldValue(_Fields field, Object value) {
23551
      switch (field) {
23552
      case PROVIDER_ID:
23553
        if (value == null) {
23554
          unsetProviderId();
23555
        } else {
23556
          setProviderId((Long)value);
23557
        }
23558
        break;
23559
 
23560
      case UNDELIVERED_ORDERS:
23561
        if (value == null) {
23562
          unsetUndeliveredOrders();
23563
        } else {
23564
          setUndeliveredOrders((Map<String,String>)value);
23565
        }
23566
        break;
23567
 
23568
      }
23569
    }
23570
 
23571
    public void setFieldValue(int fieldID, Object value) {
23572
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
23573
    }
23574
 
23575
    public Object getFieldValue(_Fields field) {
23576
      switch (field) {
23577
      case PROVIDER_ID:
23578
        return new Long(getProviderId());
23579
 
23580
      case UNDELIVERED_ORDERS:
23581
        return getUndeliveredOrders();
23582
 
23583
      }
23584
      throw new IllegalStateException();
23585
    }
23586
 
23587
    public Object getFieldValue(int fieldId) {
23588
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
23589
    }
23590
 
23591
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
23592
    public boolean isSet(_Fields field) {
23593
      switch (field) {
23594
      case PROVIDER_ID:
23595
        return isSetProviderId();
23596
      case UNDELIVERED_ORDERS:
23597
        return isSetUndeliveredOrders();
23598
      }
23599
      throw new IllegalStateException();
23600
    }
23601
 
23602
    public boolean isSet(int fieldID) {
23603
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
23604
    }
23605
 
23606
    @Override
23607
    public boolean equals(Object that) {
23608
      if (that == null)
23609
        return false;
23610
      if (that instanceof updateNonDeliveryReason_args)
23611
        return this.equals((updateNonDeliveryReason_args)that);
23612
      return false;
23613
    }
23614
 
23615
    public boolean equals(updateNonDeliveryReason_args that) {
23616
      if (that == null)
23617
        return false;
23618
 
23619
      boolean this_present_providerId = true;
23620
      boolean that_present_providerId = true;
23621
      if (this_present_providerId || that_present_providerId) {
23622
        if (!(this_present_providerId && that_present_providerId))
23623
          return false;
23624
        if (this.providerId != that.providerId)
23625
          return false;
23626
      }
23627
 
23628
      boolean this_present_undeliveredOrders = true && this.isSetUndeliveredOrders();
23629
      boolean that_present_undeliveredOrders = true && that.isSetUndeliveredOrders();
23630
      if (this_present_undeliveredOrders || that_present_undeliveredOrders) {
23631
        if (!(this_present_undeliveredOrders && that_present_undeliveredOrders))
23632
          return false;
23633
        if (!this.undeliveredOrders.equals(that.undeliveredOrders))
23634
          return false;
23635
      }
23636
 
23637
      return true;
23638
    }
23639
 
23640
    @Override
23641
    public int hashCode() {
23642
      return 0;
23643
    }
23644
 
23645
    public void read(TProtocol iprot) throws TException {
23646
      TField field;
23647
      iprot.readStructBegin();
23648
      while (true)
23649
      {
23650
        field = iprot.readFieldBegin();
23651
        if (field.type == TType.STOP) { 
23652
          break;
23653
        }
23654
        _Fields fieldId = _Fields.findByThriftId(field.id);
23655
        if (fieldId == null) {
23656
          TProtocolUtil.skip(iprot, field.type);
23657
        } else {
23658
          switch (fieldId) {
23659
            case PROVIDER_ID:
23660
              if (field.type == TType.I64) {
23661
                this.providerId = iprot.readI64();
23662
                setProviderIdIsSet(true);
23663
              } else { 
23664
                TProtocolUtil.skip(iprot, field.type);
23665
              }
23666
              break;
23667
            case UNDELIVERED_ORDERS:
23668
              if (field.type == TType.MAP) {
23669
                {
1382 varun.gupt 23670
                  TMap _map67 = iprot.readMapBegin();
23671
                  this.undeliveredOrders = new HashMap<String,String>(2*_map67.size);
23672
                  for (int _i68 = 0; _i68 < _map67.size; ++_i68)
1245 chandransh 23673
                  {
1382 varun.gupt 23674
                    String _key69;
23675
                    String _val70;
23676
                    _key69 = iprot.readString();
23677
                    _val70 = iprot.readString();
23678
                    this.undeliveredOrders.put(_key69, _val70);
1245 chandransh 23679
                  }
23680
                  iprot.readMapEnd();
23681
                }
23682
              } else { 
23683
                TProtocolUtil.skip(iprot, field.type);
23684
              }
23685
              break;
23686
          }
23687
          iprot.readFieldEnd();
23688
        }
23689
      }
23690
      iprot.readStructEnd();
23691
      validate();
23692
    }
23693
 
23694
    public void write(TProtocol oprot) throws TException {
23695
      validate();
23696
 
23697
      oprot.writeStructBegin(STRUCT_DESC);
23698
      oprot.writeFieldBegin(PROVIDER_ID_FIELD_DESC);
23699
      oprot.writeI64(this.providerId);
23700
      oprot.writeFieldEnd();
23701
      if (this.undeliveredOrders != null) {
23702
        oprot.writeFieldBegin(UNDELIVERED_ORDERS_FIELD_DESC);
23703
        {
23704
          oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.undeliveredOrders.size()));
1382 varun.gupt 23705
          for (Map.Entry<String, String> _iter71 : this.undeliveredOrders.entrySet())
1245 chandransh 23706
          {
1382 varun.gupt 23707
            oprot.writeString(_iter71.getKey());
23708
            oprot.writeString(_iter71.getValue());
1245 chandransh 23709
          }
23710
          oprot.writeMapEnd();
23711
        }
23712
        oprot.writeFieldEnd();
23713
      }
23714
      oprot.writeFieldStop();
23715
      oprot.writeStructEnd();
23716
    }
23717
 
23718
    @Override
23719
    public String toString() {
23720
      StringBuilder sb = new StringBuilder("updateNonDeliveryReason_args(");
23721
      boolean first = true;
23722
 
23723
      sb.append("providerId:");
23724
      sb.append(this.providerId);
23725
      first = false;
23726
      if (!first) sb.append(", ");
23727
      sb.append("undeliveredOrders:");
23728
      if (this.undeliveredOrders == null) {
23729
        sb.append("null");
23730
      } else {
23731
        sb.append(this.undeliveredOrders);
23732
      }
23733
      first = false;
23734
      sb.append(")");
23735
      return sb.toString();
23736
    }
23737
 
23738
    public void validate() throws TException {
23739
      // check for required fields
23740
    }
23741
 
23742
  }
23743
 
23744
  public static class updateNonDeliveryReason_result implements TBase<updateNonDeliveryReason_result._Fields>, java.io.Serializable, Cloneable, Comparable<updateNonDeliveryReason_result>   {
23745
    private static final TStruct STRUCT_DESC = new TStruct("updateNonDeliveryReason_result");
23746
 
23747
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
23748
 
23749
    private TransactionServiceException ex;
23750
 
23751
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
23752
    public enum _Fields implements TFieldIdEnum {
23753
      EX((short)1, "ex");
23754
 
23755
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
23756
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
23757
 
23758
      static {
23759
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
23760
          byId.put((int)field._thriftId, field);
23761
          byName.put(field.getFieldName(), field);
23762
        }
23763
      }
23764
 
23765
      /**
23766
       * Find the _Fields constant that matches fieldId, or null if its not found.
23767
       */
23768
      public static _Fields findByThriftId(int fieldId) {
23769
        return byId.get(fieldId);
23770
      }
23771
 
23772
      /**
23773
       * Find the _Fields constant that matches fieldId, throwing an exception
23774
       * if it is not found.
23775
       */
23776
      public static _Fields findByThriftIdOrThrow(int fieldId) {
23777
        _Fields fields = findByThriftId(fieldId);
23778
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
23779
        return fields;
23780
      }
23781
 
23782
      /**
23783
       * Find the _Fields constant that matches name, or null if its not found.
23784
       */
23785
      public static _Fields findByName(String name) {
23786
        return byName.get(name);
23787
      }
23788
 
23789
      private final short _thriftId;
23790
      private final String _fieldName;
23791
 
23792
      _Fields(short thriftId, String fieldName) {
23793
        _thriftId = thriftId;
23794
        _fieldName = fieldName;
23795
      }
23796
 
23797
      public short getThriftFieldId() {
23798
        return _thriftId;
23799
      }
23800
 
23801
      public String getFieldName() {
23802
        return _fieldName;
23803
      }
23804
    }
23805
 
23806
    // isset id assignments
23807
 
23808
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
23809
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
23810
          new FieldValueMetaData(TType.STRUCT)));
23811
    }});
23812
 
23813
    static {
23814
      FieldMetaData.addStructMetaDataMap(updateNonDeliveryReason_result.class, metaDataMap);
23815
    }
23816
 
23817
    public updateNonDeliveryReason_result() {
23818
    }
23819
 
23820
    public updateNonDeliveryReason_result(
23821
      TransactionServiceException ex)
23822
    {
23823
      this();
23824
      this.ex = ex;
23825
    }
23826
 
23827
    /**
23828
     * Performs a deep copy on <i>other</i>.
23829
     */
23830
    public updateNonDeliveryReason_result(updateNonDeliveryReason_result other) {
23831
      if (other.isSetEx()) {
23832
        this.ex = new TransactionServiceException(other.ex);
23833
      }
23834
    }
23835
 
23836
    public updateNonDeliveryReason_result deepCopy() {
23837
      return new updateNonDeliveryReason_result(this);
23838
    }
23839
 
23840
    @Deprecated
23841
    public updateNonDeliveryReason_result clone() {
23842
      return new updateNonDeliveryReason_result(this);
23843
    }
23844
 
23845
    public TransactionServiceException getEx() {
23846
      return this.ex;
23847
    }
23848
 
23849
    public updateNonDeliveryReason_result setEx(TransactionServiceException ex) {
23850
      this.ex = ex;
23851
      return this;
23852
    }
23853
 
23854
    public void unsetEx() {
23855
      this.ex = null;
23856
    }
23857
 
23858
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
23859
    public boolean isSetEx() {
23860
      return this.ex != null;
23861
    }
23862
 
23863
    public void setExIsSet(boolean value) {
23864
      if (!value) {
23865
        this.ex = null;
23866
      }
23867
    }
23868
 
23869
    public void setFieldValue(_Fields field, Object value) {
23870
      switch (field) {
23871
      case EX:
23872
        if (value == null) {
23873
          unsetEx();
23874
        } else {
23875
          setEx((TransactionServiceException)value);
23876
        }
23877
        break;
23878
 
23879
      }
23880
    }
23881
 
23882
    public void setFieldValue(int fieldID, Object value) {
23883
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
23884
    }
23885
 
23886
    public Object getFieldValue(_Fields field) {
23887
      switch (field) {
23888
      case EX:
23889
        return getEx();
23890
 
23891
      }
23892
      throw new IllegalStateException();
23893
    }
23894
 
23895
    public Object getFieldValue(int fieldId) {
23896
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
23897
    }
23898
 
23899
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
23900
    public boolean isSet(_Fields field) {
23901
      switch (field) {
23902
      case EX:
23903
        return isSetEx();
23904
      }
23905
      throw new IllegalStateException();
23906
    }
23907
 
23908
    public boolean isSet(int fieldID) {
23909
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
23910
    }
23911
 
23912
    @Override
23913
    public boolean equals(Object that) {
23914
      if (that == null)
23915
        return false;
23916
      if (that instanceof updateNonDeliveryReason_result)
23917
        return this.equals((updateNonDeliveryReason_result)that);
23918
      return false;
23919
    }
23920
 
23921
    public boolean equals(updateNonDeliveryReason_result that) {
23922
      if (that == null)
23923
        return false;
23924
 
23925
      boolean this_present_ex = true && this.isSetEx();
23926
      boolean that_present_ex = true && that.isSetEx();
23927
      if (this_present_ex || that_present_ex) {
23928
        if (!(this_present_ex && that_present_ex))
23929
          return false;
23930
        if (!this.ex.equals(that.ex))
23931
          return false;
23932
      }
23933
 
23934
      return true;
23935
    }
23936
 
23937
    @Override
23938
    public int hashCode() {
23939
      return 0;
23940
    }
23941
 
23942
    public int compareTo(updateNonDeliveryReason_result other) {
23943
      if (!getClass().equals(other.getClass())) {
23944
        return getClass().getName().compareTo(other.getClass().getName());
23945
      }
23946
 
23947
      int lastComparison = 0;
23948
      updateNonDeliveryReason_result typedOther = (updateNonDeliveryReason_result)other;
23949
 
23950
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
23951
      if (lastComparison != 0) {
23952
        return lastComparison;
23953
      }
23954
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
23955
      if (lastComparison != 0) {
23956
        return lastComparison;
23957
      }
23958
      return 0;
23959
    }
23960
 
23961
    public void read(TProtocol iprot) throws TException {
23962
      TField field;
23963
      iprot.readStructBegin();
23964
      while (true)
23965
      {
23966
        field = iprot.readFieldBegin();
23967
        if (field.type == TType.STOP) { 
23968
          break;
23969
        }
23970
        _Fields fieldId = _Fields.findByThriftId(field.id);
23971
        if (fieldId == null) {
23972
          TProtocolUtil.skip(iprot, field.type);
23973
        } else {
23974
          switch (fieldId) {
23975
            case EX:
23976
              if (field.type == TType.STRUCT) {
23977
                this.ex = new TransactionServiceException();
23978
                this.ex.read(iprot);
23979
              } else { 
23980
                TProtocolUtil.skip(iprot, field.type);
23981
              }
23982
              break;
23983
          }
23984
          iprot.readFieldEnd();
23985
        }
23986
      }
23987
      iprot.readStructEnd();
23988
      validate();
23989
    }
23990
 
23991
    public void write(TProtocol oprot) throws TException {
23992
      oprot.writeStructBegin(STRUCT_DESC);
23993
 
23994
      if (this.isSetEx()) {
23995
        oprot.writeFieldBegin(EX_FIELD_DESC);
23996
        this.ex.write(oprot);
23997
        oprot.writeFieldEnd();
23998
      }
23999
      oprot.writeFieldStop();
24000
      oprot.writeStructEnd();
24001
    }
24002
 
24003
    @Override
24004
    public String toString() {
24005
      StringBuilder sb = new StringBuilder("updateNonDeliveryReason_result(");
24006
      boolean first = true;
24007
 
24008
      sb.append("ex:");
24009
      if (this.ex == null) {
24010
        sb.append("null");
24011
      } else {
24012
        sb.append(this.ex);
24013
      }
24014
      first = false;
24015
      sb.append(")");
24016
      return sb.toString();
24017
    }
24018
 
24019
    public void validate() throws TException {
24020
      // check for required fields
24021
    }
24022
 
24023
  }
24024
 
1406 ankur.sing 24025
  public static class getUndeliveredOrders_args implements TBase<getUndeliveredOrders_args._Fields>, java.io.Serializable, Cloneable, Comparable<getUndeliveredOrders_args>   {
24026
    private static final TStruct STRUCT_DESC = new TStruct("getUndeliveredOrders_args");
24027
 
24028
    private static final TField PROVIDER_ID_FIELD_DESC = new TField("providerId", TType.I64, (short)1);
24029
    private static final TField WAREHOUSE_ID_FIELD_DESC = new TField("warehouseId", TType.I64, (short)2);
24030
 
24031
    private long providerId;
24032
    private long warehouseId;
24033
 
24034
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
24035
    public enum _Fields implements TFieldIdEnum {
24036
      PROVIDER_ID((short)1, "providerId"),
24037
      WAREHOUSE_ID((short)2, "warehouseId");
24038
 
24039
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
24040
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
24041
 
24042
      static {
24043
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
24044
          byId.put((int)field._thriftId, field);
24045
          byName.put(field.getFieldName(), field);
24046
        }
24047
      }
24048
 
24049
      /**
24050
       * Find the _Fields constant that matches fieldId, or null if its not found.
24051
       */
24052
      public static _Fields findByThriftId(int fieldId) {
24053
        return byId.get(fieldId);
24054
      }
24055
 
24056
      /**
24057
       * Find the _Fields constant that matches fieldId, throwing an exception
24058
       * if it is not found.
24059
       */
24060
      public static _Fields findByThriftIdOrThrow(int fieldId) {
24061
        _Fields fields = findByThriftId(fieldId);
24062
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
24063
        return fields;
24064
      }
24065
 
24066
      /**
24067
       * Find the _Fields constant that matches name, or null if its not found.
24068
       */
24069
      public static _Fields findByName(String name) {
24070
        return byName.get(name);
24071
      }
24072
 
24073
      private final short _thriftId;
24074
      private final String _fieldName;
24075
 
24076
      _Fields(short thriftId, String fieldName) {
24077
        _thriftId = thriftId;
24078
        _fieldName = fieldName;
24079
      }
24080
 
24081
      public short getThriftFieldId() {
24082
        return _thriftId;
24083
      }
24084
 
24085
      public String getFieldName() {
24086
        return _fieldName;
24087
      }
24088
    }
24089
 
24090
    // isset id assignments
24091
    private static final int __PROVIDERID_ISSET_ID = 0;
24092
    private static final int __WAREHOUSEID_ISSET_ID = 1;
24093
    private BitSet __isset_bit_vector = new BitSet(2);
24094
 
24095
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
24096
      put(_Fields.PROVIDER_ID, new FieldMetaData("providerId", TFieldRequirementType.DEFAULT, 
24097
          new FieldValueMetaData(TType.I64)));
24098
      put(_Fields.WAREHOUSE_ID, new FieldMetaData("warehouseId", TFieldRequirementType.DEFAULT, 
24099
          new FieldValueMetaData(TType.I64)));
24100
    }});
24101
 
24102
    static {
24103
      FieldMetaData.addStructMetaDataMap(getUndeliveredOrders_args.class, metaDataMap);
24104
    }
24105
 
24106
    public getUndeliveredOrders_args() {
24107
    }
24108
 
24109
    public getUndeliveredOrders_args(
24110
      long providerId,
24111
      long warehouseId)
24112
    {
24113
      this();
24114
      this.providerId = providerId;
24115
      setProviderIdIsSet(true);
24116
      this.warehouseId = warehouseId;
24117
      setWarehouseIdIsSet(true);
24118
    }
24119
 
24120
    /**
24121
     * Performs a deep copy on <i>other</i>.
24122
     */
24123
    public getUndeliveredOrders_args(getUndeliveredOrders_args other) {
24124
      __isset_bit_vector.clear();
24125
      __isset_bit_vector.or(other.__isset_bit_vector);
24126
      this.providerId = other.providerId;
24127
      this.warehouseId = other.warehouseId;
24128
    }
24129
 
24130
    public getUndeliveredOrders_args deepCopy() {
24131
      return new getUndeliveredOrders_args(this);
24132
    }
24133
 
24134
    @Deprecated
24135
    public getUndeliveredOrders_args clone() {
24136
      return new getUndeliveredOrders_args(this);
24137
    }
24138
 
24139
    public long getProviderId() {
24140
      return this.providerId;
24141
    }
24142
 
24143
    public getUndeliveredOrders_args setProviderId(long providerId) {
24144
      this.providerId = providerId;
24145
      setProviderIdIsSet(true);
24146
      return this;
24147
    }
24148
 
24149
    public void unsetProviderId() {
24150
      __isset_bit_vector.clear(__PROVIDERID_ISSET_ID);
24151
    }
24152
 
24153
    /** Returns true if field providerId is set (has been asigned a value) and false otherwise */
24154
    public boolean isSetProviderId() {
24155
      return __isset_bit_vector.get(__PROVIDERID_ISSET_ID);
24156
    }
24157
 
24158
    public void setProviderIdIsSet(boolean value) {
24159
      __isset_bit_vector.set(__PROVIDERID_ISSET_ID, value);
24160
    }
24161
 
24162
    public long getWarehouseId() {
24163
      return this.warehouseId;
24164
    }
24165
 
24166
    public getUndeliveredOrders_args setWarehouseId(long warehouseId) {
24167
      this.warehouseId = warehouseId;
24168
      setWarehouseIdIsSet(true);
24169
      return this;
24170
    }
24171
 
24172
    public void unsetWarehouseId() {
24173
      __isset_bit_vector.clear(__WAREHOUSEID_ISSET_ID);
24174
    }
24175
 
24176
    /** Returns true if field warehouseId is set (has been asigned a value) and false otherwise */
24177
    public boolean isSetWarehouseId() {
24178
      return __isset_bit_vector.get(__WAREHOUSEID_ISSET_ID);
24179
    }
24180
 
24181
    public void setWarehouseIdIsSet(boolean value) {
24182
      __isset_bit_vector.set(__WAREHOUSEID_ISSET_ID, value);
24183
    }
24184
 
24185
    public void setFieldValue(_Fields field, Object value) {
24186
      switch (field) {
24187
      case PROVIDER_ID:
24188
        if (value == null) {
24189
          unsetProviderId();
24190
        } else {
24191
          setProviderId((Long)value);
24192
        }
24193
        break;
24194
 
24195
      case WAREHOUSE_ID:
24196
        if (value == null) {
24197
          unsetWarehouseId();
24198
        } else {
24199
          setWarehouseId((Long)value);
24200
        }
24201
        break;
24202
 
24203
      }
24204
    }
24205
 
24206
    public void setFieldValue(int fieldID, Object value) {
24207
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
24208
    }
24209
 
24210
    public Object getFieldValue(_Fields field) {
24211
      switch (field) {
24212
      case PROVIDER_ID:
24213
        return new Long(getProviderId());
24214
 
24215
      case WAREHOUSE_ID:
24216
        return new Long(getWarehouseId());
24217
 
24218
      }
24219
      throw new IllegalStateException();
24220
    }
24221
 
24222
    public Object getFieldValue(int fieldId) {
24223
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
24224
    }
24225
 
24226
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
24227
    public boolean isSet(_Fields field) {
24228
      switch (field) {
24229
      case PROVIDER_ID:
24230
        return isSetProviderId();
24231
      case WAREHOUSE_ID:
24232
        return isSetWarehouseId();
24233
      }
24234
      throw new IllegalStateException();
24235
    }
24236
 
24237
    public boolean isSet(int fieldID) {
24238
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
24239
    }
24240
 
24241
    @Override
24242
    public boolean equals(Object that) {
24243
      if (that == null)
24244
        return false;
24245
      if (that instanceof getUndeliveredOrders_args)
24246
        return this.equals((getUndeliveredOrders_args)that);
24247
      return false;
24248
    }
24249
 
24250
    public boolean equals(getUndeliveredOrders_args that) {
24251
      if (that == null)
24252
        return false;
24253
 
24254
      boolean this_present_providerId = true;
24255
      boolean that_present_providerId = true;
24256
      if (this_present_providerId || that_present_providerId) {
24257
        if (!(this_present_providerId && that_present_providerId))
24258
          return false;
24259
        if (this.providerId != that.providerId)
24260
          return false;
24261
      }
24262
 
24263
      boolean this_present_warehouseId = true;
24264
      boolean that_present_warehouseId = true;
24265
      if (this_present_warehouseId || that_present_warehouseId) {
24266
        if (!(this_present_warehouseId && that_present_warehouseId))
24267
          return false;
24268
        if (this.warehouseId != that.warehouseId)
24269
          return false;
24270
      }
24271
 
24272
      return true;
24273
    }
24274
 
24275
    @Override
24276
    public int hashCode() {
24277
      return 0;
24278
    }
24279
 
24280
    public int compareTo(getUndeliveredOrders_args other) {
24281
      if (!getClass().equals(other.getClass())) {
24282
        return getClass().getName().compareTo(other.getClass().getName());
24283
      }
24284
 
24285
      int lastComparison = 0;
24286
      getUndeliveredOrders_args typedOther = (getUndeliveredOrders_args)other;
24287
 
24288
      lastComparison = Boolean.valueOf(isSetProviderId()).compareTo(isSetProviderId());
24289
      if (lastComparison != 0) {
24290
        return lastComparison;
24291
      }
24292
      lastComparison = TBaseHelper.compareTo(providerId, typedOther.providerId);
24293
      if (lastComparison != 0) {
24294
        return lastComparison;
24295
      }
24296
      lastComparison = Boolean.valueOf(isSetWarehouseId()).compareTo(isSetWarehouseId());
24297
      if (lastComparison != 0) {
24298
        return lastComparison;
24299
      }
24300
      lastComparison = TBaseHelper.compareTo(warehouseId, typedOther.warehouseId);
24301
      if (lastComparison != 0) {
24302
        return lastComparison;
24303
      }
24304
      return 0;
24305
    }
24306
 
24307
    public void read(TProtocol iprot) throws TException {
24308
      TField field;
24309
      iprot.readStructBegin();
24310
      while (true)
24311
      {
24312
        field = iprot.readFieldBegin();
24313
        if (field.type == TType.STOP) { 
24314
          break;
24315
        }
24316
        _Fields fieldId = _Fields.findByThriftId(field.id);
24317
        if (fieldId == null) {
24318
          TProtocolUtil.skip(iprot, field.type);
24319
        } else {
24320
          switch (fieldId) {
24321
            case PROVIDER_ID:
24322
              if (field.type == TType.I64) {
24323
                this.providerId = iprot.readI64();
24324
                setProviderIdIsSet(true);
24325
              } else { 
24326
                TProtocolUtil.skip(iprot, field.type);
24327
              }
24328
              break;
24329
            case WAREHOUSE_ID:
24330
              if (field.type == TType.I64) {
24331
                this.warehouseId = iprot.readI64();
24332
                setWarehouseIdIsSet(true);
24333
              } else { 
24334
                TProtocolUtil.skip(iprot, field.type);
24335
              }
24336
              break;
24337
          }
24338
          iprot.readFieldEnd();
24339
        }
24340
      }
24341
      iprot.readStructEnd();
24342
      validate();
24343
    }
24344
 
24345
    public void write(TProtocol oprot) throws TException {
24346
      validate();
24347
 
24348
      oprot.writeStructBegin(STRUCT_DESC);
24349
      oprot.writeFieldBegin(PROVIDER_ID_FIELD_DESC);
24350
      oprot.writeI64(this.providerId);
24351
      oprot.writeFieldEnd();
24352
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
24353
      oprot.writeI64(this.warehouseId);
24354
      oprot.writeFieldEnd();
24355
      oprot.writeFieldStop();
24356
      oprot.writeStructEnd();
24357
    }
24358
 
24359
    @Override
24360
    public String toString() {
24361
      StringBuilder sb = new StringBuilder("getUndeliveredOrders_args(");
24362
      boolean first = true;
24363
 
24364
      sb.append("providerId:");
24365
      sb.append(this.providerId);
24366
      first = false;
24367
      if (!first) sb.append(", ");
24368
      sb.append("warehouseId:");
24369
      sb.append(this.warehouseId);
24370
      first = false;
24371
      sb.append(")");
24372
      return sb.toString();
24373
    }
24374
 
24375
    public void validate() throws TException {
24376
      // check for required fields
24377
    }
24378
 
24379
  }
24380
 
24381
  public static class getUndeliveredOrders_result implements TBase<getUndeliveredOrders_result._Fields>, java.io.Serializable, Cloneable, Comparable<getUndeliveredOrders_result>   {
24382
    private static final TStruct STRUCT_DESC = new TStruct("getUndeliveredOrders_result");
24383
 
24384
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
24385
 
24386
    private List<Order> success;
24387
 
24388
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
24389
    public enum _Fields implements TFieldIdEnum {
24390
      SUCCESS((short)0, "success");
24391
 
24392
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
24393
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
24394
 
24395
      static {
24396
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
24397
          byId.put((int)field._thriftId, field);
24398
          byName.put(field.getFieldName(), field);
24399
        }
24400
      }
24401
 
24402
      /**
24403
       * Find the _Fields constant that matches fieldId, or null if its not found.
24404
       */
24405
      public static _Fields findByThriftId(int fieldId) {
24406
        return byId.get(fieldId);
24407
      }
24408
 
24409
      /**
24410
       * Find the _Fields constant that matches fieldId, throwing an exception
24411
       * if it is not found.
24412
       */
24413
      public static _Fields findByThriftIdOrThrow(int fieldId) {
24414
        _Fields fields = findByThriftId(fieldId);
24415
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
24416
        return fields;
24417
      }
24418
 
24419
      /**
24420
       * Find the _Fields constant that matches name, or null if its not found.
24421
       */
24422
      public static _Fields findByName(String name) {
24423
        return byName.get(name);
24424
      }
24425
 
24426
      private final short _thriftId;
24427
      private final String _fieldName;
24428
 
24429
      _Fields(short thriftId, String fieldName) {
24430
        _thriftId = thriftId;
24431
        _fieldName = fieldName;
24432
      }
24433
 
24434
      public short getThriftFieldId() {
24435
        return _thriftId;
24436
      }
24437
 
24438
      public String getFieldName() {
24439
        return _fieldName;
24440
      }
24441
    }
24442
 
24443
    // isset id assignments
24444
 
24445
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
24446
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
24447
          new ListMetaData(TType.LIST, 
24448
              new StructMetaData(TType.STRUCT, Order.class))));
24449
    }});
24450
 
24451
    static {
24452
      FieldMetaData.addStructMetaDataMap(getUndeliveredOrders_result.class, metaDataMap);
24453
    }
24454
 
24455
    public getUndeliveredOrders_result() {
24456
    }
24457
 
24458
    public getUndeliveredOrders_result(
24459
      List<Order> success)
24460
    {
24461
      this();
24462
      this.success = success;
24463
    }
24464
 
24465
    /**
24466
     * Performs a deep copy on <i>other</i>.
24467
     */
24468
    public getUndeliveredOrders_result(getUndeliveredOrders_result other) {
24469
      if (other.isSetSuccess()) {
24470
        List<Order> __this__success = new ArrayList<Order>();
24471
        for (Order other_element : other.success) {
24472
          __this__success.add(new Order(other_element));
24473
        }
24474
        this.success = __this__success;
24475
      }
24476
    }
24477
 
24478
    public getUndeliveredOrders_result deepCopy() {
24479
      return new getUndeliveredOrders_result(this);
24480
    }
24481
 
24482
    @Deprecated
24483
    public getUndeliveredOrders_result clone() {
24484
      return new getUndeliveredOrders_result(this);
24485
    }
24486
 
24487
    public int getSuccessSize() {
24488
      return (this.success == null) ? 0 : this.success.size();
24489
    }
24490
 
24491
    public java.util.Iterator<Order> getSuccessIterator() {
24492
      return (this.success == null) ? null : this.success.iterator();
24493
    }
24494
 
24495
    public void addToSuccess(Order elem) {
24496
      if (this.success == null) {
24497
        this.success = new ArrayList<Order>();
24498
      }
24499
      this.success.add(elem);
24500
    }
24501
 
24502
    public List<Order> getSuccess() {
24503
      return this.success;
24504
    }
24505
 
24506
    public getUndeliveredOrders_result setSuccess(List<Order> success) {
24507
      this.success = success;
24508
      return this;
24509
    }
24510
 
24511
    public void unsetSuccess() {
24512
      this.success = null;
24513
    }
24514
 
24515
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
24516
    public boolean isSetSuccess() {
24517
      return this.success != null;
24518
    }
24519
 
24520
    public void setSuccessIsSet(boolean value) {
24521
      if (!value) {
24522
        this.success = null;
24523
      }
24524
    }
24525
 
24526
    public void setFieldValue(_Fields field, Object value) {
24527
      switch (field) {
24528
      case SUCCESS:
24529
        if (value == null) {
24530
          unsetSuccess();
24531
        } else {
24532
          setSuccess((List<Order>)value);
24533
        }
24534
        break;
24535
 
24536
      }
24537
    }
24538
 
24539
    public void setFieldValue(int fieldID, Object value) {
24540
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
24541
    }
24542
 
24543
    public Object getFieldValue(_Fields field) {
24544
      switch (field) {
24545
      case SUCCESS:
24546
        return getSuccess();
24547
 
24548
      }
24549
      throw new IllegalStateException();
24550
    }
24551
 
24552
    public Object getFieldValue(int fieldId) {
24553
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
24554
    }
24555
 
24556
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
24557
    public boolean isSet(_Fields field) {
24558
      switch (field) {
24559
      case SUCCESS:
24560
        return isSetSuccess();
24561
      }
24562
      throw new IllegalStateException();
24563
    }
24564
 
24565
    public boolean isSet(int fieldID) {
24566
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
24567
    }
24568
 
24569
    @Override
24570
    public boolean equals(Object that) {
24571
      if (that == null)
24572
        return false;
24573
      if (that instanceof getUndeliveredOrders_result)
24574
        return this.equals((getUndeliveredOrders_result)that);
24575
      return false;
24576
    }
24577
 
24578
    public boolean equals(getUndeliveredOrders_result that) {
24579
      if (that == null)
24580
        return false;
24581
 
24582
      boolean this_present_success = true && this.isSetSuccess();
24583
      boolean that_present_success = true && that.isSetSuccess();
24584
      if (this_present_success || that_present_success) {
24585
        if (!(this_present_success && that_present_success))
24586
          return false;
24587
        if (!this.success.equals(that.success))
24588
          return false;
24589
      }
24590
 
24591
      return true;
24592
    }
24593
 
24594
    @Override
24595
    public int hashCode() {
24596
      return 0;
24597
    }
24598
 
24599
    public int compareTo(getUndeliveredOrders_result other) {
24600
      if (!getClass().equals(other.getClass())) {
24601
        return getClass().getName().compareTo(other.getClass().getName());
24602
      }
24603
 
24604
      int lastComparison = 0;
24605
      getUndeliveredOrders_result typedOther = (getUndeliveredOrders_result)other;
24606
 
24607
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
24608
      if (lastComparison != 0) {
24609
        return lastComparison;
24610
      }
24611
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
24612
      if (lastComparison != 0) {
24613
        return lastComparison;
24614
      }
24615
      return 0;
24616
    }
24617
 
24618
    public void read(TProtocol iprot) throws TException {
24619
      TField field;
24620
      iprot.readStructBegin();
24621
      while (true)
24622
      {
24623
        field = iprot.readFieldBegin();
24624
        if (field.type == TType.STOP) { 
24625
          break;
24626
        }
24627
        _Fields fieldId = _Fields.findByThriftId(field.id);
24628
        if (fieldId == null) {
24629
          TProtocolUtil.skip(iprot, field.type);
24630
        } else {
24631
          switch (fieldId) {
24632
            case SUCCESS:
24633
              if (field.type == TType.LIST) {
24634
                {
24635
                  TList _list72 = iprot.readListBegin();
24636
                  this.success = new ArrayList<Order>(_list72.size);
24637
                  for (int _i73 = 0; _i73 < _list72.size; ++_i73)
24638
                  {
24639
                    Order _elem74;
24640
                    _elem74 = new Order();
24641
                    _elem74.read(iprot);
24642
                    this.success.add(_elem74);
24643
                  }
24644
                  iprot.readListEnd();
24645
                }
24646
              } else { 
24647
                TProtocolUtil.skip(iprot, field.type);
24648
              }
24649
              break;
24650
          }
24651
          iprot.readFieldEnd();
24652
        }
24653
      }
24654
      iprot.readStructEnd();
24655
      validate();
24656
    }
24657
 
24658
    public void write(TProtocol oprot) throws TException {
24659
      oprot.writeStructBegin(STRUCT_DESC);
24660
 
24661
      if (this.isSetSuccess()) {
24662
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
24663
        {
24664
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
24665
          for (Order _iter75 : this.success)
24666
          {
24667
            _iter75.write(oprot);
24668
          }
24669
          oprot.writeListEnd();
24670
        }
24671
        oprot.writeFieldEnd();
24672
      }
24673
      oprot.writeFieldStop();
24674
      oprot.writeStructEnd();
24675
    }
24676
 
24677
    @Override
24678
    public String toString() {
24679
      StringBuilder sb = new StringBuilder("getUndeliveredOrders_result(");
24680
      boolean first = true;
24681
 
24682
      sb.append("success:");
24683
      if (this.success == null) {
24684
        sb.append("null");
24685
      } else {
24686
        sb.append(this.success);
24687
      }
24688
      first = false;
24689
      sb.append(")");
24690
      return sb.toString();
24691
    }
24692
 
24693
    public void validate() throws TException {
24694
      // check for required fields
24695
    }
24696
 
24697
  }
24698
 
305 ashish 24699
  public static class getAlerts_args implements TBase<getAlerts_args._Fields>, java.io.Serializable, Cloneable, Comparable<getAlerts_args>   {
24700
    private static final TStruct STRUCT_DESC = new TStruct("getAlerts_args");
24701
 
483 rajveer 24702
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
305 ashish 24703
    private static final TField VALID_FIELD_DESC = new TField("valid", TType.BOOL, (short)2);
24704
 
483 rajveer 24705
    private long orderId;
305 ashish 24706
    private boolean valid;
24707
 
24708
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
24709
    public enum _Fields implements TFieldIdEnum {
483 rajveer 24710
      ORDER_ID((short)1, "orderId"),
305 ashish 24711
      VALID((short)2, "valid");
24712
 
24713
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
24714
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
24715
 
24716
      static {
24717
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
24718
          byId.put((int)field._thriftId, field);
24719
          byName.put(field.getFieldName(), field);
24720
        }
24721
      }
24722
 
24723
      /**
24724
       * Find the _Fields constant that matches fieldId, or null if its not found.
24725
       */
24726
      public static _Fields findByThriftId(int fieldId) {
24727
        return byId.get(fieldId);
24728
      }
24729
 
24730
      /**
24731
       * Find the _Fields constant that matches fieldId, throwing an exception
24732
       * if it is not found.
24733
       */
24734
      public static _Fields findByThriftIdOrThrow(int fieldId) {
24735
        _Fields fields = findByThriftId(fieldId);
24736
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
24737
        return fields;
24738
      }
24739
 
24740
      /**
24741
       * Find the _Fields constant that matches name, or null if its not found.
24742
       */
24743
      public static _Fields findByName(String name) {
24744
        return byName.get(name);
24745
      }
24746
 
24747
      private final short _thriftId;
24748
      private final String _fieldName;
24749
 
24750
      _Fields(short thriftId, String fieldName) {
24751
        _thriftId = thriftId;
24752
        _fieldName = fieldName;
24753
      }
24754
 
24755
      public short getThriftFieldId() {
24756
        return _thriftId;
24757
      }
24758
 
24759
      public String getFieldName() {
24760
        return _fieldName;
24761
      }
24762
    }
24763
 
24764
    // isset id assignments
483 rajveer 24765
    private static final int __ORDERID_ISSET_ID = 0;
305 ashish 24766
    private static final int __VALID_ISSET_ID = 1;
24767
    private BitSet __isset_bit_vector = new BitSet(2);
24768
 
24769
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 24770
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
305 ashish 24771
          new FieldValueMetaData(TType.I64)));
24772
      put(_Fields.VALID, new FieldMetaData("valid", TFieldRequirementType.DEFAULT, 
24773
          new FieldValueMetaData(TType.BOOL)));
24774
    }});
24775
 
24776
    static {
24777
      FieldMetaData.addStructMetaDataMap(getAlerts_args.class, metaDataMap);
24778
    }
24779
 
24780
    public getAlerts_args() {
24781
    }
24782
 
24783
    public getAlerts_args(
483 rajveer 24784
      long orderId,
305 ashish 24785
      boolean valid)
24786
    {
24787
      this();
483 rajveer 24788
      this.orderId = orderId;
24789
      setOrderIdIsSet(true);
305 ashish 24790
      this.valid = valid;
24791
      setValidIsSet(true);
24792
    }
24793
 
24794
    /**
24795
     * Performs a deep copy on <i>other</i>.
24796
     */
24797
    public getAlerts_args(getAlerts_args other) {
24798
      __isset_bit_vector.clear();
24799
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 24800
      this.orderId = other.orderId;
305 ashish 24801
      this.valid = other.valid;
24802
    }
24803
 
24804
    public getAlerts_args deepCopy() {
24805
      return new getAlerts_args(this);
24806
    }
24807
 
24808
    @Deprecated
24809
    public getAlerts_args clone() {
24810
      return new getAlerts_args(this);
24811
    }
24812
 
483 rajveer 24813
    public long getOrderId() {
24814
      return this.orderId;
305 ashish 24815
    }
24816
 
483 rajveer 24817
    public getAlerts_args setOrderId(long orderId) {
24818
      this.orderId = orderId;
24819
      setOrderIdIsSet(true);
305 ashish 24820
      return this;
24821
    }
24822
 
483 rajveer 24823
    public void unsetOrderId() {
24824
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
305 ashish 24825
    }
24826
 
483 rajveer 24827
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
24828
    public boolean isSetOrderId() {
24829
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
305 ashish 24830
    }
24831
 
483 rajveer 24832
    public void setOrderIdIsSet(boolean value) {
24833
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
305 ashish 24834
    }
24835
 
24836
    public boolean isValid() {
24837
      return this.valid;
24838
    }
24839
 
24840
    public getAlerts_args setValid(boolean valid) {
24841
      this.valid = valid;
24842
      setValidIsSet(true);
24843
      return this;
24844
    }
24845
 
24846
    public void unsetValid() {
24847
      __isset_bit_vector.clear(__VALID_ISSET_ID);
24848
    }
24849
 
24850
    /** Returns true if field valid is set (has been asigned a value) and false otherwise */
24851
    public boolean isSetValid() {
24852
      return __isset_bit_vector.get(__VALID_ISSET_ID);
24853
    }
24854
 
24855
    public void setValidIsSet(boolean value) {
24856
      __isset_bit_vector.set(__VALID_ISSET_ID, value);
24857
    }
24858
 
24859
    public void setFieldValue(_Fields field, Object value) {
24860
      switch (field) {
483 rajveer 24861
      case ORDER_ID:
305 ashish 24862
        if (value == null) {
483 rajveer 24863
          unsetOrderId();
305 ashish 24864
        } else {
483 rajveer 24865
          setOrderId((Long)value);
305 ashish 24866
        }
24867
        break;
24868
 
24869
      case VALID:
24870
        if (value == null) {
24871
          unsetValid();
24872
        } else {
24873
          setValid((Boolean)value);
24874
        }
24875
        break;
24876
 
24877
      }
24878
    }
24879
 
24880
    public void setFieldValue(int fieldID, Object value) {
24881
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
24882
    }
24883
 
24884
    public Object getFieldValue(_Fields field) {
24885
      switch (field) {
483 rajveer 24886
      case ORDER_ID:
24887
        return new Long(getOrderId());
305 ashish 24888
 
24889
      case VALID:
24890
        return new Boolean(isValid());
24891
 
24892
      }
24893
      throw new IllegalStateException();
24894
    }
24895
 
24896
    public Object getFieldValue(int fieldId) {
24897
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
24898
    }
24899
 
24900
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
24901
    public boolean isSet(_Fields field) {
24902
      switch (field) {
483 rajveer 24903
      case ORDER_ID:
24904
        return isSetOrderId();
305 ashish 24905
      case VALID:
24906
        return isSetValid();
24907
      }
24908
      throw new IllegalStateException();
24909
    }
24910
 
24911
    public boolean isSet(int fieldID) {
24912
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
24913
    }
24914
 
24915
    @Override
24916
    public boolean equals(Object that) {
24917
      if (that == null)
24918
        return false;
24919
      if (that instanceof getAlerts_args)
24920
        return this.equals((getAlerts_args)that);
24921
      return false;
24922
    }
24923
 
24924
    public boolean equals(getAlerts_args that) {
24925
      if (that == null)
24926
        return false;
24927
 
483 rajveer 24928
      boolean this_present_orderId = true;
24929
      boolean that_present_orderId = true;
24930
      if (this_present_orderId || that_present_orderId) {
24931
        if (!(this_present_orderId && that_present_orderId))
305 ashish 24932
          return false;
483 rajveer 24933
        if (this.orderId != that.orderId)
305 ashish 24934
          return false;
24935
      }
24936
 
24937
      boolean this_present_valid = true;
24938
      boolean that_present_valid = true;
24939
      if (this_present_valid || that_present_valid) {
24940
        if (!(this_present_valid && that_present_valid))
24941
          return false;
24942
        if (this.valid != that.valid)
24943
          return false;
24944
      }
24945
 
24946
      return true;
24947
    }
24948
 
24949
    @Override
24950
    public int hashCode() {
24951
      return 0;
24952
    }
24953
 
24954
    public int compareTo(getAlerts_args other) {
24955
      if (!getClass().equals(other.getClass())) {
24956
        return getClass().getName().compareTo(other.getClass().getName());
24957
      }
24958
 
24959
      int lastComparison = 0;
24960
      getAlerts_args typedOther = (getAlerts_args)other;
24961
 
483 rajveer 24962
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
305 ashish 24963
      if (lastComparison != 0) {
24964
        return lastComparison;
24965
      }
483 rajveer 24966
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
305 ashish 24967
      if (lastComparison != 0) {
24968
        return lastComparison;
24969
      }
24970
      lastComparison = Boolean.valueOf(isSetValid()).compareTo(isSetValid());
24971
      if (lastComparison != 0) {
24972
        return lastComparison;
24973
      }
24974
      lastComparison = TBaseHelper.compareTo(valid, typedOther.valid);
24975
      if (lastComparison != 0) {
24976
        return lastComparison;
24977
      }
24978
      return 0;
24979
    }
24980
 
24981
    public void read(TProtocol iprot) throws TException {
24982
      TField field;
24983
      iprot.readStructBegin();
24984
      while (true)
24985
      {
24986
        field = iprot.readFieldBegin();
24987
        if (field.type == TType.STOP) { 
24988
          break;
24989
        }
24990
        _Fields fieldId = _Fields.findByThriftId(field.id);
24991
        if (fieldId == null) {
24992
          TProtocolUtil.skip(iprot, field.type);
24993
        } else {
24994
          switch (fieldId) {
483 rajveer 24995
            case ORDER_ID:
305 ashish 24996
              if (field.type == TType.I64) {
483 rajveer 24997
                this.orderId = iprot.readI64();
24998
                setOrderIdIsSet(true);
305 ashish 24999
              } else { 
25000
                TProtocolUtil.skip(iprot, field.type);
25001
              }
25002
              break;
25003
            case VALID:
25004
              if (field.type == TType.BOOL) {
25005
                this.valid = iprot.readBool();
25006
                setValidIsSet(true);
25007
              } else { 
25008
                TProtocolUtil.skip(iprot, field.type);
25009
              }
25010
              break;
25011
          }
25012
          iprot.readFieldEnd();
25013
        }
25014
      }
25015
      iprot.readStructEnd();
25016
      validate();
25017
    }
25018
 
25019
    public void write(TProtocol oprot) throws TException {
25020
      validate();
25021
 
25022
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 25023
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
25024
      oprot.writeI64(this.orderId);
305 ashish 25025
      oprot.writeFieldEnd();
25026
      oprot.writeFieldBegin(VALID_FIELD_DESC);
25027
      oprot.writeBool(this.valid);
25028
      oprot.writeFieldEnd();
25029
      oprot.writeFieldStop();
25030
      oprot.writeStructEnd();
25031
    }
25032
 
25033
    @Override
25034
    public String toString() {
25035
      StringBuilder sb = new StringBuilder("getAlerts_args(");
25036
      boolean first = true;
25037
 
483 rajveer 25038
      sb.append("orderId:");
25039
      sb.append(this.orderId);
305 ashish 25040
      first = false;
25041
      if (!first) sb.append(", ");
25042
      sb.append("valid:");
25043
      sb.append(this.valid);
25044
      first = false;
25045
      sb.append(")");
25046
      return sb.toString();
25047
    }
25048
 
25049
    public void validate() throws TException {
25050
      // check for required fields
25051
    }
25052
 
25053
  }
25054
 
25055
  public static class getAlerts_result implements TBase<getAlerts_result._Fields>, java.io.Serializable, Cloneable, Comparable<getAlerts_result>   {
25056
    private static final TStruct STRUCT_DESC = new TStruct("getAlerts_result");
25057
 
25058
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
25059
 
25060
    private List<Alert> success;
25061
 
25062
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
25063
    public enum _Fields implements TFieldIdEnum {
25064
      SUCCESS((short)0, "success");
25065
 
25066
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
25067
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
25068
 
25069
      static {
25070
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
25071
          byId.put((int)field._thriftId, field);
25072
          byName.put(field.getFieldName(), field);
25073
        }
25074
      }
25075
 
25076
      /**
25077
       * Find the _Fields constant that matches fieldId, or null if its not found.
25078
       */
25079
      public static _Fields findByThriftId(int fieldId) {
25080
        return byId.get(fieldId);
25081
      }
25082
 
25083
      /**
25084
       * Find the _Fields constant that matches fieldId, throwing an exception
25085
       * if it is not found.
25086
       */
25087
      public static _Fields findByThriftIdOrThrow(int fieldId) {
25088
        _Fields fields = findByThriftId(fieldId);
25089
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
25090
        return fields;
25091
      }
25092
 
25093
      /**
25094
       * Find the _Fields constant that matches name, or null if its not found.
25095
       */
25096
      public static _Fields findByName(String name) {
25097
        return byName.get(name);
25098
      }
25099
 
25100
      private final short _thriftId;
25101
      private final String _fieldName;
25102
 
25103
      _Fields(short thriftId, String fieldName) {
25104
        _thriftId = thriftId;
25105
        _fieldName = fieldName;
25106
      }
25107
 
25108
      public short getThriftFieldId() {
25109
        return _thriftId;
25110
      }
25111
 
25112
      public String getFieldName() {
25113
        return _fieldName;
25114
      }
25115
    }
25116
 
25117
    // isset id assignments
25118
 
25119
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
25120
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
25121
          new ListMetaData(TType.LIST, 
25122
              new StructMetaData(TType.STRUCT, Alert.class))));
25123
    }});
25124
 
25125
    static {
25126
      FieldMetaData.addStructMetaDataMap(getAlerts_result.class, metaDataMap);
25127
    }
25128
 
25129
    public getAlerts_result() {
25130
    }
25131
 
25132
    public getAlerts_result(
25133
      List<Alert> success)
25134
    {
25135
      this();
25136
      this.success = success;
25137
    }
25138
 
25139
    /**
25140
     * Performs a deep copy on <i>other</i>.
25141
     */
25142
    public getAlerts_result(getAlerts_result other) {
25143
      if (other.isSetSuccess()) {
25144
        List<Alert> __this__success = new ArrayList<Alert>();
25145
        for (Alert other_element : other.success) {
25146
          __this__success.add(new Alert(other_element));
25147
        }
25148
        this.success = __this__success;
25149
      }
25150
    }
25151
 
25152
    public getAlerts_result deepCopy() {
25153
      return new getAlerts_result(this);
25154
    }
25155
 
25156
    @Deprecated
25157
    public getAlerts_result clone() {
25158
      return new getAlerts_result(this);
25159
    }
25160
 
25161
    public int getSuccessSize() {
25162
      return (this.success == null) ? 0 : this.success.size();
25163
    }
25164
 
25165
    public java.util.Iterator<Alert> getSuccessIterator() {
25166
      return (this.success == null) ? null : this.success.iterator();
25167
    }
25168
 
25169
    public void addToSuccess(Alert elem) {
25170
      if (this.success == null) {
25171
        this.success = new ArrayList<Alert>();
25172
      }
25173
      this.success.add(elem);
25174
    }
25175
 
25176
    public List<Alert> getSuccess() {
25177
      return this.success;
25178
    }
25179
 
25180
    public getAlerts_result setSuccess(List<Alert> success) {
25181
      this.success = success;
25182
      return this;
25183
    }
25184
 
25185
    public void unsetSuccess() {
25186
      this.success = null;
25187
    }
25188
 
25189
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
25190
    public boolean isSetSuccess() {
25191
      return this.success != null;
25192
    }
25193
 
25194
    public void setSuccessIsSet(boolean value) {
25195
      if (!value) {
25196
        this.success = null;
25197
      }
25198
    }
25199
 
25200
    public void setFieldValue(_Fields field, Object value) {
25201
      switch (field) {
25202
      case SUCCESS:
25203
        if (value == null) {
25204
          unsetSuccess();
25205
        } else {
25206
          setSuccess((List<Alert>)value);
25207
        }
25208
        break;
25209
 
25210
      }
25211
    }
25212
 
25213
    public void setFieldValue(int fieldID, Object value) {
25214
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
25215
    }
25216
 
25217
    public Object getFieldValue(_Fields field) {
25218
      switch (field) {
25219
      case SUCCESS:
25220
        return getSuccess();
25221
 
25222
      }
25223
      throw new IllegalStateException();
25224
    }
25225
 
25226
    public Object getFieldValue(int fieldId) {
25227
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
25228
    }
25229
 
25230
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
25231
    public boolean isSet(_Fields field) {
25232
      switch (field) {
25233
      case SUCCESS:
25234
        return isSetSuccess();
25235
      }
25236
      throw new IllegalStateException();
25237
    }
25238
 
25239
    public boolean isSet(int fieldID) {
25240
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
25241
    }
25242
 
25243
    @Override
25244
    public boolean equals(Object that) {
25245
      if (that == null)
25246
        return false;
25247
      if (that instanceof getAlerts_result)
25248
        return this.equals((getAlerts_result)that);
25249
      return false;
25250
    }
25251
 
25252
    public boolean equals(getAlerts_result that) {
25253
      if (that == null)
25254
        return false;
25255
 
25256
      boolean this_present_success = true && this.isSetSuccess();
25257
      boolean that_present_success = true && that.isSetSuccess();
25258
      if (this_present_success || that_present_success) {
25259
        if (!(this_present_success && that_present_success))
25260
          return false;
25261
        if (!this.success.equals(that.success))
25262
          return false;
25263
      }
25264
 
25265
      return true;
25266
    }
25267
 
25268
    @Override
25269
    public int hashCode() {
25270
      return 0;
25271
    }
25272
 
25273
    public int compareTo(getAlerts_result other) {
25274
      if (!getClass().equals(other.getClass())) {
25275
        return getClass().getName().compareTo(other.getClass().getName());
25276
      }
25277
 
25278
      int lastComparison = 0;
25279
      getAlerts_result typedOther = (getAlerts_result)other;
25280
 
25281
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
25282
      if (lastComparison != 0) {
25283
        return lastComparison;
25284
      }
25285
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
25286
      if (lastComparison != 0) {
25287
        return lastComparison;
25288
      }
25289
      return 0;
25290
    }
25291
 
25292
    public void read(TProtocol iprot) throws TException {
25293
      TField field;
25294
      iprot.readStructBegin();
25295
      while (true)
25296
      {
25297
        field = iprot.readFieldBegin();
25298
        if (field.type == TType.STOP) { 
25299
          break;
25300
        }
25301
        _Fields fieldId = _Fields.findByThriftId(field.id);
25302
        if (fieldId == null) {
25303
          TProtocolUtil.skip(iprot, field.type);
25304
        } else {
25305
          switch (fieldId) {
25306
            case SUCCESS:
25307
              if (field.type == TType.LIST) {
25308
                {
1406 ankur.sing 25309
                  TList _list76 = iprot.readListBegin();
25310
                  this.success = new ArrayList<Alert>(_list76.size);
25311
                  for (int _i77 = 0; _i77 < _list76.size; ++_i77)
305 ashish 25312
                  {
1406 ankur.sing 25313
                    Alert _elem78;
25314
                    _elem78 = new Alert();
25315
                    _elem78.read(iprot);
25316
                    this.success.add(_elem78);
305 ashish 25317
                  }
25318
                  iprot.readListEnd();
25319
                }
25320
              } else { 
25321
                TProtocolUtil.skip(iprot, field.type);
25322
              }
25323
              break;
25324
          }
25325
          iprot.readFieldEnd();
25326
        }
25327
      }
25328
      iprot.readStructEnd();
25329
      validate();
25330
    }
25331
 
25332
    public void write(TProtocol oprot) throws TException {
25333
      oprot.writeStructBegin(STRUCT_DESC);
25334
 
25335
      if (this.isSetSuccess()) {
25336
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
25337
        {
25338
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
1406 ankur.sing 25339
          for (Alert _iter79 : this.success)
305 ashish 25340
          {
1406 ankur.sing 25341
            _iter79.write(oprot);
305 ashish 25342
          }
25343
          oprot.writeListEnd();
25344
        }
25345
        oprot.writeFieldEnd();
25346
      }
25347
      oprot.writeFieldStop();
25348
      oprot.writeStructEnd();
25349
    }
25350
 
25351
    @Override
25352
    public String toString() {
25353
      StringBuilder sb = new StringBuilder("getAlerts_result(");
25354
      boolean first = true;
25355
 
25356
      sb.append("success:");
25357
      if (this.success == null) {
25358
        sb.append("null");
25359
      } else {
25360
        sb.append(this.success);
25361
      }
25362
      first = false;
25363
      sb.append(")");
25364
      return sb.toString();
25365
    }
25366
 
25367
    public void validate() throws TException {
25368
      // check for required fields
25369
    }
25370
 
25371
  }
25372
 
25373
  public static class setAlert_args implements TBase<setAlert_args._Fields>, java.io.Serializable, Cloneable, Comparable<setAlert_args>   {
25374
    private static final TStruct STRUCT_DESC = new TStruct("setAlert_args");
25375
 
483 rajveer 25376
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
305 ashish 25377
    private static final TField UNSET_FIELD_DESC = new TField("unset", TType.BOOL, (short)2);
25378
    private static final TField TYPE_FIELD_DESC = new TField("type", TType.I64, (short)3);
25379
    private static final TField COMMENT_FIELD_DESC = new TField("comment", TType.STRING, (short)4);
25380
 
483 rajveer 25381
    private long orderId;
305 ashish 25382
    private boolean unset;
25383
    private long type;
25384
    private String comment;
25385
 
25386
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
25387
    public enum _Fields implements TFieldIdEnum {
483 rajveer 25388
      ORDER_ID((short)1, "orderId"),
305 ashish 25389
      UNSET((short)2, "unset"),
25390
      TYPE((short)3, "type"),
25391
      COMMENT((short)4, "comment");
25392
 
25393
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
25394
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
25395
 
25396
      static {
25397
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
25398
          byId.put((int)field._thriftId, field);
25399
          byName.put(field.getFieldName(), field);
25400
        }
25401
      }
25402
 
25403
      /**
25404
       * Find the _Fields constant that matches fieldId, or null if its not found.
25405
       */
25406
      public static _Fields findByThriftId(int fieldId) {
25407
        return byId.get(fieldId);
25408
      }
25409
 
25410
      /**
25411
       * Find the _Fields constant that matches fieldId, throwing an exception
25412
       * if it is not found.
25413
       */
25414
      public static _Fields findByThriftIdOrThrow(int fieldId) {
25415
        _Fields fields = findByThriftId(fieldId);
25416
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
25417
        return fields;
25418
      }
25419
 
25420
      /**
25421
       * Find the _Fields constant that matches name, or null if its not found.
25422
       */
25423
      public static _Fields findByName(String name) {
25424
        return byName.get(name);
25425
      }
25426
 
25427
      private final short _thriftId;
25428
      private final String _fieldName;
25429
 
25430
      _Fields(short thriftId, String fieldName) {
25431
        _thriftId = thriftId;
25432
        _fieldName = fieldName;
25433
      }
25434
 
25435
      public short getThriftFieldId() {
25436
        return _thriftId;
25437
      }
25438
 
25439
      public String getFieldName() {
25440
        return _fieldName;
25441
      }
25442
    }
25443
 
25444
    // isset id assignments
483 rajveer 25445
    private static final int __ORDERID_ISSET_ID = 0;
305 ashish 25446
    private static final int __UNSET_ISSET_ID = 1;
25447
    private static final int __TYPE_ISSET_ID = 2;
25448
    private BitSet __isset_bit_vector = new BitSet(3);
25449
 
25450
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 25451
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
305 ashish 25452
          new FieldValueMetaData(TType.I64)));
25453
      put(_Fields.UNSET, new FieldMetaData("unset", TFieldRequirementType.DEFAULT, 
25454
          new FieldValueMetaData(TType.BOOL)));
25455
      put(_Fields.TYPE, new FieldMetaData("type", TFieldRequirementType.DEFAULT, 
25456
          new FieldValueMetaData(TType.I64)));
25457
      put(_Fields.COMMENT, new FieldMetaData("comment", TFieldRequirementType.DEFAULT, 
25458
          new FieldValueMetaData(TType.STRING)));
25459
    }});
25460
 
25461
    static {
25462
      FieldMetaData.addStructMetaDataMap(setAlert_args.class, metaDataMap);
25463
    }
25464
 
25465
    public setAlert_args() {
25466
    }
25467
 
25468
    public setAlert_args(
483 rajveer 25469
      long orderId,
305 ashish 25470
      boolean unset,
25471
      long type,
25472
      String comment)
25473
    {
25474
      this();
483 rajveer 25475
      this.orderId = orderId;
25476
      setOrderIdIsSet(true);
305 ashish 25477
      this.unset = unset;
25478
      setUnsetIsSet(true);
25479
      this.type = type;
25480
      setTypeIsSet(true);
25481
      this.comment = comment;
25482
    }
25483
 
25484
    /**
25485
     * Performs a deep copy on <i>other</i>.
25486
     */
25487
    public setAlert_args(setAlert_args other) {
25488
      __isset_bit_vector.clear();
25489
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 25490
      this.orderId = other.orderId;
305 ashish 25491
      this.unset = other.unset;
25492
      this.type = other.type;
25493
      if (other.isSetComment()) {
25494
        this.comment = other.comment;
25495
      }
25496
    }
25497
 
25498
    public setAlert_args deepCopy() {
25499
      return new setAlert_args(this);
25500
    }
25501
 
25502
    @Deprecated
25503
    public setAlert_args clone() {
25504
      return new setAlert_args(this);
25505
    }
25506
 
483 rajveer 25507
    public long getOrderId() {
25508
      return this.orderId;
305 ashish 25509
    }
25510
 
483 rajveer 25511
    public setAlert_args setOrderId(long orderId) {
25512
      this.orderId = orderId;
25513
      setOrderIdIsSet(true);
305 ashish 25514
      return this;
25515
    }
25516
 
483 rajveer 25517
    public void unsetOrderId() {
25518
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
305 ashish 25519
    }
25520
 
483 rajveer 25521
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
25522
    public boolean isSetOrderId() {
25523
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
305 ashish 25524
    }
25525
 
483 rajveer 25526
    public void setOrderIdIsSet(boolean value) {
25527
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
305 ashish 25528
    }
25529
 
25530
    public boolean isUnset() {
25531
      return this.unset;
25532
    }
25533
 
25534
    public setAlert_args setUnset(boolean unset) {
25535
      this.unset = unset;
25536
      setUnsetIsSet(true);
25537
      return this;
25538
    }
25539
 
25540
    public void unsetUnset() {
25541
      __isset_bit_vector.clear(__UNSET_ISSET_ID);
25542
    }
25543
 
25544
    /** Returns true if field unset is set (has been asigned a value) and false otherwise */
25545
    public boolean isSetUnset() {
25546
      return __isset_bit_vector.get(__UNSET_ISSET_ID);
25547
    }
25548
 
25549
    public void setUnsetIsSet(boolean value) {
25550
      __isset_bit_vector.set(__UNSET_ISSET_ID, value);
25551
    }
25552
 
25553
    public long getType() {
25554
      return this.type;
25555
    }
25556
 
25557
    public setAlert_args setType(long type) {
25558
      this.type = type;
25559
      setTypeIsSet(true);
25560
      return this;
25561
    }
25562
 
25563
    public void unsetType() {
25564
      __isset_bit_vector.clear(__TYPE_ISSET_ID);
25565
    }
25566
 
25567
    /** Returns true if field type is set (has been asigned a value) and false otherwise */
25568
    public boolean isSetType() {
25569
      return __isset_bit_vector.get(__TYPE_ISSET_ID);
25570
    }
25571
 
25572
    public void setTypeIsSet(boolean value) {
25573
      __isset_bit_vector.set(__TYPE_ISSET_ID, value);
25574
    }
25575
 
25576
    public String getComment() {
25577
      return this.comment;
25578
    }
25579
 
25580
    public setAlert_args setComment(String comment) {
25581
      this.comment = comment;
25582
      return this;
25583
    }
25584
 
25585
    public void unsetComment() {
25586
      this.comment = null;
25587
    }
25588
 
25589
    /** Returns true if field comment is set (has been asigned a value) and false otherwise */
25590
    public boolean isSetComment() {
25591
      return this.comment != null;
25592
    }
25593
 
25594
    public void setCommentIsSet(boolean value) {
25595
      if (!value) {
25596
        this.comment = null;
25597
      }
25598
    }
25599
 
25600
    public void setFieldValue(_Fields field, Object value) {
25601
      switch (field) {
483 rajveer 25602
      case ORDER_ID:
305 ashish 25603
        if (value == null) {
483 rajveer 25604
          unsetOrderId();
305 ashish 25605
        } else {
483 rajveer 25606
          setOrderId((Long)value);
305 ashish 25607
        }
25608
        break;
25609
 
25610
      case UNSET:
25611
        if (value == null) {
25612
          unsetUnset();
25613
        } else {
25614
          setUnset((Boolean)value);
25615
        }
25616
        break;
25617
 
25618
      case TYPE:
25619
        if (value == null) {
25620
          unsetType();
25621
        } else {
25622
          setType((Long)value);
25623
        }
25624
        break;
25625
 
25626
      case COMMENT:
25627
        if (value == null) {
25628
          unsetComment();
25629
        } else {
25630
          setComment((String)value);
25631
        }
25632
        break;
25633
 
25634
      }
25635
    }
25636
 
25637
    public void setFieldValue(int fieldID, Object value) {
25638
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
25639
    }
25640
 
25641
    public Object getFieldValue(_Fields field) {
25642
      switch (field) {
483 rajveer 25643
      case ORDER_ID:
25644
        return new Long(getOrderId());
305 ashish 25645
 
25646
      case UNSET:
25647
        return new Boolean(isUnset());
25648
 
25649
      case TYPE:
25650
        return new Long(getType());
25651
 
25652
      case COMMENT:
25653
        return getComment();
25654
 
25655
      }
25656
      throw new IllegalStateException();
25657
    }
25658
 
25659
    public Object getFieldValue(int fieldId) {
25660
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
25661
    }
25662
 
25663
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
25664
    public boolean isSet(_Fields field) {
25665
      switch (field) {
483 rajveer 25666
      case ORDER_ID:
25667
        return isSetOrderId();
305 ashish 25668
      case UNSET:
25669
        return isSetUnset();
25670
      case TYPE:
25671
        return isSetType();
25672
      case COMMENT:
25673
        return isSetComment();
25674
      }
25675
      throw new IllegalStateException();
25676
    }
25677
 
25678
    public boolean isSet(int fieldID) {
25679
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
25680
    }
25681
 
25682
    @Override
25683
    public boolean equals(Object that) {
25684
      if (that == null)
25685
        return false;
25686
      if (that instanceof setAlert_args)
25687
        return this.equals((setAlert_args)that);
25688
      return false;
25689
    }
25690
 
25691
    public boolean equals(setAlert_args that) {
25692
      if (that == null)
25693
        return false;
25694
 
483 rajveer 25695
      boolean this_present_orderId = true;
25696
      boolean that_present_orderId = true;
25697
      if (this_present_orderId || that_present_orderId) {
25698
        if (!(this_present_orderId && that_present_orderId))
305 ashish 25699
          return false;
483 rajveer 25700
        if (this.orderId != that.orderId)
305 ashish 25701
          return false;
25702
      }
25703
 
25704
      boolean this_present_unset = true;
25705
      boolean that_present_unset = true;
25706
      if (this_present_unset || that_present_unset) {
25707
        if (!(this_present_unset && that_present_unset))
25708
          return false;
25709
        if (this.unset != that.unset)
25710
          return false;
25711
      }
25712
 
25713
      boolean this_present_type = true;
25714
      boolean that_present_type = true;
25715
      if (this_present_type || that_present_type) {
25716
        if (!(this_present_type && that_present_type))
25717
          return false;
25718
        if (this.type != that.type)
25719
          return false;
25720
      }
25721
 
25722
      boolean this_present_comment = true && this.isSetComment();
25723
      boolean that_present_comment = true && that.isSetComment();
25724
      if (this_present_comment || that_present_comment) {
25725
        if (!(this_present_comment && that_present_comment))
25726
          return false;
25727
        if (!this.comment.equals(that.comment))
25728
          return false;
25729
      }
25730
 
25731
      return true;
25732
    }
25733
 
25734
    @Override
25735
    public int hashCode() {
25736
      return 0;
25737
    }
25738
 
25739
    public int compareTo(setAlert_args other) {
25740
      if (!getClass().equals(other.getClass())) {
25741
        return getClass().getName().compareTo(other.getClass().getName());
25742
      }
25743
 
25744
      int lastComparison = 0;
25745
      setAlert_args typedOther = (setAlert_args)other;
25746
 
483 rajveer 25747
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
305 ashish 25748
      if (lastComparison != 0) {
25749
        return lastComparison;
25750
      }
483 rajveer 25751
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
305 ashish 25752
      if (lastComparison != 0) {
25753
        return lastComparison;
25754
      }
25755
      lastComparison = Boolean.valueOf(isSetUnset()).compareTo(isSetUnset());
25756
      if (lastComparison != 0) {
25757
        return lastComparison;
25758
      }
25759
      lastComparison = TBaseHelper.compareTo(unset, typedOther.unset);
25760
      if (lastComparison != 0) {
25761
        return lastComparison;
25762
      }
25763
      lastComparison = Boolean.valueOf(isSetType()).compareTo(isSetType());
25764
      if (lastComparison != 0) {
25765
        return lastComparison;
25766
      }
25767
      lastComparison = TBaseHelper.compareTo(type, typedOther.type);
25768
      if (lastComparison != 0) {
25769
        return lastComparison;
25770
      }
25771
      lastComparison = Boolean.valueOf(isSetComment()).compareTo(isSetComment());
25772
      if (lastComparison != 0) {
25773
        return lastComparison;
25774
      }
25775
      lastComparison = TBaseHelper.compareTo(comment, typedOther.comment);
25776
      if (lastComparison != 0) {
25777
        return lastComparison;
25778
      }
25779
      return 0;
25780
    }
25781
 
25782
    public void read(TProtocol iprot) throws TException {
25783
      TField field;
25784
      iprot.readStructBegin();
25785
      while (true)
25786
      {
25787
        field = iprot.readFieldBegin();
25788
        if (field.type == TType.STOP) { 
25789
          break;
25790
        }
25791
        _Fields fieldId = _Fields.findByThriftId(field.id);
25792
        if (fieldId == null) {
25793
          TProtocolUtil.skip(iprot, field.type);
25794
        } else {
25795
          switch (fieldId) {
483 rajveer 25796
            case ORDER_ID:
305 ashish 25797
              if (field.type == TType.I64) {
483 rajveer 25798
                this.orderId = iprot.readI64();
25799
                setOrderIdIsSet(true);
305 ashish 25800
              } else { 
25801
                TProtocolUtil.skip(iprot, field.type);
25802
              }
25803
              break;
25804
            case UNSET:
25805
              if (field.type == TType.BOOL) {
25806
                this.unset = iprot.readBool();
25807
                setUnsetIsSet(true);
25808
              } else { 
25809
                TProtocolUtil.skip(iprot, field.type);
25810
              }
25811
              break;
25812
            case TYPE:
25813
              if (field.type == TType.I64) {
25814
                this.type = iprot.readI64();
25815
                setTypeIsSet(true);
25816
              } else { 
25817
                TProtocolUtil.skip(iprot, field.type);
25818
              }
25819
              break;
25820
            case COMMENT:
25821
              if (field.type == TType.STRING) {
25822
                this.comment = iprot.readString();
25823
              } else { 
25824
                TProtocolUtil.skip(iprot, field.type);
25825
              }
25826
              break;
25827
          }
25828
          iprot.readFieldEnd();
25829
        }
25830
      }
25831
      iprot.readStructEnd();
25832
      validate();
25833
    }
25834
 
25835
    public void write(TProtocol oprot) throws TException {
25836
      validate();
25837
 
25838
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 25839
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
25840
      oprot.writeI64(this.orderId);
305 ashish 25841
      oprot.writeFieldEnd();
25842
      oprot.writeFieldBegin(UNSET_FIELD_DESC);
25843
      oprot.writeBool(this.unset);
25844
      oprot.writeFieldEnd();
25845
      oprot.writeFieldBegin(TYPE_FIELD_DESC);
25846
      oprot.writeI64(this.type);
25847
      oprot.writeFieldEnd();
25848
      if (this.comment != null) {
25849
        oprot.writeFieldBegin(COMMENT_FIELD_DESC);
25850
        oprot.writeString(this.comment);
25851
        oprot.writeFieldEnd();
25852
      }
25853
      oprot.writeFieldStop();
25854
      oprot.writeStructEnd();
25855
    }
25856
 
25857
    @Override
25858
    public String toString() {
25859
      StringBuilder sb = new StringBuilder("setAlert_args(");
25860
      boolean first = true;
25861
 
483 rajveer 25862
      sb.append("orderId:");
25863
      sb.append(this.orderId);
305 ashish 25864
      first = false;
25865
      if (!first) sb.append(", ");
25866
      sb.append("unset:");
25867
      sb.append(this.unset);
25868
      first = false;
25869
      if (!first) sb.append(", ");
25870
      sb.append("type:");
25871
      sb.append(this.type);
25872
      first = false;
25873
      if (!first) sb.append(", ");
25874
      sb.append("comment:");
25875
      if (this.comment == null) {
25876
        sb.append("null");
25877
      } else {
25878
        sb.append(this.comment);
25879
      }
25880
      first = false;
25881
      sb.append(")");
25882
      return sb.toString();
25883
    }
25884
 
25885
    public void validate() throws TException {
25886
      // check for required fields
25887
    }
25888
 
25889
  }
25890
 
25891
  public static class setAlert_result implements TBase<setAlert_result._Fields>, java.io.Serializable, Cloneable, Comparable<setAlert_result>   {
25892
    private static final TStruct STRUCT_DESC = new TStruct("setAlert_result");
25893
 
25894
 
25895
 
25896
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
25897
    public enum _Fields implements TFieldIdEnum {
25898
;
25899
 
25900
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
25901
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
25902
 
25903
      static {
25904
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
25905
          byId.put((int)field._thriftId, field);
25906
          byName.put(field.getFieldName(), field);
25907
        }
25908
      }
25909
 
25910
      /**
25911
       * Find the _Fields constant that matches fieldId, or null if its not found.
25912
       */
25913
      public static _Fields findByThriftId(int fieldId) {
25914
        return byId.get(fieldId);
25915
      }
25916
 
25917
      /**
25918
       * Find the _Fields constant that matches fieldId, throwing an exception
25919
       * if it is not found.
25920
       */
25921
      public static _Fields findByThriftIdOrThrow(int fieldId) {
25922
        _Fields fields = findByThriftId(fieldId);
25923
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
25924
        return fields;
25925
      }
25926
 
25927
      /**
25928
       * Find the _Fields constant that matches name, or null if its not found.
25929
       */
25930
      public static _Fields findByName(String name) {
25931
        return byName.get(name);
25932
      }
25933
 
25934
      private final short _thriftId;
25935
      private final String _fieldName;
25936
 
25937
      _Fields(short thriftId, String fieldName) {
25938
        _thriftId = thriftId;
25939
        _fieldName = fieldName;
25940
      }
25941
 
25942
      public short getThriftFieldId() {
25943
        return _thriftId;
25944
      }
25945
 
25946
      public String getFieldName() {
25947
        return _fieldName;
25948
      }
25949
    }
25950
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
25951
    }});
25952
 
25953
    static {
25954
      FieldMetaData.addStructMetaDataMap(setAlert_result.class, metaDataMap);
25955
    }
25956
 
25957
    public setAlert_result() {
25958
    }
25959
 
25960
    /**
25961
     * Performs a deep copy on <i>other</i>.
25962
     */
25963
    public setAlert_result(setAlert_result other) {
25964
    }
25965
 
25966
    public setAlert_result deepCopy() {
25967
      return new setAlert_result(this);
25968
    }
25969
 
25970
    @Deprecated
25971
    public setAlert_result clone() {
25972
      return new setAlert_result(this);
25973
    }
25974
 
25975
    public void setFieldValue(_Fields field, Object value) {
25976
      switch (field) {
25977
      }
25978
    }
25979
 
25980
    public void setFieldValue(int fieldID, Object value) {
25981
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
25982
    }
25983
 
25984
    public Object getFieldValue(_Fields field) {
25985
      switch (field) {
25986
      }
25987
      throw new IllegalStateException();
25988
    }
25989
 
25990
    public Object getFieldValue(int fieldId) {
25991
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
25992
    }
25993
 
25994
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
25995
    public boolean isSet(_Fields field) {
25996
      switch (field) {
25997
      }
25998
      throw new IllegalStateException();
25999
    }
26000
 
26001
    public boolean isSet(int fieldID) {
26002
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
26003
    }
26004
 
26005
    @Override
26006
    public boolean equals(Object that) {
26007
      if (that == null)
26008
        return false;
26009
      if (that instanceof setAlert_result)
26010
        return this.equals((setAlert_result)that);
26011
      return false;
26012
    }
26013
 
26014
    public boolean equals(setAlert_result that) {
26015
      if (that == null)
26016
        return false;
26017
 
26018
      return true;
26019
    }
26020
 
26021
    @Override
26022
    public int hashCode() {
26023
      return 0;
26024
    }
26025
 
26026
    public int compareTo(setAlert_result other) {
26027
      if (!getClass().equals(other.getClass())) {
26028
        return getClass().getName().compareTo(other.getClass().getName());
26029
      }
26030
 
26031
      int lastComparison = 0;
26032
      setAlert_result typedOther = (setAlert_result)other;
26033
 
26034
      return 0;
26035
    }
26036
 
26037
    public void read(TProtocol iprot) throws TException {
26038
      TField field;
26039
      iprot.readStructBegin();
26040
      while (true)
26041
      {
26042
        field = iprot.readFieldBegin();
26043
        if (field.type == TType.STOP) { 
26044
          break;
26045
        }
26046
        _Fields fieldId = _Fields.findByThriftId(field.id);
26047
        if (fieldId == null) {
26048
          TProtocolUtil.skip(iprot, field.type);
26049
        } else {
26050
          switch (fieldId) {
26051
          }
26052
          iprot.readFieldEnd();
26053
        }
26054
      }
26055
      iprot.readStructEnd();
26056
      validate();
26057
    }
26058
 
26059
    public void write(TProtocol oprot) throws TException {
26060
      oprot.writeStructBegin(STRUCT_DESC);
26061
 
26062
      oprot.writeFieldStop();
26063
      oprot.writeStructEnd();
26064
    }
26065
 
26066
    @Override
26067
    public String toString() {
26068
      StringBuilder sb = new StringBuilder("setAlert_result(");
26069
      boolean first = true;
26070
 
26071
      sb.append(")");
26072
      return sb.toString();
26073
    }
26074
 
26075
    public void validate() throws TException {
26076
      // check for required fields
26077
    }
26078
 
26079
  }
26080
 
68 ashish 26081
}