3
uQh                 @   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.
        N)r   )selfr    r   ?/tmp/pip-build-2nz6shyl/telethon/telethon/tl/functions/users.py__init__   s    zGetFullUserRequest.__init__c                s   |j |j| 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j n| jdS )Nr   )_r   )
isinstancer   r   to_dict)r   r   r   r   r      s    zGetFullUserRequest.to_dictc             C   s   dj d| jj fS )N    s   Y)joinr   _bytes)r   r   r   r   r       s    zGetFullUserRequest._bytesc             C   s   |j  }| |dS )N)r   )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.
        N)r   )r   r   r   r   r   r   0   s    z(GetRequirementsToContactRequest.__init__c                s:   g }x*| j D ] }|j|j|j|I d H  qW || _ d S )N)r   appendr   r   )r   r   r   _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 )Nr(   c             S   s"   g | ]}t |tr|j 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   r   =   s    z'GetRequirementsToContactRequest.to_dictc             C   s2   dj ddtjdt| jdj dd | jD fS )Nr   s   s   ĵz<ic             s   s   | ]}|j  V  qd S )N)r   )r,   r-   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>   |j   g }x&t|j  D ]}|j }|j| qW | |dS )N)r   )read_intranger   r)   )r   r   r    r   r+   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   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 )GetUsersRequestiHiMr
   )r   c             C   s
   || _ dS )zG
        :returns Vector<User>: This type has no constructors.
        N)r   )r   r   r   r   r   r   X   s    zGetUsersRequest.__init__c                s:   g }x*| j D ] }|j|j|j|I d H  qW || _ d S )N)r   r)   r   r   )r   r   r   r*   r+   r   r   r   r   ^   s     zGetUsersRequest.resolvec             C   s$   d| j d krg ndd | j D dS )Nr5   c             S   s"   g | ]}t |tr|j n|qS r   )r   r   r   )r,   r-   r   r   r   r.   h   s    z+GetUsersRequest.to_dict.<locals>.<listcomp>)r   r   )r   )r   r   r   r   r   e   s    zGetUsersRequest.to_dictc             C   s2   dj ddtjdt| jdj dd | jD fS )Nr   s   Hs   ĵz<ic             s   s   | ]}|j  V  qd S )N)r   )r,   r-   r   r   r   r/   n   s    z)GetUsersRequest._bytes.<locals>.<genexpr>)r   r0   r1   r2   r   )r   r   r   r   r   k   s    zGetUsersRequest._bytesc             C   s>   |j   g }x&t|j  D ]}|j }|j| qW | |dS )N)r   )r3   r4   r   r)   )r   r   r    r   r+   r   r   r   r!   q   s    zGetUsersRequest.from_readerN)r"   r#   r$   r%   r&   r   r   r   r   r   r'   r!   r   r   r   r   r5   T   s   r5   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.
        N)r   r7   )r   r   r7   r   r   r   r      s    z$SetSecureValueErrorsRequest.__init__c                s   |j |j| jI d H | _d S )N)r   r   r   )r   r   r   r   r   r   r      s    z#SetSecureValueErrorsRequest.resolvec             C   s>   dt | jtr| jj n| j| jd kr*g ndd | jD dS )Nr6   c             S   s"   g | ]}t |tr|j n|qS r   )r   r   r   )r,   r-   r   r   r   r.      s    z7SetSecureValueErrorsRequest.to_dict.<locals>.<listcomp>)r   r   r7   )r   r   r   r   r7   )r   r   r   r   r      s    z#SetSecureValueErrorsRequest.to_dictc             C   s:   dj d| jj dtjdt| jdj dd | jD fS )Nr   s   Ȑs   ĵz<ic             s   s   | ]}|j  V  qd S )N)r   )r,   r-   r   r   r   r/      s    z5SetSecureValueErrorsRequest._bytes.<locals>.<genexpr>)r   r   r   r0   r1   r2   r7   )r   r   r   r   r      s    z"SetSecureValueErrorsRequest._bytesc             C   sH   |j  }|j  g }x&t|j D ]}|j  }|j| q"W | ||dS )N)r   r7   )r   r3   r4   r)   )r   r   r    _errorsr   r+   r   r   r   r!      s    z'SetSecureValueErrorsRequest.from_readerN)r"   r#   r$   r%   r&   r   r   r   r   r   r'   r!   r   r   r   r   r6   |   s   r6   )__doc__Ztl.tlobjectr   r   typingr   r   r   r   osr0   r	   Ztl.typesr
   r   r   r(   r5   r6   r   r   r   r   <module>   s   ((