o
    O`W                     @   s  d Z ddlZddlZddlmZ ddlmZ ddlmZ ddl	m
Z
mZ ddlmZ G dd	 d	eZeG d
d deZeG dd deZeG dd deZeG dd deZeG dd deZeG dd deZeG dd deZeG dd deZdS )za
This code was generated by
\ / _    _  _|   _  _
 | (_)\/(_)(_|\/| |(/_  v1.0.0
      /       /
    N)__version__)TwilioException)obsolete_client)urlparse
urlunparse)TwilioHttpClientc                   @   s  e Zd ZdZ		dxddZ		dyddZdd	 Zed
d Zedd Z	edd Z
edd Zedd Zedd Zedd Zedd Zedd Zedd Zedd Zed d! Zed"d# Zed$d% Zed&d' Zed(d) Zed*d+ Zed,d- Zed.d/ Zed0d1 Zed2d3 Zed4d5 Zed6d7 Zed8d9 Zed:d; Z ed<d= Z!ed>d? Z"ed@dA Z#edBdC Z$edDdE Z%edFdG Z&edHdI Z'edJdK Z(edLdM Z)edNdO Z*edPdQ Z+edRdS Z,edTdU Z-edVdW Z.edXdY Z/edZd[ Z0ed\d] Z1ed^d_ Z2ed`da Z3edbdc Z4eddde Z5edfdg Z6edhdi Z7edjdk Z8edldm Z9edndo Z:edpdq Z;edrds Z<edtdu Z=dvdw Z>dS )zClientz( A client for accessing the Twilio API. Nc                 C   sJ  |pt j}|p|d| _	 |p|d| _	 |p| j| _	 |p$|d| _	 |p-|d| _	 | jr6| js:td| j| jf| _		 |pFt
 | _	 d| _d| _d| _d| _d| _d| _d| _d| _d| _d| _d| _d| _d| _d| _d| _d| _d| _d| _d| _d| _d| _ d| _!d| _"d| _#d| _$d| _%d| _&d| _'d| _(d| _)dS )a  
        Initializes the Twilio Client

        :param str username: Username to authenticate with
        :param str password: Password to authenticate with
        :param str account_sid: Account Sid, defaults to Username
        :param str region: Twilio Region to make requests to, defaults to 'us1' if an edge is provided
        :param HttpClient http_client: HttpClient, defaults to TwilioHttpClient
        :param dict environment: Environment to look for auth details, defaults to os.environ
        :param str edge: Twilio Edge to make requests to, defaults to None

        :returns: Twilio Client
        :rtype: twilio.rest.Client
        TWILIO_ACCOUNT_SIDTWILIO_AUTH_TOKENTWILIO_EDGETWILIO_REGIONz1Credentials are required to create a TwilioClientN)*osenvirongetusernamepasswordaccount_sidedgeregionr   authr   http_client	_accounts_api
_autopilot_chat_conversations_events_fax	_flex_api	_insights_ip_messaging_lookups
_messaging_monitor_notify_numbers_preview_pricing_proxy_serverless_studio_sync_taskrouter	_trunking	_trusthub_verify_video_voice	_wireless	_supersim_bulkexports)selfr   r   r   r   r   environmentr    r7   X/var/www/html/asistente-voz-ia/venv/lib/python3.10/site-packages/twilio/rest/__init__.py__init__   s^   

zClient.__init__Fc	           	   
   C   s   |p| j }|pi }dtt |d< dt|d< d|d< |dkr*d|vr*d	|d< d
|vr2d|d
< | |}| jj||||||||dS )a  
        Makes a request to the Twilio API using the configured http client
        Authentication information is automatically added if none is provided

        :param str method: HTTP Method
        :param str uri: Fully qualified url
        :param dict[str, str] params: Query string parameters
        :param dict[str, str] data: POST body data
        :param dict[str, str] headers: HTTP Headers
        :param tuple(str, str) auth: Authentication
        :param int timeout: Timeout in seconds
        :param bool allow_redirects: Should the client follow redirects

        :returns: Response from the Twilio API
        :rtype: twilio.http.response.Response
        ztwilio-python/{} (Python {})z
User-Agentz	python-{}zX-Twilio-Clientzutf-8zAccept-CharsetPOSTzContent-Typez!application/x-www-form-urlencodedAcceptzapplication/json)paramsdataheadersr   timeoutallow_redirects)r   formatr   platformpython_versionget_hostnamer   request)	r5   methodurir<   r=   r>   r   r?   r@   r7   r7   r8   rE   ]   s.   

