
?F[c           @   s   d  e  f d     YZ d S(   t
   DBSnapshotc           B   sD   e  Z d  Z d d d  Z d   Z d   Z d   Z e d  Z	 RS(   s  
    Represents a RDS DB Snapshot

    Properties reference available from the AWS documentation at http://docs.amazonwebservices.com/AmazonRDS/latest/APIReference/API_DBSnapshot.html

    :ivar engine_version: Specifies the version of the database engine
    :ivar license_model: License model information for the restored DB instance
    :ivar allocated_storage: Specifies the allocated storage size in gigabytes (GB)
    :ivar availability_zone: Specifies the name of the Availability Zone the DB Instance was located in at the time of the DB Snapshot
    :ivar connection: boto.rds.RDSConnection associated with the current object
    :ivar engine: Specifies the name of the database engine
    :ivar id: Specifies the identifier for the DB Snapshot (DBSnapshotIdentifier)
    :ivar instance_create_time: Specifies the time (UTC) when the snapshot was taken
    :ivar instance_id: Specifies the the DBInstanceIdentifier of the DB Instance this DB Snapshot was created from (DBInstanceIdentifier)
    :ivar master_username: Provides the master username for the DB Instance
    :ivar port: Specifies the port that the database engine was listening on at the time of the snapshot
    :ivar snapshot_create_time: Provides the time (UTC) when the snapshot was taken
    :ivar status: Specifies the status of this DB Snapshot. Possible values are [ available, backing-up, creating, deleted, deleting, failed, modifying, rebooting, resetting-master-credentials ]
    :ivar iops: Specifies the Provisioned IOPS (I/O operations per second) value of the DB instance at the time of the snapshot.
    :ivar option_group_name: Provides the option group name for the DB snapshot.
    :ivar percent_progress: The percentage of the estimated data that has been transferred.
    :ivar snapshot_type: Provides the type of the DB snapshot.
    :ivar source_region: The region that the DB snapshot was created in or copied from.
    :ivar vpc_id: Provides the Vpc Id associated with the DB snapshot.
    c         C   s   | |  _  | |  _ d  |  _ d  |  _ d  |  _ d  |  _ d  |  _ d  |  _ d  |  _	 d  |  _
 d  |  _ d  |  _ d  |  _	 d  |  _ d  |  _ d  |  _ d  |  _ d  |  _ d  |  _ d  |  _ d  S(   N(   t
   connectiont   idt   Nonet   enginet   engine_versiont   snapshot_create_timet   instance_create_timet   portt   statust   availability_zonet   master_usernamet   allocated_storaget   instance_idt   license_modelt   iopst   option_group_namet   percent_progresst   snapshot_typet   source_regiont   vpc_id(   t   selfR   R   (    (    s2   lib/python2.7/site-packages/boto/rds/dbsnapshot.pyt   __init__1   s(    																			c         C   s   d |  j  S(   Ns   DBSnapshot:%s(   R   (   R   (    (    s2   lib/python2.7/site-packages/boto/rds/dbsnapshot.pyt   __repr__G   s    c         C   s   d  S(   N(    (   R   t   namet   attrsR   (    (    s2   lib/python2.7/site-packages/boto/rds/dbsnapshot.pyt   startElementJ   s    c         C   s  | d k r | |  _  n| d k r0 | |  _ n| d k rH | |  _ n| d k r` | |  _ n| d k rx | |  _ nx| d k r | |  _ n`| d k r t |  |  _ nB| d k r | |  _ n*| d	 k r | |  _	 n| d
 k r | |  _
 n | d k rt |  |  _ n | d k r,| |  _ n | d k rD| |  _ n | d k rbt |  |  _ n | d k rz| |  _ nv | d k rt |  |  _ nX | d k r| |  _ n@ | d k r| |  _ n( | d k r| |  _ n t |  | |  d  S(   Nt   Enginet   EngineVersiont   InstanceCreateTimet   SnapshotCreateTimet   DBInstanceIdentifiert   DBSnapshotIdentifiert   Portt   Statust   AvailabilityZonet   MasterUsernamet   AllocatedStoraget   SnapshotTimet   LicenseModelt   Iopst   OptionGroupNamet   PercentProgresst   SnapshotTypet   SourceRegiont   VpcId(   R   R   R   R   R   R   t   intR   R	   R
   R   R   t   timeR   R   R   R   R   R   R   t   setattr(   R   R   t   valueR   (    (    s2   lib/python2.7/site-packages/boto/rds/dbsnapshot.pyt
   endElementM   sN    c         C   s   |  j  j |  j  } t |  d k rc xU | D]. } | j |  j k r. |  j j | j  q. q. Wn | r t d |  j   n  |  j S(   s  
        Update the DB snapshot's status information by making a call to fetch
        the current snapshot attributes from the service.

        :type validate: bool
        :param validate: By default, if EC2 returns no data about the
                         instance the update method returns quietly.  If
                         the validate param is True, however, it will
                         raise a ValueError exception if no data is
                         returned from EC2.
        i    s   %s is not a valid Snapshot ID(   R   t   get_all_dbsnapshotsR   t   lent   __dict__t   updatet
   ValueErrorR	   (   R   t   validatet   rst   i(    (    s2   lib/python2.7/site-packages/boto/rds/dbsnapshot.pyR6   w   s    N(
   t   __name__t
   __module__t   __doc__R   R   R   R   R2   t   FalseR6   (    (    (    s2   lib/python2.7/site-packages/boto/rds/dbsnapshot.pyR       s   			*N(   t   objectR    (    (    (    s2   lib/python2.7/site-packages/boto/rds/dbsnapshot.pyt   <module>   s    