
    piO                         d Z ddlm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 ddlmZ  G d	 d
e      Z G d de      Z G d de      Zy)a  
    This code was generated by
   ___ _ _ _ _ _    _ ____    ____ ____ _    ____ ____ _  _ ____ ____ ____ ___ __   __
    |  | | | | |    | |  | __ |  | |__| | __ | __ |___ |\ | |___ |__/ |__|  | |  | |__/
    |  |_|_| | |___ | |__|    |__| |  | |    |__] |___ | \| |___ |  \ |  |  | |__| |  \

    Twilio - Iam
    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.
    )datetime)AnyDictListOptional)deserializevalues)InstanceContext)InstanceResource)ListResource)Versionc                        e Zd Z G d de      Z G d de      Z G d de      Z G d de      Z	 	 dd	ed
e	e
ef   dee
   f fdZedd       ZdefdZdefdZdedd fdZdedd fdZde
fdZ xZS )OAuthAppInstancec                   ,    e Zd ZdZdeeef   fdZd Zy)8OAuthAppInstance.IamV1AccountVendorOauthAppCreateRequest
        :ivar type:
        :ivar friendly_name:
        :ivar owner_sid:
        :ivar description:
        :ivar client_sid:
        :ivar policy:
        :ivar access_token_ttl:
        payloadc                 8   |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        y Ntypefriendly_name	owner_siddescription
client_sidpolicyaccess_token_ttlgetr   r   r   r   r   r   r   selfr   s     _/opt/services/ai/voice_agent/venv/lib/python3.12/site-packages/twilio/rest/iam/v1/o_auth_app.py__init__zAOAuthAppInstance.IamV1AccountVendorOauthAppCreateRequest.__init__%   }    '.{{6':DI07O0LD,3KK,DDN.5kk-.HD-4[[-FDO H% K 4;;;?Q3RD!    c                     | j                   | j                  | j                  | j                  | j                  | j
                  | j
                  j                         nd | j                  dS N)r   r   r   r   r   r   r   r   r   r   r   r   r   to_dictr   r    s    r!   r(   z@OAuthAppInstance.IamV1AccountVendorOauthAppCreateRequest.to_dict1   X    		!%!3!3!^^#//"oo37;;3J$++--/PT$($9$9 r$   N	__name__
__module____qualname____doc__r   strr   r"   r(    r$   r!   'IamV1AccountVendorOauthAppCreateRequestr      "    	
	SDcN 
	S		r$   r2   c                   ,    e Zd ZdZdeeef   fdZd Zy)8OAuthAppInstance.IamV1AccountVendorOauthAppUpdateRequest
        :ivar type:
        :ivar friendly_name:
        :ivar description:
        :ivar policy:
        :ivar access_token_ttl:
        r   c                     |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        y Nr   r   r   r   r   r   r   r   r   r   r   r   s     r!   r"   zAOAuthAppInstance.IamV1AccountVendorOauthAppUpdateRequest.__init__E   ]    '.{{6':DI07O0LD.5kk-.HD H% K 4;;;?Q3RD!r$   c                     | j                   | j                  | j                  | j                  | j                  j	                         nd | j
                  dS N)r   r   r   r   r   r   r   r   r   r(   r   r)   s    r!   r(   z@OAuthAppInstance.IamV1AccountVendorOauthAppUpdateRequest.to_dictO   J    		!%!3!3#//37;;3J$++--/PT$($9$9 r$   Nr+   r1   r$   r!   'IamV1AccountVendorOauthAppUpdateRequestr5   <   "    		SDcN 	S	r$   r?   c                   ,    e Zd ZdZdeeef   fdZd Zy)COAuthAppInstance.IamV1OrganizationVendorOauthAppUpdateRequestPolicy}
        :ivar allow: Set of permissions explicitly allowed
        :ivar deny: Set of permissions explicitly denied
        r   c                 \    |j                  d      | _        |j                  d      | _        y Nallowdenyr   rF   rG   r   s     r!   r"   zLOAuthAppInstance.IamV1OrganizationVendorOauthAppUpdateRequestPolicy.__init__^   "    .5kk'.BDJ-4[[-@DIr$   c                 4    | j                   | j                  dS NrF   rG   rL   r)   s    r!   r(   zKOAuthAppInstance.IamV1OrganizationVendorOauthAppUpdateRequestPolicy.to_dictc       		 r$   Nr+   r1   r$   r!   2IamV1OrganizationVendorOauthAppUpdateRequestPolicyrB   X   "    	
	ADcN 	A
	r$   rN   c                   ,    e Zd ZdZdeeef   fdZd Zy)6OAuthAppInstance.IamV1OrganizationVendoroauthappPolicyrC   r   c                 \    |j                  d      | _        |j                  d      | _        y rE   rH   r   s     r!   r"   z?OAuthAppInstance.IamV1OrganizationVendoroauthappPolicy.__init__o   rI   r$   c                 4    | j                   | j                  dS rK   rL   r)   s    r!   r(   z>OAuthAppInstance.IamV1OrganizationVendoroauthappPolicy.to_dictt   rM   r$   Nr+   r1   r$   r!   %IamV1OrganizationVendoroauthappPolicyrQ   i   rO   r$   rT   versionr   sidc                    t         |   |       |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        t        j                  |j                  d            | _	        |j                  d      | _
        |j                  d      | _        |j                  d      | _        |j                  d	      | _        t        j                  |j                  d
            | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        d|xs | j                  i| _        d | _        y )Nr   rV   r   r   date_created
