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 ddl	m
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
      /       /
    )deserialize)	serialize)values)InstanceResource)ListResource)Pagec                       sz   e Zd 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ejejejejejfddZdd Z  Z	S )NotificationListk PLEASE NOTE that this class contains beta products that are subject to
    change. Use them with caution. c                    s2   t t| | d|i| _djdi | j| _dS )ah  
        Initialize the NotificationList

        :param Version version: Version that contains the resource
        :param service_sid: The SID of the Service that the resource is associated with

        :returns: twilio.rest.notify.v1.service.notification.NotificationList
        :rtype: twilio.rest.notify.v1.service.notification.NotificationList
        service_sidz%/Services/{service_sid}/NotificationsN )superr   __init__	_solutionformat_uri)selfversionr
   	__class__r   ]/var/www/html/venv/lib/python3.10/site-packages/twilio/rest/notify/v1/service/notification.pyr      s   

zNotificationList.__init__c              	   C   s   t i dt|dd dt|dd d|d|d|d	|d
|d|dt|dt|dt|	dt|
dt|dt|dt|dd dt|dt|dd d|i}| jjd| j|d}t| j|| j	d dS )a  
        Create the NotificationInstance

        :param unicode body: The notification body text
        :param NotificationInstance.Priority priority: The priority of the notification
        :param unicode ttl: How long, in seconds, the notification is valid
        :param unicode title: The notification title
        :param unicode sound: The name of the sound to be played for the notification
        :param unicode action: The actions to display for the notification
        :param dict data: The custom key-value pairs of the notification's payload
        :param dict apn: The APNS-specific payload that overrides corresponding attributes in a generic payload for APNS Bindings
        :param dict gcm: The GCM-specific payload that overrides corresponding attributes in generic payload for GCM Bindings
        :param dict sms: The SMS-specific payload that overrides corresponding attributes in generic payload for SMS Bindings
        :param dict facebook_messenger: Deprecated
        :param dict fcm: The FCM-specific payload that overrides corresponding attributes in generic payload for FCM Bindings
        :param list[unicode] segment: A Segment to notify
        :param dict alexa: Deprecated
        :param list[unicode] to_binding: The destination address specified as a JSON string
        :param unicode delivery_callback_url: URL to send webhooks
        :param list[unicode] identity: The `identity` value that identifies the new resource's User
        :param list[unicode] tag: A tag that selects the Bindings to notify

        :returns: The created NotificationInstance
        :rtype: twilio.rest.notify.v1.service.notification.NotificationInstance
        Identityc                 S      | S Nr   er   r   r   <lambda>F       z)NotificationList.create.<locals>.<lambda>Tagc                 S   r   r   r   r   r   r   r   r   G   r   BodyPriorityTtlTitleSoundActionDataApnGcmSmsFacebookMessengerFcmSegmentc                 S   r   r   r   r   r   r   r   r   T   r   Alexa	ToBindingc                 S   r   r   r   r   r   r   r   r   V   r   DeliveryCallbackUrlPOST)methoduridatar
   r
   )
r   ofr   mapobject_versioncreater   NotificationInstancer   )r   bodypriorityttltitlesoundactionr1   apngcmsmsfacebook_messengerfcmsegmentalexa
to_bindingdelivery_callback_urlidentitytagpayloadr   r   r   r7   %   sN    
	






zNotificationList.createc                 C      dS )z
        Provide a friendly representation

        :returns: Machine friendly representation
        :rtype: str
        z#<Twilio.Notify.V1.NotificationList>r   r   r   r   r   __repr__^      zNotificationList.__repr__)
__name__
__module____qualname____doc__r   r   unsetr7   rN   __classcell__r   r   r   r   r      s    
9r   c                       s0   e Zd ZdZ fddZdd Zdd Z  ZS )NotificationPager	   c                    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 service_sid: The SID of the Service that the resource is associated with

        :returns: twilio.rest.notify.v1.service.notification.NotificationPage
        :rtype: twilio.rest.notify.v1.service.notification.NotificationPage
        N)r   rV   r   r   )r   r   responsesolutionr   r   r   r   l   s   
zNotificationPage.__init__c                 C   s   t | j|| jd dS )a  
        Build an instance of NotificationInstance

        :param dict payload: Payload response from the API

        :returns: twilio.rest.notify.v1.service.notification.NotificationInstance
        :rtype: twilio.rest.notify.v1.service.notification.NotificationInstance
        r
   r2   )r8   r6   r   )r   rJ   r   r   r   get_instance|   s   	zNotificationPage.get_instancec                 C   rK   )rL   z#<Twilio.Notify.V1.NotificationPage>r   rM   r   r   r   rN      rO   zNotificationPage.__repr__)rP   rQ   rR   rS   r   rY   rN   rU   r   r   r   r   rV   h   s
    rV   c                       s(  e Zd ZdZG dd de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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d(d) Zed*d+ Zed,d- Zd.d/ Z  ZS )0r8   r	   c                   @   s   e Zd ZdZdZdS )zNotificationInstance.PriorityhighlowN)rP   rQ   rR   HIGHLOWr   r   r   r   r      s    r   c                    s   t t| | i d|dd|dd|ddt|dd|dd|dd|dd|dd	t|d	d
