U
    h                     @   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rdddl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dS )zBFile generated by TLObjects' generator. All changes will be ERASED   )TLObject)	TLRequest    )OptionalListUnionTYPE_CHECKINGN)datetime)TypeInputUserTypeSecureValueErrorc                   @   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 )GetFullUserRequestl   Yl l    r
   idc                 C   s
   || _ dS )z@
        :returns users.UserFull: Instance of UserFull.
        Nr   selfr    r   ?/tmp/pip-unpacked-wheel-c81u5j2r/telethon/tl/functions/users.py__init__   s    zGetFullUserRequest.__init__c                    s   | || jI d H | _d S Nget_input_userget_input_entityr   r   clientutilsr   r   r   resolve   s    zGetFullUserRequest.resolvec                 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GetFullUserRequest.to_dictc                 C   s   d d| j fS )N    s   Y)joinr   _bytesr    r   r   r   r#       s    zGetFullUserRequest._bytesc                 C   s   |  }| |dS Nr   )tgread_object)clsreader_idr   r   r   from_reader&   s    zGetFullUserRequest.from_readerN)__name__
__module____qualname__CONSTRUCTOR_IDSUBCLASS_OF_IDr   r   r   r#   classmethodr)   r   r   r   r   r      s   r   c                   @   sJ   e Zd ZdZdZed dddZdd Zd	d
 Zdd Z	e
dd ZdS )GetRequirementsToContactRequestl   51 i#&2r
   r   c                 C   s
   || _ dS )zW
        :returns Vector<RequirementToContact>: This type has no constructors.
        Nr   r   r   r   r   r   0   s    z(GetRequirementsToContactRequest.__init__c                    s6   g }| j D ] }||||I d H  q
|| _ d S r   r   appendr   r   r   r   r   Z_tmp_xr   r   r   r   6   s    
z'GetRequirementsToContactRequest.resolvec                 C   s$   d| j d krg ndd | j D dS )Nr0   c                 S   s"   g | ]}t |tr| n|qS r   r   r   r   .0xr   r   r   
<listcomp>@   s     z;GetRequirementsToContactRequest.to_dict.<locals>.<listcomp>r   r   r    r   r   r   r   =   s    z'GetRequirementsToContactRequest.to_dictc              	   C   s2   d ddtdt| jd dd | jD fS )Nr!   s      ĵ<ic                 s   s   | ]}|  V  qd S r   r#   r6   r   r   r   	<genexpr>F   s     z9GetRequirementsToContactRequest._bytes.<locals>.<genexpr>r"   structpacklenr   r    r   r   r   r#   C   s      z&GetRequirementsToContactRequest._bytesc                 C   s:   |   g }t|  D ]}| }|| q| |dS r$   read_intranger%   r2   r&   r'   r(   r   r4   r   r   r   r)   I   s    z+GetRequirementsToContactRequest.from_readerNr*   r+   r,   r-   r.   r   r   r   r   r#   r/   r)   r   r   r   r   r0   ,   s   r0   c                   @   sJ   e Zd ZdZdZed dddZdd Zd	d
 Zdd Z	e
dd ZdS )GetUsersRequestiHiMr
   r   c                 C   s
   || _ dS )zG
        :returns Vector<User>: This type has no constructors.
        Nr   r   r   r   r   r   X   s    zGetUsersRequest.__init__c                    s6   g }| j D ] }||||I d H  q
|| _ d S r   r1   r3   r   r   r   r   ^   s    
zGetUsersRequest.resolvec                 C   s$   d| j d krg ndd | j D dS )NrG   c                 S   s"   g | ]}t |tr| n|qS r   r5   r6   r   r   r   r9   h   s     z+GetUsersRequest.to_dict.<locals>.<listcomp>r   r   r    r   r   r   r   e   s    zGetUsersRequest.to_dictc              	   C   s2   d ddtdt| jd dd | jD fS )Nr!   s   Hr:   r;   c                 s   s   | ]}|  V  qd S r   r<   r6   r   r   r   r=   n   s     z)GetUsersRequest._bytes.<locals>.<genexpr>r>   r    r   r   r   r#   k   s      zGetUsersRequest._bytesc                 C   s:   |   g }t|  D ]}| }|| q| |dS r$   rB   rE   r   r   r   r)   q   s    zGetUsersRequest.from_readerNrF   r   r   r   r   rG   T   s   rG   c                   @   sL   e Zd ZdZdZded dddZdd	 Zd
d Zdd Z	e
dd ZdS )SetSecureValueErrorsRequestl   ! l   gk r
   r   r   errorsc                 C   s   || _ || _dS )z?
        :returns Bool: This type has no constructors.
        NrI   )r   r   rJ   r   r   r   r      s    z$SetSecureValueErrorsRequest.__init__c                    s   | || jI d H | _d S r   r   r   r   r   r   r      s    z#SetSecureValueErrorsRequest.resolvec                 C   s>   dt | jtr| j n| j| jd kr*g ndd | jD dS )NrH   c                 S   s"   g | ]}t |tr| n|qS r   r5   r6   r   r   r   r9      s     z7SetSecureValueErrorsRequest.to_dict.<locals>.<listcomp>)r   r   rJ   )r   r   r   r   rJ   r    r   r   r   r      s    z#SetSecureValueErrorsRequest.to_dictc              
   C   s:   d d| j dtdt| jd dd | jD fS )Nr!   s   Ȑr:   r;   c                 s   s   | ]}|  V  qd S r   r<   r6   r   r   r   r=      s     z5SetSecureValueErrorsRequest._bytes.<locals>.<genexpr>)r"   r   r#   r?   r@   rA   rJ   r    r   r   r   r#      s      z"SetSecureValueErrorsRequest._bytesc                 C   sD   |  }|  g }t| D ]}|  }|| q | ||dS )NrI   )r%   rC   rD   r2   )r&   r'   r(   _errorsr   r4   r   r   r   r)      s    z'SetSecureValueErrorsRequest.from_readerNrF   r   r   r   r   rH   |   s   rH   )__doc__Ztl.tlobjectr   r   typingr   r   r   r   osr?   r	   Ztl.typesr
   r   r   r0   rG   rH   r   r   r   r   <module>   s   ((