zClient.requestc                 C   s   | j s| js|S t|}|jd}|d }d|dd }d}d}t|dkr.|d }nt|dkr<|d }|d }| j p@|}| jpI|pI|oId	}|jdd
d ||||fD d}t|S )z
        Determines the proper hostname given edge and region preferences
        via client configuration or uri.

        :param str uri: Fully qualified url

        :returns: The final uri used to make the request
        :rtype: str
        .r   N            us1c                 S   s   g | ]}|r|qS r7   r7   ).0partr7   r7   r8   
<listcomp>   s    z'Client.get_hostname.<locals>.<listcomp>)netloc)	r   r   r   rR   splitjoinlen_replacer   )r5   rG   
parsed_urlpiecesprefixsuffixr   r   r7   r7   r8   rD      s&   


zClient.get_hostnamec                 C   &   | j du rddlm} || | _ | j S )z
        Access the Accounts Twilio Domain

        :returns: Accounts Twilio Domain
        :rtype: twilio.rest.accounts.Accounts
        Nr   )Accounts)r   twilio.rest.accountsr\   )r5   r\   r7   r7   r8   accounts      

zClient.accountsc                 C   r[   )zw
        Access the Api Twilio Domain

        :returns: Api Twilio Domain
        :rtype: twilio.rest.api.Api
        Nr   )Api)r   twilio.rest.apir`   )r5   r`   r7   r7   r8   api   r_   z
Client.apic                 C   r[   )z
        Access the Autopilot Twilio Domain

        :returns: Autopilot Twilio Domain
        :rtype: twilio.rest.autopilot.Autopilot
        Nr   )	Autopilot)r   twilio.rest.autopilotrc   )r5   rc   r7   r7   r8   	autopilot   r_   zClient.autopilotc                 C   r[   )z{
        Access the Chat Twilio Domain

        :returns: Chat Twilio Domain
        :rtype: twilio.rest.chat.Chat
        Nr   )Chat)r   twilio.rest.chatrf   )r5   rf   r7   r7   r8   chat   r_   zClient.chatc                 C   r[   )z
        Access the Conversations Twilio Domain

        :returns: Conversations Twilio Domain
        :rtype: twilio.rest.conversations.Conversations
        Nr   )Conversations)r   twilio.rest.conversationsri   )r5   ri   r7   r7   r8   conversations   r_   zClient.conversationsc                 C   r[   )z
        Access the Events Twilio Domain

        :returns: Events Twilio Domain
        :rtype: twilio.rest.events.Events
        Nr   )Events)r   twilio.rest.eventsrl   )r5   rl   r7   r7   r8   events   r_   zClient.eventsc                 C   r[   )zw
        Access the Fax Twilio Domain

        :returns: Fax Twilio Domain
        :rtype: twilio.rest.fax.Fax
        Nr   )Fax)r   twilio.rest.faxro   )r5   ro   r7   r7   r8   fax   r_   z
