
    G˝i                    T    d dl mZ d dlmZmZ ddlmZ ddlmZ  G d dee	         Z
y	)
    )annotations)TYPE_CHECKINGAny   )	InputFile   )TelegramMethodc                       e Zd ZU dZeZdZded<   	 dZded<   	 dZ	ded	<   	 dZ
d
ed<   	 dZded<   	 dZded<   	 dZded<   	 er#ddddddd	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d fdZ xZS  xZS )
SetWebhooka  
    Use this method to specify a URL and receive incoming updates via an outgoing webhook. Whenever there is an update for the bot, we will send an HTTPS POST request to the specified URL, containing a JSON-serialized :class:`aiogram.types.update.Update`. In case of an unsuccessful request (a request with response `HTTP status code <https://en.wikipedia.org/wiki/List_of_HTTP_status_codes>`_ different from :code:`2XY`), we will repeat the request and give up after a reasonable amount of attempts. Returns :code:`True` on success.
    If you'd like to make sure that the webhook was set by you, you can specify secret data in the parameter *secret_token*. If specified, the request will contain a header 'X-Telegram-Bot-Api-Secret-Token' with the secret token as content.

     **Notes**

     **1.** You will not be able to receive updates using :class:`aiogram.methods.get_updates.GetUpdates` for as long as an outgoing webhook is set up.

     **2.** To use a self-signed certificate, you need to upload your `public key certificate <https://core.telegram.org/bots/self-signed>`_ using *certificate* parameter. Please upload as InputFile, sending a String will not work.

     **3.** Ports currently supported *for webhooks*: **443, 80, 88, 8443**.
     If you're having any trouble setting up webhooks, please check out this `amazing guide to webhooks <https://core.telegram.org/bots/webhooks>`_.

    Source: https://core.telegram.org/bots/api#setwebhook
    
setWebhookstrurlNInputFile | Nonecertificate
str | None
ip_address
int | Nonemax_connectionslist[str] | Noneallowed_updatesbool | Nonedrop_pending_updatessecret_token)r   r   r   r   r   r   c               4    t        	|   d|||||||d| y )N)r   r   r   r   r   r   r    )super__init__)
__pydantic__self__r   r   r   r   r   r   r   _SetWebhook__pydantic_kwargs	__class__s
            T/home/leshdev/mybot/venv/lib/python3.12/site-packages/aiogram/methods/set_webhook.pyr   zSetWebhook.__init__0   s6      G 	'% / /%9)	 $	    )r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   returnNone)__name__
__module____qualname____doc__bool__returning____api_method____annotations__r   r   r   r   r   r   r   r   __classcell__)r    s   @r!   r   r   	   s      M!N	HY$(K!( x!J
!y"&OZ& r(,O%, ^(,+,7#L*# k -1%)*.0404'+	 	 *		
 #	 (	 .	 #.	 %	 "%	 	 		 r"   r   N)
__future__r   typingr   r   typesr   baser	   r)   r   r   r"   r!   <module>r2      s$    " %   @% @r"   