Subversion Repositories SmartDukaan

Rev

Rev 3896 | Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
3893 chandransh 1
#
2
# Autogenerated by Thrift Compiler (0.7.0)
3
#
4
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
#
6
 
7
from thrift.Thrift import *
8
import shop2020.thriftpy.generic.GenericService
9
from ttypes import *
10
from thrift.Thrift import TProcessor
11
from thrift.transport import TTransport
12
from thrift.protocol import TBinaryProtocol, TProtocol
13
try:
14
  from thrift.protocol import fastbinary
15
except:
16
  fastbinary = None
17
 
18
 
19
class Iface(shop2020.thriftpy.generic.GenericService.Iface):
20
  def pushContentToProduction(self, entityId):
21
    """
22
    Parameters:
23
     - entityId
24
    """
25
    pass
26
 
27
 
28
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
29
  def __init__(self, iprot, oprot=None):
30
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
31
 
32
  def pushContentToProduction(self, entityId):
33
    """
34
    Parameters:
35
     - entityId
36
    """
37
    self.send_pushContentToProduction(entityId)
38
    self.recv_pushContentToProduction()
39
 
40
  def send_pushContentToProduction(self, entityId):
41
    self._oprot.writeMessageBegin('pushContentToProduction', TMessageType.CALL, self._seqid)
42
    args = pushContentToProduction_args()
43
    args.entityId = entityId
44
    args.write(self._oprot)
45
    self._oprot.writeMessageEnd()
46
    self._oprot.trans.flush()
47
 
48
  def recv_pushContentToProduction(self, ):
49
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
50
    if mtype == TMessageType.EXCEPTION:
51
      x = TApplicationException()
52
      x.read(self._iprot)
53
      self._iprot.readMessageEnd()
54
      raise x
55
    result = pushContentToProduction_result()
56
    result.read(self._iprot)
57
    self._iprot.readMessageEnd()
58
    return
59
 
60
 
61
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
62
  def __init__(self, handler):
63
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
64
    self._processMap["pushContentToProduction"] = Processor.process_pushContentToProduction
65
 
66
  def process(self, iprot, oprot):
67
    (name, type, seqid) = iprot.readMessageBegin()
68
    if name not in self._processMap:
69
      iprot.skip(TType.STRUCT)
70
      iprot.readMessageEnd()
71
      x = TApplicationException(TApplicationException.UNKNOWN_METHOD, 'Unknown function %s' % (name))
72
      oprot.writeMessageBegin(name, TMessageType.EXCEPTION, seqid)
73
      x.write(oprot)
74
      oprot.writeMessageEnd()
75
      oprot.trans.flush()
76
      return
77
    else:
78
      self._processMap[name](self, seqid, iprot, oprot)
79
    return True
80
 
81
  def process_pushContentToProduction(self, seqid, iprot, oprot):
82
    args = pushContentToProduction_args()
83
    args.read(iprot)
84
    iprot.readMessageEnd()
85
    result = pushContentToProduction_result()
86
    self._handler.pushContentToProduction(args.entityId)
87
    oprot.writeMessageBegin("pushContentToProduction", TMessageType.REPLY, seqid)
88
    result.write(oprot)
89
    oprot.writeMessageEnd()
90
    oprot.trans.flush()
91
 
92
 
93
# HELPER FUNCTIONS AND STRUCTURES
94
 
95
class pushContentToProduction_args:
96
  """
97
  Attributes:
98
   - entityId
99
  """
100
 
101
  thrift_spec = (
102
    None, # 0
103
    (1, TType.I64, 'entityId', None, None, ), # 1
104
  )
105
 
106
  def __init__(self, entityId=None,):
107
    self.entityId = entityId
108
 
109
  def read(self, iprot):
110
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
111
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
112
      return
113
    iprot.readStructBegin()
114
    while True:
115
      (fname, ftype, fid) = iprot.readFieldBegin()
116
      if ftype == TType.STOP:
117
        break
118
      if fid == 1:
119
        if ftype == TType.I64:
120
          self.entityId = iprot.readI64();
121
        else:
122
          iprot.skip(ftype)
123
      else:
124
        iprot.skip(ftype)
125
      iprot.readFieldEnd()
126
    iprot.readStructEnd()
127
 
128
  def write(self, oprot):
129
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
130
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
131
      return
132
    oprot.writeStructBegin('pushContentToProduction_args')
133
    if self.entityId is not None:
134
      oprot.writeFieldBegin('entityId', TType.I64, 1)
135
      oprot.writeI64(self.entityId)
136
      oprot.writeFieldEnd()
137
    oprot.writeFieldStop()
138
    oprot.writeStructEnd()
139
 
140
  def validate(self):
141
    return
142
 
143
 
144
  def __repr__(self):
145
    L = ['%s=%r' % (key, value)
146
      for key, value in self.__dict__.iteritems()]
147
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
148
 
149
  def __eq__(self, other):
150
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
151
 
152
  def __ne__(self, other):
153
    return not (self == other)
154
 
155
class pushContentToProduction_result:
156
 
157
  thrift_spec = (
158
  )
159
 
160
  def read(self, iprot):
161
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
162
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
163
      return
164
    iprot.readStructBegin()
165
    while True:
166
      (fname, ftype, fid) = iprot.readFieldBegin()
167
      if ftype == TType.STOP:
168
        break
169
      else:
170
        iprot.skip(ftype)
171
      iprot.readFieldEnd()
172
    iprot.readStructEnd()
173
 
174
  def write(self, oprot):
175
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
176
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
177
      return
178
    oprot.writeStructBegin('pushContentToProduction_result')
179
    oprot.writeFieldStop()
180
    oprot.writeStructEnd()
181
 
182
  def validate(self):
183
    return
184
 
185
 
186
  def __repr__(self):
187
    L = ['%s=%r' % (key, value)
188
      for key, value in self.__dict__.iteritems()]
189
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
190
 
191
  def __eq__(self, other):
192
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
193
 
194
  def __ne__(self, other):
195
    return not (self == other)