o
    �¨Êhæ   ã                   @   st   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dS )za
This code was generated by
\ / _    _  _|   _  _
 | (_)\/(_)(_|\/| |(/_  v1.0.0
      /       /
é    )Údeserialize)Úvalues)ÚInstanceResource)ÚListResource)ÚPagec                       sZ   e Zd ZdZ‡ fdd„Zddd„Zddd„Zejejejfd	d
„Z	dd„ Z
dd„ Z‡  ZS )ÚSegmentListúk 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 )a#  
        Initialize the SegmentList

        :param Version version: Version that contains the resource
        :param service_sid: The service_sid

        :returns: twilio.rest.notify.v1.service.segment.SegmentList
        :rtype: twilio.rest.notify.v1.service.segment.SegmentList
        Úservice_sidz /Services/{service_sid}/SegmentsN© )Úsuperr   Ú__init__Ú	_solutionÚformatÚ_uri)ÚselfÚversionr	   ©Ú	__class__r
   úW/var/www/html/env/lib/python3.10/site-packages/twilio/rest/notify/v1/service/segment.pyr      s   

zSegmentList.__init__Nc                 C   s6   | j  ||¡}| j|d d�}| j  ||d |d ¡S )aÁ  
        Streams SegmentInstance records from the API as a generator stream.
        This operation lazily loads records as efficiently as possible until the limit
        is reached.
        The results are returned as a generator, so this operation is memory efficient.

        :param int limit: Upper limit for the number of records to return. stream()
                          guarantees to never return more than limit.  Default is no limit
        :param int page_size: Number of records to fetch per request, when not set will use
                              the default value of 50 records.  If no page_size is defined
                              but a limit is defined, stream() will attempt to read the
                              limit with the most efficient page size, i.e. min(limit, 1000)

        :returns: Generator that will yield up to limit results
        :rtype: list[twilio.rest.notify.v1.service.segment.SegmentInstance]
        Ú	page_size)r   ÚlimitÚ
page_limit)Ú_versionÚread_limitsÚpageÚstream)r   r   r   Úlimitsr   r
   r
   r   r   $   s   zSegmentList.streamc                 C   s   t | j||d�ƒS )aa  
        Lists SegmentInstance records from the API as a list.
        Unlike stream(), this operation is eager and will load `limit` records into
        memory before returning.

        :param int limit: Upper limit for the number of records to return. list() guarantees
                          never to return more than limit.  Default is no limit
        :param int page_size: Number of records to fetch per request, when not set will use
                              the default value of 50 records.  If no page_size is defined
                              but a limit is defined, list() will attempt to read the limit
                              with the most efficient page size, i.e. min(limit, 1000)

        :returns: Generator that will yield up to limit results
        :rtype: list[twilio.rest.notify.v1.service.segment.SegmentInstance]
        )r   r   )Úlistr   )r   r   r   r
   r
   r   r   ;   s   zSegmentList.listc                 C   s6   t  |||dœ¡}| jjd| j|d�}t| j|| jƒS )aÁ  
        Retrieve a single page of SegmentInstance records from the API.
        Request is executed immediately

        :param str page_token: PageToken provided by the API
        :param int page_number: Page Number, this value is simply for client state
        :param int page_size: Number of records to return, defaults to 50

        :returns: Page of SegmentInstance
        :rtype: twilio.rest.notify.v1.service.segment.SegmentPage
        )Ú	PageTokenr   ÚPageSizeÚGET)Úparams)r   Úofr   r   r   ÚSegmentPager   )r   Ú
page_tokenÚpage_numberr   r!   Úresponser
   r
   r   r   M   s   ýzSegmentList.pagec                 C   s"   | j jj d|¡}t| j || jƒS )a9  
        Retrieve a specific page of SegmentInstance records from the API.
        Request is executed immediately

        :param str target_url: API-generated URL for the requested results page

        :returns: Page of SegmentInstance
        :rtype: twilio.rest.notify.v1.service.segment.SegmentPage
        r    )r   ÚdomainÚtwilioÚrequestr#   r   )r   Ú
target_urlr&   r
   r
   r   Úget_paged   s
   

