U
    V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\    gk r
   idc                 C   s
   || _ dS z?
        :returns Bool: This type has no constructors.
        Nr   )selfr    r   >/tmp/pip-build-6059463i/telethon/telethon/tl/functions/help.py__init__   s    z$AcceptTermsOfServiceRequest.__init__c                 C   s"   dt | jtr| j n| jdS )Nr   )_r   )
isinstancer   r   to_dictr   r   r   r   r      s    z#AcceptTermsOfServiceRequest.to_dictc                 C   s   d d| j fS )N    s   r)joinr   _bytesr   r   r   r   r      s    z"AcceptTermsOfServiceRequest._bytesc                 C   s   |  }| |dS )Nr   tgread_object)clsreaderZ_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 r   r   peer
suggestionc                 C   s   || _ || _dS r   r+   )r   r,   r-   r   r   r   r   -   s    z!DismissSuggestionRequest.__init__c                    s   | || jI d H | _d S NZget_input_peerget_input_entityr,   r   clientutilsr   r   r   resolve4   s    z DismissSuggestionRequest.resolvec                 C   s&   dt | jtr| 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 d| j | | jfS )Nr   s   )r   r,   r   serialize_bytesr-   r   r   r   r   r   >   s
    
zDismissSuggestionRequest._bytesc                 C   s   |  }| }| ||dS )Nr+   )r    tgread_string)r!   r"   _peerZ_suggestionr   r   r   r#   E   s    z$DismissSuggestionRequest.from_readerN)r$   r%   r&   r'   r(   strr   r4   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fS\r   r   user_idmessageentitiesc                 C   s   || _ || _|| _dS zU
        :returns help.UserInfo: Instance of either UserInfoEmpty, UserInfo.
        Nr;   )r   r<   r=   r>   r   r   r   r   P   s    zEditUserInfoRequest.__init__c                    s   | || jI d H | _d S r.   Zget_input_userr0   r<   r1   r   r   r   r4   X   s    zEditUserInfoRequest.resolvec                 C   sB   dt | jtr| j n| j| j| jd kr.g ndd | jD dS )Nr9   c                 S   s"   g | ]}t |tr| n|qS r   r   r   r   .0xr   r   r   
<listcomp>`   s     z/EditUserInfoRequest.to_dict.<locals>.<listcomp>)r   r<   r=   r>   )r   r<   r   r   r=   r>   r   r   r   r   r   [   s
    zEditUserInfoRequest.to_dictc                 C   sD   d d| j | | jdtdt| jd dd | jD fS )Nr   s   pf   ĵ<ic                 s   s   | ]}|  V  qd S r.   r   rB   r   r   r   	<genexpr>h   s     z-EditUserInfoRequest._bytes.<locals>.<genexpr>)	r   r<   r   r5   r=   structpacklenr>   r   r   r   r   r   c   s    
  zEditUserInfoRequest._bytesc                 C   sN   |  }| }|  g }t| D ]}|  }|| q(| |||dS )Nr;   )r    r6   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(   r8   r   r   r4   r   r   r)   r#   r   r   r   r   r9   L   s   r9   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.
        NrT   r   rU   r   r   r   r   |   s    zGetAppConfigRequest.__init__c                 C   s   d| j dS )NrS   r   rU   rT   r   r   r   r   r      s    zGetAppConfigRequest.to_dictc                 C   s   d dtd| jfS )Nr   s   TarG   r   rJ   rK   rU   r   r   r   r   r      s    zGetAppConfigRequest._bytesc                 C   s   |  }| |dS NrT   rM   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   rS   x   s   rS   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.
        Nr`   )r   ra   r   r   r   r      s    zGetAppUpdateRequest.__init__c                 C   s   d| j dS )Nr_   )r   ra   r`   r   r   r   r   r      s    zGetAppUpdateRequest.to_dictc                 C   s   d d| | jfS )Nr   s   }Z-R)r   r5   ra   r   r   r   r   r      s    
zGetAppUpdateRequest._bytesc                 C   s   |  }| |dS )Nr`   r6   )r!   r"   Z_sourcer   r   r   r#      s    zGetAppUpdateRequest.from_readerNr$   r%   r&   r'   r(   r8   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 )
GetCdnConfigRequestiBRl   |9Y c                 C   s   ddiS )Nr   rd   r   r   r   r   r   r      s     zGetCdnConfigRequest.to_dictc                 C   s
   d dS )Nr   )s   BRr   r   r   r   r   r      s    zGetCdnConfigRequest._bytesc                 C   s   |  S r.   r   r!   r"   r   r   r   r#      s    zGetCdnConfigRequest.from_readerN	r$   r%   r&   r'   r(   r   r   r)   r#   r   r   r   r   rd      s   rd   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   rh   r   r   r   r   r   r      s     zGetConfigRequest.to_dictc                 C   s
   d dS )Nr   )s   kre   r   r   r   r   r      s    zGetConfigRequest._bytesc                 C   s   |  S r.   r   rf   r   r   r   r#      s    zGetConfigRequest.from_readerNrg   r   r   r   r   rh      s   rh   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_coderU   c                 C   s   || _ || _dS )zj
        :returns help.CountriesList: Instance of either CountriesListNotModified, CountriesList.
        Nrj   )r   rk   rU   r   r   r   r      s    z GetCountriesListRequest.__init__c                 C   s   d| j | jdS )Nri   )r   rk   rU   rj   r   r   r   r   r      s    zGetCountriesListRequest.to_dictc                 C   s"   d d| | jtd| jfS )Nr   s   WsrG   )r   r5   rk   rJ   rK   rU   r   r   r   r   r      s
    
