ó
š9^c           @   s   d  e  f d     YZ d S(   t   SendAtc           B   sq   e  Z d  Z d d d  Z e d    Z e j d    Z e d    Z e j d    Z d   Z	 d   Z
 RS(	   sH  A unix timestamp allowing you to specify when you want your
    email to be delivered. This may be overridden by the
    personalizations[x].send_at parameter. You can't schedule more
    than 72 hours in advance. If you have the flexibility, it's
    better to schedule mail for off-peak times. Most emails are
    scheduled and sent at the top of the hour or half hour.
    Scheduling email to avoid those times (for example, scheduling
    at 10:53) can result in lower deferral rates because it won't
    be going through our servers at the same times as everyone else's
    mail.c         C   sF   d |  _ d |  _ | d k	 r* | |  _ n  | d k	 rB | |  _ n  d S(   s@  Create a unix timestamp specifying when your email should
        be delivered.

        :param send_at: Unix timestamp
        :type send_at: integer
        :param name: p is the Personalization object or Personalization object
                     index
        :type name: Personalization, integer, optional
        N(   t   Nonet   _send_att   _personalizationt   send_att   personalization(   t   selfR   t   p(    (    s?   /tmp/pip-unpacked-wheel-v7av_c/sendgrid/helpers/mail/send_at.pyt   __init__   s    
		c         C   s   |  j  S(   s3   A unix timestamp.

        :rtype: integer
        (   R   (   R   (    (    s?   /tmp/pip-unpacked-wheel-v7av_c/sendgrid/helpers/mail/send_at.pyR      s    c         C   s   | |  _  d S(   s`   A unix timestamp.

        :param value: A unix timestamp.
        :type value: integer
        N(   R   (   R   t   value(    (    s?   /tmp/pip-unpacked-wheel-v7av_c/sendgrid/helpers/mail/send_at.pyR   &   s    c         C   s   |  j  S(   sm   The Personalization object or Personalization object index

        :rtype: Personalization, integer
        (   R   (   R   (    (    s?   /tmp/pip-unpacked-wheel-v7av_c/sendgrid/helpers/mail/send_at.pyR   /   s    c         C   s   | |  _  d S(   sŲ   The Personalization object or Personalization object index

        :param value: The Personalization object or Personalization object
                      index
        :type value: Personalization, integer
        N(   R   (   R   R	   (    (    s?   /tmp/pip-unpacked-wheel-v7av_c/sendgrid/helpers/mail/send_at.pyR   7   s    c         C   s   t  |  j    S(   sK   Get a JSON representation of this object.

        :rtype: integer
        (   t   strt   get(   R   (    (    s?   /tmp/pip-unpacked-wheel-v7av_c/sendgrid/helpers/mail/send_at.pyt   __str__A   s    c         C   s   |  j  S(   sĻ   
        Get a JSON-ready representation of this SendAt object.

        :returns: The unix timestamp, ready for use in a request body.
        :rtype: integer
        (   R   (   R   (    (    s?   /tmp/pip-unpacked-wheel-v7av_c/sendgrid/helpers/mail/send_at.pyR   H   s    N(   t   __name__t
   __module__t   __doc__R   R   t   propertyR   t   setterR   R   R   (    (    (    s?   /tmp/pip-unpacked-wheel-v7av_c/sendgrid/helpers/mail/send_at.pyR       s   
	
	N(   t   objectR    (    (    (    s?   /tmp/pip-unpacked-wheel-v7av_c/sendgrid/helpers/mail/send_at.pyt   <module>   t    