B
    ²ô`2‰  ã               @   s   d Z ddlmZ ddlmZ ddl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G dd„ deƒZG dd„ deƒZdS )za
This code was generated by
\ / _    _  _|   _  _
 | (_)\/(_)(_|\/| |(/_  v1.0.0
      /       /
é    )Údeserialize)Úvalues)ÚInstanceContext)ÚInstanceResource)ÚListResource)ÚPagec                   s¬   e Zd Z‡ fdd„Zejejejejfdd„Zejejejddfdd„Zejejejddfdd	„Zejejejejejejfd
d„Z	dd„ Z
dd„ Zdd„ Zdd„ Z‡  ZS )ÚTriggerListc                s.   t t| ƒ |¡ d|i| _djf | jŽ| _dS )a]  
        Initialize the TriggerList

        :param Version version: Version that contains the resource
        :param account_sid: A 34 character string that uniquely identifies this resource.

        :returns: twilio.rest.api.v2010.account.usage.trigger.TriggerList
        :rtype: twilio.rest.api.v2010.account.usage.trigger.TriggerList
        Úaccount_sidz+/Accounts/{account_sid}/Usage/Triggers.jsonN)Úsuperr   Ú__init__Ú	_solutionÚformatÚ_uri)ÚselfÚversionr	   )Ú	__class__© úZ/home/dcms/DCMS/lib/python3.7/site-packages/twilio/rest/api/v2010/account/usage/trigger.pyr      s    

zTriggerList.__init__c       
   
   C   sD   t  |||||||dœ¡}| jjd| j|d}	t| j|	| jd dS )a  
        Create the TriggerInstance

        :param unicode callback_url: The URL we call when the trigger fires
        :param unicode trigger_value: The usage value at which the trigger should fire
        :param TriggerInstance.UsageCategory usage_category: The usage category the trigger watches
        :param unicode callback_method: The HTTP method to use to call callback_url
        :param unicode friendly_name: A string to describe the resource
        :param TriggerInstance.Recurring recurring: The frequency of a recurring UsageTrigger
        :param TriggerInstance.TriggerField trigger_by: The field in the UsageRecord resource that fires the trigger

        :returns: The created TriggerInstance
        :rtype: twilio.rest.api.v2010.account.usage.trigger.TriggerInstance
        )ÚCallbackUrlZTriggerValueÚUsageCategoryÚCallbackMethodÚFriendlyNameÚ	RecurringÚ	TriggerByÚPOST)ÚmethodÚuriÚdatar	   )r	   )r   ÚofÚ_versionÚcreater   ÚTriggerInstancer   )
r   Úcallback_urlÚtrigger_valueÚusage_categoryÚcallback_methodÚfriendly_nameÚ	recurringÚ
trigger_byr   Úpayloadr   r   r   r    #   s    
zTriggerList.createNc             C   s6   | j  ||¡}| j||||d d}| j  ||d ¡S )a   
        Streams TriggerInstance records from the API as a generator stream.
        This operation lazily loads records as efficiently as possible until the limit
        is reached.
        The results are returned as a generator, so this operation is memory efficient.

        :param TriggerInstance.Recurring recurring: The frequency of recurring UsageTriggers to read
        :param TriggerInstance.TriggerField trigger_by: The trigger field of the UsageTriggers to read
        :param TriggerInstance.UsageCategory usage_category: The usage category of the UsageTriggers to read
        :param int limit: Upper limit for the number of records to return. stream()
                          guarantees to never return more than limit.  Default is no limit
        :param int page_size: Number of records to fetch per request, when not set will use
                              the default value of 50 records.  If no page_size is defined
                              but a limit is defined, stream() will attempt to read the
                              limit with the most efficient page size, i.e. min(limit, 1000)

        :returns: Generator that will yield up to limit results
        :rtype: list[twilio.rest.api.v2010.account.usage.trigger.TriggerInstance]
        Ú	page_size)r'   r(   r$   r*   Úlimit)r   Zread_limitsÚpageÚstream)r   r'   r(   r$   r+   r*   Zlimitsr,   r   r   r   r-   B   s    zTriggerList.streamc             C   s   t | j|||||dƒS )a   
        Lists TriggerInstance records from the API as a list.
        Unlike stream(), this operation is eager and will load `limit` records into
        memory before returning.

        :param TriggerInstance.Recurring recurring: The frequency of recurring UsageTriggers to read
        :param TriggerInstance.TriggerField trigger_by: The trigger field of the UsageTriggers to read
        :param TriggerInstance.UsageCategory usage_category: The usage category of the UsageTriggers to read
        :param int limit: Upper limit for the number of records to return. list() guarantees
                          never to return more than limit.  Default is no limit
        :param int page_size: Number of records to fetch per request, when not set will use
                              the default value of 50 records.  If no page_size is defined
                              but a limit is defined, list() will attempt to read the limit
                              with the most efficient page size, i.e. min(limit, 1000)

        :returns: Generator that will yield up to limit results
        :rtype: list[twilio.rest.api.v2010.account.usage.trigger.TriggerInstance]
        )r'   r(   r$   r+   r*   )Úlistr-   )r   r'   r(   r$   r+   r*   r   r   r   r.   b   s    zTriggerList.listc       	   	   C   s<   t  ||||||dœ¡}| jjd| j|d}t| j|| jƒS )a   
        Retrieve a single page of TriggerInstance records from the API.
        Request is executed immediately

        :param TriggerInstance.Recurring recurring: The frequency of recurring UsageTriggers to read
        :param TriggerInstance.TriggerField trigger_by: The trigger field of the UsageTriggers to read
        :param TriggerInstance.UsageCategory usage_category: The usage category of the UsageTriggers to read
        :param str page_token: PageToken provided by the API
        :param int page_number: Page Number, this value is simply for client state
        :param int page_size: Number of records to return, defaults to 50

        :returns: Page of TriggerInstance
        :rtype: twilio.rest.api.v2010.account.usage.trigger.TriggerPage
        )r   r   r   Z	PageTokenr   ZPageSizeÚGET)r   r   Úparams)r   r   r   r,   r   ÚTriggerPager   )	r   r'   r(   r$   Z
page_tokenZpage_numberr*   r   Úresponser   r   r   r,   ~   s    
zTriggerList.pagec             C   s"   | j jj d|¡}t| j || jƒS )a?  
        Retrieve a specific page of TriggerInstance records from the API.
        Request is executed immediately

        :param str target_url: API-generated URL for the requested results page

        :returns: Page of TriggerInstance
        :rtype: twilio.rest.api.v2010.account.usage.trigger.TriggerPage
        r/   )r   ÚdomainZtwilioÚrequestr1   r   )r   Ú
target_urlr2   r   r   r   Úget_pageœ   s    

zTriggerList.get_pagec             C   s   t | j| jd |dS )a
  
        Constructs a TriggerContext

        :param sid: The unique string that identifies the resource

        :returns: twilio.rest.api.v2010.account.usage.trigger.TriggerContext
        :rtype: twilio.rest.api.v2010.account.usage.trigger.TriggerContext
        r	   )r	   Úsid)ÚTriggerContextr   r   )r   r7   r   r   r   Úget­   s    	zTriggerList.getc             C   s   t | j| jd |dS )a
  
        Constructs a TriggerContext

        :param sid: The unique string that identifies the resource

        :returns: twilio.rest.api.v2010.account.usage.trigger.TriggerContext
        :rtype: twilio.rest.api.v2010.account.usage.trigger.TriggerContext
        r	   )r	   r7   )r8   r   r   )r   r7   r   r   r   Ú__call__¸   s    	zTriggerList.__call__c             C   s   dS )zz
        Provide a friendly representation

        :returns: Machine friendly representation
        :rtype: str
        z<Twilio.Api.V2010.TriggerList>r   )r   r   r   r   Ú__repr__Ã   s    zTriggerList.__repr__)Ú__name__Ú
__module__Ú__qualname__r   r   Úunsetr    r-   r.   r,   r6   r9   r:   r;   Ú__classcell__r   r   )r   r   r      s   r   c                   s,   e Zd Z‡ fdd„Zdd„ Zdd„ Z‡  ZS )r1   c                s   t t| ƒ ||¡ || _dS )a•  
        Initialize the TriggerPage

        :param Version version: Version that contains the resource
        :param Response response: Response from the API
        :param account_sid: A 34 character string that uniquely identifies this resource.

        :returns: twilio.rest.api.v2010.account.usage.trigger.TriggerPage
        :rtype: twilio.rest.api.v2010.account.usage.trigger.TriggerPage
        N)r
   r1   r   r   )r   r   r2   Zsolution)r   r   r   r   Ï   s    zTriggerPage.__init__c             C   s   t | j|| jd dS )a  
        Build an instance of TriggerInstance

        :param dict payload: Payload response from the API

        :returns: twilio.rest.api.v2010.account.usage.trigger.TriggerInstance
        :rtype: twilio.rest.api.v2010.account.usage.trigger.TriggerInstance
        r	   )r	   )r!   r   r   )r   r)   r   r   r   Úget_instanceß   s    	zTriggerPage.get_instancec             C   s   dS )zz
        Provide a friendly representation

        :returns: Machine friendly representation
        :rtype: str
        z<Twilio.Api.V2010.TriggerPage>r   )r   r   r   r   r;   ê   s    zTriggerPage.__repr__)r<   r=   r>   r   rA   r;   r@   r   r   )r   r   r1   Í   s   r1   c                   sJ   e Zd Z‡ fdd„Zdd„ Zejejejfdd„Zdd„ Zd	d
„ Z	‡  Z
S )r8   c                s0   t t| ƒ |¡ ||dœ| _djf | jŽ| _dS )a¥  
        Initialize the TriggerContext

        :param Version version: Version that contains the resource
        :param account_sid: The SID of the Account that created the resource to fetch
        :param sid: The unique string that identifies the resource

        :returns: twilio.rest.api.v2010.account.usage.trigger.TriggerContext
        :rtype: twilio.rest.api.v2010.account.usage.trigger.TriggerContext
        )r	   r7   z1/Accounts/{account_sid}/Usage/Triggers/{sid}.jsonN)r
   r8   r   r   r   r   )r   r   r	   r7   )r   r   r   r   ö   s    zTriggerContext.__init__c             C   s0   | j jd| jd}t| j || jd | jd dS )z¦
        Fetch the TriggerInstance

        :returns: The fetched TriggerInstance
        :rtype: twilio.rest.api.v2010.account.usage.trigger.TriggerInstance
        r/   )r   r   r	   r7   )r	   r7   )r   Úfetchr   r!   r   )r   r)   r   r   r   rB     s    zTriggerContext.fetchc             C   sD   t  |||dœ¡}| jjd| j|d}t| j|| jd | jd dS )a  
        Update the TriggerInstance

        :param unicode callback_method: The HTTP method to use to call callback_url
        :param unicode callback_url: The URL we call when the trigger fires
        :param unicode friendly_name: A string to describe the resource

        :returns: The updated TriggerInstance
        :rtype: twilio.rest.api.v2010.account.usage.trigger.TriggerInstance
        )r   r   r   r   )r   r   r   r	   r7   )r	   r7   )r   r   r   Úupdater   r!   r   )r   r%   r"   r&   r   r)   r   r   r   rC     s    
zTriggerContext.updatec             C   s   | j jd| jdS )z~
        Deletes the TriggerInstance

        :returns: True if delete succeeds, False otherwise
        :rtype: bool
        ÚDELETE)r   r   )r   Údeleter   )r   r   r   r   rE   2  s    zTriggerContext.deletec             C   s$   d  dd„ | j ¡ D ƒ¡}d |¡S )zz
        Provide a friendly representation

        :returns: Machine friendly representation
        :rtype: str
        ú c             s   s   | ]\}}d   ||¡V  qdS )z{}={}N)r   )Ú.0ÚkÚvr   r   r   ú	<genexpr>B  s    z*TriggerContext.__repr__.<locals>.<genexpr>z$<Twilio.Api.V2010.TriggerContext {}>)Újoinr   Úitemsr   )r   Úcontextr   r   r   r;   ;  s    zTriggerContext.__repr__)r<   r=   r>   r   rB   r   r?   rC   rE   r;   r@   r   r   )r   r   r8   ô   s   	r8   c                   sH  e Zd ZG dd„ deƒZG dd„ deƒZG dd„ deƒZd4‡ f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d,d-„ Zejejejfd.d/„Zd0d1„ Zd2d3„ Z‡  Z S )5r!   c               @   sÀ  e Zd ZdZdZdZdZdZdZdZ	dZ
d	Zd
ZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZ dZ!d Z"d!Z#d"Z$d#Z%d$Z&d%Z'd&Z(d'Z)d(Z*d)Z+d*Z,d+Z-d,Z.d-Z/d.Z0d/Z1d0Z2d1Z3d2Z4d3Z5d4Z6d5Z7d6Z8d7Z9d8Z:d9Z;d:Z<d;Z=d<Z>d=Z?d>Z@d?ZAd@ZBdAZCdBZDdCZEdDZFdEZGdFZHdGZIdHZJdIZKdJZLdKZMdLZNdMZOdNZPdOZQdPZRdQZSdRZTdSZUdTZVdUZWdVZXdWZYdXZZdYZ[dZZ\d[Z]d\Z^d]Z_d^Z`d_Zad`ZbdaZcdbZddcZeddZfdeZgdfZhdgZidhZjdiZkdjZldkZmdlZndmZodnZpdoZqdpZrdqZsdrZtdsZudtZvduZwdvZxdwZydxZzdyZ{dzZ|d{Z}d|Z~d}Zd~Z€dZd€Z‚dZƒd‚Z„dƒZ…d„Z†d…Z‡d†Zˆd‡Z‰dˆZŠd‰Z‹dŠZŒd‹ZdŒZŽdZdŽZdZ‘dZ’d‘Z“d’Z”d“Z•d”Z–d•Z—d–Z˜d—Z™d˜Zšd™Z›dšZœd›ZdœZždZŸdžZ dŸZ¡d Z¢d¡Z£d¢Z¤d£Z¥d¤Z¦d¥Z§d¦Z¨d§Z©d¨Zªd©Z«dªZ¬d«Z­d¬Z®d­Z¯d®Z°d¯Z±d°Z²d±Z³d²Z´d³Zµd´Z¶dµZ·d¶Z¸d·Z¹d¸Zºd¹Z»dºZ¼d»Z½d¼Z¾d½Z¿d¾ZÀd¿ZÁdÀZÂdÁZÃdÂZÄdÃZÅdÄZÆdÅZÇdÆZÈdÇZÉdÈZÊdÉZËdÊZÌdËZÍdÌZÎdÍZÏdÎZÐdÏZÑdÐZÒdÑZÓdÒZÔdÓZÕdÔZÖdÕZ×dÖZØd×ZÙdØZÚdÙZÛdÚZÜdÛZÝdÜZÞdÝZßdÞZàdßZádàZâdáZãdâZädãZådäZædåZçdæZèdçZédèZêdéZëdêZìdëZídìZîdíZïdîS )ïzTriggerInstance.UsageCategoryzagent-conferencezanswering-machine-detectionzauthy-authenticationszauthy-calls-outboundzauthy-monthly-feeszauthy-phone-intelligencezauthy-phone-verificationszauthy-sms-outboundzcall-progess-eventsZcalleridlookupsZcallszcalls-clientzcalls-globalconferencezcalls-inboundzcalls-inbound-localzcalls-inbound-mobilezcalls-inbound-tollfreezcalls-outboundzcalls-pay-verb-transactionszcalls-recordingsz	calls-sipzcalls-sip-inboundzcalls-sip-outboundzcarrier-lookupsZconversationszconversations-api-requestsz!conversations-conversation-eventsz#conversations-endpoint-connectivityzconversations-eventsz conversations-participant-eventszconversations-participantsZcpszfraud-lookupszgroup-roomszgroup-rooms-data-trackz$group-rooms-encrypted-media-recordedzgroup-rooms-media-downloadedzgroup-rooms-media-recordedzgroup-rooms-media-routedzgroup-rooms-media-storedzgroup-rooms-participant-minuteszgroup-rooms-recorded-minutesZlookupsZmarketplacez0marketplace-algorithmia-named-entity-recognitionz!marketplace-cadence-transcriptionzmarketplace-cadence-translationz marketplace-capio-speech-to-textzmarketplace-convriza-ababaz$marketplace-deepgram-phrase-detectorz)marketplace-digital-segment-business-infoz(marketplace-facebook-offline-conversionsz!marketplace-google-speech-to-textz'marketplace-ibm-watson-message-insightsz(marketplace-ibm-watson-message-sentimentz)marketplace-ibm-watson-recording-analysisz$marketplace-ibm-watson-tone-analyzerz!marketplace-icehook-systems-scoutz&marketplace-infogroup-dataaxle-bizinfoz,marketplace-keen-io-contact-center-analyticszmarketplace-marchex-cleancallz.marketplace-marchex-sentiment-analysis-for-smsz,marketplace-marketplace-nextcaller-social-idz-marketplace-mobile-commons-opt-out-classifierz&marketplace-nexiwave-voicemail-to-textz5marketplace-nextcaller-advanced-caller-identificationzmarketplace-nomorobo-spam-scorez#marketplace-payfone-tcpa-compliancez2marketplace-remeeting-automatic-speech-recognitionz1marketplace-tcpa-defense-solutions-blacklist-feedzmarketplace-telo-opencnamzmarketplace-truecnam-true-spamz(marketplace-twilio-caller-name-lookup-usz-marketplace-twilio-carrier-information-lookupzmarketplace-voicebase-pciz#marketplace-voicebase-transcriptionz5marketplace-voicebase-transcription-custom-vocabularyz0marketplace-whitepages-pro-caller-identificationz-marketplace-whitepages-pro-phone-intelligencez+marketplace-whitepages-pro-phone-reputationz"marketplace-wolfarm-spoken-resultsz marketplace-wolfram-short-answerz4marketplace-ytica-contact-center-reporting-analyticsZmediastorageÚmmszmms-inboundzmms-inbound-longcodezmms-inbound-shortcodezmms-messages-carrierfeeszmms-outboundzmms-outbound-longcodezmms-outbound-shortcodezmonitor-readszmonitor-storagezmonitor-writesÚnotifyznotify-actions-attemptsznotify-channelsznumber-format-lookupsZpchatzpchat-usersz&peer-to-peer-rooms-participant-minutesZpfaxzpfax-minuteszpfax-minutes-inboundzpfax-minutes-outboundz
pfax-pagesZphonenumberszphonenumbers-cpszphonenumbers-emergencyzphonenumbers-localzphonenumbers-mobilezphonenumbers-setupszphonenumbers-tollfreeZpremiumsupportÚproxyzproxy-active-sessionsZpstnconnectivityÚpvzpv-composition-media-downloadedzpv-composition-media-encryptedzpv-composition-media-storedzpv-composition-minuteszpv-recording-compositionszpv-room-participantszpv-room-participants-au1zpv-room-participants-br1zpv-room-participants-ie1zpv-room-participants-jp1zpv-room-participants-sg1zpv-room-participants-us1zpv-room-participants-us2zpv-roomszpv-sip-endpoint-registrationsZ
recordingsZrecordingstoragezrooms-group-bandwidthzrooms-group-minuteszrooms-peer-to-peer-minutesZ
shortcodeszshortcodes-customerownedzshortcodes-mms-enablementzshortcodes-mpszshortcodes-randomzshortcodes-ukzshortcodes-vanityzsmall-group-roomszsmall-group-rooms-data-trackz%small-group-rooms-participant-minutesZsmszsms-inboundzsms-inbound-longcodezsms-inbound-shortcodezsms-messages-carrierfeeszsms-messages-featureszsms-messages-features-senderidzsms-outboundzsms-outbound-content-inspectionzsms-outbound-longcodezsms-outbound-shortcodezspeech-recognitionzstudio-engagementsÚsynczsync-actionszsync-endpoint-hoursz#sync-endpoint-hours-above-daily-capztaskrouter-tasksZ
totalpriceZtranscriptionsztrunking-cpsztrunking-emergency-callsztrunking-originationztrunking-origination-localztrunking-origination-mobileztrunking-origination-tollfreeztrunking-recordingsztrunking-secureztrunking-terminationZturnmegabyteszturnmegabytes-australiazturnmegabytes-brasilzturnmegabytes-germanyzturnmegabytes-indiazturnmegabytes-irelandzturnmegabytes-japanzturnmegabytes-singaporezturnmegabytes-useastzturnmegabytes-uswestztwilio-interconnectzverify-pushzvideo-recordingszvoice-insightsz/voice-insights-client-insights-on-demand-minutez-voice-insights-ptsn-insights-on-demand-minutez6voice-insights-sip-interface-insights-on-demand-minutez5voice-insights-sip-trunking-insights-on-demand-minuteZwirelesszwireless-orderszwireless-orders-artworkzwireless-orders-bulkzwireless-orders-esimzwireless-orders-starterzwireless-usagezwireless-usage-commandszwireless-usage-commands-africazwireless-usage-commands-asiaz.wireless-usage-commands-centralandsouthamericazwireless-usage-commands-europezwireless-usage-commands-homez$wireless-usage-commands-northamericazwireless-usage-commands-oceaniazwireless-usage-commands-roamingzwireless-usage-datazwireless-usage-data-africazwireless-usage-data-asiaz*wireless-usage-data-centralandsouthamericaz'wireless-usage-data-custom-additionalmbz#wireless-usage-data-custom-first5mbz$wireless-usage-data-domestic-roamingzwireless-usage-data-europez+wireless-usage-data-individual-additionalgbz&wireless-usage-data-individual-firstgbz0wireless-usage-data-international-roaming-canadaz/wireless-usage-data-international-roaming-indiaz0wireless-usage-data-international-roaming-mexicoz wireless-usage-data-northamericazwireless-usage-data-oceaniazwireless-usage-data-pooledz#wireless-usage-data-pooled-downlinkz!wireless-usage-data-pooled-uplinkzwireless-usage-mrczwireless-usage-mrc-customzwireless-usage-mrc-individualzwireless-usage-mrc-pooledzwireless-usage-mrc-suspendedzwireless-usage-smszwireless-usage-voiceN)ðr<   r=   r>   ZAGENT_CONFERENCEZANSWERING_MACHINE_DETECTIONZAUTHY_AUTHENTICATIONSZAUTHY_CALLS_OUTBOUNDZAUTHY_MONTHLY_FEESZAUTHY_PHONE_INTELLIGENCEZAUTHY_PHONE_VERIFICATIONSZAUTHY_SMS_OUTBOUNDZCALL_PROGESS_EVENTSZCALLERIDLOOKUPSZCALLSZCALLS_CLIENTZCALLS_GLOBALCONFERENCEZCALLS_INBOUNDZCALLS_INBOUND_LOCALZCALLS_INBOUND_MOBILEZCALLS_INBOUND_TOLLFREEZCALLS_OUTBOUNDZCALLS_PAY_VERB_TRANSACTIONSZCALLS_RECORDINGSZ	CALLS_SIPZCALLS_SIP_INBOUNDZCALLS_SIP_OUTBOUNDZCARRIER_LOOKUPSZCONVERSATIONSZCONVERSATIONS_API_REQUESTSZ!CONVERSATIONS_CONVERSATION_EVENTSZ#CONVERSATIONS_ENDPOINT_CONNECTIVITYZCONVERSATIONS_EVENTSZ CONVERSATIONS_PARTICIPANT_EVENTSZCONVERSATIONS_PARTICIPANTSZCPSZFRAUD_LOOKUPSZGROUP_ROOMSZGROUP_ROOMS_DATA_TRACKZ$GROUP_ROOMS_ENCRYPTED_MEDIA_RECORDEDZGROUP_ROOMS_MEDIA_DOWNLOADEDZGROUP_ROOMS_MEDIA_RECORDEDZGROUP_ROOMS_MEDIA_ROUTEDZGROUP_ROOMS_MEDIA_STOREDZGROUP_ROOMS_PARTICIPANT_MINUTESZGROUP_ROOMS_RECORDED_MINUTESZLOOKUPSZMARKETPLACEZ0MARKETPLACE_ALGORITHMIA_NAMED_ENTITY_RECOGNITIONZ!MARKETPLACE_CADENCE_TRANSCRIPTIONZMARKETPLACE_CADENCE_TRANSLATIONZ MARKETPLACE_CAPIO_SPEECH_TO_TEXTZMARKETPLACE_CONVRIZA_ABABAZ$MARKETPLACE_DEEPGRAM_PHRASE_DETECTORZ)MARKETPLACE_DIGITAL_SEGMENT_BUSINESS_INFOZ(MARKETPLACE_FACEBOOK_OFFLINE_CONVERSIONSZ!MARKETPLACE_GOOGLE_SPEECH_TO_TEXTZ'MARKETPLACE_IBM_WATSON_MESSAGE_INSIGHTSZ(MARKETPLACE_IBM_WATSON_MESSAGE_SENTIMENTZ)MARKETPLACE_IBM_WATSON_RECORDING_ANALYSISZ$MARKETPLACE_IBM_WATSON_TONE_ANALYZERZ!MARKETPLACE_ICEHOOK_SYSTEMS_SCOUTZ&MARKETPLACE_INFOGROUP_DATAAXLE_BIZINFOZ,MARKETPLACE_KEEN_IO_CONTACT_CENTER_ANALYTICSZMARKETPLACE_MARCHEX_CLEANCALLZ.MARKETPLACE_MARCHEX_SENTIMENT_ANALYSIS_FOR_SMSZ,MARKETPLACE_MARKETPLACE_NEXTCALLER_SOCIAL_IDZ-MARKETPLACE_MOBILE_COMMONS_OPT_OUT_CLASSIFIERZ&MARKETPLACE_NEXIWAVE_VOICEMAIL_TO_TEXTZ5MARKETPLACE_NEXTCALLER_ADVANCED_CALLER_IDENTIFICATIONZMARKETPLACE_NOMOROBO_SPAM_SCOREZ#MARKETPLACE_PAYFONE_TCPA_COMPLIANCEZ2MARKETPLACE_REMEETING_AUTOMATIC_SPEECH_RECOGNITIONZ1MARKETPLACE_TCPA_DEFENSE_SOLUTIONS_BLACKLIST_FEEDZMARKETPLACE_TELO_OPENCNAMZMARKETPLACE_TRUECNAM_TRUE_SPAMZ(MARKETPLACE_TWILIO_CALLER_NAME_LOOKUP_USZ-MARKETPLACE_TWILIO_CARRIER_INFORMATION_LOOKUPZMARKETPLACE_VOICEBASE_PCIZ#MARKETPLACE_VOICEBASE_TRANSCRIPTIONZ5MARKETPLACE_VOICEBASE_TRANSCRIPTION_CUSTOM_VOCABULARYZ0MARKETPLACE_WHITEPAGES_PRO_CALLER_IDENTIFICATIONZ-MARKETPLACE_WHITEPAGES_PRO_PHONE_INTELLIGENCEZ+MARKETPLACE_WHITEPAGES_PRO_PHONE_REPUTATIONZ"MARKETPLACE_WOLFARM_SPOKEN_RESULTSZ MARKETPLACE_WOLFRAM_SHORT_ANSWERZ4MARKETPLACE_YTICA_CONTACT_CENTER_REPORTING_ANALYTICSZMEDIASTORAGEZMMSZMMS_INBOUNDZMMS_INBOUND_LONGCODEZMMS_INBOUND_SHORTCODEZMMS_MESSAGES_CARRIERFEESZMMS_OUTBOUNDZMMS_OUTBOUND_LONGCODEZMMS_OUTBOUND_SHORTCODEZMONITOR_READSZMONITOR_STORAGEZMONITOR_WRITESZNOTIFYZNOTIFY_ACTIONS_ATTEMPTSZNOTIFY_CHANNELSZNUMBER_FORMAT_LOOKUPSZPCHATZPCHAT_USERSZ&PEER_TO_PEER_ROOMS_PARTICIPANT_MINUTESZPFAXZPFAX_MINUTESZPFAX_MINUTES_INBOUNDZPFAX_MINUTES_OUTBOUNDZ
PFAX_PAGESZPHONENUMBERSZPHONENUMBERS_CPSZPHONENUMBERS_EMERGENCYZPHONENUMBERS_LOCALZPHONENUMBERS_MOBILEZPHONENUMBERS_SETUPSZPHONENUMBERS_TOLLFREEZPREMIUMSUPPORTZPROXYZPROXY_ACTIVE_SESSIONSZPSTNCONNECTIVITYZPVZPV_COMPOSITION_MEDIA_DOWNLOADEDZPV_COMPOSITION_MEDIA_ENCRYPTEDZPV_COMPOSITION_MEDIA_STOREDZPV_COMPOSITION_MINUTESZPV_RECORDING_COMPOSITIONSZPV_ROOM_PARTICIPANTSZPV_ROOM_PARTICIPANTS_AU1ZPV_ROOM_PARTICIPANTS_BR1ZPV_ROOM_PARTICIPANTS_IE1ZPV_ROOM_PARTICIPANTS_JP1ZPV_ROOM_PARTICIPANTS_SG1ZPV_ROOM_PARTICIPANTS_US1ZPV_ROOM_PARTICIPANTS_US2ZPV_ROOMSZPV_SIP_ENDPOINT_REGISTRATIONSZ
RECORDINGSZRECORDINGSTORAGEZROOMS_GROUP_BANDWIDTHZROOMS_GROUP_MINUTESZROOMS_PEER_TO_PEER_MINUTESZ
SHORTCODESZSHORTCODES_CUSTOMEROWNEDZSHORTCODES_MMS_ENABLEMENTZSHORTCODES_MPSZSHORTCODES_RANDOMZSHORTCODES_UKZSHORTCODES_VANITYZSMALL_GROUP_ROOMSZSMALL_GROUP_ROOMS_DATA_TRACKZ%SMALL_GROUP_ROOMS_PARTICIPANT_MINUTESZSMSZSMS_INBOUNDZSMS_INBOUND_LONGCODEZSMS_INBOUND_SHORTCODEZSMS_MESSAGES_CARRIERFEESZSMS_MESSAGES_FEATURESZSMS_MESSAGES_FEATURES_SENDERIDZSMS_OUTBOUNDZSMS_OUTBOUND_CONTENT_INSPECTIONZSMS_OUTBOUND_LONGCODEZSMS_OUTBOUND_SHORTCODEZSPEECH_RECOGNITIONZSTUDIO_ENGAGEMENTSZSYNCZSYNC_ACTIONSZSYNC_ENDPOINT_HOURSZ#SYNC_ENDPOINT_HOURS_ABOVE_DAILY_CAPZTASKROUTER_TASKSZ
TOTALPRICEZTRANSCRIPTIONSZTRUNKING_CPSZTRUNKING_EMERGENCY_CALLSZTRUNKING_ORIGINATIONZTRUNKING_ORIGINATION_LOCALZTRUNKING_ORIGINATION_MOBILEZTRUNKING_ORIGINATION_TOLLFREEZTRUNKING_RECORDINGSZTRUNKING_SECUREZTRUNKING_TERMINATIONZTURNMEGABYTESZTURNMEGABYTES_AUSTRALIAZTURNMEGABYTES_BRASILZTURNMEGABYTES_GERMANYZTURNMEGABYTES_INDIAZTURNMEGABYTES_IRELANDZTURNMEGABYTES_JAPANZTURNMEGABYTES_SINGAPOREZTURNMEGABYTES_USEASTZTURNMEGABYTES_USWESTZTWILIO_INTERCONNECTZVERIFY_PUSHZVIDEO_RECORDINGSZVOICE_INSIGHTSZ/VOICE_INSIGHTS_CLIENT_INSIGHTS_ON_DEMAND_MINUTEZ-VOICE_INSIGHTS_PTSN_INSIGHTS_ON_DEMAND_MINUTEZ6VOICE_INSIGHTS_SIP_INTERFACE_INSIGHTS_ON_DEMAND_MINUTEZ5VOICE_INSIGHTS_SIP_TRUNKING_INSIGHTS_ON_DEMAND_MINUTEZWIRELESSZWIRELESS_ORDERSZWIRELESS_ORDERS_ARTWORKZWIRELESS_ORDERS_BULKZWIRELESS_ORDERS_ESIMZWIRELESS_ORDERS_STARTERZWIRELESS_USAGEZWIRELESS_USAGE_COMMANDSZWIRELESS_USAGE_COMMANDS_AFRICAZWIRELESS_USAGE_COMMANDS_ASIAZ.WIRELESS_USAGE_COMMANDS_CENTRALANDSOUTHAMERICAZWIRELESS_USAGE_COMMANDS_EUROPEZWIRELESS_USAGE_COMMANDS_HOMEZ$WIRELESS_USAGE_COMMANDS_NORTHAMERICAZWIRELESS_USAGE_COMMANDS_OCEANIAZWIRELESS_USAGE_COMMANDS_ROAMINGZWIRELESS_USAGE_DATAZWIRELESS_USAGE_DATA_AFRICAZWIRELESS_USAGE_DATA_ASIAZ*WIRELESS_USAGE_DATA_CENTRALANDSOUTHAMERICAZ'WIRELESS_USAGE_DATA_CUSTOM_ADDITIONALMBZ#WIRELESS_USAGE_DATA_CUSTOM_FIRST5MBZ$WIRELESS_USAGE_DATA_DOMESTIC_ROAMINGZWIRELESS_USAGE_DATA_EUROPEZ+WIRELESS_USAGE_DATA_INDIVIDUAL_ADDITIONALGBZ&WIRELESS_USAGE_DATA_INDIVIDUAL_FIRSTGBZ0WIRELESS_USAGE_DATA_INTERNATIONAL_ROAMING_CANADAZ/WIRELESS_USAGE_DATA_INTERNATIONAL_ROAMING_INDIAZ0WIRELESS_USAGE_DATA_INTERNATIONAL_ROAMING_MEXICOZ WIRELESS_USAGE_DATA_NORTHAMERICAZWIRELESS_USAGE_DATA_OCEANIAZWIRELESS_USAGE_DATA_POOLEDZ#WIRELESS_USAGE_DATA_POOLED_DOWNLINKZ!WIRELESS_USAGE_DATA_POOLED_UPLINKZWIRELESS_USAGE_MRCZWIRELESS_USAGE_MRC_CUSTOMZWIRELESS_USAGE_MRC_INDIVIDUALZWIRELESS_USAGE_MRC_POOLEDZWIRELESS_USAGE_MRC_SUSPENDEDZWIRELESS_USAGE_SMSZWIRELESS_USAGE_VOICEr   r   r   r   r   H  sÚ  r   c               @   s   e Zd ZdZdZdZdZdS )zTriggerInstance.RecurringZdailyZmonthlyZyearlyZalltimeN)r<   r=   r>   ZDAILYZMONTHLYZYEARLYZALLTIMEr   r   r   r   r   7  s   r   c               @   s   e Zd ZdZdZdZdS )zTriggerInstance.TriggerFieldÚcountÚusageZpriceN)r<   r=   r>   ZCOUNTÚUSAGEZPRICEr   r   r   r   ÚTriggerField=  s   rV   Nc                sÊ   t t| ƒ |¡ | d¡| d¡| d¡| d¡| d¡t | d¡¡t | d¡¡t | d¡¡| d	¡| d
¡| d¡| d¡| d¡| d¡| d¡| d¡dœ| _d| _||p¾| jd dœ| _dS )zË
        Initialize the TriggerInstance

        :returns: twilio.rest.api.v2010.account.usage.trigger.TriggerInstance
        :rtype: twilio.rest.api.v2010.account.usage.trigger.TriggerInstance
        r	   Úapi_versionr%   r"   Úcurrent_valueÚdate_createdÚ
date_firedÚdate_updatedr&   r'   r7   r(   r#   r   r$   Úusage_record_uri)r	   rW   r%   r"   rX   rY   rZ   r[   r&   r'   r7   r(   r#   r   r$   r\   N)r	   r7   )	r
   r!   r   r9   r   Zrfc2822_datetimeÚ_propertiesÚ_contextr   )r   r   r)   r	   r7   )r   r   r   r   B  s&    zTriggerInstance.__init__c             C   s.   | j dkr(t| j| jd | jd d| _ | j S )a5  
        Generate an instance context for the instance, the context is capable of
        performing various actions.  All instance actions are proxied to the context

        :returns: TriggerContext for this TriggerInstance
        :rtype: twilio.rest.api.v2010.account.usage.trigger.TriggerContext
        Nr	   r7   )r	   r7   )r^   r8   r   r   )r   r   r   r   Ú_proxyc  s    	
zTriggerInstance._proxyc             C   s
   | j d S )ze
        :returns: The SID of the Account that this trigger monitors
        :rtype: unicode
        r	   )r]   )r   r   r   r   r	   t  s    zTriggerInstance.account_sidc             C   s
   | j d S )z_
        :returns: The API version used to create the resource
        :rtype: unicode
        rW   )r]   )r   r   r   r   rW   |  s    zTriggerInstance.api_versionc             C   s
   | j d S )z_
        :returns: The HTTP method we use to call callback_url
        :rtype: unicode
        r%   )r]   )r   r   r   r   r%   „  s    zTriggerInstance.callback_methodc             C   s
   | j d S )zY
        :returns: he URL we call when the trigger fires
        :rtype: unicode
        r"   )r]   )r   r   r   r   r"   Œ  s    zTriggerInstance.callback_urlc             C   s
   | j d S )zj
        :returns: The current value of the field the trigger is watching
        :rtype: unicode
        rX   )r]   )r   r   r   r   rX   ”  s    zTriggerInstance.current_valuec             C   s
   | j d S )zt
        :returns: The RFC 2822 date and time in GMT that the resource was created
        :rtype: datetime
        rY   )r]   )r   r   r   r   rY   œ  s    zTriggerInstance.date_createdc             C   s
   | j d S )zv
        :returns: The RFC 2822 date and time in GMT that the trigger was last fired
        :rtype: datetime
        rZ   )r]   )r   r   r   r   rZ   ¤  s    zTriggerInstance.date_firedc             C   s
   | j d S )zy
        :returns: The RFC 2822 date and time in GMT that the resource was last updated
        :rtype: datetime
        r[   )r]   )r   r   r   r   r[   ¬  s    zTriggerInstance.date_updatedc             C   s
   | j d S )zh
        :returns: The string that you assigned to describe the trigger
        :rtype: unicode
        r&   )r]   )r   r   r   r   r&   ´  s    zTriggerInstance.friendly_namec             C   s
   | j d S )zo
        :returns: The frequency of a recurring UsageTrigger
        :rtype: TriggerInstance.Recurring
        r'   )r]   )r   r   r   r   r'   ¼  s    zTriggerInstance.recurringc             C   s
   | j d S )zb
        :returns: The unique string that identifies the resource
        :rtype: unicode
        r7   )r]   )r   r   r   r   r7   Ä  s    zTriggerInstance.sidc             C   s
   | j d S )z…
        :returns: The field in the UsageRecord resource that fires the trigger
        :rtype: TriggerInstance.TriggerField
        r(   )r]   )r   r   r   r   r(   Ì  s    zTriggerInstance.trigger_byc             C   s
   | j d S )z\
        :returns: The value at which the trigger will fire
        :rtype: unicode
        r#   )r]   )r   r   r   r   r#   Ô  s    zTriggerInstance.trigger_valuec             C   s
   | j d S )zq
        :returns: The URI of the resource, relative to `https://api.twilio.com`
        :rtype: unicode
        r   )r]   )r   r   r   r   r   Ü  s    zTriggerInstance.uric             C   s
   | j d S )zp
        :returns: The usage category the trigger watches
        :rtype: TriggerInstance.UsageCategory
        r$   )r]   )r   r   r   r   r$   ä  s    zTriggerInstance.usage_categoryc             C   s
   | j d S )zl
        :returns: The URI of the UsageRecord resource this trigger watches
        :rtype: unicode
        r\   )r]   )r   r   r   r   r\   ì  s    z TriggerInstance.usage_record_uric             C   s
   | j  ¡ S )z¦
        Fetch the TriggerInstance

        :returns: The fetched TriggerInstance
        :rtype: twilio.rest.api.v2010.account.usage.trigger.TriggerInstance
        )r_   rB   )r   r   r   r   rB   ô  s    zTriggerInstance.fetchc             C   s   | j j|||dS )a  
        Update the TriggerInstance

        :param unicode callback_method: The HTTP method to use to call callback_url
        :param unicode callback_url: The URL we call when the trigger fires
        :param unicode friendly_name: A string to describe the resource

        :returns: The updated TriggerInstance
        :rtype: twilio.rest.api.v2010.account.usage.trigger.TriggerInstance
        )r%   r"   r&   )r_   rC   )r   r%   r"   r&   r   r   r   rC   ý  s    zTriggerInstance.updatec             C   s
   | j  ¡ S )z~
        Deletes the TriggerInstance

        :returns: True if delete succeeds, False otherwise
        :rtype: bool
        )r_   rE   )r   r   r   r   rE     s    zTriggerInstance.deletec             C   s$   d  dd„ | j ¡ D ƒ¡}d |¡S )zz
        Provide a friendly representation

        :returns: Machine friendly representation
        :rtype: str
        rF   c             s   s   | ]\}}d   ||¡V  qdS )z{}={}N)r   )rG   rH   rI   r   r   r   rJ     s    z+TriggerInstance.__repr__.<locals>.<genexpr>z%<Twilio.Api.V2010.TriggerInstance {}>)rK   r   rL   r   )r   rM   r   r   r   r;     s    zTriggerInstance.__repr__)N)!r<   r=   r>   Úobjectr   r   rV   r   Úpropertyr_   r	   rW   r%   r"   rX   rY   rZ   r[   r&   r'   r7   r(   r#   r   r$   r\   rB   r   r?   rC   rE   r;   r@   r   r   )r   r   r!   F  s6    p!		r!   N)Ú__doc__Ztwilio.baser   r   Ztwilio.base.instance_contextr   Ztwilio.base.instance_resourcer   Ztwilio.base.list_resourcer   Ztwilio.base.pager   r   r1   r8   r!   r   r   r   r   Ú<module>   s    ='R