ó
ŗ9^c           @   s   d  e  f d     YZ d S(   t   Sectionc           B   sh   e  Z d  Z d d d  Z e d    Z e j d    Z e d    Z e j d    Z d   Z	 RS(   s5   A block section of code to be used as a substitution.c         C   sF   d |  _ d |  _ | d k	 r* | |  _ n  | d k	 rB | |  _ n  d S(   sĀ   Create a section with the given key and value.

        :param key: section of code key
        :type key: string
        :param value: section of code value
        :type value: string
        N(   t   Nonet   _keyt   _valuet   keyt   value(   t   selfR   R   (    (    s?   /tmp/pip-unpacked-wheel-v7av_c/sendgrid/helpers/mail/section.pyt   __init__   s    		c         C   s   |  j  S(   s=   A section of code's key.

        :rtype key: string
        (   R   (   R   (    (    s?   /tmp/pip-unpacked-wheel-v7av_c/sendgrid/helpers/mail/section.pyR      s    c         C   s   | |  _  d S(   sd   A section of code's key.

        :param key: section of code key
        :type key: string
        N(   R   (   R   R   (    (    s?   /tmp/pip-unpacked-wheel-v7av_c/sendgrid/helpers/mail/section.pyR      s    c         C   s   |  j  S(   s;   A section of code's value.

        :rtype: string
        (   R   (   R   (    (    s?   /tmp/pip-unpacked-wheel-v7av_c/sendgrid/helpers/mail/section.pyR   %   s    c         C   s   | |  _  d S(   sq   A section of code's value.

        :param value: A section of code's value.
        :type value: string
        N(   R   (   R   R   (    (    s?   /tmp/pip-unpacked-wheel-v7av_c/sendgrid/helpers/mail/section.pyR   -   s    c         C   s;   i  } |  j  d k	 r7 |  j d k	 r7 |  j | |  j  <n  | S(   s   
        Get a JSON-ready representation of this Section.

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