
    d{idG                         d Z ddlmZ ddl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 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)deserialize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efdZdefd	Zdefd
ZdefdZddZ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defdZdedefdZdefdZ xZS )DomainCertsInstancea  
    :ivar domain_sid: The unique string that we created to identify the Domain resource.
    :ivar date_updated: Date that this Domain was last updated.
    :ivar date_expires: Date that the private certificate associated with this domain expires. You will need to update the certificate before that date to ensure your shortened links will continue to work.
    :ivar date_created: Date that this Domain was registered to the Twilio platform to create a new Domain object.
    :ivar domain_name: Full url path for this domain.
    :ivar certificate_sid: The unique string that we created to identify this Certificate resource.
    :ivar url:
    :ivar cert_in_validation: Optional JSON field describing the status and upload date of a new certificate in the process of validation
    versionpayload
domain_sidc                 2   t         |   |       |j                  d      | _        t	        j
                  |j                  d            | _        t	        j
                  |j                  d            | _        t	        j
                  |j                  d            | _        |j                  d      | _	        |j                  d      | _
        |j                  d      | _        |j                  d      | _        d|xs | j                  i| _        d | _        y )	Nr   date_updateddate_expiresdate_createddomain_namecertificate_sidurlcert_in_validation)super__init__getr   r   iso8601_datetimer   r   r   r   r   r   r   	_solution_context)selfr   r   r   	__class__s       c/home/sas/my/fyp/ringai/.venv/lib/python3.12/site-packages/twilio/rest/messaging/v1/domain_certs.pyr   zDomainCertsInstance.__init__%   s     	!)0\)B0;0L0LKK'1
 1<0L0LKK'1
 1<0L0LKK'1
 +2++m*D.5kk:K.L")++e"4?F{{ @

 *7
 7;    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: DomainCertsContext for this DomainCertsInstance
        r   r   )r    DomainCertsContext_versionr   r!   s    r#   _proxyzDomainCertsInstance._proxyC   s9     == .>>,7DM }}r$   c                 6    | j                   j                         S zn
        Deletes the DomainCertsInstance


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


        :returns: True if delete succeeds, False otherwise
        N)r+   delete_asyncr*   s    r#   r1   z DomainCertsInstance.delete_async[   s!      [[--////   '%'c                 6    | j                   j                         S )z
        Deletes the DomainCertsInstance with HTTP info


        :returns: ApiResponse with success boolean, status code, and headers
        )r+   delete_with_http_infor*   s    r#   r4   z)DomainCertsInstance.delete_with_http_infod   s     {{0022r$   c                 R   K   | j                   j                          d{   S 7 w)z
        Asynchronous coroutine that deletes the DomainCertsInstance with HTTP info


        :returns: ApiResponse with success boolean, status code, and headers
        N)r+   delete_with_http_info_asyncr*   s    r#   r6   z/DomainCertsInstance.delete_with_http_info_asyncm   s!      [[<<>>>>r2   c                 6    | j                   j                         S )c
        Fetch the DomainCertsInstance


        :returns: The fetched DomainCertsInstance
        )r+   fetchr*   s    r#   r9   zDomainCertsInstance.fetchv   s     {{  ""r$   c                 R   K   | j                   j                          d{   S 7 w)}
        Asynchronous coroutine to fetch the DomainCertsInstance


        :returns: The fetched DomainCertsInstance
        N)r+   fetch_asyncr*   s    r#   r<   zDomainCertsInstance.fetch_async   s!      [[,,....r2   c                 6    | j                   j                         S )z
        Fetch the DomainCertsInstance with HTTP info


        :returns: ApiResponse with instance, status code, and headers
        )r+   fetch_with_http_infor*   s    r#   r>   z(DomainCertsInstance.fetch_with_http_info   s     {{//11r$   c                 R   K   | j                   j                          d{   S 7 w)z
        Asynchronous coroutine to fetch the DomainCertsInstance with HTTP info


        :returns: ApiResponse with instance, status code, and headers
        N)r+   fetch_with_http_info_asyncr*   s    r#   r@   z.DomainCertsInstance.fetch_with_http_info_async   s!      [[;;====r2   tls_certc                 :    | j                   j                  |      S )J  
        Update the DomainCertsInstance

        :param tls_cert: Contains the full TLS certificate and private for this domain in PEM format: https://en.wikipedia.org/wiki/Privacy-Enhanced_Mail. Twilio uses this information to process HTTPS traffic sent to your domain.

        :returns: The updated DomainCertsInstance
        rA   )r+   updater!   rA   s     r#   rE   zDomainCertsInstance.update   s#     {{!! " 
 	
