U
    42‹iš  ã                   @   s,   d dl mZ d dlmZ G dd„ deƒZdS )é   )ÚContent)ÚValidateApiKeyc                   @   sF   e Zd ZdZdd„ Zedd„ ƒZedd„ ƒZejdd„ ƒZd	d
„ Z	dS )ÚHtmlContentz*HTML content to be included in your email.c                 C   s    d| _ tƒ | _|dk	r|| _dS )z‘Create an HtmlContent with the specified MIME type and content.

        :param content: The HTML content.
        :type content: string
        N)Ú_contentr   Ú
_validatorÚcontent©Úselfr   © r
   úF/tmp/pip-unpacked-wheel-clku7wca/sendgrid/helpers/mail/html_content.pyÚ__init__   s    zHtmlContent.__init__c                 C   s   dS )z@The MIME type for HTML content.

        :rtype: string
        z	text/htmlr
   ©r	   r
   r
   r   Ú	mime_type   s    zHtmlContent.mime_typec                 C   s   | j S )z9The actual HTML content.

        :rtype: string
        )r   r   r
   r
   r   r      s    zHtmlContent.contentc                 C   s   | j  |¡ || _dS )zmThe actual HTML content.

        :param value: The actual HTML content.
        :type value: string
        N)r   Zvalidate_message_dictr   )r	   Úvaluer
   r
   r   r   $   s    c                 C   s0   i }| j dk	r| j |d< | jdk	r,| j|d< |S )z¡
        Get a JSON-ready representation of this HtmlContent.

        :returns: This HtmlContent, ready for use in a request body.
        :rtype: dict
        NÚtyper   )r   r   r   r
   r
   r   Úget.   s    



zHtmlContent.getN)
Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   Úpropertyr   r   Úsetterr   r
   r
   r
   r   r      s   


	r   N)r   r   Z
validatorsr   r   r
   r
   r
   r   Ú<module>   s   