zGetCountriesListRequest._bytesc                 C   s   |  }| }| ||dS )Nrj   )r6   rM   )r!   r"   Z
_lang_coder\   r   r   r   r#      s    z#GetCountriesListRequest.from_readerN)r$   r%   r&   r'   r(   r8   r^   r   r   r   r)   r#   r   r   r   r   ri      s   ri   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.
        Nrm   )r   rn   r   r   r   r      s    zGetDeepLinkInfoRequest.__init__c                 C   s   d| j dS )Nrl   )r   rn   rm   r   r   r   r   r      s    zGetDeepLinkInfoRequest.to_dictc                 C   s   d d| | jfS )Nr   s   _?)r   r5   rn   r   r   r   r   r     s    
zGetDeepLinkInfoRequest._bytesc                 C   s   |  }| |dS )Nrm   rb   )r!   r"   _pathr   r   r   r#     s    z"GetDeepLinkInfoRequest.from_readerNrc   r   r   r   r   rl      s   rl   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   rp   r   r   r   r   r   r     s     zGetInviteTextRequest.to_dictc                 C   s
   d dS )Nr   )s   C#9Mre   r   r   r   r   r     s    zGetInviteTextRequest._bytesc                 C   s   |  S r.   r   rf   r   r   r   r#      s    z GetInviteTextRequest.from_readerNrg   r   r   r   r   rp     s   rp   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   rq   r   r   r   r   r   r   )  s     zGetNearestDcRequest.to_dictc                 C   s
   d dS )Nr   )s   &0re   r   r   r   r   r   .  s    zGetNearestDcRequest._bytesc                 C   s   |  S r.   r   rf   r   r   r   r#   3  s    zGetNearestDcRequest.from_readerNrg   r   r   r   r   rq   %  s   rq   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   @ rT   c                 C   s
   || _ dS )zm
        :returns help.PassportConfig: Instance of either PassportConfigNotModified, PassportConfig.
        NrT   rV   r   r   r   r   <  s    z!GetPassportConfigRequest.__init__c                 C   s   d| j dS )Nrr   rW   rT   r   r   r   r   r   B  s    z GetPassportConfigRequest.to_dictc                 C   s   d dtd| jfS )Nr   s   arG   rX   r   r   r   r   r   H  s    zGetPassportConfigRequest._bytesc                 C   s   |  }| |dS rY   rZ   r[   r   r   r   r#   N  s    z$GetPassportConfigRequest.from_readerNr]   r   r   r   r   rr   8  s   rr   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 3g?rT   c                 C   s
   || _ dS za
        :returns help.PeerColors: Instance of either PeerColorsNotModified, PeerColors.
        NrT   rV   r   r   r   r   X  s    zGetPeerColorsRequest.__init__c                 C   s   d| j dS )Nrs   rW   rT   r   r   r   r   r   ^  s    zGetPeerColorsRequest.to_dictc                 C   s   d dtd| jfS )Nr   s   /rG   rX   r   r   r   r   r   d  s    zGetPeerColorsRequest._bytesc                 C   s   |  }| |dS rY   rZ   r[   r   r   r   r#   j  s    z GetPeerColorsRequest.from_readerNr]   r   r   r   r   rs   T  s   rs   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 rt   rT   c                 C   s
   || _ dS ru   rT   rV   r   r   r   r   t  s    z$GetPeerProfileColorsRequest.__init__c                 C   s   d| j dS )Nrv   rW   rT   r   r   r   r   r   z  s    z#GetPeerProfileColorsRequest.to_dictc                 C   s   d dtd| jfS )Nr   s   ϫrG   rX   r   r   r   r   r     s    z"GetPeerProfileColorsRequest._bytesc                 C   s   |  }| |dS rY   rZ   r[   r   r   r   r#     s    z'GetPeerProfileColorsRequest.from_readerNr]   r   r   r   r   rv   p  s   rv   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   rw   r   r   r   r   r   r     s     zGetPremiumPromoRequest.to_dictc                 C   s
   d dS )Nr   )s   ԓre   r   r   r   r   r     s    zGetPremiumPromoRequest._bytesc                 C   s   |  S r.   r   rf   r   r   r   r#     s    z"GetPremiumPromoRequest.from_readerNrg   r   r   r   r   rw     s   rw   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   rx   r   r   r   r   r   r     s     zGetPromoDataRequest.to_dictc                 C   s
   d dS )Nr   )s   !tre   r   r   r   r   r     s    zGetPromoDataRequest._bytesc                 C   s   |  S r.   r   rf   r   r   r   r#     s    zGetPromoDataRequest.from_readerNrg   r   r   r   r   rx     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 )GetRecentMeUrlsRequesti=l   wDd refererc                 C   s
   || _ dS )zG
        :returns help.RecentMeUrls: Instance of RecentMeUrls.
        Nrz   )r   r{   r   r   r   r     s    zGetRecentMeUrlsRequest.__init__c                 C   s   d| j dS )Nry   )r   r{   rz   r   r   r   r   r     s    zGetRecentMeUrlsRequest.to_dictc                 C   s   d d| | jfS )Nr   s   =)r   r5   r{   r   r   r   r   r     s    
zGetRecentMeUrlsRequest._bytesc                 C   s   |  }| |dS )Nrz   rb   )r!   r"   Z_refererr   r   r   r#     s    z"GetRecentMeUrlsRequest.from_readerNrc   r   r   r   r   ry     s   ry   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   r|   r   r   r   r   r   r     s     zGetSupportRequest.to_dictc                 C   s
   d dS )Nr   )s   ߜre   r   r   r   r   r     s    zGetSupportRequest._bytesc                 C   s   |  S r.   r   rf   r   r   r   r#     s    zGetSupportRequest.from_readerNrg   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 )