Client.faxc                 C   r[   )z
        Access the FlexApi Twilio Domain

        :returns: FlexApi Twilio Domain
        :rtype: twilio.rest.flex_api.FlexApi
        Nr   )FlexApi)r   twilio.rest.flex_apirr   )r5   rr   r7   r7   r8   flex_api
  r_   zClient.flex_apic                 C   r[   )z
        Access the Insights Twilio Domain

        :returns: Insights Twilio Domain
        :rtype: twilio.rest.insights.Insights
        Nr   )Insights)r   twilio.rest.insightsru   )r5   ru   r7   r7   r8   insights  r_   zClient.insightsc                 C   r[   )z
        Access the IpMessaging Twilio Domain

        :returns: IpMessaging Twilio Domain
        :rtype: twilio.rest.ip_messaging.IpMessaging
        Nr   )IpMessaging)r    twilio.rest.ip_messagingrx   )r5   rx   r7   r7   r8   ip_messaging$  r_   zClient.ip_messagingc                 C   r[   )z
        Access the Lookups Twilio Domain

        :returns: Lookups Twilio Domain
        :rtype: twilio.rest.lookups.Lookups
        Nr   )Lookups)r!   twilio.rest.lookupsr{   )r5   r{   r7   r7   r8   lookups1  r_   zClient.lookupsc                 C   r[   )z
        Access the Messaging Twilio Domain

        :returns: Messaging Twilio Domain
        :rtype: twilio.rest.messaging.Messaging
        Nr   )	Messaging)r"   twilio.rest.messagingr~   )r5   r~   r7   r7   r8   	messaging>  r_   zClient.messagingc                 C   r[   )z
        Access the Monitor Twilio Domain

        :returns: Monitor Twilio Domain
        :rtype: twilio.rest.monitor.Monitor
        Nr   )Monitor)r#   twilio.rest.monitorr   )r5   r   r7   r7   r8   monitorK  r_   zClient.monitorc                 C   r[   )z
        Access the Notify Twilio Domain

        :returns: Notify Twilio Domain
        :rtype: twilio.rest.notify.Notify
        Nr   )Notify)r$   twilio.rest.notifyr   )r5   r   r7   r7   r8   notifyX  r_   zClient.notifyc                 C   r[   )z
        Access the Numbers Twilio Domain

        :returns: Numbers Twilio Domain
        :rtype: twilio.rest.numbers.Numbers
        Nr   )Numbers)r%   twilio.rest.numbersr   )r5   r   r7   r7   r8   numberse  r_   zClient.numbersc                 C   r[   )z
        Access the Preview Twilio Domain

        :returns: Preview Twilio Domain
        :rtype: twilio.rest.preview.Preview
        Nr   )Preview)r&   twilio.rest.previewr   )r5   r   r7   r7   r8   previewr  r_   zClient.previewc                 C   r[   )z
        Access the Pricing Twilio Domain

        :returns: Pricing Twilio Domain
        :rtype: twilio.rest.pricing.Pricing
        Nr   )Pricing)r'   twilio.rest.pricingr   )r5   r   r7   r7   r8   pricing  r_   zClient.pricingc                 C   r[   )z
        Access the Proxy Twilio Domain

        :returns: Proxy Twilio Domain
        :rtype: twilio.rest.proxy.Proxy
        Nr   )Proxy)r(   twilio.rest.proxyr   )r5   r   r7   r7   r8   proxy  r_   zClient.proxyc                 C   r[   )z
        Access the Serverless Twilio Domain

        :returns: Serverless Twilio Domain
        :rtype: twilio.rest.serverless.Serverless
        Nr   )
Serverless)r)   twilio.rest.serverlessr   )r5   r   r7   r7   r8   
serverless  r_   zClient.serverlessc                 C   r[   )z
        Access the Studio Twilio Domain

        :returns: Studio Twilio Domain
        :rtype: twilio.rest.studio.Studio
        Nr   )Studio)r*   twilio.rest.studior   )r5   r   r7   r7   r8   studio  r_   zClient.studioc                 C   r[   )z{
        Access the Sync Twilio Domain

        :returns: Sync Twilio Domain
        :rtype: twilio.rest.sync.Sync
        Nr   )Sync)r+   twilio.rest.syncr   )r5   r   r7   r7   r8   sync  r_   zClient.syncc                 C   r[   )z
        Access the Taskrouter Twilio Domain

        :returns: Taskrouter Twilio Domain
        :rtype: twilio.rest.taskrouter.Taskrouter
        Nr   )
