3
uQh]C                 @   s  d Z ddlmZ ddlmZ ddlmZmZmZmZ ddl	Z	ddl
Z
ddlmZ erpddlmZmZmZmZmZ G d	d
 d
eZG dd deZG dd deZG dd deZG dd deZG dd deZG dd deZG dd deZG dd deZG dd deZG dd deZG dd  d eZG d!d" d"eZG d#d$ d$eZG d%d& d&eZ G d'd( d(eZ!G d)d* d*eZ"G d+d, d,eZ#G d-d. d.eZ$G d/d0 d0eZ%G d1d2 d2eZ&G d3d4 d4eZ'G d5d6 d6eZ(G d7d8 d8eZ)G d9d: d:eZ*dS );zBFile generated by TLObjects' generator. All changes will be ERASED   )TLObject)	TLRequest    )OptionalListUnionTYPE_CHECKINGN)datetime)TypeDataJSONTypeInputAppEventTypeInputPeerTypeInputUserTypeMessageEntityc               @   s>   e Zd ZdZdZddddZdd Zd	d
 Zedd Z	dS )AcceptTermsOfServiceRequestl   w\ l   gk r
   )idc             C   s
   || _ dS )z?
        :returns Bool: This type has no constructors.
        N)r   )selfr    r   >/tmp/pip-build-2nz6shyl/telethon/telethon/tl/functions/help.py__init__   s    z$AcceptTermsOfServiceRequest.__init__c             C   s"   dt | jtr| jj n| jdS )Nr   )_r   )
isinstancer   r   to_dict)r   r   r   r   r      s    z#AcceptTermsOfServiceRequest.to_dictc             C   s   dj d| jj fS )N    s   r)joinr   _bytes)r   r   r   r   r      s    z"AcceptTermsOfServiceRequest._bytesc             C   s   |j  }| |dS )N)r   )tgread_object)clsreader_idr   r   r   from_reader#   s    z'AcceptTermsOfServiceRequest.from_readerN)
__name__
__module____qualname__CONSTRUCTOR_IDSUBCLASS_OF_IDr   r   r   classmethodr   r   r   r   r   r      s   r   c               @   sH   e Zd ZdZdZdedddZdd Zd	d
 Zdd Z	e
dd ZdS )DismissSuggestionRequestl   :j l   gk r   )peer
suggestionc             C   s   || _ || _dS )z?
        :returns Bool: This type has no constructors.
        N)r'   r(   )r   r'   r(   r   r   r   r   -   s    z!DismissSuggestionRequest.__init__c                s   |j |j| jI d H | _d S )N)get_input_peerget_input_entityr'   )r   clientutilsr   r   r   resolve4   s    z DismissSuggestionRequest.resolvec             C   s&   dt | jtr| jj n| j| jdS )Nr&   )r   r'   r(   )r   r'   r   r   r(   )r   r   r   r   r   7   s    z DismissSuggestionRequest.to_dictc             C   s   dj d| jj | j| jfS )Nr   s   )r   r'   r   serialize_bytesr(   )r   r   r   r   r   >   s    zDismissSuggestionRequest._bytesc             C   s   |j  }|j }| ||dS )N)r'   r(   )r   tgread_string)r   r   _peerZ_suggestionr   r   r   r   E   s    z$DismissSuggestionRequest.from_readerN)r    r!   r"   r#   r$   strr   r-   r   r   r%   r   r   r   r   r   r&   )   s   r&   c               @   sN   e Zd ZdZdZdeed dddZdd	 Zd
d Z	dd Z
edd ZdS )EditUserInfoRequestipfiS\r   r   )user_idmessageentitiesc             C   s   || _ || _|| _dS )zU
        :returns help.UserInfo: Instance of either UserInfoEmpty, UserInfo.
        N)r3   r4   r5   )r   r3   r4   r5   r   r   r   r   P   s    zEditUserInfoRequest.__init__c                s   |j |j| jI d H | _d S )N)get_input_userr*   r3   )r   r+   r,   r   r   r   r-   X   s    zEditUserInfoRequest.resolvec             C   sB   dt | jtr| jj n| j| j| jd kr.g ndd | jD dS )Nr2   c             S   s"   g | ]}t |tr|j n|qS r   )r   r   r   ).0xr   r   r   
