o
    f>h                     @   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                       sn   e Zd ZdZ	ddedeeef dee f fddZ	e
dd
dZdddZdddZdefddZ  ZS )RequestManagedCertInstancea  
    :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_created: Date that this Domain was registered to the Twilio platform to create a new Domain object.
    :ivar date_expires: Date that the private certificate associated with this domain expires. This is the expiration date of your existing cert.
    :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 managed: A boolean flag indicating if the certificate is managed by Twilio.
    :ivar requesting: A boolean flag indicating if a managed certificate needs to be fulfilled by Twilio.
    Nversionpayload
domain_sidc                    s   t  | |d| _t|d| _t|d| _t|d| _|d| _	|d| _
|d| _|d| _|d	| _d|pJ| ji| _d | _d S )
Nr   date_updateddate_createddate_expiresdomain_namecertificate_sidurlmanaged
requesting)super__init__getr   r   iso8601_datetimer   r   r   r   r   r   r   r   	_solution_context)selfr   r   r   	__class__ `/var/www/html/venv/lib/python3.10/site-packages/twilio/rest/messaging/v1/request_managed_cert.pyr   %   s&   

z#RequestManagedCertInstance.__init__returnRequestManagedCertContextc                 C   s&   | j du 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: RequestManagedCertContext for this RequestManagedCertInstance
        Nr   r   )r   r$   _versionr   r   r!   r!   r"   _proxyB   s   
z!RequestManagedCertInstance._proxyc                 C   s
   | j  S )r
        Update the RequestManagedCertInstance


        :returns: The updated RequestManagedCertInstance
        )r(   updater'   r!   r!   r"   r*   Q   s   
z!RequestManagedCertInstance.updatec                    s   | j  I dH S )
        Asynchronous coroutine to update the RequestManagedCertInstance


        :returns: The updated RequestManagedCertInstance
        N)r(   update_asyncr'   r!   r!   r"   r,   Z   s   z'RequestManagedCertInstance.update_asyncc                 C   $   d dd | j D }d|S )f
        Provide a friendly representation

        :returns: Machine friendly representation
         c                 s        | ]\}}d  ||V  qdS z{}={}Nformat.0kvr!   r!   r"   	<genexpr>i       z6RequestManagedCertInstance.__repr__.<locals>.<genexpr>z3<Twilio.Messaging.V1.RequestManagedCertInstance {}>joinr   itemsr3   r   contextr!   r!   r"   __repr__c      
z#RequestManagedCertInstance.__repr__)N)r#   r$   )r#   r   )__name__
__module____qualname____doc__r   r   strr   r   r   propertyr(   r*   r,   r?   __classcell__r!   r!   r   r"   r      s    


		r   c                       sP   e Zd Zdedef fddZdefddZdefdd	Zdefd
dZ	  Z
S )r$   r   r   c                    s.   t  | d|i| _djdi | j| _dS )z
        Initialize the RequestManagedCertContext

        :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   z7/LinkShortening/Domains/{domain_sid}/RequestManagedCertNr!   )r   r   r   r3   _uri)r   r   r   r   r!   r"   r   o   s   z"RequestManagedCertContext.__init__r#   c                 C   sH   t i }t i }d|d< | jjd| j||d}t| j|| jd dS )r)   application/jsonAcceptPOSTmethoduridataheadersr   r%   )r   ofr&   r*   rH   r   r   r   rO   rP   r   r!   r!   r"   r*      s   


z RequestManagedCertContext.updatec                    sP   t i }t i }d|d< | jjd| j||dI dH }t| j|| jd dS )r+   rI   rJ   rK   rL   Nr   r%   )r   rQ   r&   r,   rH   r   r   rR   r!   r!   r"   r,      s   


z&RequestManagedCertContext.update_asyncc                 C   r-   )r.   r/   c                 s   r0   r1   r2   r4   r!   r!   r"   r8      r9   z5RequestManagedCertContext.__repr__.<locals>.<genexpr>z2<Twilio.Messaging.V1.RequestManagedCertContext {}>r:   r=   r!   r!   r"   r?      r@   z"RequestManagedCertContext.__repr__)rA   rB   rC   r   rE   r   r   r*   r,   r?   rG   r!   r!   r   r"   r$   m   s
    r$   c                       sT   e Zd Zdef fddZdedefddZdedefdd	Zdefd
dZ	  Z
S )RequestManagedCertListr   c                    s   t  | dS )zt
        Initialize the RequestManagedCertList

        :param version: Version that contains the resource

        N)r   r   )r   r   r   r!   r"   r      s   zRequestManagedCertList.__init__r   r#   c                 C      t | j|dS z
        Constructs a RequestManagedCertContext

        :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         zRequestManagedCertList.getc                 C   rT   rU   rV   rW   r!   r!   r"   __call__   rX   zRequestManagedCertList.__call__c                 C   s   dS )r.   z,<Twilio.Messaging.V1.RequestManagedCertList>r!   r'   r!   r!   r"   r?      s   zRequestManagedCertList.__repr__)rA   rB   rC   r   r   rE   r$   r   rY   r?   rG   r!   r!   r   r"   rS      s
    	rS   N)rD   r   typingr   r   r   twilio.baser   r   twilio.base.instance_contextr   twilio.base.instance_resourcer	   twilio.base.list_resourcer
   twilio.base.versionr   r   r$   rS   r!   r!   r!   r"   <module>   s    UG