Subversion Repositories SmartDukaan

Rev

Rev 8618 | Rev 8914 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 8618 Rev 8907
Line 229... Line 229...
229
     * @param paymentId
229
     * @param paymentId
230
     * @param category
230
     * @param category
231
     */
231
     */
232
    public void markPaymentAsProcessed(long paymentId, ExtraPaymentProcessingType category) throws org.apache.thrift.TException;
232
    public void markPaymentAsProcessed(long paymentId, ExtraPaymentProcessingType category) throws org.apache.thrift.TException;
233
 
233
 
-
 
234
    public boolean validatePaymentAtGateway(long merchantTxnId, double amount, boolean isDigital) throws PaymentException, org.apache.thrift.TException;
-
 
235
 
234
  }
236
  }
235
 
237
 
236
  public interface AsyncIface extends in.shop2020.generic.GenericService .AsyncIface {
238
  public interface AsyncIface extends in.shop2020.generic.GenericService .AsyncIface {
237
 
239
 
238
    public void createPayment(long userId, double amount, long gatewayId, long txnId, boolean isDigital, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createPayment_call> resultHandler) throws org.apache.thrift.TException;
240
    public void createPayment(long userId, double amount, long gatewayId, long txnId, boolean isDigital, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createPayment_call> resultHandler) throws org.apache.thrift.TException;
Line 275... Line 277...
275
 
277
 
276
    public void getPaymentsRequiringExtraProcessing(ExtraPaymentProcessingType category, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getPaymentsRequiringExtraProcessing_call> resultHandler) throws org.apache.thrift.TException;
278
    public void getPaymentsRequiringExtraProcessing(ExtraPaymentProcessingType category, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getPaymentsRequiringExtraProcessing_call> resultHandler) throws org.apache.thrift.TException;
277
 
279
 
278
    public void markPaymentAsProcessed(long paymentId, ExtraPaymentProcessingType category, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.markPaymentAsProcessed_call> resultHandler) throws org.apache.thrift.TException;
280
    public void markPaymentAsProcessed(long paymentId, ExtraPaymentProcessingType category, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.markPaymentAsProcessed_call> resultHandler) throws org.apache.thrift.TException;
279
 
281
 
-
 
282
    public void validatePaymentAtGateway(long merchantTxnId, double amount, boolean isDigital, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.validatePaymentAtGateway_call> resultHandler) throws org.apache.thrift.TException;
-
 
283
 
280
  }
284
  }
281
 
285
 
282
  public static class Client extends in.shop2020.generic.GenericService.Client implements Iface {
286
  public static class Client extends in.shop2020.generic.GenericService.Client implements Iface {
283
    public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
287
    public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
284
      public Factory() {}
288
      public Factory() {}
Line 865... Line 869...
865
      markPaymentAsProcessed_result result = new markPaymentAsProcessed_result();
869
      markPaymentAsProcessed_result result = new markPaymentAsProcessed_result();
866
      receiveBase(result, "markPaymentAsProcessed");
870
      receiveBase(result, "markPaymentAsProcessed");
867
      return;
871
      return;
868
    }
872
    }
869
 
873
 
-
 
874
    public boolean validatePaymentAtGateway(long merchantTxnId, double amount, boolean isDigital) throws PaymentException, org.apache.thrift.TException
-
 
875
    {
-
 
876
      send_validatePaymentAtGateway(merchantTxnId, amount, isDigital);
-
 
877
      return recv_validatePaymentAtGateway();
-
 
878
    }
-
 
879
 
-
 
880
    public void send_validatePaymentAtGateway(long merchantTxnId, double amount, boolean isDigital) throws org.apache.thrift.TException
-
 
881
    {
-
 
882
      validatePaymentAtGateway_args args = new validatePaymentAtGateway_args();
-
 
883
      args.setMerchantTxnId(merchantTxnId);
-
 
884
      args.setAmount(amount);
-
 
885
      args.setIsDigital(isDigital);
-
 
886
      sendBase("validatePaymentAtGateway", args);
-
 
887
    }
-
 
888
 
-
 
889
    public boolean recv_validatePaymentAtGateway() throws PaymentException, org.apache.thrift.TException
-
 
890
    {
-
 
891
      validatePaymentAtGateway_result result = new validatePaymentAtGateway_result();
-
 
892
      receiveBase(result, "validatePaymentAtGateway");
-
 
893
      if (result.isSetSuccess()) {
-
 
894
        return result.success;
-
 
895
      }
-
 
896
      if (result.pe != null) {
-
 
897
        throw result.pe;
-
 
898
      }
-
 
899
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "validatePaymentAtGateway failed: unknown result");
-
 
900
    }
-
 
901
 
870
  }
902
  }
871
  public static class AsyncClient extends in.shop2020.generic.GenericService.AsyncClient implements AsyncIface {
903
  public static class AsyncClient extends in.shop2020.generic.GenericService.AsyncClient implements AsyncIface {
872
    public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
904
    public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
873
      private org.apache.thrift.async.TAsyncClientManager clientManager;
905
      private org.apache.thrift.async.TAsyncClientManager clientManager;
874
      private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
906
      private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
Line 1657... Line 1689...
1657
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1689
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1658
        (new Client(prot)).recv_markPaymentAsProcessed();
1690
        (new Client(prot)).recv_markPaymentAsProcessed();
1659
      }
1691
      }
1660
    }
1692
    }
1661
 
1693
 
-
 
1694
    public void validatePaymentAtGateway(long merchantTxnId, double amount, boolean isDigital, org.apache.thrift.async.AsyncMethodCallback<validatePaymentAtGateway_call> resultHandler) throws org.apache.thrift.TException {
-
 
1695
      checkReady();
-
 
1696
      validatePaymentAtGateway_call method_call = new validatePaymentAtGateway_call(merchantTxnId, amount, isDigital, resultHandler, this, ___protocolFactory, ___transport);
-
 
1697
      this.___currentMethod = method_call;
-
 
1698
      ___manager.call(method_call);
-
 
1699
    }