<listcomp>`   s    z/EditUserInfoRequest.to_dict.<locals>.<listcomp>)r   r3   r4   r5   )r   r3   r   r   r4   r5   )r   r   r   r   r   [   s    zEditUserInfoRequest.to_dictc          	   C   sD   dj d| jj | j| jdtjdt| jdj dd | jD fS )Nr   s   pfs   ĵz<ic             s   s   | ]}|j  V  qd S )N)r   )r7   r8   r   r   r   	<genexpr>h   s    z-EditUserInfoRequest._bytes.<locals>.<genexpr>)	r   r3   r   r.   r4   structpacklenr5   )r   r   r   r   r   c   s
    
zEditUserInfoRequest._bytesc             C   sR   |j  }|j }|j  g }x&t|j D ]}|j  }|j| q*W | |||dS )N)r3   r4   r5   )r   r/   read_intrangeappend)r   r   _user_id_messageZ	_entitiesr   _xr   r   r   r   k   s    zEditUserInfoRequest.from_readerN)r    r!   r"   r#   r$   r1   r   r   r-   r   r   r%   r   r   r   r   r   r2   L   s   r2   c               @   s>   e Zd ZdZdZedddZdd Zdd	 Ze	d
d Z
dS )GetAppConfigRequestiTai8)hashc             C   s
   || _ dS )z^
        :returns help.AppConfig: Instance of either AppConfigNotModified, AppConfig.
        N)rE   )r   rE   r   r   r   r   |   s    zGetAppConfigRequest.__init__c             C   s   d| j dS )NrD   )r   rE   )rE   )r   r   r   r   r      s    zGetAppConfigRequest.to_dictc             C   s   dj dtjd| jfS )Nr   s   Taz<i)r   r;   r<   rE   )r   r   r   r   r      s    zGetAppConfigRequest._bytesc             C   s   |j  }| |dS )N)rE   )r>   )r   r   _hashr   r   r   r      s    zGetAppConfigRequest.from_readerN)r    r!   r"   r#   r$   intr   r   r   r%   r   r   r   r   r   rD   x   s   rD   c               @   s>   e Zd ZdZdZedddZdd Zdd	 Ze	d
d Z
dS )GetAppUpdateRequesti}Z-RiX)sourcec             C   s
   || _ dS )zU
        :returns help.AppUpdate: Instance of either AppUpdate, NoAppUpdate.
        N)rI   )r   rI   r   r   r   r      s    zGetAppUpdateRequest.__init__c             C   s   d| j dS )NrH   )r   rI   )rI   )r   r   r   r   r      s    zGetAppUpdateRequest.to_dictc             C   s   dj d| j| jfS )Nr   s   }Z-R)r   r.   rI   )r   r   r   r   r      s    zGetAppUpdateRequest._bytesc             C   s   |j  }| |dS )N)rI   )r/   )r   r   _sourcer   r   r   r      s    zGetAppUpdateRequest.from_readerN)r    r!   r"   r#   r$   r1   r   r   r   r%   r   r   r   r   r   rH      s   rH   c               @   s0   e Zd ZdZdZdd Zdd Zedd Zd	S )
GetCdnConfigRequestiBRl   |9Y c             C   s   ddiS )Nr   rK   r   )r   r   r   r   r      s    zGetCdnConfigRequest.to_dictc             C   s
   dj dS )Nr      BR)rL   )r   )r   r   r   r   r      s    zGetCdnConfigRequest._bytesc             C   s   |  S )Nr   )r   r   r   r   r   r      s    zGetCdnConfigRequest.from_readerN)	r    r!   r"   r#   r$   r   r   r%   r   r   r   r   r   rK      s
   rK   c               @   s0   e Zd ZdZdZdd Zdd Zedd Zd	S )
GetConfigRequestl   k	 l   J*L& c             C   s   ddiS )Nr   rM   r   )r   r   r   r   r      s    zGetConfigRequest.to_dictc             C   s
   dj dS )Nr      k)rN   )r   )r   r   r   r   r      s    zGetConfigRequest._bytesc             C   s   |  S )Nr   )r   r   r   r   r   r      s    zGetConfigRequest.from_readerN)	r    r!   r"   r#   r$   r   r   r%   r   r   r   r   r   rM      s
   rM   c               @   s@   e Zd ZdZdZeedddZdd Zdd	 Z	e
d
d ZdS )GetCountriesListRequestiWsl   ~cT )	lang_coderE   c             C   s   || _ || _dS )zj
        :returns help.CountriesList: Instance of either CountriesListNotModified, CountriesList.
        N)rP   rE   )r   rP   rE   r   r   r   r      s    z GetCountriesListRequest.__init__c             C   s   d| j | jdS )NrO   )r   rP   rE   )rP   rE   )r   r   r   r   r      s    zGetCountriesListRequest.to_dictc             C   s"   dj d| j| jtjd| jfS )Nr   s   Wsz<i)r   r.   rP   r;   r<   rE   )r   r   r   r   r      s    
zGetCountriesListRequest._bytesc             C   s   |j  }|j }| ||dS )N)rP   rE   )r/   r>   )r   r   Z
_lang_coderF   r   r   r   r      s    z#GetCountriesListRequest.from_readerN)r    r!   r"   r#   r$   r1   rG   r   r   r   r%   r   r   r   r   r   rO      s   rO   c               @   s>   e Zd ZdZdZedddZdd Zdd	 Ze	d
d Z
dS )GetDeepLinkInfoRequesti_?l   8,0 )pathc             C   s
   || _ dS )za
        :returns help.DeepLinkInfo: Instance of either DeepLinkInfoEmpty, DeepLinkInfo.
        N)rR   )r   rR   r   r   r   r      s    zGetDeepLinkInfoRequest.__init__c             C   s   d| j dS )NrQ   )r   rR   )rR   )r   r   r   r   r      s    zGetDeepLinkInfoRequest.to_dictc             C   s   dj d| j| jfS )Nr   s   _?)r   r.   rR   )r   r   r   r   r     s    zGetDeepLinkInfoRequest._bytesc             C   s   |j  }| |dS )N)rR   )r/   )r   r   _pathr   r   r   r     s    z"GetDeepLinkInfoRequest.from_readerN)r    r!   r"   r#   r$   r1   r   r   r   r%   r   r   r   r   r   rQ      s   rQ   c               @   s0   e Zd ZdZdZdd Zdd Zedd Zd	S )
GetInviteTextRequestiC#9Ml   5* c             C   s   ddiS )Nr   rT   r   )r   r   r   r   r     s    zGetInviteTextRequest.to_dictc             C   s
   dj dS )Nr      C#9M)rU   )r   )r   r   r   r   r     s    zGetInviteTextRequest._bytesc             C   s   |  S )Nr   )r   r   r   r   r   r      s    z GetInviteTextRequest.from_readerN)	r    r!   r"   r#   r$   r   r   r%   r   r   r   r   r   rT     s
   rT   c               @   s0   e Zd ZdZdZdd Zdd Zedd Zd	S )
GetNearestDcRequesti&0i_w8c             C   s   ddiS )Nr   rV   r   )r   r   r   r   r   )  s    zGetNearestDcRequest.to_dictc             C   s
   dj dS )Nr      &0)rW   )r   )r   r   r   r   r   .  s    zGetNearestDcRequest._bytesc             C   s   |  S )Nr   )r   r   r   r   r   r   3  s    zGetNearestDcRequest.from_readerN)	r    r!   r"   r#   r$   r   r   r%   r   r   r   r   r   rV   %  s
   rV   c               @   s>   e Zd ZdZdZedddZdd Zdd	 Ze	d
d Z
dS )GetPassportConfigRequestl   - l   @ )rE   c             C   s
   || _ dS )zm
        :returns help.PassportConfig: Instance of either PassportConfigNotModified, PassportConfig.
        N)rE   )r   rE   r   r   r   r   <  s    z!GetPassportConfigRequest.__init__c             C   s   d| j dS )NrX   )r   rE   )rE   )r   r   r   r   r   B  s    z GetPassportConfigRequest.to_dictc             C   s   dj dtjd| jfS )Nr   s   az<i)r   r;   r<   rE   )r   r   r   r   r   H  s    zGetPassportConfigRequest._bytesc             C   s   |j  }| |dS )N)rE   )r>   )r   r   rF   r   r   r   r   N  s    z$GetPassportConfigRequest.from_readerN)r    r!   r"   r#   r$   rG   r   r   r   r%   r   r   r   r   r   rX   8  s   rX   c               @   s>   e Zd ZdZdZedddZdd Zdd	 Ze	d
d Z
dS )GetPeerColorsRequestl   /t5 i3g?)rE   c             C   s
   || _ dS )za
        :returns help.PeerColors: Instance of either PeerColorsNotModified, PeerColors.
        N)rE   )r   rE   r   r   r   r   X  s    zGetPeerColorsRequest.__init__c             C   s   d| j dS )NrY   )r   rE   )rE   )r   r   r   r   r   ^  s    zGetPeerColorsRequest.to_dictc             C   s   dj dtjd| jfS )Nr   s   /z<i)r   r;   r<   rE   )r   r   r   r   r   d  s    zGetPeerColorsRequest._bytesc             C   s   |j  }| |dS )N)rE   )r>   )r   r   rF   r   r   r   r   j  s    z GetPeerColorsRequest.from_readerN)r    r!   r"   r#   r$   rG   r   r   r   r%   r   r   r   r   r   rY   T  s   rY   c               @   s>   e Zd ZdZdZedddZdd Zdd	 Ze	d
d Z
dS )GetPeerProfileColorsRequestl   )W i3g?)rE   c             C   s
   || _ dS )za
        :returns help.PeerColors: Instance of either PeerColorsNotModified, PeerColors.
        N)rE   )r   rE   r   r   r   r   t  s    z$GetPeerProfileColorsRequest.__init__c             C   s   d| j dS )NrZ   )r   rE   )rE   )r   r   r   r   r   z  s    z#GetPeerProfileColorsRequest.to_dictc             C   s   dj dtjd| jfS )Nr   s   ϫz<i)r   r;   r<   rE   )r   r   r   r   r     s    z"GetPeerProfileColorsRequest._bytesc             C   s   |j  }| |dS )N)rE   )r>   )r   r   rF   r   r   r   r     s    z'GetPeerProfileColorsRequest.from_readerN)r    r!   r"   r#   r$   rG   r   r   r   r%   r   r   r   r   r   rZ   p  s   rZ   c               @   s0   e Zd ZdZdZdd Zdd Zedd Zd	S )
GetPremiumPromoRequestl   7p l   8# c             C   s   ddiS )Nr   r[   r   )r   r   r   r   r     s    zGetPremiumPromoRequest.to_dictc             C   s
   dj dS )Nr      ԓ)r\   )r   )r   r   r   r   r     s    zGetPremiumPromoRequest._bytesc             C   s   |  S )Nr   )r   r   r   r   r   r     s    z"GetPremiumPromoRequest.from_readerN)	r    r!   r"   r#   r$   r   r   r%   r   r   r   r   r   r[     s
   r[   c               @   s0   e Zd ZdZdZdd Zdd Zedd Zd	S )
GetPromoDataRequestl   !t. l   BU: c             C   s   ddiS )Nr   r]   r   )r   r   r   r   r     s    zGetPromoDataRequest.to_dictc             C   s
   dj dS )Nr      !t)r^   )r   )r   r   r   r   r     s    zGetPromoDataRequest._bytesc             C   s   |  S )Nr   )r   r   r   r   r   r     s    zGetPromoDataRequest.from_readerN)	r    r!   r"   r#   r$   r   r   r%   r   r   r   r   r   r]     s
   r]   c               @   s>   e Zd ZdZdZedddZdd Zdd	 Ze	d
d Z
dS )GetRecentMeUrlsRequesti=l   wDd )refererc             C   s
   || _ dS )zG
        :returns help.RecentMeUrls: Instance of RecentMeUrls.
        N)r`   )r   r`   r   r   r   r     s    zGetRecentMeUrlsRequest.__init__c             C   s   d| j dS )Nr_   )r   r`   )r`   )r   r   r   r   r     s    zGetRecentMeUrlsRequest.to_dictc             C   s   dj d| j| jfS )Nr   s   =)r   r.   r`   )r   r   r   r   r     s    zGetRecentMeUrlsRequest._bytesc             C   s   |j  }| |dS )N)r`   )r/   )r   r   Z_refererr   r   r   r     s    z"GetRecentMeUrlsRequest.from_readerN)r    r!   r"   r#   r$   r1   r   r   r   r%   r   r   r   r   r   r_     s   r_   c               @   s0   e Zd ZdZdZdd Zdd Zedd Zd	S )
GetSupportRequestl   9 iYqc             C   s   ddiS )Nr   ra   r   )r   r   r   r   r     s    zGetSupportRequest.to_dictc             C   s
   dj dS )Nr      ߜ)rb   )r   )r   r   r   r   r     s    zGetSupportRequest._bytesc             C   s   |  S )Nr   )r   r   r   r   r   r     s    zGetSupportRequest.from_readerN)	r    r!   r"   r#   r$   r   r   r%   r   r   r   r   r   ra     s
   ra   c               @   s0   e Zd ZdZdZdd Zdd Zedd Zd	S )
GetSupportNameRequestl   ,g& i·Pc             C   s   ddiS )Nr   rc   r   )r   r   r   r   r     s    zGetSupportNameRequest.to_dictc             C   s
   dj dS )Nr      ,`)rd   )r   )r   r   r   r   r     s    zGetSupportNameRequest._bytesc             C   s   |  S )Nr   )r   r   r   r   r   r     s    z!GetSupportNameRequest.from_readerN)	r    r!   r"   r#   r$   r   r   r%   r   r   r   r   r   rc     s
   rc   c               @   s0   e Zd ZdZdZdd Zdd Zedd Zd	S )
