o
    ȷe                     @   s   G d d de ZdS )c                   @   s<   e Zd ZdZdddZdd Zdd Zd	d
 ZdddZdS )
DBSnapshota  
    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.
    Nc                 C   s|   || _ || _d | _d | _d | _d | _d | _d | _d | _d | _	d | _
d | _d | _d | _d | _d | _d | _d | _d | _d | _d S N)
connectionidengineengine_versionsnapshot_create_timeinstance_create_timeportstatusavailability_zonemaster_usernameallocated_storageinstance_idlicense_modeliopsoption_group_namepercent_progresssnapshot_typesource_regionvpc_id)selfr   r    r   J/var/www/ideatree/venv/lib/python3.10/site-packages/boto/rds/dbsnapshot.py__init__1   s(   
zDBSnapshot.__init__c                 C   s
   d| j  S )NzDBSnapshot:%s)r   )r   r   r   r   __repr__G   s   
zDBSnapshot.__repr__c                 C   s   d S r   r   )r   nameattrsr   r   r   r   startElementJ   s   zDBSnapshot.startElementc                 C   sv  |dkr	|| _ d S |dkr|| _d S |dkr|| _d S |dkr$|| _d S |dkr-|| _d S |dkr6|| _d S |dkrAt|| _d S |dkrJ|| _d S |d	krS|| _	d S |d
kr\|| _
d S |dkrgt|| _d S |dkrp|| _d S |dkry|| _d S |dkrt|| _d S |dkr|| _d S |dkrt|| _d S |dkr|| _d S |dkr|| _d S |dkr|| _d S t| || d S )NEngineEngineVersionInstanceCreateTimeSnapshotCreateTimeDBInstanceIdentifierDBSnapshotIdentifierPortStatusAvailabilityZoneMasterUsernameAllocatedStorageSnapshotTimeLicenseModelIopsOptionGroupNamePercentProgressSnapshotTypeSourceRegionVpcId)r   r   r   r   r   r   intr	   r
   r   r   r   timer   r   r   r   r   r   r   setattr)r   r   valuer   r   r   r   
endElementM   sN   














zDBSnapshot.endElementFc                 C   s\   | j | j}t|dkr"|D ]}|j| jkr| j|j q| jS |r+td| j | jS )a  
        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.
            z%s is not a valid Snapshot ID)r   get_all_dbsnapshotsr   len__dict__update
ValueErrorr
   )r   validatersir   r   r   r:   w   s   zDBSnapshot.update)NN)F)	__name__
__module____qualname____doc__r   r   r   r5   r:   r   r   r   r   r      s    
*r   N)objectr   r   r   r   r   <module>   s   