
    piA                         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e
      Z G d	 d
e      Zy)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                   B     e Zd ZdZdedeeef   f fdZdefdZ	 x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                 P    t         |   |       |j                  d      | _        y )Nitems)super__init__getr   )selfr   r   	__class__s      g/opt/services/ai/voice_agent/venv/lib/python3.12/site-packages/twilio/rest/accounts/v1/bulk_contacts.pyr   zBulkContactsInstance.__init__   s     !29++g2F
    returnc                      y)f
        Provide a friendly representation

        :returns: Machine friendly representation
        z)<Twilio.Accounts.V1.BulkContactsInstance> r   s    r   __repr__zBulkContactsInstance.__repr__!   s     ;r   )__name__
__module____qualname____doc__r   r   strr   r   r   __classcell__r   s   @r   r   r      s2    G G$sCx. G
;# ;r   r   c                   \     e Zd Zdef fdZdee   defdZdee   defdZ	de
fdZ xZS )BulkContactsListr   c                 2    t         |   |       d| _        y)zn
        Initialize the BulkContactsList

        :param version: Version that contains the resource

        z/Contacts/BulkN)r   r   _uri)r   r   r   s     r   r   zBulkContactsList.__init__-   s     	!$	r   r   r   c                    t        j                  dt        j                  |d       i      }t        j                  ddi      }d|d<   d|d<   | j                  j                  d| j                  ||      }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                 ,    t        j                  |       S Nr   objectes    r   <lambda>z)BulkContactsList.create.<locals>.<lambda>C       	8H8H8K r   Content-Type!application/x-www-form-urlencodedapplication/jsonAcceptPOSTmethoduridataheaders)r   ofr   map_versioncreater)   r   r   r   r<   r=   r   s        r   rA   zBulkContactsList.create8   s     yyu.KL

 ))^-PQR"E.--&&tyytW ' 
 $DMM7;;r   c                 6  K   t        j                  dt        j                  |d       i      }t        j                  ddi      }d|d<   d|d<   | j                  j                  d| j                  ||       d	{   }t        | j                  |      S 7 w)
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                 ,    t        j                  |       S r-   r.   r0   s    r   r2   z/BulkContactsList.create_async.<locals>.<lambda>]   r3   r   r4   r5   r6   r7   r8   r9   N)r   r>   r   r?   r@   create_asyncr)   r   rB   s        r   rE   zBulkContactsList.create_asyncR   s      yyu.KL

 ))^-PQR"E.22tyytW 3 
 
 $DMM7;;	
s   A:B<B=Bc                      y)r   z%<Twilio.Accounts.V1.BulkContactsList>r   r   s    r   r   zBulkContactsList.__repr__l   s     7r   )r   r    r!   r   r   r   r/   r   rA   rE   r#   r   r$   r%   s   @r   r'   r'   +   sK    	% 	%<DL <-A <4<V <9M <47# 7r   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   <module>rL      s9    - , ) : 2 ';+ ;(G7| G7r   