-
 
1700
 
-
 
1701
    public static class validatePaymentAtGateway_call extends org.apache.thrift.async.TAsyncMethodCall {
-
 
1702
      private long merchantTxnId;
-
 
1703
      private double amount;
-
 
1704
      private boolean isDigital;
-
 
1705
      public validatePaymentAtGateway_call(long merchantTxnId, double amount, boolean isDigital, org.apache.thrift.async.AsyncMethodCallback<validatePaymentAtGateway_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
-
 
1706
        super(client, protocolFactory, transport, resultHandler, false);
-
 
1707
        this.merchantTxnId = merchantTxnId;
-
 
1708
        this.amount = amount;
-
 
1709
        this.isDigital = isDigital;
-
 
1710
      }
-
 
1711
 
-
 
1712
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
-
 
1713
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("validatePaymentAtGateway", org.apache.thrift.protocol.TMessageType.CALL, 0));
-
 
1714
        validatePaymentAtGateway_args args = new validatePaymentAtGateway_args();
-
 
1715
        args.setMerchantTxnId(merchantTxnId);
-
 
1716
        args.setAmount(amount);
-
 
1717
        args.setIsDigital(isDigital);
-
 
1718
        args.write(prot);
-
 
1719
        prot.writeMessageEnd();
-
 
1720
      }
-
 
1721
 
-
 
1722
      public boolean getResult() throws PaymentException, org.apache.thrift.TException {
-
 
1723
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
-
 
1724
          throw new IllegalStateException("Method call not finished!");
-
 
1725
        }
-
 
1726
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
-
 
1727
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
-
 
1728
        return (new Client(prot)).recv_validatePaymentAtGateway();
-
 
1729
      }
-
 
1730
    }
-
 
1731
 
1662
  }
1732
  }
1663
 
1733
 
1664
  public static class Processor<I extends Iface> extends in.shop2020.generic.GenericService.Processor implements org.apache.thrift.TProcessor {
1734
  public static class Processor<I extends Iface> extends in.shop2020.generic.GenericService.Processor implements org.apache.thrift.TProcessor {
1665
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
1735
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
1666
    public Processor(I iface) {
1736
    public Processor(I iface) {
Line 1691... Line 1761...
1691
      processMap.put("capturePayment", new capturePayment());
1761
      processMap.put("capturePayment", new capturePayment());
1692
      processMap.put("refundPayment", new refundPayment());
1762
      processMap.put("refundPayment", new refundPayment());
1693
      processMap.put("partiallyCapturePayment", new partiallyCapturePayment());
1763
      processMap.put("partiallyCapturePayment", new partiallyCapturePayment());
1694
      processMap.put("getPaymentsRequiringExtraProcessing", new getPaymentsRequiringExtraProcessing());
1764
      processMap.put("getPaymentsRequiringExtraProcessing", new getPaymentsRequiringExtraProcessing());
1695
      processMap.put("markPaymentAsProcessed", new markPaymentAsProcessed());
1765
      processMap.put("markPaymentAsProcessed", new markPaymentAsProcessed());
-
 
1766
      processMap.put("validatePaymentAtGateway", new validatePaymentAtGateway());
1696
      return processMap;
1767
      return processMap;
1697
    }
1768
    }
1698
 
1769
 
1699
    private static class createPayment<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createPayment_args> {
1770
    private static class createPayment<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createPayment_args> {
1700
      public createPayment() {
1771
      public createPayment() {
Line 2108... Line 2179...
2108
        iface.markPaymentAsProcessed(args.paymentId, args.category);
2179
        iface.markPaymentAsProcessed(args.paymentId, args.category);
2109
        return result;
2180
        return result;
2110
      }
2181
      }
2111
    }
2182
    }
2112
 
2183
 
-
 
2184
    private static class validatePaymentAtGateway<I extends Iface> extends org.apache.thrift.ProcessFunction<I, validatePaymentAtGateway_args> {
-
 
2185
      public validatePaymentAtGateway() {
-
 
2186
        super("validatePaymentAtGateway");
-
 
2187
      }
-
 
2188
 
-
 
2189
      protected validatePaymentAtGateway_args getEmptyArgsInstance() {
-
 
2190
        return new validatePaymentAtGateway_args();
-
 
2191
      }
-
 
2192
 
-
 
2193
      protected validatePaymentAtGateway_result getResult(I iface, validatePaymentAtGateway_args args) throws org.apache.thrift.TException {
-
 
2194
        validatePaymentAtGateway_result result = new validatePaymentAtGateway_result();
-
 
2195
        try {
-
 
2196
          result.success = iface.validatePaymentAtGateway(args.merchantTxnId, args.amount, args.isDigital);
-
 
2197
          result.setSuccessIsSet(true);
-
 
2198
        } catch (PaymentException pe) {
-
 
2199
          result.pe = pe;
-
 
2200
        }
-
 
2201
        return result;
-
 
2202
      }
-
 
2203
    }
-
 
2204
 
2113
  }
2205
  }
2114
 
2206
 
2115
  public static class createPayment_args implements org.apache.thrift.TBase<createPayment_args, createPayment_args._Fields>, java.io.Serializable, Cloneable   {
2207
  public static class createPayment_args implements org.apache.thrift.TBase<createPayment_args, createPayment_args._Fields>, java.io.Serializable, Cloneable   {
2116
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createPayment_args");
2208
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createPayment_args");
2117
 
2209
 
Line 19170... Line 19262...
19170
      sb.append(")");
19262
      sb.append(")");
19171
      return sb.toString();
19263
      return sb.toString();
19172
    }
19264
    }
19173
 
19265
 
19174
    public void validate() throws org.apache.thrift.TException {
19266
    public void validate() throws org.apache.thrift.TException {
-
 
19267
      // check for required fields
-
 
19268
    }
-
 
19269
 
-
 
19270
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-
 
19271
      try {
-
 
19272
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-
 
19273
      } catch (org.apache.thrift.TException te) {
-
 
19274
        throw new java.io.IOException(te);
-
 
19275
      }
-
 
19276
    }
