U
    3ìd
  ã                   @   s@   d Z ddlmZ ddlmZ G dd„ deƒZG dd„ deƒZdS )	z 
Represents an Internet Gateway
é    )ÚTaggedEC2Object)Ú	ResultSetc                       s:   e Zd Zd
‡ fdd„	Zdd„ Z‡ fdd„Zdd	„ Z‡  ZS )ÚInternetGatewayNc                    s    t t| ƒ |¡ d | _g | _d S ©N)Úsuperr   Ú__init__ÚidÚattachments©ÚselfÚ
connection©Ú	__class__© ú</tmp/pip-unpacked-wheel-d7dsrkjd/boto/vpc/internetgateway.pyr      s    zInternetGateway.__init__c                 C   s
   d| j  S )NzInternetGateway:%s)r   ©r   r   r   r   Ú__repr__#   s    zInternetGateway.__repr__c                    sF   t t| ƒ |||¡}|d k	r |S |dkr>tdtfgƒ| _| jS d S d S )NZattachmentSetÚitem)r   r   ÚstartElementr   ÚInternetGatewayAttachmentr	   )r   ÚnameÚattrsr   Úresultr   r   r   r   &   s    zInternetGateway.startElementc                 C   s    |dkr|| _ nt| ||ƒ d S )NZinternetGatewayId)r   Úsetattr©r   r   Úvaluer   r   r   r   Ú
endElement3   s    zInternetGateway.endElement)N)Ú__name__Ú
__module__Ú__qualname__r   r   r   r   Ú__classcell__r   r   r   r   r      s   r   c                   @   s.   e Zd Zd
dd„Zdd„ Zdd„ Zdd	„ ZdS )r   Nc                 C   s   d | _ d | _d S r   ©Úvpc_idÚstater
   r   r   r   r   :   s    z"InternetGatewayAttachment.__init__c                 C   s
   d| j  S )NzInternetGatewayAttachment:%s)r"   r   r   r   r   r   >   s    z"InternetGatewayAttachment.__repr__c                 C   s   d S r   r   )r   r   r   r   r   r   r   r   A   s    z&InternetGatewayAttachment.startElementc                 C   s"   |dkr|| _ n|dkr|| _d S )NZvpcIdr#   r!   r   r   r   r   r   D   s    z$InternetGatewayAttachment.endElement)N)r   r   r   r   r   r   r   r   r   r   r   r   9   s   
r   N)Ú__doc__Zboto.ec2.ec2objectr   Zboto.resultsetr   r   Úobjectr   r   r   r   r   Ú<module>   s   