
    pic                         d Z ddl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 ddlmZ  G d d	e      Z G d
 de
      Z G d de      Zy)a  
    This code was generated by
   ___ _ _ _ _ _    _ ____    ____ ____ _    ____ ____ _  _ ____ ____ ____ ___ __   __
    |  | | | | |    | |  | __ |  | |__| | __ | __ |___ |\ | |___ |__/ |__|  | |  | |__/
    |  |_|_| | |___ | |__|    |__| |  | |    |__] |___ | \| |___ |  \ |  |  | |__| |  \

    Twilio - Conversations
    This is the public Twilio REST API.

    NOTE: This class is auto generated by OpenAPI Generator.
    https://openapi-generator.tech
    Do not edit the class manually.
    )AnyDictOptionalUnion)	serializevalues)InstanceContext)InstanceResource)ListResource)Versionc                   ,    e Zd ZdZdedeeef   def fdZe	dd       Z
ddZ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
eeef   deeef   deeef   deeef   deeef   deeef   deeef   deeef   deeef   deeef   deeef   deeef   deeef   dd f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
eeef   deeef   deeef   deeef   deeef   deeef   deeef   deeef   deeef   deeef   deeef   deeef   deeef   dd fdZdefdZ xZS )NotificationInstancea  
    :ivar account_sid: The unique ID of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for this configuration.
    :ivar chat_service_sid: The SID of the [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource) the Configuration applies to.
    :ivar new_message: The Push Notification configuration for New Messages.
    :ivar added_to_conversation: The Push Notification configuration for being added to a Conversation.
    :ivar removed_from_conversation: The Push Notification configuration for being removed from a Conversation.
    :ivar log_enabled: Weather the notification logging is enabled.
    :ivar url: An absolute API resource URL for this configuration.
    versionpayloadchat_service_sidc                 x   t         |   |       |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _	        d|i| _
        d | _        y )Naccount_sidr   new_messageadded_to_conversationremoved_from_conversationlog_enabledurl)super__init__getr   r   r   r   r   r   r   	_solution_context)selfr   r   r   	__class__s       /opt/services/ai/voice_agent/venv/lib/python3.12/site-packages/twilio/rest/conversations/v1/service/configuration/notification.pyr   zNotificationInstance.__init__"   s     	!*1++m*D/6{{;M/N8?M8RBI++#C