r$   c                 V   K   | j                   j                  |       d{   S 7 w)d  
        Asynchronous coroutine to update the DomainCertsInstance

        :param tls_cert: Contains the full TLS certificate and private for this domain in PEM format: https://en.wikipedia.org/wiki/Privacy-Enhanced_Mail. Twilio uses this information to process HTTPS traffic sent to your domain.

        :returns: The updated DomainCertsInstance
        rD   N)r+   update_asyncrF   s     r#   rI   z DomainCertsInstance.update_async   s1      [[-- . 
 
 	
 
    )')c                 :    | j                   j                  |      S )am  
        Update the DomainCertsInstance with HTTP info

        :param tls_cert: Contains the full TLS certificate and private for this domain in PEM format: https://en.wikipedia.org/wiki/Privacy-Enhanced_Mail. Twilio uses this information to process HTTPS traffic sent to your domain.

        :returns: ApiResponse with instance, status code, and headers
        rD   )r+   update_with_http_inforF   s     r#   rL   z)DomainCertsInstance.update_with_http_info   s#     {{00 1 
 	
r$   c                 V   K   | j                   j                  |       d{   S 7 w)a  
        Asynchronous coroutine to update the DomainCertsInstance with HTTP info

        :param tls_cert: Contains the full TLS certificate and private for this domain in PEM format: https://en.wikipedia.org/wiki/Privacy-Enhanced_Mail. Twilio uses this information to process HTTPS traffic sent to your domain.

        :returns: ApiResponse with instance, status code, and headers
        rD   N)r+   update_with_http_info_asyncrF   s     r#   rN   z/DomainCertsInstance.update_with_http_info_async   s1      [[<< = 
 
 	
 
rJ   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/DomainCertsInstance.__repr__.<locals>.<genexpr>        SDAq7>>!Q/S   !z,<Twilio.Messaging.V1.DomainCertsInstance {}>joinr   itemsrU   r!   contexts     r#   __repr__zDomainCertsInstance.__repr__   s6     ((SDNN<P<P<RSS=DDWMMr$   )N)r%   r(   )r%   r   )__name__
__module____qualname____doc__r   r   strr   r   r   propertyr+   boolr.   r1   r	   r4   r6   r9   r<   r>   r@   rE   rI   rL   rN   rb   __classcell__r"   s   @r#   r   r      s    	 %)	;; c3h; SM	;<  $ $0D 03{ 3?; ?#/2k 2>+ >

s 

'< 



3 

3H 



c 

k 



# 

+ 

N# Nr$   r   c                   $    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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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defdZde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 DomainCertsContext

        :param version: Version that contains the resource
        :param domain_sid: Unique string used to identify the domain that this certificate should be associated with.
        r   z0/LinkShortening/Domains/{domain_sid}/CertificateN )r   r   r   rU   _uri)r!   r   r   r"   s      r#   r   zDomainCertsContext.__init__   sF     	! *
 NFMM 
nn
	r$   r%   c                 |    t        j                  i       }| j                  j                  d| j                  |      S )z
        Internal helper for delete operation

        Returns:
            tuple: (success_boolean, status_code, headers)
        DELETEmethoduriheaders)r   ofr)   delete_with_response_inforo   r!   ru   s     r#   _deletezDomainCertsContext._delete   s8     ))B-}}66G 7 
 	