-
 
19277
 
-
 
19278
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-
 
19279
      try {
-
 
19280
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-
 
19281
      } catch (org.apache.thrift.TException te) {
-
 
19282
        throw new java.io.IOException(te);
-
 
19283
      }
-
 
19284
    }
-
 
19285
 
-
 
19286
  }
-
 
19287
 
-
 
19288
  public static class validatePaymentAtGateway_args implements org.apache.thrift.TBase<validatePaymentAtGateway_args, validatePaymentAtGateway_args._Fields>, java.io.Serializable, Cloneable   {
-
 
19289
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("validatePaymentAtGateway_args");
-
 
19290
 
-
 
19291
    private static final org.apache.thrift.protocol.TField MERCHANT_TXN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("merchantTxnId", org.apache.thrift.protocol.TType.I64, (short)1);
-
 
19292
    private static final org.apache.thrift.protocol.TField AMOUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("amount", org.apache.thrift.protocol.TType.DOUBLE, (short)2);
-
 
19293
    private static final org.apache.thrift.protocol.TField IS_DIGITAL_FIELD_DESC = new org.apache.thrift.protocol.TField("isDigital", org.apache.thrift.protocol.TType.BOOL, (short)3);
-
 
19294
 
-
 
19295
    private long merchantTxnId; // required
-
 
19296
    private double amount; // required
-
 
19297
    private boolean isDigital; // required
-
 
19298
 
-
 
19299
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
19300
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-
 
19301
      MERCHANT_TXN_ID((short)1, "merchantTxnId"),
-
 
19302
      AMOUNT((short)2, "amount"),
-
 
19303
      IS_DIGITAL((short)3, "isDigital");
-
 
19304
 
-
 
19305
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
19306
 
-
 
19307
      static {
-
 
19308
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
19309
          byName.put(field.getFieldName(), field);
-
 
19310
        }
-
 
19311
      }
-
 
19312
 
-
 
19313
      /**
-
 
19314
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
19315
       */
-
 
19316
      public static _Fields findByThriftId(int fieldId) {
-
 
19317
        switch(fieldId) {
-
 
19318
          case 1: // MERCHANT_TXN_ID
-
 
19319
            return MERCHANT_TXN_ID;
-
 
19320
          case 2: // AMOUNT
-
 
19321
            return AMOUNT;
-
 
19322
          case 3: // IS_DIGITAL
-
 
19323
            return IS_DIGITAL;
-
 
19324
          default:
-
 
19325
            return null;
-
 
19326
        }
-
 
19327
      }
-
 
19328
 
-
 
19329
      /**
-
 
19330
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
19331
       * if it is not found.
-
 
19332
       */
-
 
19333
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
19334
        _Fields fields = findByThriftId(fieldId);
-
 
19335
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
19336
        return fields;
-
 
19337
      }
-
 
19338
 
-
 
19339
      /**
-
 
19340
       * Find the _Fields constant that matches name, or null if its not found.
-
 
19341
       */
-
 
19342
      public static _Fields findByName(String name) {
-
 
19343
        return byName.get(name);
-
 
19344
      }
-
 
19345
 
-
 
19346
      private final short _thriftId;
-
 
19347
      private final String _fieldName;
-
 
19348
 
-
 
19349
      _Fields(short thriftId, String fieldName) {
-
 
19350
        _thriftId = thriftId;
-
 
19351
        _fieldName = fieldName;
-
 
19352
      }
-
 
19353
 
-
 
19354
      public short getThriftFieldId() {
-
 
19355
        return _thriftId;
-
 
19356
      }
-
 
19357
 
-
 
19358
      public String getFieldName() {
-
 
19359
        return _fieldName;
-
 
19360
      }
-
 
19361
    }
-
 
19362
 
-
 
19363
    // isset id assignments
-
 
19364
    private static final int __MERCHANTTXNID_ISSET_ID = 0;
-
 
19365
    private static final int __AMOUNT_ISSET_ID = 1;
-
 
19366
    private static final int __ISDIGITAL_ISSET_ID = 2;
-
 
19367
    private BitSet __isset_bit_vector = new BitSet(3);
-
 
19368
 
-
 
19369
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
 