GetTermsOfServiceUpdateRequesti,iw)<)c             C   s   ddiS )Nr   re   r   )r   r   r   r   r     s    z&GetTermsOfServiceUpdateRequest.to_dictc             C   s
   dj dS )Nr      ,)rf   )r   )r   r   r   r   r     s    z%GetTermsOfServiceUpdateRequest._bytesc             C   s   |  S )Nr   )r   r   r   r   r   r     s    z*GetTermsOfServiceUpdateRequest.from_readerN)	r    r!   r"   r#   r$   r   r   r%   r   r   r   r   r   re     s
   re   c               @   s>   e Zd ZdZdZedddZdd Zdd	 Ze	d
d Z
dS )GetTimezonesListRequesti@Il   ud )rE   c             C   s
   || _ dS )zj
        :returns help.TimezonesList: Instance of either TimezonesListNotModified, TimezonesList.
        N)rE   )r   rE   r   r   r   r     s    z GetTimezonesListRequest.__init__c             C   s   d| j dS )Nrg   )r   rE   )rE   )r   r   r   r   r     s    zGetTimezonesListRequest.to_dictc             C   s   dj dtjd| jfS )Nr   s   @Iz<i)r   r;   r<   rE   )r   r   r   r   r     s    zGetTimezonesListRequest._bytesc             C   s   |j  }| |dS )N)rE   )r>   )r   r   rF   r   r   r   r     s    z#GetTimezonesListRequest.from_readerN)r    r!   r"   r#   r$   rG   r   r   r   r%   r   r   r   r   r   rg     s   rg   c               @   sF   e Zd ZdZdZddddZdd Zd	d
 Zdd Ze	dd Z