Taskrouter)r,   twilio.rest.taskrouterr   )r5   r   r7   r7   r8   
taskrouter  r_   zClient.taskrouterc                 C   r[   )z
        Access the Trunking Twilio Domain

        :returns: Trunking Twilio Domain
        :rtype: twilio.rest.trunking.Trunking
        Nr   )Trunking)r-   twilio.rest.trunkingr   )r5   r   r7   r7   r8   trunking  r_   zClient.trunkingc                 C   r[   )z
        Access the Trusthub Twilio Domain

        :returns: Trusthub Twilio Domain
        :rtype: twilio.rest.trusthub.Trusthub
        Nr   )Trusthub)r.   twilio.rest.trusthubr   )r5   r   r7   r7   r8   trusthub  r_   zClient.trusthubc                 C   r[   )z
        Access the Verify Twilio Domain

        :returns: Verify Twilio Domain
        :rtype: twilio.rest.verify.Verify
        Nr   )Verify)r/   twilio.rest.verifyr   )r5   r   r7   r7   r8   verify  r_   zClient.verifyc                 C   r[   )z
        Access the Video Twilio Domain

        :returns: Video Twilio Domain
        :rtype: twilio.rest.video.Video
        Nr   )Video)r0   twilio.rest.videor   )r5   r   r7   r7   r8   video  r_   zClient.videoc                 C   r[   )z
        Access the Voice Twilio Domain

        :returns: Voice Twilio Domain
        :rtype: twilio.rest.voice.Voice
        Nr   )Voice)r1   twilio.rest.voicer   )r5   r   r7   r7   r8   voice  r_   zClient.voicec                 C   r[   )z
        Access the Wireless Twilio Domain

        :returns: Wireless Twilio Domain
        :rtype: twilio.rest.wireless.Wireless
        Nr   )Wireless)r2   twilio.rest.wirelessr   )r5   r   r7   r7   r8   wireless  r_   zClient.wirelessc                 C   r[   )z
        Access the Supersim Twilio Domain

        :returns: Supersim Twilio Domain
        :rtype: twilio.rest.supersim.Supersim
        Nr   )Supersim)r3   twilio.rest.supersimr   )r5   r   r7   r7   r8   supersim  r_   zClient.supersimc                 C   r[   )z
        Access the Bulkexports Twilio Domain

        :returns: Bulkexports Twilio Domain
        :rtype: twilio.rest.bulkexports.Bulkexports
        Nr   )Bulkexports)r4   twilio.rest.bulkexportsr   )r5   r   r7   r7   r8   bulkexports(  r_   zClient.bulkexportsc                 C   
   | j jjS )zK
        :rtype: twilio.rest.api.v2010.account.address.AddressList
        )rb   account	addressesr5   r7   r7   r8   r   5     
zClient.addressesc                 C   r   )zS
        :rtype: twilio.rest.api.v2010.account.application.ApplicationList
        )rb   r   applicationsr   r7   r7   r8   r   <  r   zClient.applicationsc                 C   r   )zg
        :rtype: twilio.rest.api.v2010.account.authorized_connect_app.AuthorizedConnectAppList
        )rb   r   authorized_connect_appsr   r7   r7   r8   r   C  r   zClient.authorized_connect_appsc                 C   r   )zn
        :rtype: twilio.rest.api.v2010.account.available_phone_number.AvailablePhoneNumberCountryList
        )rb   r   available_phone_numbersr   r7   r7   r8   r   J  r   zClient.available_phone_numbersc                 C   r   )zK
        :rtype: twilio.rest.api.v2010.account.balance.BalanceList
        )rb   r   balancer   r7   r7   r8   r   Q  r   zClient.balancec                 C   r   )zE
        :rtype: twilio.rest.api.v2010.account.call.CallList
        )rb   r   callsr   r7   r7   r8   r   X  r   zClient.callsc                 C   r   )zQ
        :rtype: twilio.rest.api.v2010.account.conference.ConferenceList
        )rb   r   conferencesr   r7   r7   r8   r   _  r   zClient.conferencesc                 C   r   )zR
        :rtype: twilio.rest.api.v2010.account.connect_app.ConnectAppList
        )rb   r   connect_appsr   r7   r7   r8   r   f  r   zClient.connect_appsc                 C   r   )ze
        :rtype: twilio.rest.api.v2010.account.incoming_phone_number.IncomingPhoneNumberList
        )rb   r   incoming_phone_numbersr   r7   r7   r8   r   m  r   zClient.incoming_phone_numbersc                 C   r   )zC
        :rtype: twilio.rest.api.v2010.account.key.KeyList
        )rb   r   keysr   r7   r7   r8   r   t  r   zClient.keysc                 C   r   )zK
        :rtype: twilio.rest.api.v2010.account.message.MessageList
        )rb   r   messagesr   r7   r7   r8   r   {  r   zClient.messagesc                 C   r   )zJ
        :rtype: twilio.rest.api.v2010.account.new_key.NewKeyList
        )rb   r   new_keysr   r7   r7   r8   r     r   zClient.new_keysc                 C   r   )zY
        :rtype: twilio.rest.api.v2010.account.new_signing_key.NewSigningKeyList
        )rb   r   new_signing_keysr   r7   r7   r8   r     r   zClient.new_signing_keysc                 C   r   )zU
        :rtype: twilio.rest.api.v2010.account.notification.NotificationList
        )rb   r   notificationsr   r7   r7   r8   r     r   zClient.notificationsc                 C   r   )z_
        :rtype: twilio.rest.api.v2010.account.outgoing_caller_id.OutgoingCallerIdList
        )rb   r   outgoing_caller_idsr   r7   r7   r8   r     r   zClient.outgoing_caller_idsc                 C   r   )zG
        :rtype: twilio.rest.api.v2010.account.queue.QueueList
        )rb   r   queuesr   r7   r7   r8   r     r   zClient.queuesc                 C   r   )zO
        :rtype: twilio.rest.api.v2010.account.recording.RecordingList
        )rb   r   
