#NEWLINE# def write( self , oprot ) : #NEWLINE# #INDENT# if ( ( oprot . __class__ == TBinaryProtocol . TBinaryProtocolAccelerated ) and ( self . thrift_spec is not None ) and ( fastbinary is not None ) ) : #NEWLINE# #INDENT# oprot . trans . write ( fastbinary . encode_binary ( self , ( self . __class__ , self . thrift_spec ) ) ) #NEWLINE# return #NEWLINE# #UNINDENT# oprot . writeStructBegin ( 'MessageBox' ) #NEWLINE# if ( self . id is not None ) : #NEWLINE# #INDENT# oprot . writeFieldBegin ( 'id' , TType . STRING , 1 ) #NEWLINE# oprot . writeString ( self . id ) #NEWLINE# oprot . writeFieldEnd ( ) #NEWLINE# #UNINDENT# if ( self . channelId is not None ) : #NEWLINE# #INDENT# oprot . writeFieldBegin ( 'channelId' , TType . STRING , 2 ) #NEWLINE# oprot . writeString ( self . channelId ) #NEWLINE# oprot . writeFieldEnd ( ) #NEWLINE# #UNINDENT# if ( self . lastSeq is not None ) : #NEWLINE# #INDENT# oprot . writeFieldBegin ( 'lastSeq' , TType . I64 , 5 ) #NEWLINE# oprot . writeI64 ( self . lastSeq ) #NEWLINE# oprot . writeFieldEnd ( ) #NEWLINE# #UNINDENT# if ( self . unreadCount is not None ) : #NEWLINE# #INDENT# oprot . writeFieldBegin ( 'unreadCount' , TType . I64 , 6 ) #NEWLINE# oprot . writeI64 ( self . unreadCount ) #NEWLINE# oprot . writeFieldEnd ( ) #NEWLINE# #UNINDENT# if ( self . lastModifiedTime is not None ) : #NEWLINE# #INDENT# oprot . writeFieldBegin ( 'lastModifiedTime' , TType . I64 , 7 ) #NEWLINE# oprot . writeI64 ( self . lastModifiedTime ) #NEWLINE# oprot . writeFieldEnd ( ) #NEWLINE# #UNINDENT# if ( self . status is not None ) : #NEWLINE# #INDENT# oprot . writeFieldBegin ( 'status' , TType . I32 , 8 ) #NEWLINE# oprot . writeI32 ( iter45 . status ) #NEWLINE# oprot . writeFieldEnd ( ) #NEWLINE# #UNINDENT# if ( self . midType is not None ) : #NEWLINE# #INDENT# oprot . writeFieldBegin ( 'midType' , TType . I32 , 9 ) #NEWLINE# oprot . writeI32 ( self . midType ) #NEWLINE# oprot . writeFieldEnd ( ) #NEWLINE# #UNINDENT# if ( self . lastMessages is not None ) : #NEWLINE# #INDENT# oprot . writeFieldBegin ( 'lastMessages' , TType . LIST , 10 ) #NEWLINE# oprot . writeListBegin ( TType . STRUCT , len ( self . lastMessages ) ) #NEWLINE# for iter45 in self . lastMessages : #NEWLINE# #INDENT# iter45 . write ( oprot ) #NEWLINE# #UNINDENT# oprot . writeListEnd ( ) #NEWLINE# oprot . writeFieldEnd ( ) #NEWLINE# #UNINDENT# oprot . writeFieldStop ( ) #NEWLINE# oprot . writeStructEnd ( )