" GNkk'G
& ,3;;}+E")++e"4  0
 8<    returnc                     | j                   )t        | j                  | j                  d         | _         | j                   S )z
        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
        r   r   )r   NotificationContext_versionr   r   s    r    _proxyzNotificationInstance._proxy8   s:     == /!%0B!CDM }}r!   c                 6    | j                   j                         S )e
        Fetch the NotificationInstance


        :returns: The fetched NotificationInstance
        )r(   fetchr'   s    r    r+   zNotificationInstance.fetchG   s     {{  ""r!   c                 R   K   | j                   j                          d{   S 7 w)
        Asynchronous coroutine to fetch the NotificationInstance


        :returns: The fetched NotificationInstance
        N)r(   fetch_asyncr'   s    r    r.   z NotificationInstance.fetch_asyncP   s!      [[,,....s   '%'r   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_templatec                 R    | j                   j                  |||||||||	|
|||      S )  
        Update the NotificationInstance

        :param log_enabled: Weather the notification logging is enabled.
        :param new_message_enabled: Whether to send a notification when a new message is added to a conversation. The default is `false`.
        :param new_message_template: The template to use to create the notification text displayed when a new message is added to a conversation and `new_message.enabled` is `true`.
        :param new_message_sound: The name of the sound to play when a new message is added to a conversation and `new_message.enabled` is `true`.
        :param new_message_badge_count_enabled: Whether the new message badge is enabled. The default is `false`.
        :param added_to_conversation_enabled: Whether to send a notification when a participant is added to a conversation. The default is `false`.
        :param added_to_conversation_template: The template to use to create the notification text displayed when a participant is added to a conversation and `added_to_conversation.enabled` is `true`.
        :param added_to_conversation_sound: The name of the sound to play when a participant is added to a conversation and `added_to_conversation.enabled` is `true`.
        :param removed_from_conversation_enabled: Whether to send a notification to a user when they are removed from a conversation. The default is `false`.
        :param removed_from_conversation_template: The template to use to create the notification text displayed to a user when they are removed from a conversation and `removed_from_conversation.enabled` is `true`.
        :param removed_from_conversation_sound: The name of the sound to play to a user when they are removed from a conversation and `removed_from_conversation.enabled` is `true`.
        :param new_message_with_media_enabled: Whether to send a notification when a new message with media/file attachments is added to a conversation. The default is `false`.
        :param 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 and `new_message.attachments.enabled` is `true`.

        :returns: The updated NotificationInstance
        r   r/   r0   r1   r2   r3   r4   r5   r6   r7   r8   r9   r:   )r(   updater   r   r/   r0   r1   r2   r3   r4   r5   r6   r7   r8   r9   r:   s                 r    r>   zNotificationInstance.updateY   sH    F {{!!# 3!5/,K*G+I(C.O/Q,K+I,K " 
 	
r!   c                 n   K   | j                   j                  |||||||||	|
|||       d{   S 7 w)  
        Asynchronous coroutine to update the NotificationInstance

        :param log_enabled: Weather the notification logging is enabled.
        :param new_message_enabled: Whether to send a notification when a new message is added to a conversation. The default is `false`.
        :param new_message_template: The template to use to create the notification text displayed when a new message is added to a conversation and `new_message.enabled` is `true`.
        :param new_message_sound: The name of the sound to play when a new message is added to a conversation and `new_message.enabled` is `true`.
        :param new_message_badge_count_enabled: Whether the new message badge is enabled. The default is `false`.
        :param added_to_conversation_enabled: Whether to send a notification when a participant is added to a conversation. The default is `false`.
        :param added_to_conversation_template: The template to use to create the notification text displayed when a participant is added to a conversation and `added_to_conversation.enabled` is `true`.
        :param added_to_conversation_sound: The name of the sound to play when a participant is added to a conversation and `added_to_conversation.enabled` is `true`.
        :param removed_from_conversation_enabled: Whether to send a notification to a user when they are removed from a conversation. The default is `false`.
        :param removed_from_conversation_template: The template to use to create the notification text displayed to a user when they are removed from a conversation and `removed_from_conversation.enabled` is `true`.
        :param removed_from_conversation_sound: The name of the sound to play to a user when they are removed from a conversation and `removed_from_conversation.enabled` is `true`.
        :param new_message_with_media_enabled: Whether to send a notification when a new message with media/file attachments is added to a conversation. The default is `false`.
        :param 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 and `new_message.attachments.enabled` is `true`.

        :returns: The updated NotificationInstance
        r=   N)r(   update_asyncr?   s                 r    rB   z!NotificationInstance.update_async   sV     F [[--# 3!5/,K*G+I(C.O/Q,K+I,K . 
 
 	
 
s   ,535c                     dj                  d | j                  j                         D              }dj                  |      S )f
        Provide a friendly representation

        :returns: Machine friendly representation
         c              3   F   K   | ]  \  }}d j                  ||        ywz{}={}Nformat.0kvs      r    	<genexpr>z0NotificationInstance.__repr__.<locals>.<genexpr>        SDAq7>>!Q/S   !z1<Twilio.Conversations.V1.NotificationInstance {}>joinr   itemsrI   r   contexts     r    __repr__zNotificationInstance.__repr__   s6     ((SDNN<P<P<RSSBII'RRr!   )r"   r%   )r"   r   )__name__
__module____qualname____doc__r   r   strr   r   propertyr(   r+   r.   r   unsetr   boolobjectr>   rB   rV   __classcell__r   s   @r    r   r      s   <<)-c3h<KN<,  #/ ,2<<39<<39<<06?E||=C\\=C\\:@,,AGAG>Dll>Dll>Dll1
4<(1
 #4<01
 $CK0	1

 !f-1
 */tV|)<1
 (-T6\':1
 ).c6k(:1
 &+3;%71
 ,1v+>1
 -2#v+,>1
 */sF{);1
 ).dFl(;1
 */sF{);1
 
 1
j ,2<<39<<39<<06?E||=C\\=C\\:@,,AGAG>Dll>Dll>Dll1
4<(1
 #4<01
 $CK0	1

 !f-1
 */tV|)<1
 (-T6\':1
 ).c6k(:1
 &+3;%71
 ,1v+>1
 -2#v+,>1
 */sF{);1
 ).dFl(;1
 */sF{);1
 
 1
fS# Sr!   r   c                       e Zd Zdedef fdZdefdZdef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eeef   deeef   d	eeef   d
eeef   deeef   deeef   deeef   deeef   deeef   deeef   deeef   deeef   deeef   def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eeef   deeef   d	eeef   d
eeef   deeef   deeef   deeef   deeef   deeef   deeef   deeef   deeef   deeef   defdZdefdZ xZS )r%   r   r   c                 x    t         |   |       d|i| _         dj                  di | j                  | _        y)a  
        Initialize the NotificationContext

        :param version: Version that contains the resource
        :param chat_service_sid: The SID of the [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource) the Configuration applies to.
        r   z8/Services/{chat_service_sid}/Configuration/NotificationsN )r   r   r   rI   _urir   r   r   r   s      r    r   zNotificationContext.__init__   sG     	!  0
 VNUU 
nn
	r!   r"   c                     t        j                  i       }d|d<   | j                  j                  d| j                  |      }t        | j                  || j                  d         S )r*   application/jsonAcceptGETmethoduriheadersr   r$   )r   ofr&   r+   re   r   r   r   rn   r   s      r    r+   zNotificationContext.fetch   s^     ))B-.--%%U		7%S#MM!^^,>?
 	
r!   c                    K   t        j                  i       }d|d<   | j                  j                  d| j                  |       d{   }t        | j                  || j                  d         S 7 )w)r-   rh   ri   rj   rk   Nr   r$   )r   ro   r&   r.   re   r   r   rp   s      r    r.   zNotificationContext.fetch_async   ss      ))B-.11dii 2 
 
 $MM!^^,>?
 	
	
