def to_array(self):
        """
        Serializes this InlineQueryResultGif to a dictionary.

        :return: dictionary representation of this object.
        :rtype: dict
        """
        array = super(InlineQueryResultGif, self).to_array()
        # 'type' and 'id' given by superclass
        array['gif_url'] = u(self.gif_url)  # py2: type unicode, py3: type str
        array['thumb_url'] = u(self.thumb_url)  # py2: type unicode, py3: type str
        if self.gif_width is not None:
            array['gif_width'] = int(self.gif_width)  # type int
        if self.gif_height is not None:
            array['gif_height'] = int(self.gif_height)  # type int
        if self.gif_duration is not None:
            array['gif_duration'] = int(self.gif_duration)  # type int
        if self.title is not None:
            array['title'] = u(self.title)  # py2: type unicode, py3: type str
        if self.caption is not None:
            array['caption'] = u(self.caption)  # py2: type unicode, py3: type str
        if self.parse_mode is not None:
            array['parse_mode'] = u(self.parse_mode)  # py2: type unicode, py3: type str
        if self.reply_markup is not None:
            array['reply_markup'] = self.reply_markup.to_array()  # type InlineKeyboardMarkup
        if self.input_message_content is not None:
            array['input_message_content'] = self.input_message_content.to_array()  # type InputMessageContent
        return array
def to_array ( self ) : array = super ( InlineQueryResultGif , self ) . to_array ( ) array [ 'gif_url' ] = u ( self . gif_url ) array [ 'thumb_url' ] = u ( self . thumb_url ) if self . gif_width is not None : array [ 'gif_width' ] = int ( self . gif_width ) if self . gif_height is not None : array [ 'gif_height' ] = int ( self . gif_height ) if self . gif_duration is not None : array [ 'gif_duration' ] = int ( self . gif_duration ) if self . title is not None : array [ 'title' ] = u ( self . title ) if self . caption is not None : array [ 'caption' ] = u ( self . caption ) if self . parse_mode is not None : array [ 'parse_mode' ] = u ( self . parse_mode ) if self . reply_markup is not None : array [ 'reply_markup' ] = self . reply_markup . to_array ( ) if self . input_message_content is not None : array [ 'input_message_content' ] = self . input_message_content . to_array ( ) return array
Serializes this InlineQueryResultGif to a dictionary.

        :return: dictionary representation of this object.
        :rtype: dict