o
    f>hA                     @   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dedeeef f fddZdef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__ X/var/www/html/venv/lib/python3.10/site-packages/twilio/rest/accounts/v1/bulk_contacts.pyr      s   zBulkContactsInstance.__init__returnc                 C      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                       s\   e Zd Zdef fddZdee defddZdee defdd	Z	de
fd
dZ  ZS )BulkContactsListr   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   
   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   r5   r6   r   r   r   r   r:   8   s   	
zBulkContactsList.createc                    sb   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   r%   r&   r'   r)   r   r   r   r+   ]   r,   z/BulkContactsList.create_async.<locals>.<lambda>r-   r.   r/   r0   r1   r2   N)r   r7   r   r8   r9   create_asyncr#   r   r;   r   r   r   r<   R   s   	
zBulkContactsList.create_asyncc                 C   r   )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   r:   r<   r    r   r!   r   r   r   r   r"   +   s
    r"   N)r   typingr   r   r   r   twilio.baser   r   twilio.base.instance_resourcer   twilio.base.list_resourcer	   twilio.base.versionr
   r   r"   r   r   r   r   <module>   s    