o
    ,Âif}	  ã                   @   s<   d dl mZ d dlmZ d dlmZ G dd„ dee ƒZdS )é    )ÚEntityCollection)ÚCreateEntityQuery)ÚSubscriptionc                       s,   e Zd Zd‡ fdd„	Z		ddd„Z‡  ZS )ÚSubscriptionCollectionNc                    s   t t| ƒ |t|¡ d S ©N)Úsuperr   Ú__init__r   )ÚselfÚcontextÚresource_path©Ú	__class__© ú[/var/www/html/corbot_env/lib/python3.10/site-packages/office365/subscriptions/collection.pyr      s   
ÿzSubscriptionCollection.__init__c           
      C   sN   t | jƒ}|  |¡ ||t|ƒ| ¡ d ||dœ}t| ||ƒ}	| j |	¡ |S )aæ  
        Subscribes a listener application to receive change notifications when the requested type of changes occur
        to the specified resource in Microsoft Graph.

        :param str change_type: Indicates the type of change in the subscribed resource that will raise a change
           notification
        :param str notification_url: The URL of the endpoint that will receive the change notifications.
            This URL must make use of the HTTPS protocol. Any query string parameter included in the notificationUrl
            property will be included in the HTTP POST request when Microsoft Graph sends the change notifications.
        :param office365.runtime.paths.resource_path.ResourcePath or str resource_path:
        :param datetime.datetime expiration:  Specifies the date and time when the webhook subscription expires.
        :param str client_state: Specifies the value of the clientState property sent by the service in each change
            notification
        :param str latest_supported_tls_version:  Specifies the latest version of Transport Layer Security (TLS) that
            the notification endpoint, specified by notificationUrl, supports.
            The possible values are: v1_0, v1_1, v1_2, v1_3.
        ÚZ)Ú
changeTypeÚnotificationUrlÚresourceÚexpirationDateTimeÚclientStateÚlatestSupportedTlsVersion)r   r
   Ú	add_childÚstrÚ	isoformatr   Ú	add_query)
r	   Úchange_typeÚnotification_urlr   Ú
expirationÚclient_stateÚlatest_supported_tls_versionÚreturn_typeÚpayloadÚqryr   r   r   Úadd   s   


úzSubscriptionCollection.addr   )NN)Ú__name__Ú
__module__Ú__qualname__r   r#   Ú__classcell__r   r   r   r   r      s
    ùr   N)Úoffice365.entity_collectionr   Ú'office365.runtime.queries.create_entityr   Ú$office365.subscriptions.subscriptionr   r   r   r   r   r   Ú<module>   s    