o
    wÔ+fÆ  ã                   @   s   G d d„ de ƒZdS )c                   @   sÒ   e Zd ZdZ						ddd„Z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
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 )Ú
Ganalyticsz;Allows you to enable tracking provided by Google Analytics.Nc                 C   sp   d| _ d| _d| _d| _d| _d| _|  d|¡ |  d|¡ |  d|¡ |  d|¡ |  d|¡ |  d|¡ dS )aº  Create a GAnalytics to enable, customize Google Analytics tracking.

        :param enable: If this setting is enabled.
        :type enable: boolean, optional
        :param utm_source: Name of the referrer source.
        :type utm_source: string, optional
        :param utm_medium: Name of the marketing medium (e.g. "Email").
        :type utm_medium: string, optional
        :param utm_term: Used to identify paid keywords.
        :type utm_term: string, optional
        :param utm_content: Used to differentiate your campaign from ads.
        :type utm_content: string, optional
        :param utm_campaign: The name of the campaign.
        :type utm_campaign: string, optional
        NÚenableÚ
utm_sourceÚ
utm_mediumÚutm_termÚutm_contentÚutm_campaign)Ú_enableÚ_utm_sourceÚ_utm_mediumÚ	_utm_termÚ_utm_contentÚ_utm_campaignÚ_Ganalytics__set_field)Úselfr   r   r   r   r   r   © r   úS/var/www/html/venv/lib/python3.10/site-packages/sendgrid/helpers/mail/ganalytics.pyÚ__init__   s   zGanalytics.__init__c                 C   s   |durt | ||ƒ dS dS )zÖ Sets a field to the provided value if value is not None

        :param field: Name of the field
        :type field: string
        :param value: Value to be set, ignored if None
        :type value: Any
        N)Úsetattr)r   ÚfieldÚvaluer   r   r   Ú__set_field(   s   ÿzGanalytics.__set_fieldc                 C   ó   | j S )zGIndicates if this setting is enabled.

        :rtype: boolean
        ©r   ©r   r   r   r   r   3   ó   zGanalytics.enablec                 C   ó
   || _ dS )zˆIndicates if this setting is enabled.

        :param value: Indicates if this setting is enabled.
        :type value: boolean
        Nr   ©r   r   r   r   r   r   ;   ó   
c                 C   r   )zuName of the referrer source.
        e.g. Google, SomeDomain.com, or Marketing Email

        :rtype: string
        ©r	   r   r   r   r   r   D   s   zGanalytics.utm_sourcec                 C   r   )zåName of the referrer source.
        e.g. Google, SomeDomain.com, or Marketing Email

        :param value: Name of the referrer source.
        e.g. Google, SomeDomain.com, or Marketing Email
        :type value: string
        Nr   r   r   r   r   r   M   s   
	c                 C   r   )zKName of the marketing medium (e.g. Email).

        :rtype: string
        ©r
   r   r   r   r   r   X   r   zGanalytics.utm_mediumc                 C   r   )z‘Name of the marketing medium (e.g. Email).

        :param value: Name of the marketing medium (e.g. Email).
        :type value: string
        Nr   r   r   r   r   r   `   r   c                 C   r   )zDUsed to identify any paid keywords.

        :rtype: string
        ©r   r   r   r   r   r   i   r   zGanalytics.utm_termc                 C   r   )zƒUsed to identify any paid keywords.

        :param value: Used to identify any paid keywords.
        :type value: string
        Nr    r   r   r   r   r   q   r   c                 C   r   )zYUsed to differentiate your campaign from advertisements.

        :rtype: string
        ©r   r   r   r   r   r   z   r   zGanalytics.utm_contentc                 C   r   )z­Used to differentiate your campaign from advertisements.

        :param value: Used to differentiate your campaign from advertisements.
        :type value: string
        Nr!   r   r   r   r   r   ‚   r   c                 C   r   )z:The name of the campaign.

        :rtype: string
        ©r   r   r   r   r   r   ‹   r   zGanalytics.utm_campaignc                 C   r   )zoThe name of the campaign.

        :param value: The name of the campaign.
        :type value: string
        Nr"   r   r   r   r   r   “   r   c                 C   sX   g d¢}i }|D ]!}t | |dƒ}|dur)t|tƒst|tƒr#|||< q| ¡ ||< q|S )zŸ
        Get a JSON-ready representation of this Ganalytics.

        :returns: This Ganalytics, ready for use in a request body.
        :rtype: dict
        )r   r   r   r   r   r   N)ÚgetattrÚ
isinstanceÚboolÚstrÚget)r   ÚkeysÚ
ganalyticsÚkeyr   r   r   r   r'   œ   s   
€zGanalytics.get)NNNNNN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   Úpropertyr   Úsetterr   r   r   r   r   r'   r   r   r   r   r      sF    
ú$












r   N)Úobjectr   r   r   r   r   Ú<module>   s    