19370
    static {
-
 
19371
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-
 
19372
      tmpMap.put(_Fields.MERCHANT_TXN_ID, new org.apache.thrift.meta_data.FieldMetaData("merchantTxnId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
19373
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
-
 
19374
      tmpMap.put(_Fields.AMOUNT, new org.apache.thrift.meta_data.FieldMetaData("amount", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
19375
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
-
 
19376
      tmpMap.put(_Fields.IS_DIGITAL, new org.apache.thrift.meta_data.FieldMetaData("isDigital", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
19377
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
-
 
19378
      metaDataMap = Collections.unmodifiableMap(tmpMap);
-
 
19379
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(validatePaymentAtGateway_args.class, metaDataMap);
-
 
19380
    }
-
 
19381
 
-
 
19382
    public validatePaymentAtGateway_args() {
-
 
19383
    }
-
 
19384
 
-
 
19385
    public validatePaymentAtGateway_args(
-
 
19386
      long merchantTxnId,
-
 
19387
      double amount,
-
 
19388
      boolean isDigital)
-
 
19389
    {
-
 
19390
      this();
-
 
19391
      this.merchantTxnId = merchantTxnId;
-
 
19392
      setMerchantTxnIdIsSet(true);
-
 
19393
      this.amount = amount;
-
 
19394
      setAmountIsSet(true);
-
 
19395
      this.isDigital = isDigital;
-
 
19396
      setIsDigitalIsSet(true);
-
 
19397
    }
-
 
19398
 
-
 
19399
    /**
-
 
19400
     * Performs a deep copy on <i>other</i>.
-
 
19401
     */
-
 
19402
    public validatePaymentAtGateway_args(validatePaymentAtGateway_args other) {
-
 
19403
      __isset_bit_vector.clear();
-
 
19404
      __isset_bit_vector.or(other.__isset_bit_vector);
-
 
19405
      this.merchantTxnId = other.merchantTxnId;
-
 
19406
      this.amount = other.amount;
-
 
19407
      this.isDigital = other.isDigital;
-
 
19408
    }
-
 
19409
 
-
 
19410
    public validatePaymentAtGateway_args deepCopy() {
-
 
19411
      return new validatePaymentAtGateway_args(this);
-
 
19412
    }
-
 
19413
 
-
 
19414
    @Override
-
 
19415
    public void clear() {
-
 
19416
      setMerchantTxnIdIsSet(false);
-
 
19417
      this.merchantTxnId = 0;
-
 
19418
      setAmountIsSet(false);
-
 
19419
      this.amount = 0.0;
-
 
19420
      setIsDigitalIsSet(false);
-
 
19421
      this.isDigital = false;
-
 
19422
    }
-
 
19423
 
-
 
19424
    public long getMerchantTxnId() {
-
 
19425
      return this.merchantTxnId;
-
 
19426
    }
-
 
19427
 
-
 
19428
    public void setMerchantTxnId(long merchantTxnId) {
-
 
19429
      this.merchantTxnId = merchantTxnId;
-
 
19430
      setMerchantTxnIdIsSet(true);
-
 
19431
    }
-
 
19432
 
-
 
19433
    public void unsetMerchantTxnId() {
-
 
19434
      __isset_bit_vector.clear(__MERCHANTTXNID_ISSET_ID);
-
 
19435
    }
-
 
19436
 
-
 
19437
    /** Returns true if field merchantTxnId is set (has been assigned a value) and false otherwise */
-
 
19438
    public boolean isSetMerchantTxnId() {
-
 
19439
      return __isset_bit_vector.get(__MERCHANTTXNID_ISSET_ID);
-
 
19440
    }
-
 
19441
 
-
 
19442
    public void setMerchantTxnIdIsSet(boolean value) {
-
 
19443
      __isset_bit_vector.set(__MERCHANTTXNID_ISSET_ID, value);
-
 
19444
    }
-
 
19445
 
-
 
19446
    public double getAmount() {
-
 
19447
      return this.amount;
-
 
19448
    }
-
 
19449
 
-
 
19450
    public void setAmount(double amount) {
-
 
19451
      this.amount = amount;
-
 
19452
      setAmountIsSet(true);
-
 
19453
    }
-
 
19454
 
-
 
19455
    public void unsetAmount() {
-
 
19456
      __isset_bit_vector.clear(__AMOUNT_ISSET_ID);
-
 
19457
    }
-
 
19458
 
-
 
19459
    /** Returns true if field amount is set (has been assigned a value) and false otherwise */
-
 
19460
    public boolean isSetAmount() {
-
 
19461
      return __isset_bit_vector.get(__AMOUNT_ISSET_ID);
-
 
19462
    }
-
 
19463
 
-
 
19464
    public void setAmountIsSet(boolean value) {
-
 
19465
      __isset_bit_vector.set(__AMOUNT_ISSET_ID, value);
-
 
19466
    }
-
 
19467
 
-
 
19468
    public boolean isIsDigital() {
-
 
19469
      return this.isDigital;
-
 
19470
    }
-
 
19471
 
-
 
19472
    public void setIsDigital(boolean isDigital) {
-
 
19473
      this.isDigital = isDigital;
-
 
19474
      setIsDigitalIsSet(true);
-
 
19475
    }
-
 
19476
 
-
 
19477
    public void unsetIsDigital() {
-
 
19478
      __isset_bit_vector.clear(__ISDIGITAL_ISSET_ID);
-
 
19479
    }
-
 
19480
 
-
 
19481
    /** Returns true if field isDigital is set (has been assigned a value) and false otherwise */
-
 
19482
    public boolean isSetIsDigital() {
-
 
19483
      return __isset_bit_vector.get(__ISDIGITAL_ISSET_ID);
-
 
19484
    }
-
 
19485
 
-
 
19486
    public void setIsDigitalIsSet(boolean value) {
-
 
19487
      __isset_bit_vector.set(__ISDIGITAL_ISSET_ID, value);
-
 
19488
    }
-
 
19489
 
-
 
19490
    public void setFieldValue(_Fields field, Object value) {
-
 
19491
      switch (field) {
-
 
19492
      case MERCHANT_TXN_ID:
-
 
19493
        if (value == null) {
-
 
19494
          unsetMerchantTxnId();
-
 
19495
        } else {
-
 
19496
          setMerchantTxnId((Long)value);
-
 
19497
        }
-
 
19498
        break;
-
 
19499
 
-
 
19500
      case AMOUNT:
-
 
19501
        if (value == null) {
-
 
19502
          unsetAmount();
-
 
19503
        } else {
-
 
19504
          setAmount((Double)value);
-
 
19505
        }
-
 
19506
        break;
-
 
19507
 
-
 
19508
      case IS_DIGITAL:
-
 
19509
        if (value == null) {
-
 
19510
          unsetIsDigital();
-
 
19511
        } else {
-
 
19512
          setIsDigital((Boolean)value);
-
 
19513
        }
-
 
19514
        break;
-
 
19515
 
-
 
19516
      }
-
 
19517
    }
-
 
19518
 
-
 
19519
    public Object getFieldValue(_Fields field) {
-
 
19520
      switch (field) {
-
 
19521
      case MERCHANT_TXN_ID:
-
 
19522
        return Long.valueOf(getMerchantTxnId());
-
 
19523
 
-
 
19524
      case AMOUNT:
-
 
19525
        return Double.valueOf(getAmount());
-
 
19526
 
-
 
19527
      case IS_DIGITAL:
-
 
19528
        return Boolean.valueOf(isIsDigital());
-
 
19529
 
-
 
19530
      }
-
 
19531
      throw new IllegalStateException();
-
 
19532
    }
-
 
19533
 
-
 
19534
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
-
 
19535
    public boolean isSet(_Fields field) {
-
 
19536
      if (field == null) {
-
 
19537
        throw new IllegalArgumentException();
-
 
19538
      }
-
 
19539
 
-
 
19540
      switch (field) {
-
 
19541
      case MERCHANT_TXN_ID:
-
 
19542
        return isSetMerchantTxnId();
-
 
19543
      case AMOUNT:
-
 
19544
        return isSetAmount();
-
 
19545
      case IS_DIGITAL:
-
 
19546
        return isSetIsDigital();
-
 
19547
      }
-
 
19548
      throw new IllegalStateException();
-
 
19549
    }
-
 
19550
 
-
 
19551
    @Override
-
 
19552
    public boolean equals(Object that) {
-
 
19553
      if (that == null)
-
 
19554
        return false;
-
 
19555
      if (that instanceof validatePaymentAtGateway_args)
-
 
19556
        return this.equals((validatePaymentAtGateway_args)that);
-
 
19557
      return false;
-
 
19558
    }
-
 
19559
 
-
 
19560
    public boolean equals(validatePaymentAtGateway_args that) {
-
 
19561
      if (that == null)
-
 
19562
        return false;
-
 
19563
 
-
 
19564
      boolean this_present_merchantTxnId = true;
-
 
19565
      boolean that_present_merchantTxnId = true;
-
 
19566
      if (this_present_merchantTxnId || that_present_merchantTxnId) {
-
 
19567
        if (!(this_present_merchantTxnId && that_present_merchantTxnId))
-
 
19568
          return false;
-
 
19569
        if (this.merchantTxnId != that.merchantTxnId)
-
 
19570
          return false;
-
 
19571
      }
-
 
19572
 
-
 
19573
      boolean this_present_amount = true;
-
 
19574
      boolean that_present_amount = true;
-
 
19575
      if (this_present_amount || that_present_amount) {
-
 
19576
        if (!(this_present_amount && that_present_amount))
-
 
19577
          return false;
-
 
19578
        if (this.amount != that.amount)
-
 
19579
          return false;
-
 
19580
      }
-
 
19581
 
-
 
19582
      boolean this_present_isDigital = true;
-
 
19583
      boolean that_present_isDigital = true;
-
 
19584
      if (this_present_isDigital || that_present_isDigital) {
-
 
19585
        if (!(this_present_isDigital && that_present_isDigital))
-
 
19586
          return false;
-
 
19587
        if (this.isDigital != that.isDigital)
-
 
19588
          return false;
-
 
19589
      }
-
 
19590
 
-
 
19591
      return true;
-
 
19592
    }
-
 
19593
 
-
 
19594
    @Override
-
 
19595
    public int hashCode() {
-
 
19596
      return 0;
-
 
19597
    }
-
 
19598
 
-
 
19599
    public int compareTo(validatePaymentAtGateway_args other) {
-
 
19600
      if (!getClass().equals(other.getClass())) {
-
 
19601
        return getClass().getName().compareTo(other.getClass().getName());
-
 
19602
      }
-
 
19603
 
-
 
19604
      int lastComparison = 0;
-
 
19605
      validatePaymentAtGateway_args typedOther = (validatePaymentAtGateway_args)other;
-
 
19606
 
-
 
19607
      lastComparison = Boolean.valueOf(isSetMerchantTxnId()).compareTo(typedOther.isSetMerchantTxnId());
-
 
19608
      if (lastComparison != 0) {
-
 
19609
        return lastComparison;
-
 
19610
      }
-
 
19611
      if (isSetMerchantTxnId()) {
-
 
19612
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.merchantTxnId, typedOther.merchantTxnId);
-
 
19613
        if (lastComparison != 0) {
-
 
19614
          return lastComparison;
-
 
19615
        }
-
 
19616
      }
-
 
19617
      lastComparison = Boolean.valueOf(isSetAmount()).compareTo(typedOther.isSetAmount());
-
 
19618
      if (lastComparison != 0) {
-
 
19619
        return lastComparison;
-
 
19620
      }
-
 
19621
      if (isSetAmount()) {
-
 
19622
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.amount, typedOther.amount);
-
 
19623
        if (lastComparison != 0) {
-
 
19624
          return lastComparison;
-
 
19625
        }
-
 
19626
      }
-
 
19627
      lastComparison = Boolean.valueOf(isSetIsDigital()).compareTo(typedOther.isSetIsDigital());
-
 
19628
      if (lastComparison != 0) {
-
 
19629
        return lastComparison;
-
 
19630
      }
-
 
19631
      if (isSetIsDigital()) {
-
 
19632
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isDigital, typedOther.isDigital);
-
 
19633
        if (lastComparison != 0) {
-
 
19634
          return lastComparison;
-
 
19635
        }
-
 
19636
      }
-
 
19637
      return 0;
-
 
19638
    }
-
 
19639
 
-
 
19640
    public _Fields fieldForId(int fieldId) {
-
 
19641
      return _Fields.findByThriftId(fieldId);
-
 
19642
    }
-
 
19643
 
-
 
19644
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-
 
19645
      org.apache.thrift.protocol.TField field;
-
 
19646
      iprot.readStructBegin();
-
 
19647
      while (true)
-
 
19648
      {
-
 
19649
        field = iprot.readFieldBegin();
-
 
19650
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
-
 
19651
          break;
-
 
19652
        }
-
 
19653
        switch (field.id) {
-
 
19654
          case 1: // MERCHANT_TXN_ID
-
 
19655
            if (field.type == org.apache.thrift.protocol.TType.I64) {
-
 
19656
              this.merchantTxnId = iprot.readI64();
-
 
19657
              setMerchantTxnIdIsSet(true);
-
 
19658
            } else { 
-
 
19659
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
19660
            }
-
 
19661
            break;
-
 
19662
          case 2: // AMOUNT
-
 
19663
            if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
-
 
19664
              this.amount = iprot.readDouble();
-
 
19665
              setAmountIsSet(true);
-
 
19666
            } else { 
-
 
19667
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
19668
            }
-
 
19669
            break;
-
 
19670
          case 3: // IS_DIGITAL
-
 
19671
            if (field.type == org.apache.thrift.protocol.TType.BOOL) {
-
 
19672
              this.isDigital = iprot.readBool();
-
 
19673
              setIsDigitalIsSet(true);
-
 
19674
            } else { 
-
 
19675
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
19676
            }
-
 
19677
            break;
-
 
19678
          default:
-
 
19679
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
19680
        }
-
 
19681
        iprot.readFieldEnd();
-
 
19682
      }
-
 
19683
      iprot.readStructEnd();
-
 
19684
      validate();
-
 
19685
    }
