U
    ^g%im4                     @   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                       sZ   e Zd ZG dd deZG dd deZeeee	f d fddZ
edd	d
Z  ZS )$ConversationWithParticipantsInstancec                   @   s   e Zd ZdZdZdZdZdS )*ConversationWithParticipantsInstance.StateZinitializingZinactiveZactiveclosedN)__name__
__module____qualname__ZINITIALIZINGZINACTIVEZACTIVEZCLOSED r   r   z/var/www/html/api-medvista/venv/lib/python3.8/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*   r+   r,   )selfr   r   	__class__r   r   r.   5   s(    z-ConversationWithParticipantsInstance.__init__returnc                 C   s   dS )f
        Provide a friendly representation

        :returns: Machine friendly representation
        z><Twilio.Conversations.V1.ConversationWithParticipantsInstance>r   r1   r   r   r   __repr__M   s    z-ConversationWithParticipantsInstance.__repr__)r   r   r   objectr   r   r   r   strr   r.   r8   __classcell__r   r   r2   r   r      s   r   c                       s  e Zd Zed 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edef ee	ef ee	ef ee
ef ee
ef ee	ef ee	ef edef ee	ef ee	ef ee	ef ee	ef eee	 ef ed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edef ee	ef ee	ef ee
ef ee
ef ee	ef ee	ef edef ee	ef ee	ef ee	ef ee	ef eee	 ef edd	d
Ze	dddZ  ZS ) ConversationWithParticipantsList)r   c                    s   t  | d| _dS )z~
        Initialize the ConversationWithParticipantsList

        :param version: Version that contains the resource

        z/ConversationWithParticipantsN)r-   r.   _uri)r1   r   r2   r   r   r.   Y   s    z)ConversationWithParticipantsList.__init__r   r   )x_twilio_webhook_enabledr#   r$   r'   r(   r!   r%   r&   timers_inactivetimers_closedbindings_email_addressbindings_email_nameparticipantr5   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   | S Nr   er   r   r   <lambda>       z9ConversationWithParticipantsList.create.<locals>.<lambda>ZFriendlyNameZ
UniqueNameZDateCreatedZDateUpdatedZMessagingServiceSidZ
Attributesr   zTimers.InactivezTimers.ClosedzBindings.Email.AddresszBindings.Email.NameZParticipant!application/x-www-form-urlencodedzX-Twilio-Webhook-EnabledContent-TyperL   application/jsonAcceptPOSTmethoduridataheaders)	r
   ofr	   r0   map_versioncreater=   r   r1   r>   r#   r$   r'   r(   r!   r%   r&   r?   r@   rA   rB   rC   rS   rT   r   r   r   r   rX   d   s:    (   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   s   | S rD   r   rE   r   r   r   rG      rH   z?ConversationWithParticipantsList.create_async.<locals>.<lambda>rI   rJ   rK   rL   rM   rN   rO   rP   N)	r
   rU   r	   r0   rV   rW   create_asyncr=   r   rY   r   r   r   rZ      s:    (   z-ConversationWithParticipantsList.create_asyncr4   c                 C   s   dS )r6   z:<Twilio.Conversations.V1.ConversationWithParticipantsList>r   r7   r   r   r   r8      s    z)ConversationWithParticipantsList.__repr__)r   r   r   r   r.   r
   unsetr   r9   r:   r   r   r   rX   rZ   r8   r;   r   r   r2   r   r<   W   s   









M









Ir<   N)__doc__r   typingr   r   r   r   r   Ztwilio.baser   r	   r
   Ztwilio.base.instance_resourcer   Ztwilio.base.list_resourcer   Ztwilio.base.versionr   r   r<   r   r   r   r   <module>   s   ?