GetSupportNameRequestl   ,g& i·Pc                 C   s   ddiS )Nr   r}   r   r   r   r   r   r     s     zGetSupportNameRequest.to_dictc                 C   s
   d dS )Nr   )s   ,`re   r   r   r   r   r     s    zGetSupportNameRequest._bytesc                 C   s   |  S r.   r   rf   r   r   r   r#     s    z!GetSupportNameRequest.from_readerNrg   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 )
GetTermsOfServiceUpdateRequesti,iw)<)c                 C   s   ddiS )Nr   r~   r   r   r   r   r   r     s     z&GetTermsOfServiceUpdateRequest.to_dictc                 C   s
   d dS )Nr   )s   ,re   r   r   r   r   r     s    z%GetTermsOfServiceUpdateRequest._bytesc                 C   s   |  S r.   r   rf   r   r   r   r#     s    z*GetTermsOfServiceUpdateRequest.from_readerNrg   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 )GetTimezonesListRequesti@Il   ud rT   c                 C   s
   || _ dS )zj
        :returns help.TimezonesList: Instance of either TimezonesListNotModified, TimezonesList.
        NrT   rV   r   r   r   r     s    z GetTimezonesListRequest.__init__c                 C   s   d| j dS )Nr   rW   rT   r   r   r   r   r     s    zGetTimezonesListRequest.to_dictc                 C   s   d dtd| jfS )Nr   s   @IrG   rX   r   r   r   r   r     s    zGetTimezonesListRequest._bytesc                 C   s   |  }| |dS rY   rZ   r[   r   r   r   r#     s    z#GetTimezonesListRequest.from_readerNr]   r   r   r   r   r     s   r   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r:   r   r<   c                 C   s
   || _ dS r?   r   )r   r<   r   r   r   r   '  s    zGetUserInfoRequest.__init__c                    s   | || jI d H | _d S r.   r@   r1   r   r   r   r4   -  s    zGetUserInfoRequest.resolvec                 C   s"   dt | jtr| j n| jdS )Nr   )r   r<   )r   r<   r   r   r   r   r   r   r   0  s    zGetUserInfoRequest.to_dictc                 C   s   d d| j fS )Nr   s   )r   r<   r   r   r   r   r   r   6  s    zGetUserInfoRequest._bytesc                 C   s   |  }| |dS )Nr   r   )r!   r"   rP   r   r   r   r#   <  s    zGetUserInfoRequest.from_readerNr$   r%   r&   r'   r(   r   r4   r   r   r)   r#   r   r   r   r   r   #  s   r   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%r   r   r,   c                 C   s
   || _ dS r   r   )r   r,   r   r   r   r   F  s    zHidePromoDataRequest.__init__c                    s   | || jI d H | _d S r.   r/   r1   r   r   r   r4   L  s    zHidePromoDataRequest.resolvec                 C   s"   dt | jtr| j n| jdS )Nr   )r   r,   )r   r,   r   r   r   r   r   r   r   O  s    zHidePromoDataRequest.to_dictc                 C   s   d d| j fS )Nr   s   %)r   r,   r   r   r   r   r   r   U  s    zHidePromoDataRequest._bytesc                 C   s   |  }| |dS )Nr   r   )r!   r"   r7   r   r   r   r#   [  s    z HidePromoDataRequest.from_readerNr   r   r   r   r   r   B  s   r   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or   r   eventsc                 C   s
   || _ dS r   r   )r   r   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 )Nr   c                 S   s"   g | ]}t |tr| n|qS r   rA   rB   r   r   r   rE   n  s     z-SaveAppLogRequest.to_dict.<locals>.<listcomp>)r   r   r   r   r   r   r   r   k  s    zSaveAppLogRequest.to_dictc              	   C   s2   d ddtdt| jd dd | jD fS )Nr   s   HorF   rG   c                 s   s   | ]}|  V  qd S r.   rH   rB   r   r   r   rI   t  s     z+SaveAppLogRequest._bytes.<locals>.<genexpr>)r   rJ   rK   rL   r   r   r   r   r   r   q  s      zSaveAppLogRequest._bytesc                 C   s:   |   g }t|  D ]}| }|| q| |dS )Nr   )rM   rN   r    rO   )r!   r"   Z_eventsr   rR   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   r   a  s   r   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 r   pending_updates_countr=   c                 C   s   || _ || _dS r   r   )r   r   r=   r   r   r   r     s    z#SetBotUpdatesStatusRequest.__init__c                 C   s   d| j | jdS )Nr   )r   r   r=   r   r   r   r   r   r     s    z"SetBotUpdatesStatusRequest.to_dictc                 C   s"   d dtd| j| | jfS )Nr   s   "rG   )r   rJ   rK   r   r5   r=   r   r   r   r   r     s
    
z!SetBotUpdatesStatusRequest._bytesc                 C   s   |  }| }| ||dS )Nr   )rM   r6   )r!   r"   Z_pending_updates_countrQ   r   r   r   r#     s    z&SetBotUpdatesStatusRequest.from_readerN)r$   r%   r&   r'   r(   r^   r8   r   r   r   r)   r#   r   r   r   r   r     s   r   )+__doc__Ztl.tlobjectr   r   typingr   r   r   r   osrJ   r	   Ztl.typesr
   r   r   r   r   r   r*   r9   rS   r_   rd   rh   ri   rl   rp   rq   rr   rs   rv   rw   rx   ry   r|   r}   r~   r   r   r   r   r   r   r   r   r   <module>   sB   #, !