U
    ä«Fcâ  ã                   @   s   G d d„ de ƒZdS )c                   @   sV   e Zd ZdZddd„Zedd„ ƒZejdd„ ƒZedd	„ ƒZejd
d	„ ƒZdd„ Z	dS )ÚSectionz5A block section of code to be used as a substitution.Nc                 C   s,   d| _ d| _|dk	r|| _|dk	r(|| _dS )zÂ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)Ú_keyÚ_valueÚkeyÚvalue)Úselfr   r   © r   úA/tmp/pip-unpacked-wheel-7j3043uk/sendgrid/helpers/mail/section.pyÚ__init__   s    zSection.__init__c                 C   s   | j S )z=A section of code's key.

        :rtype key: string
        ©r   ©r   r   r   r   r      s    zSection.keyc                 C   s
   || _ dS )zdA section of code's key.

        :param key: section of code key
        :type key: string
        Nr
   ©r   r   r   r   r   r      s    c                 C   s   | j S )z;A section of code's value.

        :rtype: string
        ©r   r   r   r   r   r   %   s    zSection.valuec                 C   s
   || _ dS )zqA section of code's value.

        :param value: A section of code's value.
        :type value: string
        Nr   r   r   r   r   r   -   s    c                 C   s(   i }| j dk	r$| jdk	r$| j|| j < |S )z™
        Get a JSON-ready representation of this Section.

        :returns: This Section, ready for use in a request body.
        :rtype: dict
        N)r   r   )r   Úsectionr   r   r   Úget6   s    zSection.get)NN)
Ú__name__Ú
__module__Ú__qualname__Ú__doc__r	   Úpropertyr   Úsetterr   r   r   r   r   r   r      s   




r   N)Úobjectr   r   r   r   r   Ú<module>   ó    