Subversion Repositories SmartDukaan

Rev

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

Rev 2536 Rev 2591
Line 380... Line 380...
380
    """
380
    """
381
    If the order status is DOA_PICKUP_REQUESTED, it does the following
381
    If the order status is DOA_PICKUP_REQUESTED, it does the following
382
    	1. Sends out an email to the customer with the dispatch advice that he has to print as an attachment.
382
    	1. Sends out an email to the customer with the dispatch advice that he has to print as an attachment.
383
    	2. Changes order status to be DOA_PICKUP_AUTHORIZED.
383
    	2. Changes order status to be DOA_PICKUP_AUTHORIZED.
384
    	3. Returns true
384
    	3. Returns true
385
    If the order is any other status, it returns false.
385
    If the order is in any other status, it returns false.
386
    Throws an exception if the order with the given id couldn't be found.
386
    Throws an exception if the order with the given id couldn't be found.
387
    
387
    
388
    Parameters:
388
    Parameters:
389
     - orderId
389
     - orderId
390
     - pickupNumber
390
     - pickupNumber
391
    """
391
    """
392
    pass
392
    pass
393
 
393
 
-
 
394
  def acceptDoa(self, orderId):
-
 
395
    """
-
 
396
    If the order status is DOA_RETURN_AUTHORIZED or DOA_RETURN_IN_TRANSIT, marks the order status as DOA_RETURNED and returns true.
-
 
397
    If the order is in any other state, it returns false.
-
 
398
    Throws an exception if the order with the given id couldn't be found.
-
 
399
    
-
 
400
    Parameters:
-
 
401
     - orderId
-
 
402
    """
-
 
403
    pass
-
 
404
 
-
 
405
  def validateDoa(self, orderId, isValid):
-
 
406
    """
-
 
407
    Used to validate the DOA certificate for an order in the DOA_RETURNED state. If the certificate is valid,
-
 
408
    the order state is changed to DOA_PENDING and the warehouse executive gets to print a return receiving letter.
-
 
409
    If the certificate is invalid, the order state is changed to DOA_CERT_INVALID.
-
 
410
    If the order is in any other state, it returns false.
-
 
411
    Throws an exception if the order with the given id couldn't be found.
-
 
412
    
-
 
413
    Parameters:
-
 
414
     - orderId
-
 
415
     - isValid
-
 
416
    """
-
 
417
    pass
-
 
418
 
394
 
419
 
395
class Client(Iface):
420
class Client(Iface):
396
  def __init__(self, iprot, oprot=None):
421
  def __init__(self, iprot, oprot=None):
397
    self._iprot = self._oprot = iprot
422
    self._iprot = self._oprot = iprot
398
    if oprot != None:
423
    if oprot != None:
Line 1741... Line 1766...
1741
    """
1766
    """
1742
    If the order status is DOA_PICKUP_REQUESTED, it does the following
1767
    If the order status is DOA_PICKUP_REQUESTED, it does the following
1743
    	1. Sends out an email to the customer with the dispatch advice that he has to print as an attachment.
1768
    	1. Sends out an email to the customer with the dispatch advice that he has to print as an attachment.
1744
    	2. Changes order status to be DOA_PICKUP_AUTHORIZED.
1769
    	2. Changes order status to be DOA_PICKUP_AUTHORIZED.
1745
    	3. Returns true
1770
    	3. Returns true
1746
    If the order is any other status, it returns false.
1771
    If the order is in any other status, it returns false.
1747
    Throws an exception if the order with the given id couldn't be found.
1772
    Throws an exception if the order with the given id couldn't be found.
1748
    
1773
    
1749
    Parameters:
1774
    Parameters:
1750
     - orderId
1775
     - orderId
1751
     - pickupNumber
1776
     - pickupNumber
Line 1776... Line 1801...
1776
      return result.success
1801
      return result.success
1777
    if result.ex != None:
1802
    if result.ex != None:
1778
      raise result.ex