-
 
19686
 
-
 
19687
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-
 
19688
      validate();
-
 
19689
 
-
 
19690
      oprot.writeStructBegin(STRUCT_DESC);
-
 
19691
      oprot.writeFieldBegin(MERCHANT_TXN_ID_FIELD_DESC);
-
 
19692
      oprot.writeI64(this.merchantTxnId);
-
 
19693
      oprot.writeFieldEnd();
-
 
19694
      oprot.writeFieldBegin(AMOUNT_FIELD_DESC);
-
 
19695
      oprot.writeDouble(this.amount);
-
 
19696
      oprot.writeFieldEnd();
-
 
19697
      oprot.writeFieldBegin(IS_DIGITAL_FIELD_DESC);
-
 
19698
      oprot.writeBool(this.isDigital);
-
 
19699
      oprot.writeFieldEnd();
-
 
19700
      oprot.writeFieldStop();
-
 
19701
      oprot.writeStructEnd();
-
 
19702
    }
-
 
19703
 
-
 
19704
    @Override
-
 
19705
    public String toString() {
-
 
19706
      StringBuilder sb = new StringBuilder("validatePaymentAtGateway_args(");
-
 
19707
      boolean first = true;
-
 
19708
 
-
 
19709
      sb.append("merchantTxnId:");
-
 
19710
      sb.append(this.merchantTxnId);
-
 
19711
      first = false;
-
 
19712
      if (!first) sb.append(", ");
-
 
19713
      sb.append("amount:");
-
 
19714
      sb.append(this.amount);
-
 
19715
      first = false;
-
 
19716
      if (!first) sb.append(", ");
-
 
19717
      sb.append("isDigital:");
-
 
19718
      sb.append(this.isDigital);
-
 
19719
      first = false;
-
 
19720
      sb.append(")");
-
 
19721
      return sb.toString();
-
 
19722
    }
