U
    ^g%i*                     @   s   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
 d
eZG dd de
ZG dd deZdS )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                       s   e Zd ZdZdeeeef ee d fddZ	e
dddd	Zedd
dZedddZd dddZd dddZed dddZed dddZedddZ  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
    N)versionpayload
domain_sidc                    s   t  | |d| _t|d| _t|d| _t|d| _|d| _	|d| _
|d| _|d| _d|p| ji| _d | _d S )	Nr   date_updateddate_expiresdate_createddomain_namecertificate_sidurlcert_in_validation)super__init__getr   r   Ziso8601_datetimer   r   r   r   r   r   r   	_solution_context)selfr   r   r   	__class__ d/var/www/html/api-medvista/venv/lib/python3.8/site-packages/twilio/rest/messaging/v1/domain_certs.pyr   $   s*     zDomainCertsInstance.__init__DomainCertsContextreturnc                 C   s&   | j dkr t| j| jd 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
        Nr   r   )r   r!   _versionr   r   r   r   r    _proxyB   s    
zDomainCertsInstance._proxyc                 C   s
   | j  S )n
        Deletes the DomainCertsInstance


        :returns: True if delete succeeds, False otherwise
        )r'   deleter&   r   r   r    r)   Q   s    zDomainCertsInstance.deletec                    s   | j  I dH S )
        Asynchronous coroutine that deletes the DomainCertsInstance


        :returns: True if delete succeeds, False otherwise
        N)r'   delete_asyncr&   r   r   r    r+   Z   s    z DomainCertsInstance.delete_asyncc                 C   s
   | j  S )c
        Fetch the DomainCertsInstance


        :returns: The fetched DomainCertsInstance
        )r'   fetchr&   r   r   r    r-   c   s    zDomainCertsInstance.fetchc                    s   | j  I dH S )}
        Asynchronous coroutine to fetch the DomainCertsInstance


        :returns: The fetched DomainCertsInstance
        N)r'   fetch_asyncr&   r   r   r    r/   l   s    zDomainCertsInstance.fetch_asynctls_certr#   c                 C   s   | j j|d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
        r1   )r'   updater   r1   r   r   r    r4   u   s    zDomainCertsInstance.updatec                    s   | j j|dI dH S )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
        r3   N)r'   update_asyncr5   r   r   r    r7      s    z DomainCertsInstance.update_asyncc                 C   s$   d dd | j D }d|S )f
        Provide a friendly representation

        :returns: Machine friendly representation
         c                 s   s   | ]\}}d  ||V  qdS z{}={}Nformat.0kvr   r   r    	<genexpr>   s     z/DomainCertsInstance.__repr__.<locals>.<genexpr>z,<Twilio.Messaging.V1.DomainCertsInstance {}>joinr   itemsr<   r   contextr   r   r    __repr__   s    zDomainCertsInstance.__repr__)N)__name__
__module____qualname____doc__r   r   strr   r   r   propertyr'   boolr)   r+   r-   r/   r4   r7   rG   __classcell__r   r   r   r    r      s     
				r   c                       s   e Zd Zeed fddZedddZedddZe	dd	d
Z
e	dddZee	dddZee	dddZedddZ  ZS )r!   )r   r   c                    s*   t  | d|i| _djf | j| _dS )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   r<   _uri)r   r   r   r   r   r    r      s     zDomainCertsContext.__init__r"   c                 C   s   t i }| jjd| j|dS )r(   DELETEmethoduriheaders)r   ofr%   r)   rP   r   rU   r   r   r    r)      s    
zDomainCertsContext.deletec                    s$   t i }| jjd| j|dI dH S )r*   rQ   rR   N)r   rV   r%   r+   rP   rW   r   r   r    r+      s    
  zDomainCertsContext.delete_asyncc                 C   s<   t i }d|d< | jjd| j|d}t| j|| jd dS )r,   application/jsonAcceptGETrR   r   r$   )r   rV   r%   r-   rP   r   r   r   rU   r   r   r   r    r-      s    
zDomainCertsContext.fetchc                    sB   t i }d|d< | jjd| j|dI dH }t| j|| jd dS )r.   rX   rY   rZ   rR   Nr   r$   )r   rV   r%   r/   rP   r   r   r[   r   r   r    r/      s    
  zDomainCertsContext.fetch_asyncr0   c                 C   sT   t d|i}t i }d|d< d|d< | jjd| j||d}t| j|| jd d	S )
r2   TlsCert!application/x-www-form-urlencodedContent-TyperX   rY   POSTrS   rT   datarU   r   r$   )r   rV   r%   r4   rP   r   r   r   r1   ra   rU   r   r   r   r    r4      s&    	 
     zDomainCertsContext.updatec                    sZ   t d|i}t i }d|d< d|d< | jjd| j||dI dH }t| j|| jd	 d
S )r6   r\   r]   r^   rX   rY   r_   r`   Nr   r$   )r   rV   r%   r7   rP   r   r   rb   r   r   r    r7   
  s&    	 
     zDomainCertsContext.update_asyncc                 C   s$   d dd | j D }d|S )r8   r9   c                 s   s   | ]\}}d  ||V  qdS r:   r;   r=   r   r   r    rA   ,  s     z.DomainCertsContext.__repr__.<locals>.<genexpr>z+<Twilio.Messaging.V1.DomainCertsContext {}>rB   rE   r   r   r    rG   &  s    zDomainCertsContext.__repr__)rH   rI   rJ   r   rL   r   rN   r)   r+   r   r-   r/   r4   r7   rG   rO   r   r   r   r    r!      s   r!   c                       sP   e Zd Zed fddZeedddZeedddZed	d
dZ	  Z
S )DomainCertsList)r   c                    s   t  | dS )zm
        Initialize the DomainCertsList

        :param version: Version that contains the resource

        N)r   r   )r   r   r   r   r    r   2  s    zDomainCertsList.__init__)r   r#   c                 C   s   t | j|d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   r   r   r    r   ;  s    zDomainCertsList.getc                 C   s   t | j|dS rd   re   rf   r   r   r    __call__C  s    zDomainCertsList.__call__r"   c                 C   s   dS )r8   z%<Twilio.Messaging.V1.DomainCertsList>r   r&   r   r   r    rG   K  s    zDomainCertsList.__repr__)rH   rI   rJ   r   r   rL   r!   r   rg   rG   rO   r   r   r   r    rc   0  s   	rc   N)rK   r   typingr   r   r   Ztwilio.baser   r   Ztwilio.base.instance_contextr   Ztwilio.base.instance_resourcer	   Ztwilio.base.list_resourcer
   Ztwilio.base.versionr   r   r!   rc   r   r   r   r    <module>   s    