1803
      raise result.ex
1779
    raise TApplicationException(TApplicationException.MISSING_RESULT, "authorizePickup failed: unknown result");
1804
    raise TApplicationException(TApplicationException.MISSING_RESULT, "authorizePickup failed: unknown result");
1780
 
1805
 
-
 
1806
  def acceptDoa(self, orderId):
-
 
1807
    """
-
 
1808
    If the order status is DOA_RETURN_AUTHORIZED or DOA_RETURN_IN_TRANSIT, marks the order status as DOA_RETURNED and returns true.
-
 
1809
    If the order is in any other state, it returns false.
-
 
1810
    Throws an exception if the order with the given id couldn't be found.
-
 
1811
    
-
 
1812
    Parameters:
-
 
1813
     - orderId
-
 
1814
    """
-
 
1815
    self.send_acceptDoa(orderId)
-
 
1816
    return self.recv_acceptDoa()
-
 
1817
 
-
 
1818
  def send_acceptDoa(self, orderId):
-
 
1819
    self._oprot.writeMessageBegin('acceptDoa', TMessageType.CALL, self._seqid)
-
 
1820
    args = acceptDoa_args()
-
 
1821
    args.orderId = orderId
-
 
1822
    args.write(self._oprot)
-
 
1823
    self._oprot.writeMessageEnd()
-
 
1824
    self._oprot.trans.flush()
-
 
1825
 
-
 
1826
  def recv_acceptDoa(self, ):
-
 
1827
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
1828
    if mtype == TMessageType.EXCEPTION:
-
 
1829
      x = TApplicationException()
-
 
1830
      x.read(self._iprot)
-
 
1831
      self._iprot.readMessageEnd()
-
 
1832
      raise x
-
 
1833
    result = acceptDoa_result()
-
 
1834
    result.read(self._iprot)
-
 
1835
    self._iprot.readMessageEnd()
-
 
1836
    if result.success != None:
-
 
1837
      return result.success
-
 
1838
    if result.ex != None:
-
 
1839
      raise result.ex
-
 
1840
    raise TApplicationException(TApplicationException.MISSING_RESULT, "acceptDoa failed: unknown result");
-
 
1841
 
-
 
1842
  def validateDoa(self, orderId, isValid):
-
 
1843
    """
-
 
1844
    Used to validate the DOA certificate for an order in the DOA_RETURNED state. If the certificate is valid,
-
 
1845
    the order state is changed to DOA_PENDING and the warehouse executive gets to print a return receiving letter.
-
 
1846
    If the certificate is invalid, the order state is changed to DOA_CERT_INVALID.
-
 
1847
    If the order is in any other state, it returns false.
-
 
1848
    Throws an exception if the order with the given id couldn't be found.
-
 
1849
    
-
 
1850
    Parameters:
-
 
1851
     - orderId
-
 
1852
     - isValid
-
 
1853
    """
-
 
1854
    self.send_validateDoa(orderId, isValid)
-
 
1855
    return self.recv_validateDoa()
-
 
1856
 
-
 
1857
  def send_validateDoa(self, orderId, isValid):
-
 
1858
    self._oprot.writeMessageBegin('validateDoa', TMessageType.CALL, self._seqid)
-
 
1859
    args = validateDoa_args()
-
 
1860
    args.orderId = orderId
-
 
1861
    args.isValid = isValid
-
 
1862
    args.write(self._oprot)
-
 
1863
    self._oprot.writeMessageEnd()
-
 
1864
    self._oprot.trans.flush()
-
 
1865
 
-
 
1866
  def recv_validateDoa(self, ):
-
 
1867
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
1868
    if mtype == TMessageType.EXCEPTION:
-
 
1869
      x = TApplicationException()
-
 
1870
      x.read(self._iprot)
-
 
1871
      self._iprot.readMessageEnd()
-
 
1872
      raise x
-
 
1873
    result = validateDoa_result()
-
 
1874
    result.read(self._iprot)