-
 
19723
 
-
 
19724
    public void validate() throws org.apache.thrift.TException {
-
 
19725
      // check for required fields
-
 
19726
    }
-
 
19727
 
-
 
19728
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-
 
19729
      try {
-
 
19730
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-
 
19731
      } catch (org.apache.thrift.TException te) {
-
 
19732
        throw new java.io.IOException(te);
-
 
19733
      }
-
 
19734
    }
-
 
19735
 
-
 
19736
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-
 
19737
      try {
-
 
19738
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
-
 
19739
        __isset_bit_vector = new BitSet(1);
-
 
19740
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-
 
19741
      } catch (org.apache.thrift.TException te) {
-
 
19742
        throw new java.io.IOException(te);
-
 
19743
      }
-
 
19744
    }
-
 
19745
 
-
 
19746
  }
-
 
19747
 
-
 
19748
  public static class validatePaymentAtGateway_result implements org.apache.thrift.TBase<validatePaymentAtGateway_result, validatePaymentAtGateway_result._Fields>, java.io.Serializable, Cloneable   {
-
 
19749
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("validatePaymentAtGateway_result");
-
 
19750
 
-
 
19751
    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0);
-
 
19752
    private static final org.apache.thrift.protocol.TField PE_FIELD_DESC = new org.apache.thrift.protocol.TField("pe", org.apache.thrift.protocol.TType.STRUCT, (short)1);
-
 
19753
 
-
 
19754
    private boolean success; // required
-
 
19755
    private PaymentException pe; // required
-
 
19756
 
-
 
19757
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
19758
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-
 
19759
      SUCCESS((short)0, "success"),
-
 
19760
      PE((short)1, "pe");
-
 
19761
 
-
 
19762
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
19763
 
-
 
19764
      static {
-
 
19765
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
19766
          byName.put(field.getFieldName(), field);
-
 
19767
        }
-
 
19768
      }
-
 
19769
 
-
 
19770
      /**
-
 
19771
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
19772
       */
-
 
19773
      public static _Fields findByThriftId(int fieldId) {
-
 
19774
        switch(fieldId) {
-
 
19775
          case 0: // SUCCESS
-
 
19776
            return SUCCESS;
-
 
19777
          case 1: // PE
-
 
19778
            return PE;
-
 
19779
          default:
-
 
19780
            return null;
-
 
19781
        }
-
 
19782
      }
-
 
19783
 
-
 
19784
      /**
-
 
19785
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
19786
       * if it is not found.
-
 
19787
       */
-
 
19788
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
19789
        _Fields fields = findByThriftId(fieldId);
-
 
19790
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
19791
        return fields;
-
 
19792
      }
-
 
19793
 
-
 
19794
      /**
-
 
19795
       * Find the _Fields constant that matches name, or null if its not found.
-
 
19796
       */
-
 
19797
      public static _Fields findByName(String name) {
-
 
19798
        return byName.get(name);
-
 
19799
      }
-
 
19800
 
-
 
19801
      private final short _thriftId;
-
 
19802
      private final String _fieldName;
-
 
19803
 
-
 
19804
      _Fields(short thriftId, String fieldName) {
-
 
19805
        _thriftId = thriftId;
-
 
19806
        _fieldName = fieldName;
-
 
19807
      }
-
 
19808
 
-
 
