def read(cls, iprot):
        '''
        Read a new object from the given input protocol and return the object.

        :type iprot: thryft.protocol._input_protocol._InputProtocol
        :rtype: pastpy.gen.database.impl.online.online_database_object_detail_image.OnlineDatabaseObjectDetailImage
        '''

        init_kwds = {}

        iprot.read_struct_begin()
        while True:
            ifield_name, ifield_type, _ifield_id = iprot.read_field_begin()
            if ifield_type == 0:  # STOP
                break
            elif ifield_name == 'full_size_url':
                init_kwds['full_size_url'] = iprot.read_string()
            elif ifield_name == 'mediaid':
                init_kwds['mediaid'] = iprot.read_string()
            elif ifield_name == 'objectid':
                init_kwds['objectid'] = iprot.read_string()
            elif ifield_name == 'src':
                init_kwds['src'] = iprot.read_string()
            elif ifield_name == 'thumbnail_url':
                init_kwds['thumbnail_url'] = iprot.read_string()
            elif ifield_name == 'title':
                init_kwds['title'] = iprot.read_string()
            elif ifield_name == 'type':
                init_kwds['type'] = pastpy.gen.database.impl.online.online_database_object_detail_image_type.OnlineDatabaseObjectDetailImageType.value_of(iprot.read_string().strip().upper())
            iprot.read_field_end()
        iprot.read_struct_end()

        return cls(**init_kwds)
def read ( cls , iprot ) : init_kwds = { } iprot . read_struct_begin ( ) while True : ifield_name , ifield_type , _ifield_id = iprot . read_field_begin ( ) if ifield_type == 0 : break elif ifield_name == 'full_size_url' : init_kwds [ 'full_size_url' ] = iprot . read_string ( ) elif ifield_name == 'mediaid' : init_kwds [ 'mediaid' ] = iprot . read_string ( ) elif ifield_name == 'objectid' : init_kwds [ 'objectid' ] = iprot . read_string ( ) elif ifield_name == 'src' : init_kwds [ 'src' ] = iprot . read_string ( ) elif ifield_name == 'thumbnail_url' : init_kwds [ 'thumbnail_url' ] = iprot . read_string ( ) elif ifield_name == 'title' : init_kwds [ 'title' ] = iprot . read_string ( ) elif ifield_name == 'type' : init_kwds [ 'type' ] = pastpy . gen . database . impl . online . online_database_object_detail_image_type . OnlineDatabaseObjectDetailImageType . value_of ( iprot . read_string ( ) . strip ( ) . upper ( ) ) iprot . read_field_end ( ) iprot . read_struct_end ( ) return cls ( ** init_kwds )
Read a new object from the given input protocol and return the object.

        :type iprot: thryft.protocol._input_protocol._InputProtocol
        :rtype: pastpy.gen.database.impl.online.online_database_object_detail_image.OnlineDatabaseObjectDetailImage