recordingsr   r7   r7   r8   r     r   zClient.recordingsc                 C   r   )zR
        :rtype: twilio.rest.api.v2010.account.signing_key.SigningKeyList
        )rb   r   signing_keysr   r7   r7   r8   r     r   zClient.signing_keysc                 C   r   )zC
        :rtype: twilio.rest.api.v2010.account.sip.SipList
        )rb   r   sipr   r7   r7   r8   r     r   z
Client.sipc                 C   r   )zP
        :rtype: twilio.rest.api.v2010.account.short_code.ShortCodeList
        )rb   r   short_codesr   r7   r7   r8   r     r   zClient.short_codesc                 C   r   )zG
        :rtype: twilio.rest.api.v2010.account.token.TokenList
        )rb   r   tokensr   r7   r7   r8   r     r   zClient.tokensc                 C   r   )zW
        :rtype: twilio.rest.api.v2010.account.transcription.TranscriptionList
        )rb   r   transcriptionsr   r7   r7   r8   r     r   zClient.transcriptionsc                 C   r   )zG
        :rtype: twilio.rest.api.v2010.account.usage.UsageList
        )rb   r   usager   r7   r7   r8   r     r   zClient.usagec                 C   r   )z`
        :rtype: twilio.rest.api.v2010.account.validation_request.ValidationRequestList
        )rb   r   validation_requestsr   r7   r7   r8   r     r   zClient.validation_requestsc                 C   s   d | jS )zz
        Provide a friendly representation

        :returns: Machine friendly representation
        :rtype: str
        z<Twilio {}>)rA   r   r   r7   r7   r8   __repr__  s   zClient.__repr__)NNNNNNN)NNNNNF)?__name__
__module____qualname____doc__r9   rE   rD   propertyr^   rb   re   rh   rk   rn   rq   rt   rw   rz   r}   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r7   r7   r7   r8   r      s    
E
/#





















































r   c                   @      e Zd ZdZdd ZdS )TwilioClientZ Dummy client which provides no functionality. Please use
    twilio.rest.Client instead. c                 G      d S Nr7   r5   argsr7   r7   r8   r9        zTwilioClient.__init__Nr   r   r   r   r9   r7   r7   r7   r8   r         r   c                   @   r   )TwilioRestClientr   c                 G   r   r   r7   r   r7   r7   r8   r9     r   zTwilioRestClient.__init__Nr   r7   r7   r7   r8   r     r   r   c                   @   r   )TwilioIpMessagingClientr   c                 G   r   r   r7   r   r7   r7   r8   r9     r   z TwilioIpMessagingClient.__init__Nr   r7   r7   r7   r8   r     r   r   c                   @   r   )TwilioLookupsClientr   c                 G   r   r   r7   r   r7   r7   r8   r9     r   zTwilioLookupsClient.__init__Nr   r7   r7   r7   r8   r     r   r   c                   @   r   )TwilioMonitorClientr   c                 G   r   r   r7   r   r7   r7   r8   r9     r   zTwilioMonitorClient.__init__Nr   r7   r7   r7   r8   r     r   r   c                   @   r   )TwilioPricingClientr   c                 G   r   r   r7   r   r7   r7   r8   r9     r   zTwilioPricingClient.__init__Nr   r7   r7   r7   r8   r     r   r   c                   @   r   )TwilioTaskRouterClientr   c                 G   r   r   r7   r   r7   r7   r8   r9   "  r   zTwilioTaskRouterClient.__init__Nr   r7   r7   r7   r8   r     r   r   c                   @   r   )TwilioTrunkingClientr   c                 G   r   r   r7   r   r7   r7   r8   r9   +  r   zTwilioTrunkingClient.__init__Nr   r7   r7   r7   r8   r   &  r   r   )r   r   rB   twilior   twilio.base.exceptionsr   twilio.base.obsoleter   twilio.compatr   r   twilio.http.http_clientr   objectr   r   r   r   r   r   r   r   r   r7   r7   r7   r8   <module>   s<        W