-
 
1875
    self._iprot.readMessageEnd()
-
 
1876
    if result.success != None:
-
 
1877
      return result.success
-
 
1878
    if result.ex != None:
-
 
1879
      raise result.ex
-
 
1880
    raise TApplicationException(TApplicationException.MISSING_RESULT, "validateDoa failed: unknown result");
-
 
1881
 
1781
 
1882
 
1782
class Processor(Iface, TProcessor):
1883
class Processor(Iface, TProcessor):
1783
  def __init__(self, handler):
1884
  def __init__(self, handler):
1784
    self._handler = handler
1885
    self._handler = handler
1785
    self._processMap = {}
1886
    self._processMap = {}
Line 1821... Line 1922...
1821
    self._processMap["getValidOrdersAmountRange"] = Processor.process_getValidOrdersAmountRange
1922
    self._processMap["getValidOrdersAmountRange"] = Processor.process_getValidOrdersAmountRange
1822
    self._processMap["getValidOrders"] = Processor.process_getValidOrders
1923
    self._processMap["getValidOrders"] = Processor.process_getValidOrders
1823
    self._processMap["toggleDOAFlag"] = Processor.process_toggleDOAFlag
1924
    self._processMap["toggleDOAFlag"] = Processor.process_toggleDOAFlag
1824
    self._processMap["requestPickupNumber"] = Processor.process_requestPickupNumber
1925
    self._processMap["requestPickupNumber"] = Processor.process_requestPickupNumber
1825
    self._processMap["authorizePickup"] = Processor.process_authorizePickup
1926
    self._processMap["authorizePickup"] = Processor.process_authorizePickup
-
 
1927
    self._processMap["acceptDoa"] = Processor.process_acceptDoa
-
 
1928
    self._processMap["validateDoa"] = Processor.process_validateDoa
1826
 
1929
 
1827
  def process(self, iprot, oprot):
1930
  def process(self, iprot, oprot):
1828
    (name, type, seqid) = iprot.readMessageBegin()
1931
    (name, type, seqid) = iprot.readMessageBegin()
1829
    if name not in self._processMap:
1932
    if name not in self._processMap:
1830
      iprot.skip(TType.STRUCT)
1933
      iprot.skip(TType.STRUCT)
Line 2373... Line 2476...
2373
    oprot.writeMessageBegin("authorizePickup", TMessageType.REPLY, seqid)
2476
    oprot.writeMessageBegin("authorizePickup", TMessageType.REPLY, seqid)
2374
    result.write(oprot)
2477
    result.write(oprot)
2375
    oprot.writeMessageEnd()
2478
    oprot.writeMessageEnd()
2376
    oprot.trans.flush()
2479
    oprot.trans.flush()
2377
 
2480
 
-
 
2481
  def process_acceptDoa(self, seqid, iprot, oprot):
-
 
2482
    args = acceptDoa_args()
-
 
2483
    args.read(iprot)
-
 
2484
    iprot.readMessageEnd()
-
 
2485
    result = acceptDoa_result()
-
 
2486
    try:
-
 
2487
      result.success = self._handler.acceptDoa(args.orderId)
-
 
2488
    except TransactionServiceException, ex:
-
 
2489
      result.ex = ex
-
 
2490
    oprot.writeMessageBegin("acceptDoa", TMessageType.REPLY, seqid)
-
 
2491
    result.write(oprot)
-
 
2492
    oprot.writeMessageEnd()
-
 
2493
    oprot.trans.flush()
-
 
2494
 
-
 
2495
  def process_validateDoa(self, seqid, iprot, oprot):
-
 
2496
    args = validateDoa_args()
-
 
2497
    args.read(iprot)
-
 
2498
    iprot.readMessageEnd()
-
 
2499
    result = validateDoa_result()
-
 
2500
    try:
-
 
2501
      result.success = self._handler.validateDoa(args.orderId, args.isValid)
-
 
2502
    except TransactionServiceException, ex:
-
 
2503
      result.ex = ex
-
 
2504
    oprot.writeMessageBegin("validateDoa", TMessageType.REPLY, seqid)
-
 
2505
    result.write(oprot)
-
 
2506
    oprot.writeMessageEnd()
-
 
2507
    oprot.trans.flush()
-
 
2508
 
2378
 
2509
 
2379
# HELPER FUNCTIONS AND STRUCTURES
2510
# HELPER FUNCTIONS AND STRUCTURES
2380
 
2511
 
2381
class closeSession_args:
2512
class closeSession_args:
2382
 
2513
 
Line 7661... Line 7792...
7661
    if self.success != None:
7792
    if self.success != None:
7662
      oprot.writeFieldBegin('success', TType.BOOL, 0)
7793
      oprot.writeFieldBegin('success', TType.BOOL, 0)
7663
      oprot.writeBool(self.success)
7794
      oprot.writeBool(self.success)
7664
      oprot.writeFieldEnd()
7795
      oprot.writeFieldEnd()
7665
    if self.ex != None:
7796
    if self.ex != None:
-
 
7797
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
-
 
7798
      self.ex.write(oprot)
-
 
7799
      oprot.writeFieldEnd()
-
 
7800
    oprot.writeFieldStop()
-
 
7801
    oprot.writeStructEnd()
-
 
7802
 
-
 
7803
  def __repr__(self):
-
 
7804
    L = ['%s=%r' % (key, value)
-
 
7805
      for key, value in self.__dict__.iteritems()]
-
 
7806
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
7807
 
-
 
7808
  def __eq__(self, other):
-
 
7809
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
7810
 
-
 
7811
  def __ne__(self, other):
-
 
7812
    return not (self == other)
-
 
7813
 
-
 
7814
class acceptDoa_args:
-
 
7815
  """
-
 
7816
  Attributes:
-
 
7817
   - orderId
-
 
7818
  """
-
 
7819
 
-
 
7820
  thrift_spec = (
-
 
7821
    None, # 0
-
 
7822
    (1, TType.I64, 'orderId', None, None, ), # 1
-
 
7823
  )
-
 
7824
 
-
 
7825
  def __init__(self, orderId=None,):
-
 
7826
    self.orderId = orderId
-
 
7827
 
-
 
7828
  def read(self, iprot):
-
 
7829
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
7830
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
7831
      return
-
 
7832
    iprot.readStructBegin()
-
 
7833
    while True:
-
 
7834
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
7835
      if ftype == TType.STOP:
-
 
7836
        break
-
 
7837
      if fid == 1:
-
 
7838
        if ftype == TType.I64:
-
 
7839
          self.orderId = iprot.readI64();
-
 
7840
        else:
-
 
7841
          iprot.skip(ftype)
-
 
7842
      else:
-
 
7843
        iprot.skip(ftype)
-
 
7844
      iprot.readFieldEnd()
-
 
7845
    iprot.readStructEnd()
-
 
7846
 
-
 
7847
  def write(self, oprot):
-
 
7848
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
7849
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
7850
      return
-
 
7851
    oprot.writeStructBegin('acceptDoa_args')
-
 
7852
    if self.orderId != None:
-
 
7853
      oprot.writeFieldBegin('orderId', TType.I64, 1)
-
 
7854
      oprot.writeI64(self.orderId)
-
 
7855
      oprot.writeFieldEnd()
-
 
7856
    oprot.writeFieldStop()
-
 
7857
    oprot.writeStructEnd()
-
 
7858
 
-
 
7859
  def __repr__(self):
-
 
7860
    L = ['%s=%r' % (key, value)
-
 
7861
      for key, value in self.__dict__.iteritems()]
-
 
7862
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
7863
 
-
 
7864
  def __eq__(self, other):
-
 
7865
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
7866
 
-
 
7867
  def __ne__(self, other):
-
 
7868
    return not (self == other)
-
 
7869
 
-
 
