Write this object to the given output protocol and return self.

        :type oprot: thryft.protocol._output_protocol._OutputProtocol
        :rtype: pastpy.gen.database.impl.online.online_database_objects_list_item.OnlineDatabaseObjectsListItem

def write(self, oprot):
        '''
        Write this object to the given output protocol and return self.

        :type oprot: thryft.protocol._output_protocol._OutputProtocol
        :rtype: pastpy.gen.database.impl.online.online_database_objects_list_item.OnlineDatabaseObjectsListItem
        '''

        oprot.write_struct_begin('OnlineDatabaseObjectsListItem')

        oprot.write_field_begin(name='detail_href', type=11, id=None)
        oprot.write_string(self.detail_href)
        oprot.write_field_end()

        oprot.write_field_begin(name='record_type', type=11, id=None)
        oprot.write_string(self.record_type)
        oprot.write_field_end()

        oprot.write_field_begin(name='title', type=11, id=None)
        oprot.write_string(self.title)
        oprot.write_field_end()

        if self.thumbnail_url is not None:
            oprot.write_field_begin(name='thumbnail_url', type=11, id=None)
            oprot.write_string(self.thumbnail_url)
            oprot.write_field_end()

        oprot.write_field_stop()

        oprot.write_struct_end()

        return self