o
    e56                     @   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                       sv   e Zd Z fddZejejddfddZejejddfddZejejejejejfdd	Zd
d Z	dd Z
  ZS )ParticipantConversationListc                    s2   t t| | d|i| _djdi | j| _dS )a  
        Initialize the ParticipantConversationList

        :param Version version: Version that contains the resource
        :param chat_service_sid: The unique ID of the Conversation Service this conversation belongs to.

        :returns: twilio.rest.conversations.v1.service.participant_conversation.ParticipantConversationList
        :rtype: twilio.rest.conversations.v1.service.participant_conversation.ParticipantConversationList
        chat_service_sidz5/Services/{chat_service_sid}/ParticipantConversationsN )superr   __init__	_solutionformat_uri)selfversionr   	__class__r	   p/var/www/html/venv/lib/python3.10/site-packages/twilio/rest/conversations/v1/service/participant_conversation.pyr      s   

z$ParticipantConversationList.__init__Nc                 C   s4   | j ||}| j|||d d}| j ||d S )a  
        Streams ParticipantConversationInstance 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 unicode identity: A unique string identifier for the conversation participant as Conversation User.
        :param unicode address: A unique string identifier for the conversation participant who's not a Conversation User.
        :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.conversations.v1.service.participant_conversation.ParticipantConversationInstance]
        	page_size)identityaddressr   limit)_versionread_limitspagestream)r   r   r   r   r   limitsr   r	   r	   r   r   "   s   z"ParticipantConversationList.streamc                 C   s   t | j||||dS )a  
        Lists ParticipantConversationInstance records from the API as a list.
        Unlike stream(), this operation is eager and will load `limit` records into
        memory before returning.

        :param unicode identity: A unique string identifier for the conversation participant as Conversation User.
        :param unicode address: A unique string identifier for the conversation participant who's not a Conversation User.
        :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.conversations.v1.service.participant_conversation.ParticipantConversationInstance]
        )r   r   r   r   )listr   )r   r   r   r   r   r	   r	   r   r   <   s   z ParticipantConversationList.listc                 C   s:   t |||||d}| jjd| j|d}t| j|| jS )a  
        Retrieve a single page of ParticipantConversationInstance records from the API.
        Request is executed immediately

        :param unicode identity: A unique string identifier for the conversation participant as Conversation User.
        :param unicode address: A unique string identifier for the conversation participant who's not a Conversation User.
        :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 ParticipantConversationInstance
        :rtype: twilio.rest.conversations.v1.service.participant_conversation.ParticipantConversationPage
        )IdentityAddress	PageTokenr   PageSizeGET)methoduriparams)r   ofr   r   r   ParticipantConversationPager   )r   r   r   
page_tokenpage_numberr   dataresponser	   r	   r   r   Q   s   z ParticipantConversationList.pagec                 C   s"   | j jjd|}t| j || jS )a  
        Retrieve a specific page of ParticipantConversationInstance records from the API.
        Request is executed immediately

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

        :returns: Page of ParticipantConversationInstance
        :rtype: twilio.rest.conversations.v1.service.participant_conversation.ParticipantConversationPage
        r"   )r   domaintwiliorequestr'   r   )r   
target_urlr+   r	   r	   r   get_pagem   s
   

z$ParticipantConversationList.get_pagec                 C      dS )z
        Provide a friendly representation

        :returns: Machine friendly representation
        :rtype: str
        z5<Twilio.Conversations.V1.ParticipantConversationList>r	   r   r	   r	   r   __repr__~      z$ParticipantConversationList.__repr__)__name__
__module____qualname__r   r   unsetr   r   r   r0   r4   __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 )r'   c                    s   t t| || || _dS )a  
        Initialize the ParticipantConversationPage

        :param Version version: Version that contains the resource
        :param Response response: Response from the API
        :param chat_service_sid: The unique ID of the Conversation Service this conversation belongs to.

        :returns: twilio.rest.conversations.v1.service.participant_conversation.ParticipantConversationPage
        :rtype: twilio.rest.conversations.v1.service.participant_conversation.ParticipantConversationPage
        N)r
   r'   r   r   )r   r   r+   solutionr   r	   r   r      s   
z$ParticipantConversationPage.__init__c                 C   s   t | j|| jd dS )aa  
        Build an instance of ParticipantConversationInstance

        :param dict payload: Payload response from the API

        :returns: twilio.rest.conversations.v1.service.participant_conversation.ParticipantConversationInstance
        :rtype: twilio.rest.conversations.v1.service.participant_conversation.ParticipantConversationInstance
        r   )r   )ParticipantConversationInstancer   r   )r   payloadr	   r	   r   get_instance   s
   	z(ParticipantConversationPage.get_instancec                 C   r1   )r2   z5<Twilio.Conversations.V1.ParticipantConversationPage>r	   r3   r	   r	   r   r4      r5   z$ParticipantConversationPage.__repr__)r6   r7   r8   r   r>   r4   r:   r	   r	   r   r   r'      s    r'   c                       s   e 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d%d& Z  ZS )'r<   c                   @   s   e Zd ZdZdZdZdS )z%ParticipantConversationInstance.StateinactiveactiveclosedN)r6   r7   r8   INACTIVEACTIVECLOSEDr	   r	   r	   r   State   s    rE   c                    s   t t| | i d|dd|dd|dd|dd|dd|dd|dd|dd	|d	d
