ó
ş9^c           @   s   d  e  f d     YZ d S(   t
   Ganalyticsc           B   s  e  Z d  Z d d d d d d d  Z d   Z e d    Z e j d    Z e d    Z	 e	 j d    Z	 e d    Z
 e
 j 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;   Allows you to enable tracking provided by Google Analytics.c         C   s   d |  _ d |  _ d |  _ d |  _ d |  _ d |  _ |  j d |  |  j d |  |  j d |  |  j d |  |  j d |  |  j d |  d S(   sş  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
        t   enablet
   utm_sourcet
   utm_mediumt   utm_termt   utm_contentt   utm_campaignN(   t   Nonet   _enablet   _utm_sourcet   _utm_mediumt	   _utm_termt   _utm_contentt   _utm_campaignt   _Ganalytics__set_field(   t   selfR   R   R   R   R   R   (    (    sB   /tmp/pip-unpacked-wheel-v7av_c/sendgrid/helpers/mail/ganalytics.pyt   __init__   s    						c         C   s#   | d k	 r t |  | |  n  d S(   sÖ    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(   R   t   setattr(   R   t   fieldt   value(    (    sB   /tmp/pip-unpacked-wheel-v7av_c/sendgrid/helpers/mail/ganalytics.pyt   __set_field(   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/ganalytics.pyR   3   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   R   (    (    sB   /tmp/pip-unpacked-wheel-v7av_c/sendgrid/helpers/mail/ganalytics.pyR   ;   s    c         C   s   |  j  S(   su   Name of the referrer source.
        e.g. Google, SomeDomain.com, or Marketing Email

        :rtype: string
        (   R	   (   R   (    (    sB   /tmp/pip-unpacked-wheel-v7av_c/sendgrid/helpers/mail/ganalytics.pyR   D   s    c         C   s   | |  _  d S(   sċ   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
        N(   R	   (   R   R   (    (    sB   /tmp/pip-unpacked-wheel-v7av_c/sendgrid/helpers/mail/ganalytics.pyR   M   s    	c         C   s   |  j  S(   sK   Name of the marketing medium (e.g. Email).

        :rtype: string
        (   R
   (   R   (    (    sB   /tmp/pip-unpacked-wheel-v7av_c/sendgrid/helpers/mail/ganalytics.pyR   X   s    c         C   s   | |  _  d S(   s   Name of the marketing medium (e.g. Email).

        :param value: Name of the marketing medium (e.g. Email).
        :type value: string
        N(   R
   (   R   R   (    (    sB   /tmp/pip-unpacked-wheel-v7av_c/sendgrid/helpers/mail/ganalytics.pyR   `   s    c         C   s   |  j  S(   sD   Used to identify any paid keywords.

        :rtype: string
        (   R   (   R   (    (    sB   /tmp/pip-unpacked-wheel-v7av_c/sendgrid/helpers/mail/ganalytics.pyR   i   s    c         C   s   | |  _  d S(   s   Used to identify any paid keywords.

        :param value: Used to identify any paid keywords.
        :type value: string
        N(   R   (   R   R   (    (    sB   /tmp/pip-unpacked-wheel-v7av_c/sendgrid/helpers/mail/ganalytics.pyR   q   s    c         C   s   |  j  S(   sY   Used to differentiate your campaign from advertisements.

        :rtype: string
        (   R   (   R   (    (    sB   /tmp/pip-unpacked-wheel-v7av_c/sendgrid/helpers/mail/ganalytics.pyR   z   s    c         C   s   | |  _  d S(   s­   Used to differentiate your campaign from advertisements.

        :param value: Used to differentiate your campaign from advertisements.
        :type value: string
        N(   R   (   R   R   (    (    sB   /tmp/pip-unpacked-wheel-v7av_c/sendgrid/helpers/mail/ganalytics.pyR      s    c         C   s   |  j  S(   s:   The name of the campaign.

        :rtype: string
        (   R   (   R   (    (    sB   /tmp/pip-unpacked-wheel-v7av_c/sendgrid/helpers/mail/ganalytics.pyR      s    c         C   s   | |  _  d S(   so   The name of the campaign.

        :param value: The name of the campaign.
        :type value: string
        N(   R   (   R   R   (    (    sB   /tmp/pip-unpacked-wheel-v7av_c/sendgrid/helpers/mail/ganalytics.pyR      s    c         C   s   d d d d d d g } i  } xj | D]b } t  |  | d  } | d k	 r% t | t  sg t | t  rt | | | <q | j   | | <q% q% W| S(   s   
        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(   t   getattrR   t
   isinstancet   boolt   strt   get(   R   t   keyst
   ganalyticst   keyR   (    (    sB   /tmp/pip-unpacked-wheel-v7av_c/sendgrid/helpers/mail/ganalytics.pyR      s    N(   t   __name__t
   __module__t   __doc__R   R   R   t   propertyR   t   setterR   R   R   R   R   R   (    (    (    sB   /tmp/pip-unpacked-wheel-v7av_c/sendgrid/helpers/mail/ganalytics.pyR       s*   							N(   t   objectR    (    (    (    sB   /tmp/pip-unpacked-wheel-v7av_c/sendgrid/helpers/mail/ganalytics.pyt   <module>   t    