ó
º9—^c           @   s   d  e  f d „  ƒ  YZ d S(   t   TrackingSettingsc           B   s°   e  Z d  Z d 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	 e d „  ƒ Z
 e
 j d	 „  ƒ Z
 d
 „  Z RS(   s:   Settings to track how recipients interact with your email.c         C   sˆ   d |  _ d |  _ d |  _ d |  _ | d k	 r< | |  _ n  | d k	 rT | |  _ n  | d k	 rl | |  _ n  | d k	 r„ | |  _ n  d S(   sé  Create a TrackingSettings object

        :param click_tracking: Allows you to track whether a recipient clicked
                               a link in your email.
        :type click_tracking: ClickTracking, optional
        :param open_tracking: Allows you to track whether the email was opened
                              or not, but including a single pixel image in
                              the body of the content. When the pixel is
                              loaded, we can log that the email was opened.
        :type open_tracking: OpenTracking, optional
        :param subscription_tracking: Allows you to insert a subscription
                                      management link at the bottom of the
                                      text and html bodies of your email. If
                                      you would like to specify the location
                                      of the link within your email, you may
                                      use the substitution_tag.
        :type subscription_tracking: SubscriptionTracking, optional
        :param ganalytics: Allows you to enable tracking provided by Google
                           Analytics.
        :type ganalytics: Ganalytics, optional
        N(   t   Nonet   _click_trackingt   _open_trackingt   _subscription_trackingt   _ganalytics(   t   selft   click_trackingt   open_trackingt   subscription_trackingt
   ganalytics(    (    sI   /tmp/pip-unpacked-wheel-v7av_c/sendgrid/helpers/mail/tracking_settings.pyt   __init__   s    				c         C   s   |  j  S(   sm   Allows you to track whether a recipient clicked a link in your email.

        :rtype: ClickTracking
        (   R   (   R   (    (    sI   /tmp/pip-unpacked-wheel-v7av_c/sendgrid/helpers/mail/tracking_settings.pyR   /   s    c         C   s   | |  _  d S(   sä   Allows you to track whether a recipient clicked a link in your email.

        :param value: Allows you to track whether a recipient clicked a link
                      in your email.
        :type value: ClickTracking
        N(   R   (   R   t   value(    (    sI   /tmp/pip-unpacked-wheel-v7av_c/sendgrid/helpers/mail/tracking_settings.pyR   7   s    c         C   s   |  j  S(   sa   Allows you to track whether a recipient opened your email.

        :rtype: OpenTracking
        (   R   (   R   (    (    sI   /tmp/pip-unpacked-wheel-v7av_c/sendgrid/helpers/mail/tracking_settings.pyR   A   s    c         C   s   | |  _  d S(   sÍ   Allows you to track whether a recipient opened your email.

        :param value: Allows you to track whether a recipient opened your
                      email.
        :type value: OpenTracking
        N(   R   (   R   R   (    (    sI   /tmp/pip-unpacked-wheel-v7av_c/sendgrid/helpers/mail/tracking_settings.pyR   I   s    c         C   s   |  j  S(   s]   Settings for the subscription management link.

        :rtype: SubscriptionTracking
        (   R   (   R   (    (    sI   /tmp/pip-unpacked-wheel-v7av_c/sendgrid/helpers/mail/tracking_settings.pyR	   S   s    c         C   s   | |  _  d S(   s§   Settings for the subscription management link.

        :param value: Settings for the subscription management link.
        :type value: SubscriptionTracking
        N(   R   (   R   R   (    (    sI   /tmp/pip-unpacked-wheel-v7av_c/sendgrid/helpers/mail/tracking_settings.pyR	   [   s    c         C   s   |  j  S(   sC   Settings for Google Analytics.

        :rtype: Ganalytics
        (   R   (   R   (    (    sI   /tmp/pip-unpacked-wheel-v7av_c/sendgrid/helpers/mail/tracking_settings.pyR
   d   s    c         C   s   | |  _  d S(   s}   Settings for Google Analytics.

        :param value: Settings for Google Analytics.
        :type value: Ganalytics
        N(   R   (   R   R   (    (    sI   /tmp/pip-unpacked-wheel-v7av_c/sendgrid/helpers/mail/tracking_settings.pyR
   l   s    c         C   sž   i  } |  j  d k	 r+ |  j  j ƒ  | d <n  |  j d k	 rP |  j j ƒ  | d <n  |  j d k	 ru |  j j ƒ  | d <n  |  j d k	 rš |  j j ƒ  | d <n  | S(   s«   
        Get a JSON-ready representation of this TrackingSettings.

        :returns: This TrackingSettings, ready for use in a request body.
        :rtype: dict
        R   R   R	   R
   N(   R   R   t   getR   R	   R
   (   R   t   tracking_settings(    (    sI   /tmp/pip-unpacked-wheel-v7av_c/sendgrid/helpers/mail/tracking_settings.pyR   u   s    N(   t   __name__t
   __module__t   __doc__R   R   t   propertyR   t   setterR   R	   R
   R   (    (    (    sI   /tmp/pip-unpacked-wheel-v7av_c/sendgrid/helpers/mail/tracking_settings.pyR       s   '

		N(   t   objectR    (    (    (    sI   /tmp/pip-unpacked-wheel-v7av_c/sendgrid/helpers/mail/tracking_settings.pyt   <module>   t    