|d
d|dd|dd|dd|dd|dd|dd|d|d|d|dd| _d| _d|i| _	dS )z
        Initialize the NotificationInstance

        :returns: twilio.rest.notify.v1.service.notification.NotificationInstance
        :rtype: twilio.rest.notify.v1.service.notification.NotificationInstance
        sidaccount_sidr
   date_created
identitiestagssegmentsr:   r;   r<   r9   r=   r>   r1   r?   r@   rC   rA   rB   rE   )rA   rB   rE   N)
r   r8   r   getr   iso8601_datetimeinteger_properties_contextr   )r   r   rJ   r
   r   r   r   r      sT   






	









zNotificationInstance.__init__c                 C   
   | j d S )zb
        :returns: The unique string that identifies the resource
        :rtype: unicode
        r^   rg   rM   r   r   r   r^         
zNotificationInstance.sidc                 C   ri   )zd
        :returns: The SID of the Account that created the resource
        :rtype: unicode
        r_   rj   rM   r   r   r   r_      rk   z NotificationInstance.account_sidc                 C   ri   )zo
        :returns: The SID of the Service that the resource is associated with
        :rtype: unicode
        r
   rj   rM   r   r   r   r
      rk   z NotificationInstance.service_sidc                 C   ri   )zt
        :returns: The RFC 2822 date and time in GMT when the resource was created
        :rtype: datetime
        r`   rj   rM   r   r   r   r`      rk   z!NotificationInstance.date_createdc                 C   ri   )zl
        :returns: The list of identity values of the Users to notify
        :rtype: list[unicode]
        ra   rj   rM   r   r   r   ra      rk   zNotificationInstance.identitiesc                 C   ri   )ze
        :returns: The tags that select the Bindings to notify
        :rtype: list[unicode]
        rb   rj   rM   r   r   r   rb      rk   zNotificationInstance.tagsc                 C   ri   )zX
        :returns: The list of Segments to notify
        :rtype: list[unicode]
        rc   rj   rM   r   r   r   rc      rk   zNotificationInstance.segmentsc                 C   ri   )zj
        :returns: The priority of the notification
        :rtype: NotificationInstance.Priority
        r:   rj   rM   r   r   r   r:      rk   zNotificationInstance.priorityc                 C   ri   )zc
        :returns: How long, in seconds, the notification is valid
        :rtype: unicode
        r;   rj   rM   r   r   r   r;      rk   zNotificationInstance.ttlc                 C   ri   )zJ
        :returns: The notification title
        :rtype: unicode
        r<   rj   rM   r   r   r   r<     rk   zNotificationInstance.titlec                 C   ri   )zN
        :returns: The notification body text
        :rtype: unicode
        r9   rj   rM   r   r   r   r9     rk   zNotificationInstance.bodyc                 C   ri   )zk
        :returns: The name of the sound to be played for the notification
        :rtype: unicode
        r=   rj   rM   r   r   r   r=     rk   zNotificationInstance.soundc                 C   ri   )z_
        :returns: The actions to display for the notification
        :rtype: unicode
        r>   rj   rM   r   r   r   r>     rk   zNotificationInstance.actionc                 C   ri   )zi
        :returns: The custom key-value pairs of the notification's payload
        :rtype: dict
        r1   rj   rM   r   r   r   r1   &  rk   zNotificationInstance.datac                 C   ri   )z
        :returns: The APNS-specific payload that overrides corresponding attributes in a generic payload for APNS Bindings
        :rtype: dict
        r?   rj   rM   r   r   r   r?   .  rk   zNotificationInstance.apnc                 C   ri   )z
        :returns: The GCM-specific payload that overrides corresponding attributes in generic payload for GCM Bindings
        :rtype: dict
        r@   rj   rM   r   r   r   r@   6  rk   zNotificationInstance.gcmc                 C   ri   )z
        :returns: The FCM-specific payload that overrides corresponding attributes in generic payload for FCM Bindings
        :rtype: dict
        rC   rj   rM   r   r   r   rC   >  rk   zNotificationInstance.fcmc                 C   ri   )z
        :returns: The SMS-specific payload that overrides corresponding attributes in generic payload for SMS Bindings
        :rtype: dict
        rA   rj   rM   r   r   r   rA   F  rk   zNotificationInstance.smsc                 C   ri   );
        :returns: Deprecated
        :rtype: dict
        rB   rj   rM   r   r   r   rB   N  rk   z'NotificationInstance.facebook_messengerc                 C   ri   )rl   rE   rj   rM   r   r   r   rE   V  rk   zNotificationInstance.alexac                 C   rK   )rL   z'<Twilio.Notify.V1.NotificationInstance>r   rM   r   r   r   rN   ^  rO   zNotificationInstance.__repr__)rP   rQ   rR   rS   r5   r   r   propertyr^   r_   r
   r`   ra   rb   rc   r:   r;   r<   r9   r=   r>   r1   r?   r@   rC   rA   rB   rE   rN   rU   r   r   r   r   r8      sZ    %



















r8   N)rS   twilio.baser   r   r   twilio.base.instance_resourcer   twilio.base.list_resourcer   twilio.base.pager   r   rV   r8   r   r   r   r   <module>   s   W)