o
    e?                     @   s   d Z ddlmZ ddlmZ ddlmZ ddlmZ ddl	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 )za
This code was generated by
\ / _    _  _|   _  _
 | (_)\/(_)(_|\/| |(/_  v1.0.0
      /       /
    )values)InstanceContext)InstanceResource)ListResource)Pagec                       s4   e Zd Z fddZdd Zdd Zdd Z  ZS )	NotificationListc                    s   t t| | d|i| _dS )a  
        Initialize the NotificationList

        :param Version version: Version that contains the resource
        :param chat_service_sid: The unique string that identifies the resource

        :returns: twilio.rest.conversations.v1.service.configuration.notification.NotificationList
        :rtype: twilio.rest.conversations.v1.service.configuration.notification.NotificationList
        chat_service_sidN)superr   __init__	_solutionselfversionr   	__class__ r/var/www/html/venv/lib/python3.10/site-packages/twilio/rest/conversations/v1/service/configuration/notification.pyr
      s   
zNotificationList.__init__c                 C      t | j| jd dS z
        Constructs a NotificationContext

        :returns: twilio.rest.conversations.v1.service.configuration.notification.NotificationContext
        :rtype: twilio.rest.conversations.v1.service.configuration.notification.NotificationContext
        r   r   NotificationContext_versionr   r   r   r   r   get!      zNotificationList.getc                 C   r   r   r   r   r   r   r   __call__*   r   zNotificationList.__call__c                 C      dS )z
        Provide a friendly representation

        :returns: Machine friendly representation
        :rtype: str
        z*<Twilio.Conversations.V1.NotificationList>r   r   r   r   r   __repr__3      zNotificationList.__repr__)__name__
__module____qualname__r
   r   r   r   __classcell__r   r   r   r   r      s
    		r   c                       s,   e Zd Z fddZdd Zdd Z  ZS )NotificationPagec                    s   t t| || || _dS )a  
        Initialize the NotificationPage

        :param Version version: Version that contains the resource
        :param Response response: Response from the API
        :param chat_service_sid: The unique string that identifies the resource

        :returns: twilio.rest.conversations.v1.service.configuration.notification.NotificationPage
        :rtype: twilio.rest.conversations.v1.service.configuration.notification.NotificationPage
        N)r	   r%   r
   r   )r   r   responsesolutionr   r   r   r
   ?   s   
zNotificationPage.__init__c                 C   s   t | j|| jd dS )aD  
        Build an instance of NotificationInstance

        :param dict payload: Payload response from the API

        :returns: twilio.rest.conversations.v1.service.configuration.notification.NotificationInstance
        :rtype: twilio.rest.conversations.v1.service.configuration.notification.NotificationInstance
        r   r   )NotificationInstancer   r   r   payloadr   r   r   get_instanceO   s
   	zNotificationPage.get_instancec                 C   r   )r   z*<Twilio.Conversations.V1.NotificationPage>r   r   r   r   r   r   ^   r    zNotificationPage.__repr__)r!   r"   r#   r
   r+   r   r$   r   r   r   r   r%   =   s    r%   c                       sj   e Zd Z fddZejejejejejejejejejejejejejfddZdd Zdd Z  Z	S )	r   c                    s2   t t| | d|i| _djdi | j| _dS )a  
        Initialize the NotificationContext

        :param Version version: Version that contains the resource
        :param chat_service_sid: The SID of the Conversation Service that the Configuration applies to.

        :returns: twilio.rest.conversations.v1.service.configuration.notification.NotificationContext
        :rtype: twilio.rest.conversations.v1.service.configuration.notification.NotificationContext
        r   z8/Services/{chat_service_sid}/Configuration/NotificationsNr   )r	   r   r
   r   format_urir   r   r   r   r
   j   s   

zNotificationContext.__init__c                 C   sP   t |||||||||	|
|||d}| jjd| j|d}t| j|| jd dS )  
        Update the NotificationInstance

        :param bool log_enabled: Weather the notification logging is enabled.
        :param bool new_message_enabled: Whether to send a notification when a new message is added to a conversation.
        :param unicode new_message_template: The template to use to create the notification text displayed when a new message is added to a conversation.
        :param unicode new_message_sound: The name of the sound to play when a new message is added to a conversation.
        :param bool new_message_badge_count_enabled: Whether the new message badge is enabled.
        :param bool added_to_conversation_enabled: Whether to send a notification when a participant is added to a conversation.
        :param unicode added_to_conversation_template: The template to use to create the notification text displayed when a participant is added to a conversation.
        :param unicode added_to_conversation_sound: The name of the sound to play when a participant is added to a conversation.
        :param bool removed_from_conversation_enabled: Whether to send a notification to a user when they are removed from a conversation.
        :param unicode removed_from_conversation_template: The template to use to create the notification text displayed to a user when they are removed.
        :param unicode removed_from_conversation_sound: The name of the sound to play to a user when they are removed from a conversation.
        :param bool new_message_with_media_enabled: Whether to send a notification when a new message with media/file attachments is added to a conversation.
        :param unicode new_message_with_media_template: The template to use to create the notification text displayed when a new message with media/file attachments is added to a conversation.

        :returns: The updated NotificationInstance
        :rtype: twilio.rest.conversations.v1.service.configuration.notification.NotificationInstance
        )