dS )GetUserInfoRequestiiS\r   )r3   c             C   s
   || _ dS )zU
        :returns help.UserInfo: Instance of either UserInfoEmpty, UserInfo.
        N)r3   )r   r3   r   r   r   r   '  s    zGetUserInfoRequest.__init__c                s   |j |j| jI d H | _d S )N)r6   r*   r3   )r   r+   r,   r   r   r   r-   -  s    zGetUserInfoRequest.resolvec             C   s"   dt | jtr| jj n| jdS )Nrh   )r   r3   )r   r3   r   r   )r   r   r   r   r   0  s    zGetUserInfoRequest.to_dictc             C   s   dj d| jj fS )Nr   s   )r   r3   r   )r   r   r   r   r   6  s    zGetUserInfoRequest._bytesc             C   s   |j  }| |dS )N)r3   )r   )r   r   rA   r   r   r   r   <  s    zGetUserInfoRequest.from_readerN)r    r!   r"   r#   r$   r   r-   r   r   r%   r   r   r   r   r   rh   #  s   rh   c               @   sF   e Zd ZdZdZddddZdd Zd	d
 Zdd Ze	dd Z
dS )HidePromoDataRequesti%l   gk r   )r'   c             C   s
   || _ dS )z?
        :returns Bool: This type has no constructors.
        N)r'   )r   r'   r   r   r   r   F  s    zHidePromoDataRequest.__init__c                s   |j |j| jI d H | _d S )N)r)   r*   r'   )r   r+   r,   r   r   r   r-   L  s    zHidePromoDataRequest.resolvec             C   s"   dt | jtr| jj n| jdS )Nri   )r   r'   )r   r'   r   r   )r   r   r   r   r   O  s    zHidePromoDataRequest.to_dictc             C   s   dj d| jj fS )Nr   s   %)r   r'   r   )r   r   r   r   r   U  s    zHidePromoDataRequest._bytesc             C   s   |j  }| |dS )N)r'   )r   )r   r   r0   r   r   r   r   [  s    z HidePromoDataRequest.from_readerN)r    r!   r"   r#   r$   r   r-   r   r   r%   r   r   r   r   r   ri   B  s   ri   c               @   sB   e Zd ZdZdZed dddZdd Zd	d
 Ze	dd Z