19809
      public short getThriftFieldId() {
-
 
19810
        return _thriftId;
-
 
19811
      }
-
 
19812
 
-
 
19813
      public String getFieldName() {
-
 
19814
        return _fieldName;
-
 
19815
      }
-
 
19816
    }
-
 
19817
 
-
 
19818
    // isset id assignments
-
 
19819
    private static final int __SUCCESS_ISSET_ID = 0;
-
 
19820
    private BitSet __isset_bit_vector = new BitSet(1);
-
 
19821
 
-
 
19822
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
 
19823
    static {
-
 
19824
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-
 
19825
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
19826
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
-
 
19827
      tmpMap.put(_Fields.PE, new org.apache.thrift.meta_data.FieldMetaData("pe", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
19828
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
-
 
19829
      metaDataMap = Collections.unmodifiableMap(tmpMap);
-
 
19830
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(validatePaymentAtGateway_result.class, metaDataMap);
-
 
19831
    }
-
 
19832
 
-
 
19833
    public validatePaymentAtGateway_result() {
-
 
19834
    }
-
 
19835
 
-
 
19836
    public validatePaymentAtGateway_result(
-
 
19837
      boolean success,
-
 
19838
      PaymentException pe)
-
 
19839
    {
-
 
19840
      this();
-
 
19841
      this.success = success;
-
 
19842
      setSuccessIsSet(true);
-
 
19843
      this.pe = pe;
-
 
19844
    }
-
 
19845
 
-
 
19846
    /**
-
 
19847
     * Performs a deep copy on <i>other</i>.
-
 
19848
     */
-
 
19849
    public validatePaymentAtGateway_result(validatePaymentAtGateway_result other) {
-
 
19850
      __isset_bit_vector.clear();
-
 
19851
      __isset_bit_vector.or(other.__isset_bit_vector);
-
 
19852
      this.success = other.success;
-
 
19853
      if (other.isSetPe()) {
-
 
19854
        this.pe = new PaymentException(other.pe);
-
 
19855
      }
-
 
19856
    }
-
 
19857
 
-
 
19858
    public validatePaymentAtGateway_result deepCopy() {
-
 
19859
      return new validatePaymentAtGateway_result(this);
-
 
19860
    }
-
 
19861
 
-
 
19862
    @Override
-
 
19863
    public void clear() {
-
 
19864
      setSuccessIsSet(false);
-
 
19865
      this.success = false;
-
 
19866
      this.pe = null;
-
 
19867
    }
-
 
19868
 
-
 
19869
    public boolean isSuccess() {
-
 
19870
      return this.success;
-
 
19871
    }
-
 
19872
 
-
 
19873
    public void setSuccess(boolean success) {
-
 
19874
      this.success = success;
-
 
19875
      setSuccessIsSet(true);
-
 
19876
    }
-
 
19877
 
-
 
19878
    public void unsetSuccess() {
-
 
19879
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
-
 
19880
    }
-
 
19881
 
-
 
19882
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
-
 
19883
    public boolean isSetSuccess() {
-
 
19884
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
-
 
19885
    }
-
 
19886
 
-
 
19887
    public void setSuccessIsSet(boolean value) {
-
 
19888
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
-
 
19889
    }
-
 
19890
 
-
 
19891
    public PaymentException getPe() {
-
 
19892
      return this.pe;
-
 
19893
    }
-
 
19894
 
-
 
19895
    public void setPe(PaymentException pe) {
-
 
19896
      this.pe = pe;
-
 
19897
    }
-
 
19898
 
-
 
19899
    public void unsetPe() {
-
 
19900
      this.pe = null;
-
 
19901
    }
-
 
19902
 
-
 
19903
    /** Returns true if field pe is set (has been assigned a value) and false otherwise */
-
 
19904
    public boolean isSetPe() {
-
 
19905
      return this.pe != null;
-
 
19906
    }
-
 
19907
 
-
 
19908
    public void setPeIsSet(boolean value) {
-
 
19909
      if (!value) {
-
 
19910
        this.pe = null;
-
 
19911
      }
-
 
19912
    }
-
 
19913
 
-
 
19914
    public void setFieldValue(_Fields field, Object value) {
-
 
19915
      switch (field) {
-
 
19916
      case SUCCESS:
-
 
19917
        if (value == null) {
-
 
19918
          unsetSuccess();
-
 
19919
        } else {
-
 
19920
          setSuccess((Boolean)value);
-
 
19921
        }
-
 
19922
        break;
-
 
19923
 
-
 
19924
      case PE:
-
 
19925
        if (value == null) {
-
 
19926
          unsetPe();
-
 
19927
        } else {
-
 
19928
          setPe((PaymentException)value);
-
 
19929
        }
-
 
19930
        break;
-
 
19931
 
-
 
19932
      }
-
 
19933
    }
-
 
19934
 
-
 
19935
    public Object getFieldValue(_Fields field) {
-
 
19936
      switch (field) {
-
 
19937
      case SUCCESS:
-
 
19938
        return Boolean.valueOf(isSuccess());
-
 
19939
 
-
 
19940
      case PE:
-
 
19941
        return getPe();
-
 
19942
 
-
 
19943
      }
-
 
19944
      throw new IllegalStateException();
-
 
19945
    }
-
 
19946
 
-
 
19947
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
-
 
19948
    public boolean isSet(_Fields field) {
-
 
19949
      if (field == null) {
-
 
19950
        throw new IllegalArgumentException();
-
 
19951
      }
-
 
19952
 
-
 
19953
      switch (field) {
-
 
19954
      case SUCCESS:
-
 
19955
        return isSetSuccess();
-
 
19956
      case PE:
-
 
19957
        return isSetPe();
-
 
19958
      }
-
 
19959
      throw new IllegalStateException();
-
 
19960
    }
-
 
19961
 
-
 
19962
    @Override
-
 
19963
    public boolean equals(Object that) {
-
 
19964
      if (that == null)
-
 
19965
        return false;
-
 
19966
      if (that instanceof validatePaymentAtGateway_result)
-
 
19967
        return this.equals((validatePaymentAtGateway_result)that);
-
 
19968
      return false;
-
 
19969
    }
-
 
19970
 
-
 
19971
    public boolean equals(validatePaymentAtGateway_result that) {
-
 
19972
      if (that == null)
-
 
19973
        return false;
-
 
19974
 
-
 
19975
      boolean this_present_success = true;
-
 
19976
      boolean that_present_success = true;
-
 
19977
      if (this_present_success || that_present_success) {
-
 
19978
        if (!(this_present_success && that_present_success))
-
 
19979
          return false;
-
 
19980
        if (this.success != that.success)
-
 
19981
          return false;
-
 
19982
      }
-
 
19983
 
-
 
19984
      boolean this_present_pe = true && this.isSetPe();
-
 
19985
      boolean that_present_pe = true && that.isSetPe();
-
 
19986
      if (this_present_pe || that_present_pe) {
-
 
19987
        if (!(this_present_pe && that_present_pe))
-
 
19988
          return false;
-
 
19989
        if (!this.pe.equals(that.pe))
-
 
19990
          return false;
-
 
19991
      }
-
 
19992
 
-
 
19993
      return true;
-
 
19994
    }
-
 
19995
 
-
 
19996
    @Override
-
 
19997
    public int hashCode() {
-
 
19998
      return 0;
-
 
19999
    }
-
 
20000
 
-
 
20001
    public int compareTo(validatePaymentAtGateway_result other) {
-
 
20002
      if (!getClass().equals(other.getClass())) {
-
 
20003
        return getClass().getName().compareTo(other.getClass().getName());
-
 
20004
      }
-
 
20005
 
-
 
20006
      int lastComparison = 0;
-
 
20007
      validatePaymentAtGateway_result typedOther = (validatePaymentAtGateway_result)other;
-
 
20008
 
-
 
20009
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
-
 
20010
      if (lastComparison != 0) {
-
 
20011
        return lastComparison;
-
 
20012
      }
-
 
20013
      if (isSetSuccess()) {
-
 
20014
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
-
 
20015
        if (lastComparison != 0) {
-
 
20016
          return lastComparison;
-
 
20017
        }
-
 
20018
      }
-
 
20019
      lastComparison = Boolean.valueOf(isSetPe()).compareTo(typedOther.isSetPe());
-
 
20020
      if (lastComparison != 0) {
-
 
20021
        return lastComparison;
-
 
20022
      }
-
 
20023
      if (isSetPe()) {
-
 
20024
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pe, typedOther.pe);
-
 
20025
        if (lastComparison != 0) {
-
 
20026
          return lastComparison;
-
 
20027
        }
-
 
20028
      }
-
 
20029
      return 0;
-
 
20030
    }
-
 
20031
 
-
 
20032
    public _Fields fieldForId(int fieldId) {
-
 
20033
      return _Fields.findByThriftId(fieldId);
-
 
20034
    }
-
 
20035
 
-
 
20036
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-
 
20037
      org.apache.thrift.protocol.TField field;
-
 
20038
      iprot.readStructBegin();
-
 
20039
      while (true)
-
 
20040
      {
-
 
20041
        field = iprot.readFieldBegin();
-
 
20042
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
-
 
20043
          break;
-
 
20044
        }
-
 
20045
        switch (field.id) {
-
 
20046
          case 0: // SUCCESS
-
 
20047
            if (field.type == org.apache.thrift.protocol.TType.BOOL) {
-
 
20048
              this.success = iprot.readBool();
-
 
20049
              setSuccessIsSet(true);
-
 
20050
            } else { 
-
 
20051
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
20052
            }
-
 
20053
            break;
-
 
20054
          case 1: // PE
-
 
20055
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
-
 
20056
              this.pe = new PaymentException();
-
 
20057
              this.pe.read(iprot);
-
 
20058
            } else { 
-
 
20059
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
20060
            }
-
 
20061
            break;
-
 
20062
          default:
-
 
20063
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
20064
        }
