ó
º9—^c           @   s:   d  d l  m Z d  d l m Z d e f d „  ƒ  YZ d S(   i   (   t   SpamThreshold(   t   SpamUrlt	   SpamCheckc           B   sŒ   e  Z d  Z d	 d	 d	 d „ Z e d „  ƒ Z e j d „  ƒ Z e d „  ƒ Z e j d „  ƒ Z e d „  ƒ Z	 e	 j d „  ƒ Z	 d „  Z
 RS(
   s;   This allows you to test the content of your email for spam.c         C   sg   d |  _ d |  _ d |  _ | d k	 r3 | |  _ n  | d k	 rK | |  _ n  | d k	 rc | |  _ n  d S(   s‘  Create a SpamCheck to test the content of your email for spam.

        :param enable: If this setting is applied.
        :type enable: boolean, optional
        :param threshold: Spam qualification threshold, from 1 to 10 (strict).
        :type threshold: int, optional
        :param post_to_url: Inbound Parse URL to send a copy of your email.
        :type post_to_url: string, optional
        N(   t   Nonet   _enablet
   _thresholdt   _post_to_urlt   enablet	   thresholdt   post_to_url(   t   selfR   R   R	   (    (    sB   /tmp/pip-unpacked-wheel-v7av_c/sendgrid/helpers/mail/spam_check.pyt   __init__   s    
			c         C   s   |  j  S(   sG   Indicates if this setting is enabled.

        :rtype: boolean
        (   R   (   R
   (    (    sB   /tmp/pip-unpacked-wheel-v7av_c/sendgrid/helpers/mail/spam_check.pyR      s    c         C   s   | |  _  d S(   sˆ   Indicates if this setting is enabled.

        :param value: Indicates if this setting is enabled.
        :type value: boolean
        N(   R   (   R
   t   value(    (    sB   /tmp/pip-unpacked-wheel-v7av_c/sendgrid/helpers/mail/spam_check.pyR   %   s    c         C   s   |  j  S(   sÉ   Threshold used to determine if your content qualifies as spam.
        On a scale from 1 to 10, with 10 being most strict, or most likely to
        be considered as spam.

        :rtype: int
        (   R   (   R
   (    (    sB   /tmp/pip-unpacked-wheel-v7av_c/sendgrid/helpers/mail/spam_check.pyR   .   s    c         C   s.   t  | t ƒ r | |  _ n t | ƒ |  _ d S(   sÂ  Threshold used to determine if your content qualifies as spam.
        On a scale from 1 to 10, with 10 being most strict, or most likely to
        be considered as spam.

        :param value: Threshold used to determine if your content qualifies as
                      spam.
                      On a scale from 1 to 10, with 10 being most strict, or
                      most likely to be considered as spam.
        :type value: int
        N(   t
   isinstanceR    R   (   R
   R   (    (    sB   /tmp/pip-unpacked-wheel-v7av_c/sendgrid/helpers/mail/spam_check.pyR   8   s    c         C   s   |  j  S(   s£   An Inbound Parse URL to send a copy of your email.
        If defined, a copy of your email and its spam report will be sent here.

        :rtype: string
        (   R   (   R
   (    (    sB   /tmp/pip-unpacked-wheel-v7av_c/sendgrid/helpers/mail/spam_check.pyR	   I   s    c         C   s.   t  | t ƒ r | |  _ n t | ƒ |  _ d S(   sA  An Inbound Parse URL to send a copy of your email.
        If defined, a copy of your email and its spam report will be sent here.

        :param value: An Inbound Parse URL to send a copy of your email.
        If defined, a copy of your email and its spam report will be sent here.
        :type value: string
        N(   R   R   R   (   R
   R   (    (    sB   /tmp/pip-unpacked-wheel-v7av_c/sendgrid/helpers/mail/spam_check.pyR	   R   s    	c         C   ss   i  } |  j  d k	 r% |  j  | d <n  |  j d k	 rJ |  j j ƒ  | d <n  |  j d k	 ro |  j j ƒ  | d <n  | S(   s   
        Get a JSON-ready representation of this SpamCheck.

        :returns: This SpamCheck, ready for use in a request body.
        :rtype: dict
        R   R   R	   N(   R   R   R   t   getR	   (   R
   t
   spam_check(    (    sB   /tmp/pip-unpacked-wheel-v7av_c/sendgrid/helpers/mail/spam_check.pyR   `   s    N(   t   __name__t
   __module__t   __doc__R   R   t   propertyR   t   setterR   R	   R   (    (    (    sB   /tmp/pip-unpacked-wheel-v7av_c/sendgrid/helpers/mail/spam_check.pyR      s   	
	N(   t   spam_thresholdR    t   spam_urlR   t   objectR   (    (    (    sB   /tmp/pip-unpacked-wheel-v7av_c/sendgrid/helpers/mail/spam_check.pyt   <module>   s   