dS )SaveAppLogRequestiHol   gk r   )eventsc             C   s
   || _ dS )z?
        :returns Bool: This type has no constructors.
        N)rk   )r   rk   r   r   r   r   e  s    zSaveAppLogRequest.__init__c             C   s$   d| j d krg ndd | j D dS )Nrj   c             S   s"   g | ]}t |tr|j n|qS r   )r   r   r   )r7   r8   r   r   r   r9   n  s    z-SaveAppLogRequest.to_dict.<locals>.<listcomp>)r   rk   )rk   )r   r   r   r   r   k  s    zSaveAppLogRequest.to_dictc             C   s2   dj ddtjdt| jdj dd | jD fS )Nr   s   Hos   ĵz<ic             s   s   | ]}|j  V  qd S )N)r   )r7   r8   r   r   r   r:   t  s    z+SaveAppLogRequest._bytes.<locals>.<genexpr>)r   r;   r<   r=   rk   )r   r   r   r   r   q  s    zSaveAppLogRequest._bytesc             C   s>   |j   g }x&t|j  D ]}|j }|j| qW | |dS )N)rk   )r>   r?   r   r@   )r   r   Z_eventsr   rC   r   r   r   r   w  s    zSaveAppLogRequest.from_readerN)r    r!   r"   r#   r$   r   r   r   r   r%   r   r   r   r   r   rj   a  s   rj   c               @   s@   e Zd ZdZdZeedddZdd Zdd	 Z	e
