
    d{i9`                         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	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e      Z G d de      Z G d de      Zy)a  
    This code was generated by
   ___ _ _ _ _ _    _ ____    ____ ____ _    ____ ____ _  _ ____ ____ ____ ___ __   __
    |  | | | | |    | |  | __ |  | |__| | __ | __ |___ |\ | |___ |__/ |__|  | |  | |__/
    |  |_|_| | |___ | |__|    |__| |  | |    |__] |___ | \| |___ |  \ |  |  | |__| |  \

    Twilio - Messaging
    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OptionalUnion)deserialize	serializevalues)ApiResponse)InstanceContext)InstanceResource)ListResource)Versionc                       e Zd ZdZ	 ddedeeef   dee   f fdZ	e
dd       ZddZdd	Zdefd
ZdefdZej$                  ej$                  ej$                  ej$                  fdeeef   deeef   deeef   deeef   dd f
dZej$                  ej$                  ej$                  ej$                  fdeeef   deeef   deeef   deeef   dd f
dZej$                  ej$                  ej$                  ej$                  fdeeef   deeef   deeef   deeef   def
dZej$                  ej$                  ej$                  ej$                  fdeeef   deeef   deeef   deeef   def
dZdefdZ xZS )DomainConfigInstancea  
    :ivar domain_sid: The unique string that we created to identify the Domain resource.
    :ivar config_sid: The unique string that we created to identify the Domain config (prefix ZK).
    :ivar fallback_url: Any requests we receive to this domain that do not match an existing shortened message will be redirected to the fallback url. These will likely be either expired messages, random misdirected traffic, or intentional scraping.
    :ivar callback_url: URL to receive click events to your webhook whenever the recipients click on the shortened links.
    :ivar continue_on_failure: Boolean field to set customer delivery preference when there is a failure in linkShortening service
    :ivar date_created: Date this Domain Config was created.
    :ivar date_updated: Date that this Domain Config was last updated.
    :ivar url:
    :ivar disable_https: Customer's choice to send links with/without "https://" attached to shortened url. If true, messages will not be sent with https:// at the beginning of the url. If false, messages will be sent with https:// at the beginning of the url. False is the default behavior if it is not specified.
    versionpayload
domain_sidc                 8   t         |   |       |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        t        j                  |j                  d            | _
        t        j                  |j                  d            | _        |j                  d      | _        |j                  d	      | _        d|xs | j                  i| _        d | _        y )
Nr   
config_sidfallback_urlcallback_urlcontinue_on_failuredate_createddate_updatedurldisable_https)super__init__getr   r   r   r   r   r   iso8601_datetimer   r   r   r   	_solution_context)selfr   r   r   	__class__s       d/home/sas/my/fyp/ringai/.venv/lib/python3.12/site-packages/twilio/rest/messaging/v1/domain_config.pyr   zDomainConfigInstance.__init__&   s     	!)0\)B)0\)B+2;;~+F+2;;~+F3:;;?T3U 0;0L0LKK'1
 1<0L0LKK'1
 #*++e"4-4[[-I *7
 8<    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: DomainConfigContext for this DomainConfigInstance
        r   r   )r#   DomainConfigContext_versionr"   r$   s    r&   _proxyzDomainConfigInstance._proxyA   s9     == />>,7DM }}r'   c                 6    | j                   j                         S )e
        Fetch the DomainConfigInstance


        :returns: The fetched DomainConfigInstance
        )r.   fetchr-   s    r&   r1   zDomainConfigInstance.fetchP   s     {{  ""r'   c                 R   K   | j                   j                          d{   S 7 w)
        Asynchronous coroutine to fetch the DomainConfigInstance


        :returns: The fetched DomainConfigInstance
        N)r.   fetch_asyncr-   s    r&   r4   z DomainConfigInstance.fetch_asyncY   s!      [[,,....   '%'c                 6    | j                   j                         S )z
        Fetch the DomainConfigInstance with HTTP info


        :returns: ApiResponse with instance, status code, and headers
        )r.   fetch_with_http_infor-   s    r&   r7   z)DomainConfigInstance.fetch_with_http_infob   s     {{//11r'   c                 R   K   | j                   j                          d{   S 7 w)z
        Asynchronous coroutine to fetch the DomainConfigInstance with HTTP info


        :returns: ApiResponse with instance, status code, and headers
        N)r.   fetch_with_http_info_asyncr-   s    r&   r9   z/DomainConfigInstance.fetch_with_http_info_asynck   s!      [[;;====r5   r   r   r   r   c                 @    | j                   j                  ||||      S )  
        Update the DomainConfigInstance

        :param fallback_url: Any requests we receive to this domain that do not match an existing shortened message will be redirected to the fallback url. These will likely be either expired messages, random misdirected traffic, or intentional scraping.
        :param callback_url: URL to receive click events to your webhook whenever the recipients click on the shortened links
        :param continue_on_failure: Boolean field to set customer delivery preference when there is a failure in linkShortening service
        :param disable_https: Customer's choice to send links with/without \"https://\" attached to shortened url. If true, messages will not be sent with https:// at the beginning of the url. If false, messages will be sent with https:// at the beginning of the url. False is the default behavior if it is not specified.

        :returns: The updated DomainConfigInstance
        r   r   r   r   )r.   updater$   r   r   r   r   s        r&   r=   zDomainConfigInstance.updatet   s,    " {{!!%% 3'	 " 
 	
r'   c                 \   K   | j                   j                  ||||       d{   S 7 w)  
        Asynchronous coroutine to update the DomainConfigInstance

        :param fallback_url: Any requests we receive to this domain that do not match an existing shortened message will be redirected to the fallback url. These will likely be either expired messages, random misdirected traffic, or intentional scraping.
        :param callback_url: URL to receive click events to your webhook whenever the recipients click on the shortened links
        :param continue_on_failure: Boolean field to set customer delivery preference when there is a failure in linkShortening service
        :param disable_https: Customer's choice to send links with/without \"https://\" attached to shortened url. If true, messages will not be sent with https:// at the beginning of the url. If false, messages will be sent with https:// at the beginning of the url. False is the default behavior if it is not specified.

        :returns: The updated DomainConfigInstance
        r<   N)r.   update_asyncr>   s        r&   rA   z!DomainConfigInstance.update_async   s:     " [[--%% 3'	 . 
 
 	
 
   #,*,c                 @    | j                   j                  ||||      S )a  
        Update the DomainConfigInstance with HTTP info

        :param fallback_url: Any requests we receive to this domain that do not match an existing shortened message will be redirected to the fallback url. These will likely be either expired messages, random misdirected traffic, or intentional scraping.
        :param callback_url: URL to receive click events to your webhook whenever the recipients click on the shortened links
        :param continue_on_failure: Boolean field to set customer delivery preference when there is a failure in linkShortening service
        :param disable_https: Customer's choice to send links with/without \"https://\" attached to shortened url. If true, messages will not be sent with https:// at the beginning of the url. If false, messages will be sent with https:// at the beginning of the url. False is the default behavior if it is not specified.

        :returns: ApiResponse with instance, status code, and headers
        r<   )r.   update_with_http_infor>   s        r&   rD   z*DomainConfigInstance.update_with_http_info   s,    " {{00%% 3'	 1 
 	
r'   c                 \   K   | j                   j                  ||||       d{   S 7 w)a  
        Asynchronous coroutine to update the DomainConfigInstance with HTTP info

        :param fallback_url: Any requests we receive to this domain that do not match an existing shortened message will be redirected to the fallback url. These will likely be either expired messages, random misdirected traffic, or intentional scraping.
        :param callback_url: URL to receive click events to your webhook whenever the recipients click on the shortened links
        :param continue_on_failure: Boolean field to set customer delivery preference when there is a failure in linkShortening service
        :param disable_https: Customer's choice to send links with/without \"https://\" attached to shortened url. If true, messages will not be sent with https:// at the beginning of the url. If false, messages will be sent with https:// at the beginning of the url. False is the default behavior if it is not specified.

        :returns: ApiResponse with instance, status code, and headers
        r<   N)r.   update_with_http_info_asyncr>   s        r&   rF   z0DomainConfigInstance.update_with_http_info_async   s:     " [[<<%% 3'	 = 
 
 	
 
rB   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>z0DomainConfigInstance.__repr__.<locals>.<genexpr>        SDAq7>>!Q/S   !z-<Twilio.Messaging.V1.DomainConfigInstance {}>joinr"   itemsrM   r$   contexts     r&   __repr__zDomainConfigInstance.__repr__   s6     ((SDNN<P<P<RSS>EEgNNr'   )N)r(   r+   )r(   r   )__name__
__module____qualname____doc__r   r   strr   r   r   propertyr.   r1   r4   r   r7   r9   r
   unsetr   objectboolr=   rA   rD   rF   rZ   __classcell__r%   s   @r&   r   r      sZ   
  %)	<< c3h< SM	<6  #/2k 2>+ > ,2<<+1<<39<<-3\\
CK(
 CK(
 #4<0	

 T6\*
 
 
4 ,2<<+1<<39<<-3\\
CK(
 CK(
 #4<0	

 T6\*
 
 
4 ,2<<+1<<39<<-3\\
CK(
 CK(
 #4<0	

 T6\*
 

4 ,2<<+1<<39<<-3\\
CK(
 CK(
 #4<0	

 T6\*
 

0O# Or'   r   c                   0    e Zd Zdedef fdZdefdZdefdZ	de
fdZdefdZdefd	Zde
fd
Zej                   ej                   ej                   ej                   fdeeef   deeef   deeef   deeef   def
dZej                   ej                   ej                   ej                   fdeeef   deeef   deeef   deeef   def
dZej                   ej                   ej                   ej                   fdeeef   deeef   deeef   deeef   de
f
dZej                   ej                   ej                   ej                   fdeeef   deeef   deeef   deeef   def
dZej                   ej                   ej                   ej                   fdeeef   deeef   deeef   deeef   def
dZej                   ej                   ej                   ej                   fdeeef   deeef   deeef   deeef   de
f
dZdefdZ xZS )r+   r   r   c                 x    t         |   |       d|i| _         dj                  di | j                  | _        y)z
        Initialize the DomainConfigContext

        :param version: Version that contains the resource
        :param domain_sid: Unique string used to identify the domain that this config should be associated with.
        r   z+/LinkShortening/Domains/{domain_sid}/ConfigN )r   r   r"   rM   _uri)r$   r   r   r%   s      r&   r   zDomainConfigContext.__init__   sF     	! *
 IAHH 
nn
	r'   r(   c                     t        j                  i       }d|d<   | j                  j                  d| j                  |      S )zz
        Internal helper for fetch operation

        Returns:
            tuple: (payload, status_code, headers)
        application/jsonAcceptGETmethoduriheaders)r
   ofr,   fetch_with_response_infori   r$   rq   s     r&   _fetchzDomainConfigContext._fetch   sB     ))B-.}}55dii 6 
 	
r'   c                 t    | j                         \  }}}t        | j                  || j                  d         S )r0   r   r*   )ru   r   r,   r"   r$   r   _s      r&   r1   zDomainConfigContext.fetch  s8     A#MM~~l3
 	
r'   c                     | j                         \  }}}t        | j                  || j                  d         }t	        |||      S )z
        Fetch the DomainConfigInstance and return response metadata


        :returns: ApiResponse with instance, status code, and headers
        r   r*   datastatus_coderq   )ru   r   r,   r"   r   r$   r   r|   rq   instances        r&   r7   z(DomainConfigContext.fetch_with_http_info  sG     )-%g'MM~~l3

 k7SSr'   c                    K   t        j                  i       }d|d<   | j                  j                  d| j                  |       d{   S 7 w)z
        Internal async helper for fetch operation

        Returns:
            tuple: (payload, status_code, headers)
        rk   rl   rm   rn   N)r
   rr   r,   fetch_with_response_info_asyncri   rt   s     r&   _fetch_asyncz DomainConfigContext._fetch_async  sQ      ))B-.]]AAdii B 
 
 	
 
s   AAA	Ac                    K   | j                          d{   \  }}}t        | j                  || j                  d         S 7 -w)r3   Nr   r*   )r   r   r,   r"   rw   s      r&   r4   zDomainConfigContext.fetch_async.  sG      #//11A#MM~~l3
 	
 2s   AA.Ac                    K   | j                          d{   \  }}}t        | j                  || j                  d         }t	        |||      S 7 ;w)z
        Asynchronous coroutine to fetch the DomainConfigInstance and return response metadata


        :returns: ApiResponse with instance, status code, and headers
        Nr   r*   rz   )r   r   r,   r"   r   r}   s        r&   r9   z.DomainConfigContext.fetch_with_http_info_async<  sW      /3.?.?.A(A%g'MM~~l3

 k7SS )Bs   AA<Ar   r   r   r   c                    t        j                  ||t        j                  |      t        j                  |      d      }t        j                  i       }d|d<   d|d<   | j                  j                  d| j                  ||      S )z{
        Internal helper for update operation

        Returns:
            tuple: (payload, status_code, headers)
        FallbackUrlCallbackUrlContinueOnFailureDisableHttps!application/x-www-form-urlencodedContent-Typerk   rl   POSTro   rp   r{   rq   )r
   rr   r	   boolean_to_stringr,   update_with_response_infori   r$   r   r   r   r   r{   rq   s          r&   _updatezDomainConfigContext._updateK  s     yy++%.%@%@AT%U ) ; ;M J	
 ))B-"E.}}66tyytW 7 
 	
r'   c                 ~    | j                  ||||      \  }}}t        | j                  || j                  d         S )r;   r<   r   r*   )r   r   r,   r"   r$   r   r   r   r   r   rx   s          r&   r=   zDomainConfigContext.updatek  sL    " %% 3'	 % 
A $MM7t~~l/K
 	
r'   c                     | j                  ||||      \  }}}t        | j                  || j                  d         }t	        |||      S )a  
        Update the DomainConfigInstance and return response metadata

        :param fallback_url: Any requests we receive to this domain that do not match an existing shortened message will be redirected to the fallback url. These will likely be either expired messages, random misdirected traffic, or intentional scraping.
        :param callback_url: URL to receive click events to your webhook whenever the recipients click on the shortened links
        :param continue_on_failure: Boolean field to set customer delivery preference when there is a failure in linkShortening service
        :param disable_https: Customer's choice to send links with/without \"https://\" attached to shortened url. If true, messages will not be sent with https:// at the beginning of the url. If false, messages will be sent with https:// at the beginning of the url. False is the default behavior if it is not specified.

        :returns: ApiResponse with instance, status code, and headers
        r<   r   r*   rz   )r   r   r,   r"   r   	r$   r   r   r   r   r   r|   rq   r~   s	            r&   rD   z)DomainConfigContext.update_with_http_info  s[    " )-%% 3'	 )5 )
%g (MM7t~~l/K
 k7SSr'   c                 .  K   t        j                  ||t        j                  |      t        j                  |      d      }t        j                  i       }d|d<   d|d<   | j                  j                  d| j                  ||       d{   S 7 w)	z
        Internal async helper for update operation

        Returns:
            tuple: (payload, status_code, headers)
        r   r   r   rk   rl   r   r   N)r
   rr   r	   r   r,   update_with_response_info_asyncri   r   s          r&   _update_asyncz!DomainConfigContext._update_async  s      yy++%.%@%@AT%U ) ; ;M J	
 ))B-"E.]]BBtyytW C 
 
 	
 
s   BBBBc                    K   | j                  ||||       d{   \  }}}t        | j                  || j                  d         S 7 -w)r@   r<   Nr   r*   )r   r   r,   r"   r   s          r&   rA   z DomainConfigContext.update_async  s\     " #00%% 3'	 1 
 
A $MM7t~~l/K
 	

s   AA	.Ac                    K   | j                  ||||       d{   \  }}}t        | j                  || j                  d         }t	        |||      S 7 ;w)a  
        Asynchronous coroutine to update the DomainConfigInstance and return response metadata

        :param fallback_url: Any requests we receive to this domain that do not match an existing shortened message will be redirected to the fallback url. These will likely be either expired messages, random misdirected traffic, or intentional scraping.
        :param callback_url: URL to receive click events to your webhook whenever the recipients click on the shortened links
        :param continue_on_failure: Boolean field to set customer delivery preference when there is a failure in linkShortening service
        :param disable_https: Customer's choice to send links with/without \"https://\" attached to shortened url. If true, messages will not be sent with https:// at the beginning of the url. If false, messages will be sent with https:// at the beginning of the url. False is the default behavior if it is not specified.

        :returns: ApiResponse with instance, status code, and headers
        r<   Nr   r*   rz   )r   r   r,   r"   r   r   s	            r&   rF   z/DomainConfigContext.update_with_http_info_async  sl     " /3.@.@%% 3'	 /A /
 )
%g (MM7t~~l/K
 k7SS)
s   AA<Ac                     dj                  d | j                  j                         D              }dj                  |      S )rH   rI   c              3   F   K   | ]  \  }}d j                  ||        ywrK   rL   rN   s      r&   rR   z/DomainConfigContext.__repr__.<locals>.<genexpr>  rS   rT   z,<Twilio.Messaging.V1.DomainConfigContext {}>rU   rX   s     r&   rZ   zDomainConfigContext.__repr__  s6     ((SDNN<P<P<RSS=DDWMMr'   )r[   r\   r]   r   r_   r   tupleru   r   r1   r   r7   r   r4   r9   r
   ra   r   rb   rc   r   r=   rD   r   rA   rF   rZ   rd   re   s   @r&   r+   r+      sJ   
 
S 
"
 
 
+ 
Tk T
E 
 
#7 
T+ T" ,2<<+1<<39<<-3\\
CK(
 CK(
 #4<0	

 T6\*
 

D ,2<<+1<<39<<-3\\
CK(
 CK(
 #4<0	

 T6\*
 

: ,2<<+1<<39<<-3\\TCK(T CK(T #4<0	T
 T6\*T 
T< ,2<<+1<<39<<-3\\
CK(
 CK(
 #4<0	

 T6\*
 

D ,2<<+1<<39<<-3\\
CK(
 CK(
 #4<0	

 T6\*
 

: ,2<<+1<<39<<-3\\TCK(T CK(T #4<0	T
 T6\*T 
T8N# Nr'   r+   c                   P     e Zd Zdef 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 )DomainConfigListr   c                 $    t         |   |       y)zn
        Initialize the DomainConfigList

        :param version: Version that contains the resource

        N)r   r   )r$   r   r%   s     r&   r   zDomainConfigList.__init__  s     	!r'   r   r(   c                 0    t        | j                  |      S z
        Constructs a DomainConfigContext

        :param domain_sid: Unique string used to identify the domain that this config should be associated with.
        r*   r+   r,   r$   r   s     r&   r    zDomainConfigList.get       #4==ZHHr'   c                 0    t        | j                  |      S r   r   r   s     r&   __call__zDomainConfigList.__call__  r   r'   c                      y)rH   z&<Twilio.Messaging.V1.DomainConfigList>rh   r-   s    r&   rZ   zDomainConfigList.__repr__  s     8r'   )r[   r\   r]   r   r   r_   r+   r    r   rZ   rd   re   s   @r&   r   r     sI    " "Ic I&9 II3 I+> I8# 8r'   r   N)r^   r   typingr   r   r   r   twilio.baser   r	   r
   twilio.base.api_responser   twilio.base.instance_contextr   twilio.base.instance_resourcer   twilio.base.list_resourcer   twilio.base.versionr   r   r+   r   rh   r'   r&   <module>r      sY     - - 6 6 0 8 : 2 'BO+ BOJbN/ bNJ	!8| !8r'   