þzSegmentList.get_pagec                 C   ó   dS )úz
        Provide a friendly representation

        :returns: Machine friendly representation
        :rtype: str
        z<Twilio.Notify.V1.SegmentList>r
   ©r   r
   r
   r   Ú__repr__u   ó   zSegmentList.__repr__)NN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r   r   Úunsetr   r+   r/   Ú__classcell__r
   r
   r   r   r      s    


ÿr   c                       s0   e Zd ZdZ‡ fdd„Zdd„ Zdd„ Z‡  ZS )r#   r   c                    s   t t| ƒ ||¡ || _dS )a[  
        Initialize the SegmentPage

        :param Version version: Version that contains the resource
        :param Response response: Response from the API
        :param service_sid: The service_sid

        :returns: twilio.rest.notify.v1.service.segment.SegmentPage
        :rtype: twilio.rest.notify.v1.service.segment.SegmentPage
        N)r   r#   r   r   )r   r   r&   Úsolutionr   r
   r   r   ƒ   s   
zSegmentPage.__init__c                 C   s   t | j|| jd d�S )a  
        Build an instance of SegmentInstance

        :param dict payload: Payload response from the API

        :returns: twilio.rest.notify.v1.service.segment.SegmentInstance
        :rtype: twilio.rest.notify.v1.service.segment.SegmentInstance
        r	   )r	   )ÚSegmentInstancer   r   )r   Úpayloadr
   r
   r   Úget_instance“   s   	zSegmentPage.get_instancec                 C   r,   )r-   z<Twilio.Notify.V1.SegmentPage>r
   r.   r
   r
   r   r/   ž   r0   zSegmentPage.__repr__)r1   r2   r3   r4   r   r:   r/   r6   r
   r
   r   r   r#      s
    r#   c                       sp   e Zd 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dd„ Z‡  ZS )r8   r   c              	      s\   t t| ƒ |¡ |d |d |d |d t |d ¡t |d ¡dœ| _d| _d|i| _dS )	z¿
        Initialize the SegmentInstance

        :returns: twilio.rest.notify.v1.service.segment.SegmentInstance
        :rtype: twilio.rest.notify.v1.service.segment.SegmentInstance
        ÚsidÚaccount_sidr	   Úunique_nameÚdate_createdÚdate_updated)r;   r<   r	   r=   r>   r?   N)r   r8   r   r   Úiso8601_datetimeÚ_propertiesÚ_contextr   )r   r   r9   r	   r   r
   r   r   ¬   s   ú
zSegmentInstance.__init__c                 C   ó
   | j d S )z;
        :returns: The sid
        :rtype: unicode
        r;   ©rA   r.   r
   r
   r   r;   Ã   ó   
zSegmentInstance.sidc                 C   rC   )zC
        :returns: The account_sid
        :rtype: unicode
        r<   rD   r.   r
   r
   r   r<   Ë   rE   zSegmentInstance.account_sidc                 C   rC   )zC
        :returns: The service_sid
        :rtype: unicode
        r	   rD   r.   r
   r
   r   r	   Ó   rE   zSegmentInstance.service_sidc                 C   rC   )zC
        :returns: The unique_name
        :rtype: unicode
        r=   rD   r.   r
   r
   r   r=   Û   rE   zSegmentInstance.unique_namec                 C   rC   )zE
        :returns: The date_created
        :rtype: datetime
        r>   rD   r.   r
   r
   r   r>   ã   rE   zSegmentInstance.date_createdc                 C   rC   )zE
        :returns: The date_updated
        :rtype: datetime
        r?   rD   r.   r
   r
   r   r?   ë   rE   zSegmentInstance.date_updatedc                 C   r,   )r-   z"<Twilio.Notify.V1.SegmentInstance>r
   r.   r
   r
   r   r/   ó   r0   zSegmentInstance.__repr__)r1   r2   r3   r4   r   Úpropertyr;   r<   r	   r=   r>   r?   r/   r6   r
   r
   r   r   r8   ¨   s     





r8   N)r4   Útwilio.baser   r   Útwilio.base.instance_resourcer   Útwilio.base.list_resourcer   Útwilio.base.pager   r   r#   r8   r
   r
   r
   r   Ú<module>   s   o)