7870
class acceptDoa_result:
-
 
7871
  """
-
 
7872
  Attributes:
-
 
7873
   - success
-
 
7874
   - ex
-
 
7875
  """
-
 
7876
 
-
 
7877
  thrift_spec = (
-
 
7878
    (0, TType.BOOL, 'success', None, None, ), # 0
-
 
7879
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
-
 
7880
  )
-
 
7881
 
-
 
7882
  def __init__(self, success=None, ex=None,):
-
 
7883
    self.success = success
-
 
7884
    self.ex = ex
-
 
7885
 
-
 
7886
  def read(self, iprot):
-
 
7887
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
7888
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
7889
      return
-
 
7890
    iprot.readStructBegin()
-
 
7891
    while True:
-
 
7892
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
7893
      if ftype == TType.STOP:
-
 
7894
        break
-
 
7895
      if fid == 0:
-
 
7896
        if ftype == TType.BOOL:
-
 
7897
          self.success = iprot.readBool();
-
 
7898
        else:
-
 
7899
          iprot.skip(ftype)
-
 
7900
      elif fid == 1:
-
 
7901
        if ftype == TType.STRUCT:
-
 
7902
          self.ex = TransactionServiceException()
-
 
7903
          self.ex.read(iprot)
-
 
7904
        else:
-
 
7905
          iprot.skip(ftype)
-
 
7906
      else:
-
 
7907
        iprot.skip(ftype)
-
 
7908
      iprot.readFieldEnd()
-
 
7909
    iprot.readStructEnd()
-
 
7910
 
-
 
7911
  def write(self, oprot):
-
 
7912
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
7913
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
7914
      return
-
 
7915
    oprot.writeStructBegin('acceptDoa_result')
-
 
7916
    if self.success != None:
-
 
7917
      oprot.writeFieldBegin('success', TType.BOOL, 0)
-
 
7918
      oprot.writeBool(self.success)
-
 
7919
      oprot.writeFieldEnd()
-
 
7920
    if self.ex != None:
-
 
7921
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
-
 
7922
      self.ex.write(oprot)
-
 
7923
      oprot.writeFieldEnd()
-
 
7924
    oprot.writeFieldStop()
-
 
7925
    oprot.writeStructEnd()
-
 
7926
 
-
 
7927
  def __repr__(self):
-
 
7928
    L = ['%s=%r' % (key, value)
-
 
7929
      for key, value in self.__dict__.iteritems()]
-
 
7930
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
7931
 
-
 
7932
  def __eq__(self, other):
-
 
7933
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
7934
 
-
 
7935
  def __ne__(self, other):
-
 
7936
    return not (self == other)
-
 
7937
 
-
 
7938
class validateDoa_args:
-
 
7939
  """
-
 
7940
  Attributes:
-
 
7941
   - orderId
-
 
7942
   - isValid
-
 
7943
  """
-
 
7944
 
-
 
7945
  thrift_spec = (
-
 
7946
    None, # 0
-
 
7947
    (1, TType.I64, 'orderId', None, None, ), # 1
-
 
7948
    (2, TType.BOOL, 'isValid', None, None, ), # 2
-
 
7949
  )
-
 
7950
 
-
 
7951
  def __init__(self, orderId=None, isValid=None,):
-
 
7952
    self.orderId = orderId
-
 
7953
    self.isValid = isValid
-
 
7954
 
-
 
7955
  def read(self, iprot):
-
 
7956
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
7957
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
7958
      return
-
 
7959
    iprot.readStructBegin()
-
 
7960
    while True:
-
 
7961
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
7962
      if ftype == TType.STOP:
-
 
7963
        break
-
 
7964
      if fid == 1:
-
 
7965
        if ftype == TType.I64:
-
 
7966
          self.orderId = iprot.readI64();
-
 
7967
        else:
-
 
7968
          iprot.skip(ftype)
-
 
7969
      elif fid == 2:
-
 
7970
        if ftype == TType.BOOL:
