code: def to_array(self):
          
          array = super(Document, self).to_array()
          array['file_id'] = u(self.file_id)  # py2: type unicode, py3: type str
  
          if self.thumb is not None:
              array['thumb'] = self.thumb.to_array()  # type PhotoSize
  
          if self.file_name is not None:
              array['file_name'] = u(self.file_name)  # py2: type unicode, py3: type str
  
          if self.mime_type is not None:
              array['mime_type'] = u(self.mime_type)  # py2: type unicode, py3: type str
  
          if self.file_size is not None:
              array['file_size'] = int(self.file_size)  # type int
          return array
docs: Serializes this Document to a dictionary.
  
          :return: dictionary representation of this object.
          :rtype: dict