s   AA4A2	*A4r   r/   r0   r1   r2   r3   r4   r5   r6   r7   r8   r9   r:   c                    t        j                  t        j                  |      t        j                  |      ||t        j                  |      t        j                  |      ||t        j                  |	      |
|t        j                  |      |d      }t        j                  i       }d|d<   d|d<   | j                  j                  d| j                  ||      }t        | j                  || j                  d   	      S )
r<   
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!application/x-www-form-urlencodedContent-Typerh   ri   POSTrl   rm   datarn   r   r$   )	r   ro   r   boolean_to_stringr&   r>   re   r   r   r   r   r/   r0   r1   r2   r3   r4   r5   r6   r7   r8   r9   r:   ry   rn   r   s                    r    r>   zNotificationContext.update  s   H yy'99+F&/&A&ABU&V';$5090K0K31 09/J/J10 1O-H3<3N3N54 5W1P090K0K21 2Q+
2 ))B-"E.--&&tyytW ' 
 $MM7T^^DV5W
 	
r!   c                 "  K   t        j                  t        j                  |      t        j                  |      ||t        j                  |      t        j                  |      ||t        j                  |	      |
|t        j                  |      |d      }t        j                  i       }d|d<   d|d<   | j                  j                  d| j                  ||       d{   }t        | j                  || j                  d	   
      S 7 )w)rA   rs   ru   rv   rh   ri   rw   rx   Nr   r$   )	r   ro   r   rz   r&   rB   re   r   r   r{   s                    r    rB   z NotificationContext.update_asyncQ  s    H yy'99+F&/&A&ABU&V';$5090K0K31 09/J/J10 1O-H3<3N3N54 5W1P090K0K21 2Q+
2 ))B-"E.22tyytW 3 
 
 $MM7T^^DV5W
 	
	
s   C!D#D$*Dc                     dj                  d | j                  j                         D              }dj                  |      S )rD   rE   c              3   F   K   | ]  \  }}d j                  ||        ywrG   rH   rJ   s      r    rN   z/NotificationContext.__repr__.<locals>.<genexpr>  rO   rP   z0<Twilio.Conversations.V1.NotificationContext {}>rQ   rT   s     r    rV   zNotificationContext.__repr__  s6     ((SDNN<P<P<RSSAHHQQr!   )rW   rX   rY   r   r[   r   r   r+   r.   r   r]   r   r^   r_   r>   rB   rV   r`   ra   s   @r    r%   r%      s    
 
3 
"
+ 
(
#7 
0 ,2<<39<<39<<06?E||=C\\=C\\:@,,AGAG>Dll>Dll>DllI
4<(I
 #4<0I
 $CK0	I

 !f-I
 */tV|)<I
 (-T6\':I
 ).c6k(:I
 &+3;%7I
 ,1v+>I
 -2#v+,>I
 */sF{);I
 ).dFl(;I
 */sF{);I
 
I
Z ,2<<39<<39<<06?E||=C\\=C\\:@,,AGAG>Dll>Dll>DllI
4<(I
 #4<0I
 $CK0	I

 !f-I
 */tV|)<I
 (-T6\':I
 ).c6k(:I
 &+3;%7I
 ,1v+>I
 -2#v+,>I
 */sF{);I
 ).dFl(;I
 */sF{);I
 
I
VR# Rr!   r%   c                   L     e Zd Zdedef fdZdefdZdefdZdefdZ	 xZ
S )NotificationListr   r   c                 6    t         |   |       d|i| _        y)a  
        Initialize the NotificationList

        :param version: Version that contains the resource
        :param chat_service_sid: The SID of the [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource) the Configuration applies to.

        r   N)r   r   r   rf   s      r    r   zNotificationList.__init__  s#     	!  0
r!   r"   c                 J    t        | j                  | j                  d         S z3
        Constructs a NotificationContext

        r   r$   r%   r&   r   r'   s    r    r   zNotificationList.get  $    
 #MMDNN;M,N
 	
r!   c                 J    t        | j                  | j                  d         S r   r   r'   s    r    __call__zNotificationList.__call__  r   r!   c                      y)rD   z*<Twilio.Conversations.V1.NotificationList>rd   r'   s    r    rV   zNotificationList.__repr__  s     <r!   )rW   rX   rY   r   r[   r   r%   r   r   rV   r`   ra   s   @r    r   r     s<    
 
3 

( 

- 
<# <r!   r   N)rZ   typingr   r   r   r   twilio.baser   r   twilio.base.instance_contextr	   twilio.base.instance_resourcer
   twilio.base.list_resourcer   twilio.base.versionr   r   r%   r   rd   r!   r    <module>r      sP    . - ) 8 : 2 'oS+ oSdZR/ ZRz)<| )<r!   