o
    wÔ+f  ã                   @   s,   d dl mZ d dlmZ G dd„ deƒZdS )é   )ÚSpamThreshold)ÚSpamUrlc                   @   sp   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edd„ ƒZ	e	jdd„ ƒZ	dd„ Z
dS )Ú	SpamCheckz;This allows you to test the content of your email for spam.Nc                 C   sD   d| _ d| _d| _|dur|| _|dur|| _|dur || _dS dS )a‘  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)Ú_enableÚ
_thresholdÚ_post_to_urlÚenableÚ	thresholdÚpost_to_url)Úselfr   r	   r
   © r   úS/var/www/html/venv/lib/python3.10/site-packages/sendgrid/helpers/mail/spam_check.pyÚ__init__   s   

ÿzSpamCheck.__init__c                 C   ó   | j S )zGIndicates if this setting is enabled.

        :rtype: boolean
        ©r   ©r   r   r   r   r      s   zSpamCheck.enablec                 C   s
   || _ dS )zˆIndicates if this setting is enabled.

        :param value: Indicates if this setting is enabled.
        :type value: boolean
        Nr   ©r   Úvaluer   r   r   r   %   s   
c                 C   r   )zÉ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   r   r   r   r	   .   s   zSpamCheck.thresholdc                 C   ó"   t |tƒr
|| _dS t|ƒ| _dS )aÂ  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)Ú
isinstancer   r   r   r   r   r   r	   8   s   

c                 C   r   )z£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   r   r   r   r
   I   s   zSpamCheck.post_to_urlc                 C   r   )aA  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   r   r   r
   R   s   
	
c                 C   sL   i }| j dur| j |d< | jdur| j ¡ |d< | jdur$| j ¡ |d< |S )z
        Get a JSON-ready representation of this SpamCheck.

        :returns: This SpamCheck, ready for use in a request body.
        :rtype: dict
        Nr   r	   r
   )r   r	   Úgetr
   )r   Ú
spam_checkr   r   r   r   `   s   



zSpamCheck.get)NNN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   Úpropertyr   Úsetterr	   r
   r   r   r   r   r   r      s     



	


r   N)Úspam_thresholdr   Úspam_urlr   Úobjectr   r   r   r   r   Ú<module>   s    