Submit
Path:
~
/
/
proc
/
thread-self
/
root
/
usr
/
lib
/
python2.7
/
site-packages
/
boto
/
s3
/
File Content:
lifecycle.pyo
� �vWc @ s� d d l m Z d e f d � � YZ d e f d � � YZ d e f d � � YZ d e f d � � YZ d e f d � � YZ d S( i����( t sixt Rulec B sJ e Z d Z d d d d d d � Z d � Z d � Z d � Z d � Z RS( sH A Lifecycle rule for an S3 bucket. :ivar id: Unique identifier for the rule. The value cannot be longer than 255 characters. This value is optional. The server will generate a unique value for the rule if no value is provided. :ivar prefix: Prefix identifying one or more objects to which the rule applies. If prefix is not provided, Boto generates a default prefix which will match all objects. :ivar status: If 'Enabled', the rule is currently being applied. If 'Disabled', the rule is not currently being applied. :ivar expiration: An instance of `Expiration`. This indicates the lifetime of the objects that are subject to the rule. :ivar transition: An instance of `Transition`. This indicates when to transition to a different storage class. c C s� | | _ | d k r d n | | _ | | _ t | t j � rT t d | � | _ n | | _ t | t � r� t � | _ | j j | � n | r� | | _ n t � | _ d S( Nt t days( t idt Nonet prefixt statust isinstanceR t integer_typest Expirationt expirationt Transitiont Transitionst transitiont append( t selfR R R R R ( ( s5 /usr/lib/python2.7/site-packages/boto/s3/lifecycle.pyt __init__. s c C s d | j S( Ns <Rule: %s>( R ( R ( ( s5 /usr/lib/python2.7/site-packages/boto/s3/lifecycle.pyt __repr__C s c C s6 | d k r | j S| d k r2 t � | _ | j Sd S( NR R ( R R R R ( R t namet attrst connection( ( s5 /usr/lib/python2.7/site-packages/boto/s3/lifecycle.pyt startElementF s c C s\ | d k r | | _ n@ | d k r0 | | _ n( | d k rH | | _ n t | | | � d S( Nt IDt Prefixt Status( R R R t setattr( R R t valueR ( ( s5 /usr/lib/python2.7/site-packages/boto/s3/lifecycle.pyt endElementN s c C s� d } | j d k r) | d | j 7} n | d | j 7} | d | j 7} | j d k rp | | j j � 7} n | j d k r� | | j j � 7} n | d 7} | S( Ns <Rule>s <ID>%s</ID>s <Prefix>%s</Prefix>s <Status>%s</Status>s </Rule>( R R R R R t to_xmlR ( R t s( ( s5 /usr/lib/python2.7/site-packages/boto/s3/lifecycle.pyR X s N( t __name__t __module__t __doc__R R R R R R ( ( ( s5 /usr/lib/python2.7/site-packages/boto/s3/lifecycle.pyR s R c B sA e Z d Z d d d � Z d � Z d � Z d � Z d � Z RS( s� When an object will expire. :ivar days: The number of days until the object expires :ivar date: The date when the object will expire. Must be in ISO 8601 format. c C s | | _ | | _ d S( N( R t date( R R R"