-
 
20065
        iprot.readFieldEnd();
-
 
20066
      }
-
 
20067
      iprot.readStructEnd();
-
 
20068
      validate();
-
 
20069
    }
-
 
20070
 
-
 
20071
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-
 
20072
      oprot.writeStructBegin(STRUCT_DESC);
-
 
20073
 
-
 
20074
      if (this.isSetSuccess()) {
-
 
20075
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
-
 
20076
        oprot.writeBool(this.success);
-
 
20077
        oprot.writeFieldEnd();
-
 
20078
      } else if (this.isSetPe()) {
-
 
20079
        oprot.writeFieldBegin(PE_FIELD_DESC);
-
 
20080
        this.pe.write(oprot);
-
 
20081
        oprot.writeFieldEnd();
-
 
20082
      }
-
 
20083
      oprot.writeFieldStop();
-
 
20084
      oprot.writeStructEnd();
-
 
20085
    }
-
 
20086
 
-
 
20087
    @Override
-
 
20088
    public String toString() {
-
 
20089
      StringBuilder sb = new StringBuilder("validatePaymentAtGateway_result(");
-
 
20090
      boolean first = true;
-
 
20091
 
-
 
20092
      sb.append("success:");
-
 
20093
      sb.append(this.success);
-
 
20094
      first = false;
-
 
20095
      if (!first) sb.append(", ");
-
 
20096
      sb.append("pe:");
-
 
20097
      if (this.pe == null) {
-
 
20098
        sb.append("null");
-
 
20099
      } else {
-
 
20100
        sb.append(this.pe);
-
 
20101
      }
-
 
20102
      first = false;
-
 
20103
      sb.append(")");
-
 
20104
      return sb.toString();
-
 
20105
    }
-
 
20106
 
-
 
20107
    public void validate() throws org.apache.thrift.TException {
19175
      // check for required fields
20108
      // check for required fields
19176
    }
20109
    }
19177
 
20110
 
19178
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
20111
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
19179
      try {
20112
      try {