|d
dt|ddt|dd|dd|dd|dd|d| _d| _d|i| _dS )a  
        Initialize the ParticipantConversationInstance

        :returns: twilio.rest.conversations.v1.service.participant_conversation.ParticipantConversationInstance
        :rtype: twilio.rest.conversations.v1.service.participant_conversation.ParticipantConversationInstance
        account_sidr   participant_sidparticipant_user_sidparticipant_identityparticipant_messaging_bindingconversation_sidconversation_unique_nameconversation_friendly_nameconversation_attributesconversation_date_createdconversation_date_updatedconversation_created_byconversation_stateconversation_timerslinksN)	r
   r<   r   getr   iso8601_datetime_properties_contextr   )r   r   r=   r   r   r	   r   r      sH   








	





z(ParticipantConversationInstance.__init__c                 C   
   | j d S )zs
        :returns: The unique ID of the Account responsible for this conversation.
        :rtype: unicode
        rF   rW   r3   r	   r	   r   rF         
z+ParticipantConversationInstance.account_sidc                 C   rY   )z{
        :returns: The unique ID of the Conversation Service this conversation belongs to.
        :rtype: unicode
        r   rZ   r3   r	   r	   r   r      r[   z0ParticipantConversationInstance.chat_service_sidc                 C   rY   )zU
        :returns: The unique ID of the Participant.
        :rtype: unicode
        rG   rZ   r3   r	   r	   r   rG      r[   z/ParticipantConversationInstance.participant_sidc                 C   rY   )zx
        :returns: The unique ID for the conversation participant as Conversation User.
        :rtype: unicode
        rH   rZ   r3   r	   r	   r   rH      r[   z4ParticipantConversationInstance.participant_user_sidc                 C   rY   )z
        :returns: A unique string identifier for the conversation participant as Conversation User.
        :rtype: unicode
        rI   rZ   r3   r	   r	   r   rI      r[   z4ParticipantConversationInstance.participant_identityc                 C   rY   )z
        :returns: Information about how this participant exchanges messages with the conversation.
        :rtype: dict
        rJ   rZ   r3   r	   r	   r   rJ     r[   z=ParticipantConversationInstance.participant_messaging_bindingc                 C   rY   )zr
        :returns: The unique ID of the Conversation this Participant belongs to.
        :rtype: unicode
        rK   rZ   r3   r	   r	   r   rK     r[   z0ParticipantConversationInstance.conversation_sidc                 C   rY   )z
        :returns: An application-defined string that uniquely identifies the Conversation resource.
        :rtype: unicode
        rL   rZ   r3   r	   r	   r   rL     r[   z8ParticipantConversationInstance.conversation_unique_namec                 C   rY   )za
        :returns: The human-readable name of this conversation.
        :rtype: unicode
        rM   rZ   r3   r	   r	   r   rM     r[   z:ParticipantConversationInstance.conversation_friendly_namec                 C   rY   )z}
        :returns: An optional string metadata field you can use to store any data you wish.
        :rtype: unicode
        rN   rZ   r3   r	   r	   r   rN   #  r[   z7ParticipantConversationInstance.conversation_attributesc                 C   rY   )za
        :returns: The date that this conversation was created.
        :rtype: datetime
        rO   rZ   r3   r	   r	   r   rO   +  r[   z9ParticipantConversationInstance.conversation_date_createdc                 C   rY   )zf
        :returns: The date that this conversation was last updated.
        :rtype: datetime
        rP   rZ   r3   r	   r	   r   rP   3  r[   z9ParticipantConversationInstance.conversation_date_updatedc                 C   rY   )zQ
        :returns: Creator of this conversation.
        :rtype: unicode
        rQ   rZ   r3   r	   r	   r   rQ   ;  r[   z7ParticipantConversationInstance.conversation_created_byc                 C   rY   )z}
        :returns: The current state of this User Conversation
        :rtype: ParticipantConversationInstance.State
        rR   rZ   r3   r	   r	   r   rR   C  r[   z2ParticipantConversationInstance.conversation_statec                 C   rY   )zY
        :returns: Timer date values for this conversation.
        :rtype: dict
        rS   rZ   r3   r	   r	   r   rS   K  r[   z3ParticipantConversationInstance.conversation_timersc                 C   rY   )z
        :returns: Absolute URLs to access the participant and conversation of this Participant Conversation.
        :rtype: unicode
        rT   rZ   r3   r	   r	   r   rT   S  r[   z%ParticipantConversationInstance.linksc                 C   r1   )r2   z9<Twilio.Conversations.V1.ParticipantConversationInstance>r	   r3   r	   r	   r   r4   [  r5   z(ParticipantConversationInstance.__repr__)r6   r7   r8   objectrE   r   propertyrF   r   rG   rH   rI   rJ   rK   rL   rM   rN   rO   rP   rQ   rR   rS   rT   r4   r:   r	   r	   r   r   r<      sH    !















r<   N)__doc__twilio.baser   r   twilio.base.instance_resourcer   twilio.base.list_resourcer   twilio.base.pager   r   r'   r<   r	   r	   r	   r   <module>   s   x+