
    pi*                         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  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)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d
ZddZdedd fdZdedd 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       g/opt/services/ai/voice_agent/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._proxyB   s9     == .>>,7DM }}r#   c                 6    | j                   j                         S )n
        Deletes the DomainCertsInstance


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


        :returns: True if delete succeeds, False otherwise
        N)r*   delete_asyncr)   s    r"   r0   z DomainCertsInstance.delete_asyncZ   s!      [[--////   '%'c                 6    | j                   j                         S )c
        Fetch the DomainCertsInstance


        :returns: The fetched DomainCertsInstance
        )r*   fetchr)   s    r"   r4   zDomainCertsInstance.fetchc   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"   r7   zDomainCertsInstance.fetch_asyncl   s!      [[,,....r1   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
        r8   )r*   updater    r8   s     r"   r<   zDomainCertsInstance.updateu   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
        r;   N)r*   update_asyncr=   s     r"   r@   z DomainCertsInstance.update_async   s1      [[-- . 
 
 	
 
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/DomainCertsInstance.__repr__.<locals>.<genexpr>        SDAq7>>!Q/S   !z,<Twilio.Messaging.V1.DomainCertsInstance {}>joinr   itemsrG   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-   r0   r4   r7   r<   r@   rT   __classcell__r!   s   @r"   r   r      s    	 %)	;; c3h; SM	;<  $ $0D 0#/

s 

'< 



3 

3H 

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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   rG   _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 )r,   DELETEmethoduriheaders)r   ofr(   r-   ra   r    rg   s     r"   r-   zDomainCertsContext.delete   s1     ))B-}}##8G#TTr#   c                    K   t        j                  i       }| j                  j                  d| j                  |       d{   S 7 w)r/   rc   rd   N)r   rh   r(   r0   ra   ri   s     r"   r0   zDomainCertsContext.delete_async   sF      ))B-]]//G 0 
 
 	
 
s   AA
AA
c                     t        j                  i       }d|d<   | j                  j                  d| j                  |      }t        | j                  || j                  d         S )r3   application/jsonAcceptGETrd   r   r&   )r   rh   r(   r4   ra   r   r   r    rg   r   s      r"   r4   zDomainCertsContext.fetch   s]     ))B-.--%%U		7%S"MM~~l3
 	
r#   c                    K   t        j                  i       }d|d<   | j                  j                  d| j                  |       d{   }t        | j                  || j                  d         S 7 )w)r6   rl   rm   rn   rd   Nr   r&   )r   rh   r(   r7   ra   r   r   ro   s      r"   r7   zDomainCertsContext.fetch_async   sr      ))B-.11dii 2 
 
 #MM~~l3
 	
	
s   AA4A2	*A4r8   c                 
   t        j                  d|i      }t        j                  i       }d|d<   d|d<   | j                  j                  d| j                  ||      }t        | j                  || j                  d   	      S )
r:   TlsCert!application/x-www-form-urlencodedContent-Typerl   rm   POSTre   rf   datarg   r   r&   )r   rh   r(   r<   ra   r   r   r    r8   rw   rg   r   s        r"   r<   zDomainCertsContext.update   s     yy8

 ))B-"E.--&&tyytW ' 
 #MM7t~~l/K
 	
r#   c                 &  K   t        j                  d|i      }t        j                  i       }d|d<   d|d<   | j                  j                  d| j                  ||       d{   }t        | j                  || j                  d	   
      S 7 )w)r?   rr   rs   rt   rl   rm   ru   rv   Nr   r&   )r   rh   r(   r@   ra   r   r   rx   s        r"   r@   zDomainCertsContext.update_async
  s      yy8

 ))B-"E.22tyytW 3 
 
 #MM7t~~l/K
 	
	
s   A#B%B&*Bc                     dj                  d | j                  j                         D              }dj                  |      S )rB   rC   c              3   F   K   | ]  \  }}d j                  ||        ywrE   rF   rH   s      r"   rL   z.DomainCertsContext.__repr__.<locals>.<genexpr>,  rM   rN   z+<Twilio.Messaging.V1.DomainCertsContext {}>rO   rR   s     r"   rT   zDomainCertsContext.__repr__&  s6     ((SDNN<P<P<RSS<CCGLLr#   )rU   rV   rW   r   rY   r   r[   r-   r0   r   r4   r7   r<   r@   rT   r\   r]   s   @r"   r'   r'      s    
 
S 
"
U 
U
D 

* 
(
#6 
,
s 
': 
8
3 
3F 
8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__2  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__C  r   r#   c                      y)rB   z%<Twilio.Messaging.V1.DomainCertsList>r`   r)   s    r"   rT   zDomainCertsList.__repr__K  s     7r#   )rU   rV   rW   r   r   rY   r'   r   r   rT   r\   r]   s   @r"   r}   r}   0  sI    " "Hc H&8 HH3 H+= H7# 7r#   r}   N)rX   r   typingr   r   r   twilio.baser   r   twilio.base.instance_contextr	   twilio.base.instance_resourcer
   twilio.base.list_resourcer   twilio.base.versionr   r   r'   r}   r`   r#   r"   <module>r      sS     & & + 8 : 2 '|N* |N~VM VMr!7l !7r#   