U
    W¨+dï  ã                   @   sT   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 )c                   @   s2   e Zd ZdZddd„Zdd„ Zdd„ Zd	d
„ ZdS )ÚConnectionSettingAttributezE
    Represents the ConnectionSetting segment of ELB Attributes.
    Nc                 C   s
   d | _ d S ©N©Úidle_timeout©ÚselfÚ
connection© r   ú;/tmp/pip-unpacked-wheel-dlxw5sjy/boto/ec2/elb/attributes.pyÚ__init__   s    z#ConnectionSettingAttribute.__init__c                 C   s
   d| j  S )NzConnectionSettingAttribute(%s)r   ©r   r   r   r	   Ú__repr__   s    ÿz#ConnectionSettingAttribute.__repr__c                 C   s   d S r   r   ©r   ÚnameÚattrsr   r   r   r	   ÚstartElement!   s    z'ConnectionSettingAttribute.startElementc                 C   s   |dkrt |ƒ| _d S )NZIdleTimeout)Úintr   ©r   r   Úvaluer   r   r   r	   Ú
endElement$   s    z%ConnectionSettingAttribute.endElement)N©Ú__name__Ú
__module__Ú__qualname__Ú__doc__r
   r   r   r   r   r   r   r	   r      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 )ÚCrossZoneLoadBalancingAttributezK
    Represents the CrossZoneLoadBalancing segement of ELB Attributes.
    Nc                 C   s
   d | _ d S r   ©Úenabledr   r   r   r	   r
   ,   s    z(CrossZoneLoadBalancingAttribute.__init__c                 C   s
   d| j  S )Nz#CrossZoneLoadBalancingAttribute(%s)r   r   r   r   r	   r   /   s    ÿz(CrossZoneLoadBalancingAttribute.__repr__c                 C   s   d S r   r   r   r   r   r	   r   3   s    z,CrossZoneLoadBalancingAttribute.startElementc                 C   s&   |dkr"|  ¡ dkrd| _nd| _d S )NÚEnabledÚtrueTF)Úlowerr   r   r   r   r	   r   6   s    z*CrossZoneLoadBalancingAttribute.endElement)Nr   r   r   r   r	   r   (   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 )ÚAccessLogAttributez=
    Represents the AccessLog segment of ELB attributes.
    Nc                 C   s   d | _ d | _d | _d | _d S r   ©r   Ús3_bucket_nameÚs3_bucket_prefixÚemit_intervalr   r   r   r	   r
   B   s    zAccessLogAttribute.__init__c                 C   s   d| j | j| j| jf S )NzAccessLog(%s, %s, %s, %s)r!   r   r   r   r	   r   H   s    üzAccessLogAttribute.__repr__c                 C   s   d S r   r   r   r   r   r	   r   P   s    zAccessLogAttribute.startElementc                 C   sZ   |dkr$|  ¡ dkrd| _qVd| _n2|dkr4|| _n"|dkrD|| _n|dkrVt|ƒ| _d S )Nr   r   TFZS3BucketNameZS3BucketPrefixZEmitInterval)r   r   r"   r#   r   r$   r   r   r   r	   r   S   s    zAccessLogAttribute.endElement)Nr   r   r   r   r	   r    >   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 )ÚConnectionDrainingAttributezF
    Represents the ConnectionDraining segment of ELB attributes.
    Nc                 C   s   d | _ d | _d S r   ©r   Útimeoutr   r   r   r	   r
   e   s    z$ConnectionDrainingAttribute.__init__c                 C   s   d| j | jf S )NzConnectionDraining(%s, %s)r&   r   r   r   r	   r   i   s    þz$ConnectionDrainingAttribute.__repr__c                 C   s   d S r   r   r   r   r   r	   r   o   s    z(ConnectionDrainingAttribute.startElementc                 C   s:   |dkr$|  ¡ dkrd| _q6d| _n|dkr6t|ƒ| _d S )Nr   r   TFÚTimeout)r   r   r   r'   r   r   r   r	   r   r   s    z&ConnectionDrainingAttribute.endElement)Nr   r   r   r   r	   r%   a   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 )ÚLbAttributesz@
    Represents the Attributes of an Elastic Load Balancer.
    Nc                 C   s:   || _ t| j ƒ| _t| j ƒ| _t| j ƒ| _t| j ƒ| _d S r   )	r   r   Úcross_zone_load_balancingr    Ú
access_logr%   Úconnection_drainingr   Úconnecting_settingsr   r   r   r	   r
   €   s    ÿzLbAttributes.__init__c                 C   s(   dt | jƒt | jƒt | jƒt | jƒf S )NzLbAttributes(%s, %s, %s, %s))Úreprr*   r+   r,   r-   r   r   r   r	   r   ˆ   s    üzLbAttributes.__repr__c                 C   s<   |dkr| j S |dkr| jS |dkr*| jS |dkr8| jS d S )NZCrossZoneLoadBalancingZ	AccessLogZConnectionDrainingZConnectionSettings)r*   r+   r,   r-   r   r   r   r	   r      s    zLbAttributes.startElementc                 C   s   d S r   r   r   r   r   r	   r   ™   s    zLbAttributes.endElement)Nr   r   r   r   r	   r)   |   s
   

r)   N)Úobjectr   r   r    r%   r)   r   r   r   r	   Ú<module>   s   #