U
    ^g%iA                     @   st   d Z ddlmZmZmZmZ ddl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 - Accounts
    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.
    )AnyDictListOptional)	serializevalues)InstanceResource)ListResource)Versionc                       s>   e Zd ZdZeeeef d fddZedddZ	  Z
S )BulkContactsInstancea  
    :ivar items: A list of objects where each object represents the result of processing a `correlation_id`. Each object contains the following fields: `correlation_id`, a unique 32-character UUID that maps the response to the original request; `error_code`, an integer where 0 indicates success and any non-zero value represents an error; and `error_messages`, an array of strings describing specific validation errors encountered. If the request is successful, the error_messages array will be empty.
    )versionpayloadc                    s   t  | |d| _d S )Nitems)super__init__getr   )selfr   r   	__class__ d/var/www/html/api-medvista/venv/lib/python3.8/site-packages/twilio/rest/accounts/v1/bulk_contacts.pyr      s    zBulkContactsInstance.__init__returnc                 C   s   dS )f
        Provide a friendly representation

        :returns: Machine friendly representation
        z)<Twilio.Accounts.V1.BulkContactsInstance>r   r   r   r   r   __repr__!   s    zBulkContactsInstance.__repr__)__name__
__module____qualname____doc__r
   r   strr   r   r   __classcell__r   r   r   r   r      s   r   c                       sX   e Zd Zed fddZee edddZee edddZ	e
d	d
dZ  ZS )BulkContactsList)r   c                    s   t  | d| _dS )zn
        Initialize the BulkContactsList

        :param version: Version that contains the resource

        z/Contacts/BulkN)r   r   _uri)r   r   r   r   r   r   -   s    zBulkContactsList.__init__)r   r   c                 C   sZ   t dt|dd i}t ddi}d|d< d|d< | jjd| j||d	}t| j|S )
an  
        Create the BulkContactsInstance

        :param items: A list of objects where each object represents a contact's details. Each object includes the following fields: `contact_id`, which must be a string representing phone number in [E.164 format](https://www.twilio.com/docs/glossary/what-e164); `correlation_id`, a unique 32-character UUID that maps the response to the original request; `country_iso_code`, a string representing the country using the ISO format (e.g., US for the United States); and `zip_code`, a string representing the postal code.

        :returns: The created BulkContactsInstance
        Itemsc                 S   s
   t | S Nr   objecter   r   r   <lambda>C       z)BulkContactsList.create.<locals>.<lambda>Content-Type!application/x-www-form-urlencodedapplication/jsonAcceptPOSTmethoduridataheaders)r   ofr   map_versioncreater#   r   r   r   r4   r5   r   r   r   r   r9   8   s    	    zBulkContactsList.createc                    s`   t dt|dd i}t ddi}d|d< d|d< | jjd| j||d	I d
H }t| j|S )a}  
        Asynchronously create the BulkContactsInstance

        :param items: A list of objects where each object represents a contact's details. Each object includes the following fields: `contact_id`, which must be a string representing phone number in [E.164 format](https://www.twilio.com/docs/glossary/what-e164); `correlation_id`, a unique 32-character UUID that maps the response to the original request; `country_iso_code`, a string representing the country using the ISO format (e.g., US for the United States); and `zip_code`, a string representing the postal code.

        :returns: The created BulkContactsInstance
        r$   c                 S   s
   t | S r%   r&   r(   r   r   r   r*   ]   r+   z/BulkContactsList.create_async.<locals>.<lambda>r,   r-   r.   r/   r0   r1   N)r   r6   r   r7   r8   create_asyncr#   r   r:   r   r   r   r;   R   s    	    zBulkContactsList.create_asyncr   c                 C   s   dS )r   z%<Twilio.Accounts.V1.BulkContactsList>r   r   r   r   r   r   l   s    zBulkContactsList.__repr__)r   r   r   r
   r   r   r'   r   r9   r;   r    r   r!   r   r   r   r   r"   +   s   r"   N)r   typingr   r   r   r   Ztwilio.baser   r   Ztwilio.base.instance_resourcer   Ztwilio.base.list_resourcer	   Ztwilio.base.versionr
   r   r"   r   r   r   r   <module>   s   