
9^c           @   s*   d  d l  m Z d e f d     YZ d S(   i   (   t   ValidateApiKeyt   Contentc           B   sb   e  Z d  Z d   Z e d    Z e j d    Z e d    Z e j d    Z d   Z RS(   sv   Content to be included in your email.

    You must specify at least one mime type in the Contents of your email.
    c         C   sR   d |  _ d |  _ t   |  _ | d k	 r6 | |  _ n  | d k	 rN | |  _ n  d S(   s   Create a Content with the specified MIME type and content.

        :param mime_type: MIME type of this Content (e.g. "text/plain").
        :type mime_type: string
        :param content: The actual content.
        :type content: string
        N(   t   Nonet
   _mime_typet   _contentR    t
   _validatort	   mime_typet   content(   t   selfR   R   (    (    s?   /tmp/pip-unpacked-wheel-v7av_c/sendgrid/helpers/mail/content.pyt   __init__   s    		c         C   s   |  j  S(   s   The MIME type of the content you are including in your email.
        For example, "text/plain" or "text/html".

        :rtype: string
        (   R   (   R   (    (    s?   /tmp/pip-unpacked-wheel-v7av_c/sendgrid/helpers/mail/content.pyR      s    c         C   s   | |  _  d S(   s1  The MIME type of the content you are including in your email.
        For example, "text/plain" or "text/html".

        :param value: The MIME type of the content you are including in your
                      email.
        For example, "text/plain" or "text/html".
        :type value: string
        N(   R   (   R   t   value(    (    s?   /tmp/pip-unpacked-wheel-v7av_c/sendgrid/helpers/mail/content.pyR   &   s    
c         C   s   |  j  S(   sQ   The actual content (of the specified mime type).

        :rtype: string
        (   R   (   R   (    (    s?   /tmp/pip-unpacked-wheel-v7av_c/sendgrid/helpers/mail/content.pyR   2   s    c         C   s   |  j  j |  | |  _ d S(   s   The actual content (of the specified mime type).

        :param value: The actual content (of the specified mime type).
        :type value: string
        N(   R   t   validate_message_dictR   (   R   R
   (    (    s?   /tmp/pip-unpacked-wheel-v7av_c/sendgrid/helpers/mail/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 Content.

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