B
    è?F[¹  ã               @   st   d dl mZmZ G dd„ deƒZG dd„ deƒZG dd„ deƒZG dd	„ d	eƒZG d
d„ deƒZ	G dd„ deƒZ
dS )é    )ÚStatusÚDetailsc               @   s2   e Zd ZdZddd„Zdd„ Zdd„ Zd	d
„ ZdS )ÚEventad  
    A status event for an instance.

    :ivar type: The type of the event.
    :ivar id: The ID of the event.
    :ivar description: A string describing the reason for the event.
    :ivar not_before: A datestring describing the earliest time for
        the event.
    :ivar not_after: A datestring describing the latest time for
        the event.
    Nc             C   s"   || _ || _|| _|| _|| _d S )N)ÚtypeÚidÚdescriptionÚ
not_beforeÚ	not_after)Úselfr   r   r   r   r	   © r   ú4lib/python3.7/site-packages/boto/ec2/volumestatus.pyÚ__init__(   s
    zEvent.__init__c             C   s
   d| j  S )NzEvent:%s)r   )r
   r   r   r   Ú__repr__0   s    zEvent.__repr__c             C   s   d S )Nr   )r
   ÚnameÚattrsÚ
connectionr   r   r   ÚstartElement3   s    zEvent.startElementc             C   s`   |dkr|| _ nL|dkr || _n<|dkr0|| _n,|dkr@|| _n|dkrP|| _nt| ||ƒ d S )NÚ	eventTypeÚeventIdr   Z	notBeforeZnotAfter)r   r   r   r   r	   Úsetattr)r
   r   Úvaluer   r   r   r   Ú
endElement6   s    zEvent.endElement)NNNNN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r   r   r   r   r   r   r      s    
r   c               @   s   e Zd Zdd„ Zdd„ ZdS )ÚEventSetc             C   s$   |dkrt ƒ }|  |¡ |S d S d S )NÚitem)r   Úappend)r
   r   r   r   Zeventr   r   r   r   G   s
    
zEventSet.startElementc             C   s   t | ||ƒ d S )N)r   )r
   r   r   r   r   r   r   r   O   s    zEventSet.endElementN)r   r   r   r   r   r   r   r   r   r   E   s   r   c               @   s2   e Zd ZdZddd„Zdd„ Zdd„ Zd	d
„ ZdS )ÚActionzØ
    An action for an instance.

    :ivar code: The code for the type of the action.
    :ivar id: The ID of the event.
    :ivar type: The type of the event.
    :ivar description: A description of the action.
    Nc             C   s   || _ || _|| _|| _d S )N)Úcoder   r   r   )r
   r    r   r   r   r   r   r   r   ]   s    zAction.__init__c             C   s
   d| j  S )Nz	Action:%s)r    )r
   r   r   r   r   c   s    zAction.__repr__c             C   s   d S )Nr   )r
   r   r   r   r   r   r   r   f   s    zAction.startElementc             C   sP   |dkr|| _ n<|dkr || _n,|dkr0|| _n|dkr@|| _nt| ||ƒ d S )Nr   r   r   r    )r   r   r   r    r   )r
   r   r   r   r   r   r   r   i   s    zAction.endElement)NNNN)r   r   r   r   r   r   r   r   r   r   r   r   r   S   s
   
r   c               @   s   e Zd Zdd„ Zdd„ ZdS )Ú	ActionSetc             C   s$   |dkrt ƒ }|  |¡ |S d S d S )Nr   )r   r   )r
   r   r   r   Úactionr   r   r   r   x   s
    
zActionSet.startElementc             C   s   t | ||ƒ d S )N)r   )r
   r   r   r   r   r   r   r   €   s    zActionSet.endElementN)r   r   r   r   r   r   r   r   r   r!   v   s   r!   c               @   s2   e Zd ZdZddd„Zdd„ Zdd„ Zd	d
„ ZdS )ÚVolumeStatusa¸  
    Represents an EC2 Volume status as reported by
    DescribeVolumeStatus request.

    :ivar id: The volume identifier.
    :ivar zone: The availability zone of the volume
    :ivar volume_status: A Status object that reports impaired
        functionality that arises from problems internal to the instance.
    :ivar events: A list of events relevant to the instance.
    :ivar actions: A list of events relevant to the instance.
    Nc             C   s$   || _ || _tƒ | _d | _d | _d S )N)r   Úzoner   Úvolume_statusÚeventsÚactions)r
   r   r$   r   r   r   r   ‘   s
    zVolumeStatus.__init__c             C   s
   d| j  S )NzVolumeStatus:%s)r   )r
   r   r   r   r   ˜   s    zVolumeStatus.__repr__c             C   sB   |dkrt ƒ | _| jS |dkr,tƒ | _| jS |dkr:| jS d S d S )NZ	eventsSetZ
actionsSetZvolumeStatus)r   r&   r!   r'   r%   )r
   r   r   r   r   r   r   r   ›   s    zVolumeStatus.startElementc             C   s0   |dkr|| _ n|dkr || _nt| ||ƒ d S )NZvolumeIdZavailabilityZone)r   r$   r   )r
   r   r   r   r   r   r   r   §   s
    zVolumeStatus.endElement)NN)r   r   r   r   r   r   r   r   r   r   r   r   r#   „   s
   
r#   c               @   s*   e Zd ZdZd	dd„Zdd„ Zdd„ ZdS )
ÚVolumeStatusSetaš  
    A list object that contains the results of a call to
    DescribeVolumeStatus request.  Each element of the
    list will be an VolumeStatus object.

    :ivar next_token: If the response was truncated by
        the EC2 service, the next_token attribute of the
        object will contain the string that needs to be
        passed in to the next request to retrieve the next
        set of results.
    Nc             C   s   t  | ¡ || _d | _d S )N)Úlistr   r   Ú
next_token)r
   r   r   r   r   r   ½   s    
zVolumeStatusSet.__init__c             C   s$   |dkrt ƒ }|  |¡ |S d S d S )Nr   )r#   r   )r
   r   r   r   Zstatusr   r   r   r   Â   s
    
zVolumeStatusSet.startElementc             C   s   |dkr|| _ t| ||ƒ d S )NZ	NextToken)r*   r   )r
   r   r   r   r   r   r   r   Ê   s    zVolumeStatusSet.endElement)N)r   r   r   r   r   r   r   r   r   r   r   r(   °   s   
r(   N)Zboto.ec2.instancestatusr   r   Úobjectr   r)   r   r   r!   r#   r(   r   r   r   r   Ú<module>   s   *#,