ó
č?F[c           @   s*   d  d l  m Z d e f d     YZ d S(   i’’’’(   t	   EC2Objectt   Addressc           B   sh   e  Z d  Z d d d d  Z d   Z d   Z e d  Z e Z	 d d d e e d  Z
 e d  Z RS(   sä  
    Represents an EC2 Elastic IP Address

    :ivar public_ip: The Elastic IP address.
    :ivar instance_id: The instance the address is associated with (if any).
    :ivar domain: Indicates whether the address is a EC2 address or a VPC address (standard|vpc).
    :ivar allocation_id: The allocation ID for the address (VPC addresses only).
    :ivar association_id: The association ID for the address (VPC addresses only).
    :ivar network_interface_id: The network interface (if any) that the address is associated with (VPC addresses only).
    :ivar network_interface_owner_id: The owner IID (VPC addresses only).
    :ivar private_ip_address: The private IP address associated with the Elastic IP address (VPC addresses only).
    c         C   sk   t  t |   j |  | |  _ | |  _ | |  _ d  |  _ d  |  _ d  |  _	 d  |  _
 d  |  _ d  |  _ d  S(   N(   t   superR   t   __init__t
   connectiont	   public_ipt   instance_idt   Nonet   domaint   allocation_idt   association_idt   network_interface_idt   network_interface_owner_idt   private_ip_address(   t   selfR   R   R   (    (    s/   lib/python2.7/site-packages/boto/ec2/address.pyR   (   s    								c         C   s   d |  j  S(   Ns
   Address:%s(   R   (   R   (    (    s/   lib/python2.7/site-packages/boto/ec2/address.pyt   __repr__4   s    c         C   sŌ   | d k r | |  _  nø | d k r0 | |  _ n  | d k rH | |  _ n | d k r` | |  _ np | d k rx | |  _ nX | d k r | |  _ n@ | d k rØ | |  _ n( | d k rĄ | |  _ n t |  | |  d  S(	   Nt   publicIpt
   instanceIdR   t   allocationIdt   associationIdt   networkInterfaceIdt   networkInterfaceOwnerIdt   privateIpAddress(	   R   R   R   R	   R
   R   R   R   t   setattr(   R   t   namet   valueR   (    (    s/   lib/python2.7/site-packages/boto/ec2/address.pyt
   endElement7   s"    c         C   sE   |  j  r% |  j j d |  j  d |  S|  j j d |  j d |  Sd S(   sz   
        Free up this Elastic IP address.
        :see: :meth:`boto.ec2.connection.EC2Connection.release_address`
        R	   t   dry_runR   N(   R	   R   t   release_addressR   (   R   R   (    (    s/   lib/python2.7/site-packages/boto/ec2/address.pyt   releaseK   s    			c         C   sz   |  j  rF |  j j d | d |  j d |  j  d | d | d | d |  S|  j j d | d |  j d | d | d | d |  S(   s    
        Associate this Elastic IP address with a currently running instance.
        :see: :meth:`boto.ec2.connection.EC2Connection.associate_address`
        R   R   R	   R   R   t   allow_reassociationR   (   R	   R   t   associate_addressR   (   R   R   R   R   R   R   (    (    s/   lib/python2.7/site-packages/boto/ec2/address.pyt	   associate\   s     				c         C   sE   |  j  r% |  j j d |  j  d |  S|  j j d |  j d |  Sd S(   s¦   
        Disassociate this Elastic IP address from a currently running instance.
        :see: :meth:`boto.ec2.connection.EC2Connection.disassociate_address`
        R
   R   R   N(   R
   R   t   disassociate_addressR   (   R   R   (    (    s/   lib/python2.7/site-packages/boto/ec2/address.pyt   disassociatet   s    			N(   t   __name__t
   __module__t   __doc__R   R   R   R   t   FalseR   t   deleteR    R"   (    (    (    s/   lib/python2.7/site-packages/boto/ec2/address.pyR      s   		N(   t   boto.ec2.ec2objectR    R   (    (    (    s/   lib/python2.7/site-packages/boto/ec2/address.pyt   <module>   s   