ó
š9^c           @   s:   d  d l  m Z d  d l m Z d e f d     YZ d S(   i   (   t   Content(   t   ValidateApiKeyt   HtmlContentc           B   sP   e  Z d  Z d   Z e d    Z e d    Z e j d    Z d   Z RS(   s*   HTML content to be included in your email.c         C   s1   d |  _ t   |  _ | d k	 r- | |  _ n  d S(   s   Create an HtmlContent with the specified MIME type and content.

        :param content: The HTML content.
        :type content: string
        N(   t   Nonet   _contentR   t
   _validatort   content(   t   selfR   (    (    sD   /tmp/pip-unpacked-wheel-v7av_c/sendgrid/helpers/mail/html_content.pyt   __init__   s    	c         C   s   d S(   s@   The MIME type for HTML content.

        :rtype: string
        s	   text/html(    (   R   (    (    sD   /tmp/pip-unpacked-wheel-v7av_c/sendgrid/helpers/mail/html_content.pyt	   mime_type   s    c         C   s   |  j  S(   s9   The actual HTML content.

        :rtype: string
        (   R   (   R   (    (    sD   /tmp/pip-unpacked-wheel-v7av_c/sendgrid/helpers/mail/html_content.pyR      s    c         C   s   |  j  j |  | |  _ d S(   sm   The actual HTML content.

        :param value: The actual HTML content.
        :type value: string
        N(   R   t   validate_message_dictR   (   R   t   value(    (    sD   /tmp/pip-unpacked-wheel-v7av_c/sendgrid/helpers/mail/html_content.pyR   $   s    c         C   sH   i  } |  j  d k	 r% |  j  | d <n  |  j d k	 rD |  j | d <n  | S(   sĄ   
        Get a JSON-ready representation of this HtmlContent.

        :returns: This HtmlContent, ready for use in a request body.
        :rtype: dict
        t   typeR   N(   R	   R   R   (   R   R   (    (    sD   /tmp/pip-unpacked-wheel-v7av_c/sendgrid/helpers/mail/html_content.pyt   get.   s    (	   t   __name__t
   __module__t   __doc__R   t   propertyR	   R   t   setterR   (    (    (    sD   /tmp/pip-unpacked-wheel-v7av_c/sendgrid/helpers/mail/html_content.pyR      s   	
N(   R   R    t
   validatorsR   R   (    (    (    sD   /tmp/pip-unpacked-wheel-v7av_c/sendgrid/helpers/mail/html_content.pyt   <module>   s   