r$   c                 .    | j                         \  }}}|S r-   )ry   r!   success_s      r#   r.   zDomainCertsContext.delete   s     Ar$   c                 F    | j                         \  }}}t        |||      S )z
        Deletes the DomainCertsInstance and return response metadata


        :returns: ApiResponse with success boolean, status code, and headers
        datastatus_coderu   )ry   r	   r!   r|   r   ru   s       r#   r4   z(DomainCertsContext.delete_with_http_info   s%     )-%g['RRr$   c                    K   t        j                  i       }| j                  j                  d| j                  |       d{   S 7 w)z
        Internal async helper for delete operation

        Returns:
            tuple: (success_boolean, status_code, headers)
        rq   rr   N)r   rv   r)   delete_with_response_info_asyncro   rx   s     r#   _delete_asyncz DomainCertsContext._delete_async	  sG      ))B-]]BBG C 
 
 	
 
s   AA
AA
c                 J   K   | j                          d{   \  }}}|S 7 
wr0   )r   r{   s      r#   r1   zDomainCertsContext.delete_async  s)      #0022A 3s   #!#c                 b   K   | j                          d{   \  }}}t        |||      S 7 w)z
        Asynchronous coroutine that deletes the DomainCertsInstance and return response metadata


        :returns: ApiResponse with success boolean, status code, and headers
        Nr   )r   r	   r   s       r#   r6   z.DomainCertsContext.delete_with_http_info_async!  s5      /3.@.@.B(B%g['RR )Cs   /-/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GETrr   )r   rv   r)   fetch_with_response_inforo   rx   s     r#   _fetchzDomainCertsContext._fetch+  sB     ))B-.}}55dii 6 
 	
r$   c                 t    | j                         \  }}}t        | j                  || j                  d         S )r8   r   r'   )r   r   r)   r   r!   r   r}   s      r#   r9   zDomainCertsContext.fetch;  s8     A"MM~~l3
 	
r$   c                     | j                         \  }}}t        | j                  || j                  d         }t	        |||      S )z
        Fetch the DomainCertsInstance and return response metadata


        :returns: ApiResponse with instance, status code, and headers
        r   r'   r   )r   r   r)   r   r	   r!   r   r   ru   instances        r#   r>   z'DomainCertsContext.fetch_with_http_infoI  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)
        r   r   r   rr   N)r   rv   r)   fetch_with_response_info_asyncro   rx   s     r#   _fetch_asynczDomainCertsContext._fetch_asyncX  sQ      ))B-.]]AAdii B 
 
 	
 
s   AAA	Ac                    K   | j                          d{   \  }}}t        | j                  || j                  d         S 7 -w)r;   Nr   r'   )r   r   r)   r   r   s      r#   r<   zDomainCertsContext.fetch_asynch  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 DomainCertsInstance and return response metadata


        :returns: ApiResponse with instance, status code, and headers
        Nr   r'   r   )r   r   r)   r   r	   r   s        r#   r@   z-DomainCertsContext.fetch_with_http_info_asyncv  sW      /3.?.?.A(A%g&MM~~l3

 k7SS )Bs   AA<ArA   c                     t        j                  d|i      }t        j                  i       }d|d<   d|d<   | j                  j                  d| j                  ||      S )z{
        Internal helper for update operation

        Returns:
            tuple: (payload, status_code, headers)
        TlsCert!application/x-www-form-urlencodedContent-Typer   r   POSTrs   rt   r   ru   )r   rv   r)   update_with_response_inforo   r!   rA   r   ru   s       r#   _updatezDomainCertsContext._update  sh     yy8

 ))B-"E.}}66tyytW 7 
 	
r$   c                 x    | j                  |      \  }}}t        | j                  || j                  d         S )rC   rD   r   r'   )r   r   r)   r   r!   rA   r   r}   s       r#   rE   zDomainCertsContext.update  s;     h7A"MM7t~~l/K
 	
