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

        :return: dictionary representation of this object.
        :rtype: dict
        """
        from .files import InputFile
        array = super(InputMediaVideo, self).to_array()
        # 'type' given by superclass
        # 'media' given by superclass
        if self.thumb is not None:
            if isinstance(self.thumb, InputFile):
                array['thumb'] = None  # type InputFile
            elif isinstance(self.thumb, str):
                array['thumb'] = u(self.thumb)  # py2: type unicode, py3: type str
            else:
                raise TypeError('Unknown type, must be one of InputFile, str.')
            # end if
        # 'caption' given by superclass
        # 'parse_mode' given by superclass
        if self.width is not None:
            array['width'] = int(self.width)  # type int
        if self.height is not None:
            array['height'] = int(self.height)  # type int
        if self.duration is not None:
            array['duration'] = int(self.duration)  # type int
        if self.supports_streaming is not None:
            array['supports_streaming'] = bool(self.supports_streaming)  # type bool
        return array
def to_array ( self ) : from . files import InputFile array = super ( InputMediaVideo , self ) . to_array ( ) if self . thumb is not None : if isinstance ( self . thumb , InputFile ) : array [ 'thumb' ] = None elif isinstance ( self . thumb , str ) : array [ 'thumb' ] = u ( self . thumb ) else : raise TypeError ( 'Unknown type, must be one of InputFile, str.' ) if self . width is not None : array [ 'width' ] = int ( self . width ) if self . height is not None : array [ 'height' ] = int ( self . height ) if self . duration is not None : array [ 'duration' ] = int ( self . duration ) if self . supports_streaming is not None : array [ 'supports_streaming' ] = bool ( self . supports_streaming ) return array
Serializes this InputMediaVideo to a dictionary.

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