LogEnabledzNewMessage.EnabledzNewMessage.TemplatezNewMessage.SoundzNewMessage.BadgeCountEnabledzAddedToConversation.EnabledzAddedToConversation.TemplatezAddedToConversation.SoundzRemovedFromConversation.Enabledz RemovedFromConversation.TemplatezRemovedFromConversation.SoundzNewMessage.WithMedia.EnabledzNewMessage.WithMedia.TemplatePOST)methoduridatar   r   )r   ofr   updater-   r(   r   )r   log_enablednew_message_enablednew_message_templatenew_message_soundnew_message_badge_count_enabledadded_to_conversation_enabledadded_to_conversation_templateadded_to_conversation_sound!removed_from_conversation_enabled"removed_from_conversation_templateremoved_from_conversation_soundnew_message_with_media_enablednew_message_with_media_templater3   r*   r   r   r   r5   z   s*   zNotificationContext.updatec                 C   s(   | j jd| jd}t| j || jd dS )
        Fetch the NotificationInstance

        :returns: The fetched NotificationInstance
        :rtype: twilio.rest.conversations.v1.service.configuration.notification.NotificationInstance
        GET)r1   r2   r   r   )r   fetchr-   r(   r   r)   r   r   r   rE      s   zNotificationContext.fetchc                 C   $   d dd | j D }d|S )r    c                 s        | ]\}}d  ||V  qdS z{}={}Nr,   .0kvr   r   r   	<genexpr>       z/NotificationContext.__repr__.<locals>.<genexpr>z0<Twilio.Conversations.V1.NotificationContext {}>joinr   itemsr,   r   contextr   r   r   r         
zNotificationContext.__repr__)
r!   r"   r#   r
   r   unsetr5   rE   r   r$   r   r   r   r   r   h   s     
7r   c                       s   e Zd Z fddZedd Zedd Zedd Zed	d
 Zedd Z	edd Z
edd Zedd ZejejejejejejejejejejejejejfddZdd Zdd Z  ZS )r(   c              	      sd   t t| | |d|d|d|d|d|d|dd| _d	| _d|i| _d	S )
a  
        Initialize the NotificationInstance

        :returns: twilio.rest.conversations.v1.service.configuration.notification.NotificationInstance
        :rtype: twilio.rest.conversations.v1.service.configuration.notification.NotificationInstance
        account_sidr   new_messageadded_to_conversationremoved_from_conversationr6   url)rX   r   rY   rZ   r[   r6   r\   N)r	   r(   r
   r   _properties_contextr   )r   r   r*   r   r   r   r   r
      s   zNotificationInstance.__init__c                 C   s&   | j du rt| j| jd d| _ | j S )aX  
        Generate an instance context for the instance, the context is capable of
        performing various actions.  All instance actions are proxied to the context

        :returns: NotificationContext for this NotificationInstance
        :rtype: twilio.rest.conversations.v1.service.configuration.notification.NotificationContext
        Nr   r   )r^   r   r   r   r   r   r   r   _proxy   s   
	zNotificationInstance._proxyc                 C   
   | j d S )zt
        :returns: The unique ID of the Account responsible for this configuration.
        :rtype: unicode
        rX   r]   r   r   r   r   rX         
z NotificationInstance.account_sidc                 C   r`   )zz
        :returns: The SID of the Conversation Service that the Configuration applies to.
        :rtype: unicode
        r   ra   r   r   r   r   r      rb   z%NotificationInstance.chat_service_sidc                 C   r`   )zf
        :returns: The Push Notification configuration for New Messages.
        :rtype: dict
        rY   ra   r   r   r   r   rY     rb   z NotificationInstance.new_messagec                 C   r`   )zw
        :returns: The Push Notification configuration for being added to a Conversation.
        :rtype: dict
        rZ   ra   r   r   r   r   rZ     rb   z*NotificationInstance.added_to_conversationc                 C   r`   )z{
        :returns: The Push Notification configuration for being removed from a Conversation.
        :rtype: dict
        r[   ra   r   r   r   r   r[     rb   z.NotificationInstance.removed_from_conversationc                 C   r`   )z]
        :returns: Weather the notification logging is enabled.
        :rtype: bool
        r6   ra   r   r   r   r   r6     rb   z NotificationInstance.log_enabledc                 C   r`   )z[
        :returns: An absolute URL for this configuration.
        :rtype: unicode
        r\   ra   r   r   r   r   r\   %  rb   zNotificationInstance.urlc                 C   s&   | j j|||||||||	|
|||dS )r.   )r6   r7   r8   r9   r:   r;   r<   r=   r>   r?   r@   rA   rB   )r_   r5   )r   r6   r7   r8   r9   r:   r;   r<   r=   r>   r?   r@   rA   rB   r   r   r   r5   -  s   zNotificationInstance.updatec                 C   s
   | j  S )rC   )r_   rE   r   r   r   r   rE   \  s   
zNotificationInstance.fetchc                 C   rF   )r   rG   c                 s   rH   rI   rJ   rK   r   r   r   rO   l  rP   z0NotificationInstance.__repr__.<locals>.<genexpr>z1<Twilio.Conversations.V1.NotificationInstance {}>rQ   rT   r   r   r   r   e  rV   zNotificationInstance.__repr__)r!   r"   r#   r
   propertyr_   rX   r   rY   rZ   r[   r6   r\   r   rW   r5   rE   r   r$   r   r   r   r   r(      s@    








/	r(   N)__doc__twilio.baser   twilio.base.instance_contextr   twilio.base.instance_resourcer   twilio.base.list_resourcer   twilio.base.pager   r   r%   r   r(   r   r   r   r   <module>   s   -+c