r$   c                     | j                  |      \  }}}t        | j                  || j                  d         }t	        |||      S )a{  
        Update the DomainCertsInstance and return response metadata

        :param tls_cert: Contains the full TLS certificate and private for this domain in PEM format: https://en.wikipedia.org/wiki/Privacy-Enhanced_Mail. Twilio uses this information to process HTTPS traffic sent to your domain.

        :returns: ApiResponse with instance, status code, and headers
        rD   r   r'   r   )r   r   r)   r   r	   r!   rA   r   r   ru   r   s         r#   rL   z(DomainCertsContext.update_with_http_info  sJ     )-h(G%g&MM7t~~l/K
 k7SSr$   c                    K   t        j                  d|i      }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   r   r   r   r   N)r   rv   r)   update_with_response_info_asyncro   r   s       r#   _update_asyncz DomainCertsContext._update_async  sw      yy8

 ))B-"E.]]BBtyytW C 
 
 	
 
s   A#A,%A*&A,c                    K   | j                  |       d{   \  }}}t        | j                  || j                  d         S 7 -w)rH   rD   Nr   r'   )r   r   r)   r   r   s       r#   rI   zDomainCertsContext.update_async  sK      #00(0CCA"MM7t~~l/K
 	
 Ds   AA.Ac                    K   | j                  |       d{   \  }}}t        | j                  || j                  d         }t	        |||      S 7 ;w)a  
        Asynchronous coroutine to update the DomainCertsInstance and return response metadata

        :param tls_cert: Contains the full TLS certificate and private for this domain in PEM format: https://en.wikipedia.org/wiki/Privacy-Enhanced_Mail. Twilio uses this information to process HTTPS traffic sent to your domain.

        :returns: ApiResponse with instance, status code, and headers
        rD   Nr   r'   r   )r   r   r)   r   r	   r   s         r#   rN   z.DomainCertsContext.update_with_http_info_async  sZ      /3.@.@(.@.S(S%g&MM7t~~l/K
 k7SS	 )Ts   AA<Ac                     dj                  d | j                  j                         D              }dj                  |      S )rP   rQ   c              3   F   K   | ]  \  }}d j                  ||        ywrS   rT   rV   s      r#   rZ   z.DomainCertsContext.__repr__.<locals>.<genexpr>  r[   r\   z+<Twilio.Messaging.V1.DomainCertsContext {}>r]   r`   s     r#   rb   zDomainCertsContext.__repr__  s6     ((SDNN<P<P<RSS<CCGLLr$   )rc   rd   re   r   rg   r   tuplery   ri   r.   r	   r4   r   r1   r6   r   r   r9   r>   r   r<   r@   r   rE   rL   r   rI   rN   rb   rj   rk   s   @r#   r(   r(      s8   
 
S 
"
 
 S{ S
U 
D S; S
 
 
* 
Tk T
E 
 
#6 
T+ T
 
 
.
s 
': 
Tc Tk T
C 
E 
.
3 
3F 
T# T+ TM# M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 )DomainCertsListr   c                 $    t         |   |       y)zm
        Initialize the DomainCertsList

        :param version: Version that contains the resource

        N)r   r   )r!   r   r"   s     r#   r   zDomainCertsList.__init__  s     	!r$   r   r%   c                 0    t        | j                  |      S z
        Constructs a DomainCertsContext

        :param domain_sid: Unique string used to identify the domain that this certificate should be associated with.
        r'   r(   r)   r!   r   s     r#   r   zDomainCertsList.get       "$--JGGr$   c                 0    t        | j                  |      S r   r   r   s     r#   __call__zDomainCertsList.__call__  r   r$   c                      y)rP   z%<Twilio.Messaging.V1.DomainCertsList>rn   r*   s    r#   rb   zDomainCertsList.__repr__  s     7r$   )rc   rd   re   r   r   rg   r(   r   r   rb   rj   rk   s   @r#   r   r     sI    " "Hc H&8 HH3 H+= H7# 7r$   r   N)rf   r   typingr   r   r   twilio.baser   r   twilio.base.api_responser	   twilio.base.instance_contextr
   twilio.base.instance_resourcer   twilio.base.list_resourcer   twilio.base.versionr   r   r(   r   rn   r$   r#   <module>r      sV     & & + 0 8 : 2 'xN* xNv\M \M~!7l !7r$   