created_bysecretstatusr   r   codemessage	more_info)superr"   r   r   rV   r   r   r   iso8601_datetimerX   rY   rZ   r[   r   integerr   r\   r]   r^   	_solution_context)r    rU   r   rV   	__class__s       r!   r"   zOAuthAppInstance.__init__   s(    	!#*;;v#6	")++e"4,3KK,H*1++m*D0;0L0LKK'1
 *1\)B%,[[%:%,[[%:%,[[%:/:/B/BKK*+0
 $+;;v#6	&-kk)&<(/K(@ 3?$((
 48r$   returnc                     | j                   )t        | j                  | j                  d         | _         | j                   S )z
        Generate an instance context for the instance, the context is capable of
        performing various actions. All instance actions are proxied to the context

        :returns: OAuthAppContext for this OAuthAppInstance
        rV   rV   )rc   OAuthAppContext_versionrb   r)   s    r!   _proxyzOAuthAppInstance._proxy   s9     == +NN5)DM }}r$   c                 6    | j                   j                         S )k
        Deletes the OAuthAppInstance


        :returns: True if delete succeeds, False otherwise
        )rj   deleter)   s    r!   rm   zOAuthAppInstance.delete   s     {{!!##r$   c                 R   K   | j                   j                          d{   S 7 w)
        Asynchronous coroutine that deletes the OAuthAppInstance


        :returns: True if delete succeeds, False otherwise
        N)rj   delete_asyncr)   s    r!   rp   zOAuthAppInstance.delete_async   s!      [[--////s   '%'.iam_v1_account_vendor_oauth_app_update_requestc                 :    | j                   j                  |      S )
        Update the OAuthAppInstance

        :param iam_v1_account_vendor_oauth_app_update_request:

        :returns: The updated OAuthAppInstance
        rq   )rj   updater    rq   s     r!   ru   zOAuthAppInstance.update   s#     {{!!;i " 
 	
r$   c                 V   K   | j                   j                  |       d{   S 7 w)
        Asynchronous coroutine to update the OAuthAppInstance

        :param iam_v1_account_vendor_oauth_app_update_request:

        :returns: The updated OAuthAppInstance
        rt   N)rj   update_asyncrv   s     r!   ry   zOAuthAppInstance.update_async   s1      [[--;i . 
 
 	
 
s    )')c                     dj                  d | j                  j                         D              }dj                  |      S )f
        Provide a friendly representation

        :returns: Machine friendly representation
         c              3   F   K   | ]  \  }}d j                  ||        ywz{}={}Nformat.0kvs      r!   	<genexpr>z,OAuthAppInstance.__repr__.<locals>.<genexpr>        SDAq7>>!Q/S   !z#<Twilio.Iam.V1.OAuthAppInstance {}>joinrb   itemsr   r    contexts     r!   __repr__zOAuthAppInstance.__repr__   s6     ((SDNN<P<P<RSS4;;GDDr$   )N)re   rh   )r,   r-   r.   objectr2   r?   rN   rT   r   r   r0   r   r   r"   propertyrj   boolrm   rp   ru   ry   r   __classcell__rd   s   @r!   r   r      s     &  D& 8V " "" OS88)-c3h8>Fsm88  $ $0D 0