d
d ZdS )SetBotUpdatesStatusRequestl   OEX l   gk )pending_updates_countr4   c             C   s   || _ || _dS )z?
        :returns Bool: This type has no constructors.
        N)rm   r4   )r   rm   r4   r   r   r   r     s    z#SetBotUpdatesStatusRequest.__init__c             C   s   d| j | jdS )Nrl   )r   rm   r4   )rm   r4   )r   r   r   r   r     s    z"SetBotUpdatesStatusRequest.to_dictc             C   s"   dj dtjd| j| j| jfS )Nr   s   "z<i)r   r;   r<   rm   r.   r4   )r   r   r   r   r     s    z!SetBotUpdatesStatusRequest._bytesc             C   s   |j  }|j }| ||dS )N)rm   r4   )r>   r/   )r   r   Z_pending_updates_countrB   r   r   r   r     s    z&SetBotUpdatesStatusRequest.from_readerN)r    r!   r"   r#   r$   rG   r1   r   r   r   r%   r   r   r   r   r   rl     s   rl   )+__doc__Ztl.tlobjectr   r   typingr   r   r   r   osr;   r	   Ztl.typesr
   r   r   r   r   r   r&   r2   rD   rH   rK   rM   rO   rQ   rT   rV   rX   rY   rZ   r[   r]   r_   ra   rc   re   rg   rh   ri   rj   rl   r   r   r   r   <module>   sB   #, !