-
 
7971
          self.isValid = iprot.readBool();
-
 
7972
        else:
-
 
7973
          iprot.skip(ftype)
-
 
7974
      else:
-
 
7975
        iprot.skip(ftype)
-
 
7976
      iprot.readFieldEnd()
-
 
7977
    iprot.readStructEnd()
-
 
7978
 
-
 
7979
  def write(self, oprot):
-
 
7980
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
7981
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
7982
      return
-
 
7983
    oprot.writeStructBegin('validateDoa_args')
-
 
7984
    if self.orderId != None:
-
 
7985
      oprot.writeFieldBegin('orderId', TType.I64, 1)
-
 
7986
      oprot.writeI64(self.orderId)
-
 
7987
      oprot.writeFieldEnd()
-
 
7988
    if self.isValid != None:
-
 
7989
      oprot.writeFieldBegin('isValid', TType.BOOL, 2)
-
 
7990
      oprot.writeBool(self.isValid)
-
 
7991
      oprot.writeFieldEnd()
-
 
7992
    oprot.writeFieldStop()
-
 
7993
    oprot.writeStructEnd()
-
 
7994
 
-
 
7995
  def __repr__(self):
-
 
7996
    L = ['%s=%r' % (key, value)
-
 
7997
      for key, value in self.__dict__.iteritems()]
-
 
7998
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
7999
 
-
 
8000
  def __eq__(self, other):
-
 
8001
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
8002
 
-
 
8003
  def __ne__(self, other):
-
 
8004
    return not (self == other)
-
 
8005
 
-
 
8006
class validateDoa_result:
-
 
8007
  """
-
 
8008
  Attributes:
-
 
8009
   - success
-
 
8010
   - ex
-
 
8011
  """
-
 
8012
 
-
 
8013
  thrift_spec = (
-
 
8014
    (0, TType.BOOL, 'success', None, None, ), # 0
-
 
8015
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
-
 
8016
  )
-
 
8017
 
-
 
8018
  def __init__(self, success=None, ex=None,):
-
 
8019
    self.success = success
-
 
8020
    self.ex = ex
-
 
8021
 
-
 
8022
  def read(self, iprot):
-
 
8023
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
8024
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
8025
      return
-
 
8026
    iprot.readStructBegin()
-
 
8027
    while True:
-
 
8028
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
8029
      if ftype == TType.STOP:
-
 
8030
        break
-
 
8031
      if fid == 0:
-
 
8032
        if ftype == TType.BOOL:
-
 
8033
          self.success = iprot.readBool();
-
 
8034
        else:
-
 
8035
          iprot.skip(ftype)
-
 
8036
      elif fid == 1:
-
 
8037
        if ftype == TType.STRUCT:
-
 
8038
          self.ex = TransactionServiceException()
-
 
8039
          self.ex.read(iprot)
-
 
8040
        else:
-
 
8041
          iprot.skip(ftype)
-
 
8042
      else:
-
 
8043
        iprot.skip(ftype)
-
 
8044
      iprot.readFieldEnd()
-
 
8045
    iprot.readStructEnd()
-
 
8046
 
-
 
8047
  def write(self, oprot):
-
 
8048
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
8049
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
8050
      return
-
 
8051
    oprot.writeStructBegin('validateDoa_result')
-
 
8052
    if self.success != None:
-
 
8053
      oprot.writeFieldBegin('success', TType.BOOL, 0)
-
 
8054
      oprot.writeBool(self.success)
-
 
8055
      oprot.writeFieldEnd()
-
 
8056
    if self.ex != None:
7666
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
8057
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
7667
      self.ex.write(oprot)
8058
      self.ex.write(oprot)
7668
      oprot.writeFieldEnd()
8059
      oprot.writeFieldEnd()
7669
    oprot.writeFieldStop()
8060
    oprot.writeFieldStop()
7670
    oprot.writeStructEnd()
8061
    oprot.writeStructEnd()