
    xh                     :    d dl mZ d dlmZ  G d de          ZdS )   )SpamThreshold)SpamUrlc                       e Zd ZdZ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
dS )	SpamCheckz;This allows you to test the content of your email for spam.Nc                 j    d| _         d| _        d| _        ||| _        ||| _        |	|| _        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   s       S/var/www/html/what/lib/python3.11/site-packages/sendgrid/helpers/mail/spam_check.py__init__zSpamCheck.__init__   sP       DK &DN"*D #"    c                     | j         S )zGIndicates if this setting is enabled.

        :rtype: boolean
        r   r   s    r   r   zSpamCheck.enable   s     |r   c                     || _         dS )zIndicates if this setting is enabled.

        :param value: Indicates if this setting is enabled.
        :type value: boolean
        Nr   r   values     r   r   zSpamCheck.enable%   s     r   c                     | j         S )zThreshold 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   s    r   r   zSpamCheck.threshold.   s     r   c                 j    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   s     r   r   zSpamCheck.threshold8   s4     e]++ 	3#DOOO+E22DOOOr   c                     | j         S )zAn 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   s    r   r   zSpamCheck.post_to_urlI   s       r   c                 j    t          |t                    r	|| _        dS t          |          | _        dS )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   s     r   r   zSpamCheck.post_to_urlR   s8     eW%% 	/ %D 'Dr   c                     i }| j         
| j         |d<   | j        | j                                        |d<   | j        | 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_checks     r   r   zSpamCheck.get`   se     
;"#';Jx >%&*n&8&8&:&:J{#'(,(8(<(<(>(>J}%r   )NNN)__name__
__module____qualname____doc__r   propertyr   setterr   r   r    r   r   r   r      s        EE+ + + +*   X ]  ]   X 3 3 3  ! ! X! / / /    r   r   N)spam_thresholdr   spam_urlr   objectr   r&   r   r   <module>r*      sg    ) ) ) ) ) )      k k k k k k k k k kr   