o
    f>hG4                     @   s   d Z ddlmZ ddlmZmZmZmZmZ ddlm	Z	m
Z
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dS )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.
    )datetime)AnyDictListOptionalUnion)deserialize	serializevalues)InstanceResource)ListResource)Versionc                       s^   e Zd ZG dd deZG dd deZ	 dedeee	f f fddZ
d	efd
dZ  ZS )$ConversationWithParticipantsInstancec                   @   s   e Zd ZdZdZdZdS )*ConversationWithParticipantsInstance.StateinactiveactiveclosedN)__name__
__module____qualname__INACTIVEACTIVECLOSED r   r   n/var/www/html/venv/lib/python3.10/site-packages/twilio/rest/conversations/v1/conversation_with_participants.pyState   s    r   c                   @   s   e Zd ZdZdZdS )7ConversationWithParticipantsInstance.WebhookEnabledTypetruefalseN)r   r   r   TRUEFALSEr   r   r   r   WebhookEnabledType   s    r!   versionpayloadc                    s   t  | |d| _|d| _|d| _|d| _|d| _|d| _|d| _	|d| _
t|d	| _t|d
| _|d| _|d| _|d| _|d| _d S )Naccount_sidchat_service_sidmessaging_service_sidsidfriendly_nameunique_name
attributesstatedate_createddate_updatedtimerslinksbindingsurl)super__init__getr$   r%   r&   r'   r(   r)   r*   r+   r   iso8601_datetimer,   r-   r.   r/   r0   r1   )selfr"   r#   	__class__r   r   r3   4   s(   z-ConversationWithParticipantsInstance.__init__returnc                 C      dS )f
        Provide a friendly representation

        :returns: Machine friendly representation
        z><Twilio.Conversations.V1.ConversationWithParticipantsInstance>r   r6   r   r   r   __repr__L   s   z-ConversationWithParticipantsInstance.__repr__)r   r   r   objectr   r!   r   r   strr   r3   r=   __classcell__r   r   r7   r   r      s    r   c                       s  e Zd Zdef 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fded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d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	 ef de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fded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d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	 ef defddZde	fddZ  ZS ) ConversationWithParticipantsListr"   c                    s   t  | d| _dS )z~
        Initialize the ConversationWithParticipantsList

        :param version: Version that contains the resource

        z/ConversationWithParticipantsN)r2   r3   _uri)r6   r"   r7   r   r   r3   X   s   
z)ConversationWithParticipantsList.__init__x_twilio_webhook_enabledr   r(   r)   r,   r-   r&   r*   r+   r   timers_inactivetimers_closedbindings_email_addressbindings_email_nameparticipantr9   c                 C   s~   t ||t|t|||||	|
||t|dd d}t |dd}d|d< d|d< | jjd	| j||d
}t| j|S )a  
        Create the ConversationWithParticipantsInstance

        :param x_twilio_webhook_enabled: The X-Twilio-Webhook-Enabled HTTP request header
        :param friendly_name: The human-readable name of this conversation, limited to 256 characters. Optional.
        :param unique_name: An application-defined string that uniquely identifies the resource. It can be used to address the resource in place of the resource's `sid` in the URL.
        :param date_created: The date that this resource was created.
        :param date_updated: The date that this resource was last updated.
        :param messaging_service_sid: The unique ID of the [Messaging Service](https://www.twilio.com/docs/messaging/api/service-resource) this conversation belongs to.
        :param attributes: An optional string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified.  **Note** that if the attributes are not set \"{}\" will be returned.
        :param state:
        :param timers_inactive: ISO8601 duration when conversation will be switched to `inactive` state. Minimum value for this timer is 1 minute.
        :param timers_closed: ISO8601 duration when conversation will be switched to `closed` state. Minimum value for this timer is 10 minutes.
        :param bindings_email_address: The default email address that will be used when sending outbound emails in this conversation.
        :param bindings_email_name: The default name that will be used when sending outbound emails in this conversation.
        :param participant: The participant to be added to the conversation in JSON format. The JSON object attributes are as parameters in [Participant Resource](https://www.twilio.com/docs/conversations/api/conversation-participant-resource). The maximum number of participants that can be added in a single request is 10.

        :returns: The created ConversationWithParticipantsInstance
        c                 S      | S Nr   er   r   r   <lambda>       z9ConversationWithParticipantsList.create.<locals>.<lambda>FriendlyName
UniqueNameDateCreatedDateUpdatedMessagingServiceSid
Attributesr   zTimers.InactivezTimers.ClosedzBindings.Email.AddresszBindings.Email.NameParticipant!application/x-www-form-urlencodedzX-Twilio-Webhook-EnabledContent-TyperY   application/jsonAcceptPOSTmethoduridataheaders)	r
   ofr	   r5   map_versioncreaterB   r   r6   rC   r(   r)   r,   r-   r&   r*   r+   rD   rE   rF   rG   rH   r`   ra   r#   r   r   r   re   c   s4   (
z'ConversationWithParticipantsList.createc                    s   t ||t|t|||||	|
||t|dd d}t |dd}d|d< d|d< | jjd	| j||d
I dH }t| j|S )a  
        Asynchronously create the ConversationWithParticipantsInstance

        :param x_twilio_webhook_enabled: The X-Twilio-Webhook-Enabled HTTP request header
        :param friendly_name: The human-readable name of this conversation, limited to 256 characters. Optional.
        :param unique_name: An application-defined string that uniquely identifies the resource. It can be used to address the resource in place of the resource's `sid` in the URL.
        :param date_created: The date that this resource was created.
        :param date_updated: The date that this resource was last updated.
        :param messaging_service_sid: The unique ID of the [Messaging Service](https://www.twilio.com/docs/messaging/api/service-resource) this conversation belongs to.
        :param attributes: An optional string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified.  **Note** that if the attributes are not set \"{}\" will be returned.
        :param state:
        :param timers_inactive: ISO8601 duration when conversation will be switched to `inactive` state. Minimum value for this timer is 1 minute.
        :param timers_closed: ISO8601 duration when conversation will be switched to `closed` state. Minimum value for this timer is 10 minutes.
        :param bindings_email_address: The default email address that will be used when sending outbound emails in this conversation.
        :param bindings_email_name: The default name that will be used when sending outbound emails in this conversation.
        :param participant: The participant to be added to the conversation in JSON format. The JSON object attributes are as parameters in [Participant Resource](https://www.twilio.com/docs/conversations/api/conversation-participant-resource). The maximum number of participants that can be added in a single request is 10.

        :returns: The created ConversationWithParticipantsInstance
        c                 S   rI   rJ   r   rK   r   r   r   rM      rN   z?ConversationWithParticipantsList.create_async.<locals>.<lambda>rO   rW   rX   rY   rZ   r[   r\   r]   N)	r
   rb   r	   r5   rc   rd   create_asyncrB   r   rf   r   r   r   rg      s6   (
z-ConversationWithParticipantsList.create_asyncc                 C   r:   )r;   z:<Twilio.Conversations.V1.ConversationWithParticipantsList>r   r<   r   r   r   r=      s   z)ConversationWithParticipantsList.__repr__)r   r   r   r   r3   r
   unsetr   r>   r?   r   r   r   re   rg   r=   r@   r   r   r7   r   rA   V   s    




	






M




	






IrA   N)__doc__r   typingr   r   r   r   r   twilio.baser   r	   r
   twilio.base.instance_resourcer   twilio.base.list_resourcer   twilio.base.versionr   r   rA   r   r   r   r   <module>   s    >