
    i?1iZ_                         d Z ddlmZmZmZm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	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)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       /home/www/therecruiter.miabetepe.com/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._proxy:   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.fetchI   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_asyncR   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.   r/   r0   r1   r2   r3   r4   r5   r6   r7   r8   r9   )r'   updater   r   r.   r/   r0   r1   r2   r3   r4   r5   r6   r7   r8   r9   s                 r   r=   zNotificationInstance.update[   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   rA   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   itemsrH   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=   rA   rU   __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   rH   _urir   r   r   r   s      r   r   zNotificationContext.__init__   sG     	!  0
 VNUU 
nn
	r    r!   c                     | j                   j                  d| j                        }t        | j                   || j                  d         S )r)   GETmethodurir   r#   )r%   r*   rd   r   r   r   r   s     r   r*   zNotificationContext.fetch   sM     --%%		 & 

 $MM!^^,>?
 	
r    c                    K   | j                   j                  d| j                         d{   }t        | j                   || j                  d         S 7 )w)r,   rg   rh   Nr   r#   )r%   r-   rd   r   r   rk   s     r   r-   zNotificationContext.fetch_async   s[      11		 2 
 

 $MM!^^,>?
 	

s   +AA*Ar   r.   r/   r0   r1   r2   r3   r4   r5   r6   r7   r8   r9   c                     t        j                  |||||||||	|
|||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POSTri   rj   datar   r#   )r   ofr%   r=   rd   r   r   r   r   r.   r/   r0   r1   r2   r3   r4   r5   r6   r7   r8   r9   rr   r   s                   r   r=   zNotificationContext.update  s    F yy)&9';$50O/L0N-H3T4V1P0N1P
$ --&&		 ' 
 $MM7T^^DV5W
 	
r    c                    K   t        j                  |||||||||	|
|||d      }| j                  j                  d| j                  |       d{   }t        | j                  || j                  d         S 7 )w)r@   rn   rp   rq   Nr   r#   )r   rs   r%   rA   rd   r   r   rt   s                   r   rA   z NotificationContext.update_asyncB  s     F yy)&9';$50O/L0N-H3T4V1P0N1P
$ 22		 3 
 
 $MM7T^^DV5W
 	

s   AA=A;*A=c                     dj                  d | j                  j                         D              }dj                  |      S )rC   rD   c              3   F   K   | ]  \  }}d j                  ||        ywrF   rG   rI   s      r   rM   z/NotificationContext.__repr__.<locals>.<genexpr>  rN   rO   z0<Twilio.Conversations.V1.NotificationContext {}>rP   rS   s     r   rU   zNotificationContext.__repr__  s6     ((SDNN<P<P<RSSAHHQQr    )rV   rW   rX   r   rZ   r   r   r*   r-   r   r\   r   r]   r^   r=   rA   rU   r_   r`   s   @r   r$   r$      s   
 
3 
"
+ 
&
#7 
* ,2<<39<<39<<06?E||=C\\=C\\:@,,AGAG>Dll>Dll>Dll=
4<(=
 #4<0=
 $CK0	=

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

 !f-=
 */tV|)<=
 (-T6\':=
 ).c6k(:=
 &+3;%7=
 ,1v+>=
 -2#v+,>=
 */sF{);=
 ).dFl(;=
 */sF{);=
 
=
~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   re   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)rC   z*<Twilio.Conversations.V1.NotificationList>rc   r&   s    r   rU   zNotificationList.__repr__  s     <r    )rV   rW   rX   r   rZ   r   r$   r   r   rU   r_   r`   s   @r   ry   ry     s<    
 
3 

( 

- 
<# <r    ry   N)rY   typingr   r   r   r   twilio.baser   twilio.base.instance_contextr   twilio.base.instance_resourcer	   twilio.base.list_resourcer
   twilio.base.versionr   r   r$   ry   rc   r    r   <module>r      sP    . -  8 : 2 'pS+ pSf}R/ }R@(<| (<r    