8_
 


8_
 

E# Er$   r   c                        e Zd Z G d de      Z G d de      Z G d de      Z G d de      Zd	ed
e	f fdZ
defdZdefdZdedefdZdedefdZde	fdZ xZS )rh   c                   ,    e Zd ZdZdeeef   fdZd Zy)7OAuthAppContext.IamV1AccountVendorOauthAppCreateRequestr   r   c                 8   |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        y r   r   r   s     r!   r"   z@OAuthAppContext.IamV1AccountVendorOauthAppCreateRequest.__init__   r#   r$   c                     | j                   | j                  | j                  | j                  | j                  | j
                  | j
                  j                         nd | j                  dS r&   r'   r)   s    r!   r(   z?OAuthAppContext.IamV1AccountVendorOauthAppCreateRequest.to_dict  r*   r$   Nr+   r1   r$   r!   r2   r      r3   r$   r2   c                   ,    e Zd ZdZdeeef   fdZd Zy)7OAuthAppContext.IamV1AccountVendorOauthAppUpdateRequestr6   r   c                     |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        y r8   r9   r   s     r!   r"   z@OAuthAppContext.IamV1AccountVendorOauthAppUpdateRequest.__init__  r:   r$   c                     | j                   | j                  | j                  | j                  | j                  j	                         nd | j
                  dS r<   r=   r)   s    r!   r(   z?OAuthAppContext.IamV1AccountVendorOauthAppUpdateRequest.to_dict&  r>   r$   Nr+   r1   r$   r!   r?   r     r@   r$   r?   c                   ,    e Zd ZdZdeeef   fdZd Zy)BOAuthAppContext.IamV1OrganizationVendorOauthAppUpdateRequestPolicyrC   r   c                 \    |j                  d      | _        |j                  d      | _        y rE   rH   r   s     r!   r"   zKOAuthAppContext.IamV1OrganizationVendorOauthAppUpdateRequestPolicy.__init__5  rI   r$   c                 4    | j                   | j                  dS rK   rL   r)   s    r!   r(   zJOAuthAppContext.IamV1OrganizationVendorOauthAppUpdateRequestPolicy.to_dict:  rM   r$   Nr+   r1   r$   r!   rN   r   /  rO   r$   rN   c                   ,    e Zd ZdZdeeef   fdZd Zy)5OAuthAppContext.IamV1OrganizationVendoroauthappPolicyrC   r   c                 \    |j                  d      | _        |j                  d      | _        y rE   rH   r   s     r!   r"   z>OAuthAppContext.IamV1OrganizationVendoroauthappPolicy.__init__F  rI   r$   c                 4    | j                   | j                  dS rK   rL   r)   s    r!   r(   z=OAuthAppContext.IamV1OrganizationVendoroauthappPolicy.to_dictK  rM   r$   Nr+   r1   r$   r!   rT   r   @  rO   r$   rT   rU   rV   c                 x    t         |   |       d|i| _         dj                  di | j                  | _        y)z
        Initialize the OAuthAppContext

        :param version: Version that contains the resource
        :param sid: Unique ID (sid) of the OAuth app
        rV   z/Account/OAuthApps/{sid}Nr1   )r_   r"   rb   r   _uri)r    rU   rV   rd   s      r!   r"   zOAuthAppContext.__init__Q  s@     	! 3
 6.55GG	r$   re   c                     t        j                  i       }d|d<   | j                  j                  d| j                  |      S )rl   application/jsonAcceptDELETEmethoduriheaders)r	   ofri   rm   r   r    r   s     r!   rm   zOAuthAppContext.delete`  s;     ))B-.}}##8G#TTr$   c                    K   t        j                  i       }d|d<   | j                  j                  d| j                  |       d{   S 7 w)ro   r   r   r   r   N)r	   r   ri   rp   r   r   s     r!   rp   zOAuthAppContext.delete_asyncn  sP      ))B-.]]//G 0 
 
 	
 
s   AAA	Arq   c                     |j                         }t        j                  i       }d|d<   d|d<   | j                  j	                  d| j
                  ||      }t        | j                  || j                  d         S )rs   r   Content-Typer   PUTr   r   datar   rV   rg   )r(   r	   r   ri   ru   r   r   rb   r    rq   r   r   r   s        r!   ru   zOAuthAppContext.update~  sw     >EEG))B-"4.--&&diidG ' 
  wDNN5<QRRr$   c                   K   |j                         }t        j                  i       }d|d<   d|d<   | j                  j	                  d| j
                  ||       d{   }t        | j                  || j                  d         S 7 )w)	rx   r   r   r   r   r   NrV   rg   )r(   r	   r   ri   ry   r   r   rb   r   s        r!   ry   zOAuthAppContext.update_async  s      >EEG))B-"4.22diidG 3 
 
  wDNN5<QRR	
s   AB
B*B
c                     dj                  d | j                  j                         D              }dj                  |      S )r{   r|   c              3   F   K   | ]  \  }}d j                  ||        ywr~   r   r   s      r!   r   z+OAuthAppContext.__repr__.<locals>.<genexpr>  r   r   z"<Twilio.Iam.V1.OAuthAppContext {}>r   r   s     r!   r   zOAuthAppContext.__repr__  s6     ((SDNN<P<P<RSS3::7CCr$   )r,   r-   r.   r   r2   r?   rN   rT   r   r0   r"   r   rm   rp   r   ru   ry   r   r   r   s   @r!   rh   rh      s     &  D& 8V " "H Hc HU U
D 
 S8_S 
S2S8_S 
S2D# Dr$   rh   c                        e Zd Z G d de      Z G d de      Z G d de      Z G d de      Zd	ef fd
Z	dede
fdZdede
fdZdedefdZdedefdZdefdZ xZS )OAuthAppListc                   ,    e Zd ZdZdeeef   fdZd Zy)4OAuthAppList.IamV1AccountVendorOauthAppCreateRequestr   r   c                 8   |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        y r   r   r   s     r!   r"   z=OAuthAppList.IamV1AccountVendorOauthAppCreateRequest.__init__  r#   r$   c                     | j                   | j                  | j                  | j                  | j                  | j
                  | j
                  j                         nd | j                  dS r&   r'   r)   s    r!   r(   z<OAuthAppList.IamV1AccountVendorOauthAppCreateRequest.to_dict  r*   r$   Nr+   r1   r$   r!   r2   r     r3   r$   r2   c                   ,    e Zd ZdZdeeef   fdZd Zy)4OAuthAppList.IamV1AccountVendorOauthAppUpdateRequestr6   r   c                     |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        y r8   r9   r   s     r!   r"   z=OAuthAppList.IamV1AccountVendorOauthAppUpdateRequest.__init__  r:   r$   c                     | j                   | j                  | j                  | j                  | j                  j	                         nd | j
                  dS r<   r=   r)   s    r!   r(   z<OAuthAppList.IamV1AccountVendorOauthAppUpdateRequest.to_dict  r>   r$   Nr+   r1   r$   r!   r?   r     r@   r$   r?   c                   ,    e Zd ZdZdeeef   fdZd Zy)?OAuthAppList.IamV1OrganizationVendorOauthAppUpdateRequestPolicyrC   r   c                 \    |j                  d      | _        |j                  d      | _        y rE   rH   r   s     r!   r"   zHOAuthAppList.IamV1OrganizationVendorOauthAppUpdateRequestPolicy.__init__   rI   r$   c                 4    | j                   | j                  dS rK   rL   r)   s    r!   r(   zGOAuthAppList.IamV1OrganizationVendorOauthAppUpdateRequestPolicy.to_dict  rM   r$   Nr+   r1   r$   r!   rN   r     rO   r$   rN   c                   ,    e Zd ZdZdeeef   fdZd Zy)2OAuthAppList.IamV1OrganizationVendoroauthappPolicyrC   r   c                 \    |j                  d      | _        |j                  d      | _        y rE   rH   r   s     r!   r"   z;OAuthAppList.IamV1OrganizationVendoroauthappPolicy.__init__  rI   r$   c                 4    | j                   | j                  dS rK   rL   r)   s    r!   r(   z:OAuthAppList.IamV1OrganizationVendoroauthappPolicy.to_dict  rM   r$   Nr+   r1   r$   r!   rT   r     rO   r$   rT   rU   c                 2    t         |   |       d| _        y)zj
        Initialize the OAuthAppList

        :param version: Version that contains the resource

        z/Account/OAuthAppsN)r_   r"   r   )r    rU   rd   s     r!   r"   zOAuthAppList.__init__  s     	!(	r$   .iam_v1_account_vendor_oauth_app_create_requestre   c                     |j                         }t        j                  ddi      }d|d<   d|d<   | j                  j	                  d| j
                  ||      }t        | j                  |      S )z
        Create the OAuthAppInstance

        :param iam_v1_account_vendor_oauth_app_create_request:

        :returns: The created OAuthAppInstance
        r   !application/x-www-form-urlencodedr   r   POSTr   )r(   r	   r   ri   creater   r   r    r   r   r   r   s        r!   r   zOAuthAppList.create'  ss     >EEG))^-PQR"4.--&&tyytW ' 
  w77r$   c                    K   |j                         }t        j                  ddi      }d|d<   d|d<   | j                  j	                  d| j
                  ||       d{   }t        | j                  |      S 7 w)z
        Asynchronously create the OAuthAppInstance

        :param iam_v1_account_vendor_oauth_app_create_request:

        :returns: The created OAuthAppInstance
        r   r   r   r   r   r   N)r(   r	   r   ri   create_asyncr   r   r   s        r!   r   zOAuthAppList.create_async@  s      >EEG))^-PQR"4.22tyytW 3 
 
  w77	
s   AA= A;!A=rV   c                 0    t        | j                  |      S zd
        Constructs a OAuthAppContext

        :param sid: Unique ID (sid) of the OAuth app
        rg   rh   ri   r    rV   s     r!   r   zOAuthAppList.getY       t}}#66r$   c                 0    t        | j                  |      S r   r   r   s     r!   __call__zOAuthAppList.__call__a  r   r$   c                      y)r{   z<Twilio.Iam.V1.OAuthAppList>r1   r)   s    r!   r   zOAuthAppList.__repr__i  s     .r$   )r,   r-   r.   r   r2   r?   rN   rT   r   r"   r   r   r   r0   rh   r   r   r   r   r   s   @r!   r   r     s     &  D& 8V " "	) 	)88_8 
8288_8 
827s 7 77C 7O 7.# .r$   r   N)r/   r   typingr   r   r   r   twilio.baser   r	   twilio.base.instance_contextr
   twilio.base.instance_resourcer   twilio.base.list_resourcer   twilio.base.versionr   r   rh   r   r1   r$   r!   <module>r      sU     , , + 8 : 2 'TE' TEnHDo HDVu.< u.r$   