
    pi                         d Z ddlmZ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Union)	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 )MessagingGeopermissionsInstanceam  
    :ivar permissions: A list of objects where each object represents the result of processing a messaging Geo Permission. Each object contains the following fields: `country_code`, the country code of the country for which the permission was updated; `type`, the type of the permission i.e. country; `enabled`, true if the permission is enabled else false; `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permissions)super__init__getr   )selfr   r   	__class__s      r/opt/services/ai/voice_agent/venv/lib/python3.12/site-packages/twilio/rest/accounts/v1/messaging_geopermissions.pyr   z(MessagingGeopermissionsInstance.__init__   s!    !8?M8R    returnc                      y)f
        Provide a friendly representation

        :returns: Machine friendly representation
        z4<Twilio.Accounts.V1.MessagingGeopermissionsInstance> r   s    r   __repr__z(MessagingGeopermissionsInstance.__repr__!   s     Fr   )__name__
__module____qualname____doc__r   r   strr   r   r   __classcell__r   s   @r   r   r      s4    S S$sCx. S
F# Fr   r   c                        e Zd Zdef fdZej                  fdeee	f   de
fdZej                  fdeee	f   de
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 )MessagingGeopermissionsListr   c                 2    t         |   |       d| _        y)zy
        Initialize the MessagingGeopermissionsList

        :param version: Version that contains the resource

        z/Messaging/GeoPermissionsN)r   r   _uri)r   r   r   s     r   r   z$MessagingGeopermissionsList.__init__-   s     	!/	r   country_coder   c                     t        j                  ddi      }d|d<   t        j                  d|i      }| j                  j                  d| j                  ||      }t        | j                  |      S )'  
        Asynchronously fetch the MessagingGeopermissionsInstance

        :param country_code: The country code to filter the geo permissions. If provided, only the geo permission for the specified country will be returned.
        :returns: The fetched MessagingGeopermissionsInstance
        Content-Type!application/x-www-form-urlencodedapplication/jsonAcceptCountryCodeGETmethoduriheadersparams)r	   of_versionfetchr*   r   r   r+   r7   r8   r   s        r   r;   z!MessagingGeopermissionsList.fetch8   su     ))^-PQR.|
 --%%dii & 
 /t}}gFFr   c                   K   t        j                  ddi      }d|d<   t        j                  d|i      }| j                  j                  d| j                  ||       d{   }t        | j                  |      S 7 w)	r-   r.   r/   r0   r1   r2   r3   r4   N)r	   r9   r:   fetch_asyncr*   r   r<   s        r   r>   z'MessagingGeopermissionsList.fetch_asyncQ   s      ))^-PQR.|
 11dii 2 
 
 /t}}gFF	
s   A A?"A=#A?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 )	a  
        Update the MessagingGeopermissionsInstance

        :param permissions: A list of objects where each object represents the Geo Permission to be updated. Each object contains the following fields: `country_code`, unique code for each country of Geo Permission; `type`, permission type of the Geo Permission i.e. country; `enabled`, configure true for enabling the Geo Permission, false for disabling the Geo Permission.

        :returns: The created MessagingGeopermissionsInstance
        Permissionsc                 ,    t        j                  |       S Nr   objectes    r   <lambda>z4MessagingGeopermissionsList.update.<locals>.<lambda>v       9+;+;A+> r   r.   r/   r0   r1   PATCHr5   r6   datar7   )r	   r9   r   mapr:   updater*   r   r   r   rK   r7   r   s        r   rM   z"MessagingGeopermissionsList.updatej   s     yyy}}!> 
 ))^-PQR"E.--&&		g ' 
 /t}}gFFr   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 update the MessagingGeopermissionsInstance

        :param permissions: A list of objects where each object represents the Geo Permission to be updated. Each object contains the following fields: `country_code`, unique code for each country of Geo Permission; `type`, permission type of the Geo Permission i.e. country; `enabled`, configure true for enabling the Geo Permission, false for disabling the Geo Permission.

        :returns: The created MessagingGeopermissionsInstance
        r@   c                 ,    t        j                  |       S rB   rC   rE   s    r   rG   z:MessagingGeopermissionsList.update_async.<locals>.<lambda>   rH   r   r.   r/   r0   r1   rI   rJ   N)r	   r9   r   rL   r:   update_asyncr*   r   rN   s        r   rQ   z(MessagingGeopermissionsList.update_async   s      yyy}}!> 
 ))^-PQR"E.22		g 3 
 
 /t}}gFF	
s   A:B<B=Bc                      y)r   z0<Twilio.Accounts.V1.MessagingGeopermissionsList>r   r   s    r   r   z$MessagingGeopermissionsList.__repr__   s     Br   )r    r!   r"   r   r   r	   unsetr   r$   rD   r   r;   r>   r   rM   rQ   r   r%   r&   s   @r   r(   r(   +   s    	0 	0 28G!#v+.G	(G4 28G!#v+.G	(G2G$v, G3R G8G<G	(G<B# Br   r(   N)r#   typingr   r   r   r   r   twilio.baser   r	   twilio.base.instance_resourcer
   twilio.base.list_resourcer   twilio.base.versionr   r   r(   r   r   r   <module>rY      s=    4 3 ) : 2 'F&6 F(B, Br   