
    dh
                       d dl mZ d dlmZmZ d dlmZmZmZm	Z	m
Z
mZmZmZ d dlmZmZ d dlmZ d dlmZ ddlmZmZ dd	lmZ erdd
lmZ  ede      Z G d de      Z G d deee         Z G d deeee   e      Zy)    )annotations)ABCabstractmethod)TYPE_CHECKINGAnyClassVarDict	GeneratorGenericOptionalTypeVar)	BaseModel
ConfigDict)model_validator)BotContextController   )	InputFileResponseParameters)
UNSET_TYPE)BotTelegramType)boundc                  >    e Zd ZU  ed      Zded<   ded<   ded<   y	)
RequestT)arbitrary_types_allowedstrmethodzDict[str, Optional[Any]]datazOptional[Dict[str, InputFile]]filesN)__name__
__module____qualname__r   model_config__annotations__     N/var/www/netwell/bot/venv/lib/python3.12/site-packages/aiogram/methods/base.pyr   r      s    d;LK
""))r&   r   c                  P    e Zd ZU ded<   dZded<   dZded<   dZded	<   dZd
ed<   y)ResponseboolokNzOptional[TelegramType]resultzOptional[str]descriptionzOptional[int]
error_codezOptional[ResponseParameters]
parameters)r    r!   r"   r$   r,   r-   r.   r/   r%   r&   r'   r)   r)   &   s1    H%)F")!%K% $J$/3J,3r&   r)   c                      e Zd ZU  eddd      Z ed      edd              Zerde	d<   d	e	d
<   ne
edd              Ze
edd              ZddZddZy)TelegramMethodallowT)extrapopulate_by_namer   before)modec                    t        |t              s|S |j                         D ci c]  \  }}t        |t              r|| c}}S c c}}w )a  
        Remove UNSET before fields validation.

        We use UNSET as a sentinel value for `parse_mode` and replace it to real value later.
        It isn't a problem when it's just default value for a model field,
        but UNSET might be passing to a model initialization from `Bot.method_name`,
        so we must take care of it and remove it before fields validation.
        )
isinstancedictitemsr   )clsvalueskvs       r'   remove_unsetzTelegramMethod.remove_unset5   s>     &$'M!'QAz!Z7P1QQQs
   AAzClassVar[Any]__returning__zClassVar[str]__api_method__c                     y Nr%   selfs    r'   r@   zTelegramMethod.__returning__I        r&   c                     y rC   r%   rD   s    r'   rA   zTelegramMethod.__api_method__N   rF   r&   c                .   K    ||        d {   S 7 wrC   r%   rE   bots     r'   emitzTelegramMethod.emitS   s     Ys   c                r    | j                   }|st        d      | j                  |      j                         S )NzThis method is not mounted to a any bot instance, please call it explicilty with bot instance `await bot(method)`
or mount method to a bot instance `method.as_(bot)` and then call it `await method`)_botRuntimeErrorrK   	__await__rI   s     r'   rO   zTelegramMethod.__await__V   s9    ii2  yy~''))r&   N)r<   Dict[str, Any]returnrP   )rQ   type)rQ   r   )rJ   r   rQ   r   )rQ   z"Generator[Any, None, TelegramType])r    r!   r"   r   r#   r   classmethodr?   r   r$   propertyr   r@   rA   rK   rO   r%   r&   r'   r1   r1   .   s     $L (#R  $R $$%% 
		 
 
	 
		 
 
		*r&   r1   N) 
__future__r   abcr   r   typingr   r   r   r	   r
   r   r   r   pydanticr   r   pydantic.functional_validatorsr   !aiogram.client.context_controllerr   typesr   r   
types.baser   
client.botr   r   r   r)   r1   r%   r&   r'   <module>r^      st    " #	 	 	 + : B 1 # ~S1*i *4y',/ 41*)9gl6KS 1*r&   