o
    ȷem                     @   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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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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G d,d- d-eZG d.d/ d/eZG d0d1 d1eZG d2d3 d3eZG d4d5 d5eZG d6d7 d7eZG d8d9 d9eZG d:d; d;eZ G d<d= d=eZ!G d>d? d?eZ"G d@dA dAeZ#G dBdC dCeZ$G dDdE dEeZ%G dFdG dGeZ&G dHdI dIeZ'G dJdK dKeZ(G dLdM dMeZ)G dNdO dOeZ*G dPdQ dQeZ+G dRdS dSeZ,G dTdU dUeZ-G dVdW dWeZ.G dXdY dYeZ/G dZd[ d[eZ0G d\d] d]eZ1G d^d_ d_eZ2G d`da daeZ3G dbdc dceZ4G ddde dee4Z5G dfdg dgeZ6G dhdi dieZ7G djdk dkeZ8G dldm dmeZ9G dndo doeZ:G dpdq dqeZ;drS )sz6Classify responses from layer1 and strict type values.    )datetime)sixc                   @   s$   e Zd Zdd Zdd Zdd ZdS )
BaseObjectc                 C   sd   | j jd }d}t| jD ]\}}|d7 }|dkr|d7 }||d 7 }|| |7 }q|d7 }|S )Nz{ r      z, z: z })	__class____name__r   	iteritems__dict___repr_by_type)selfresultcounterkeyvalue r   N/var/www/ideatree/venv/lib/python3.10/site-packages/boto/beanstalk/response.py__repr__   s   zBaseObject.__repr__c                 C   sJ   d}t |tr|| 7 }|S t |tr|| |7 }|S |t|7 }|S )N )
isinstanceResponser   list
_repr_liststr)r   r   r   r   r   r   r
      s   

zBaseObject._repr_by_typec                 C   sL   d}|D ]}|d|  | d 7 }qt|dkr |d d d }|d7 }|S )N[ ,r   ])r
   len)r   arrayr   r   r   r   r   r       s   zBaseObject._repr_listN)r   
__module____qualname__r   r
   r   r   r   r   r   r      s    r   c                          e Zd Z fddZ  ZS )r   c                    2   t t|   |d rt|d | _d S d | _d S )NResponseMetadata)superr   __init__r$   response_metadatar   responser   r   r   r&   ,      
zResponse.__init__r   r    r!   r&   __classcell__r   r   r*   r   r   +       r   c                       r"   )r$   c                        t t|   t|d | _d S )N	RequestId)r%   r$   r&   r   
request_idr(   r*   r   r   r&   6      zResponseMetadata.__init__r,   r   r   r*   r   r$   5   r.   r$   c                       r"   )ApplicationDescriptionc                    s   t t|   t|d | _g | _|d r&|d D ]}t|}| j| qt|d | _	t|d | _
t|d | _g | _|d rU|d D ]}t|}| j| qHd S d S )NApplicationNameConfigurationTemplatesDateCreatedDateUpdatedDescriptionVersions)r%   r3   r&   r   application_nameconfiguration_templatesappendr   fromtimestampdate_createddate_updateddescriptionversions)r   r)   memberconfiguration_templateversionr*   r   r   r&   =   s"   zApplicationDescription.__init__r,   r   r   r*   r   r3   <   r.   r3   c                       r"   )ApplicationVersionDescriptionc                    sz   t t|   t|d | _t|d | _t|d | _t|d | _	|d r1t
|d | _nd | _t|d | _d S )Nr4   r6   r7   r8   SourceBundleVersionLabel)r%   rE   r&   r   r:   r   r=   r>   r?   r@   
S3Locationsource_bundleversion_labelr(   r*   r   r   r&   Q   s   z&ApplicationVersionDescription.__init__r,   r   r   r*   r   rE   P   r.   rE   c                       r"   )AutoScalingGroupc                    r/   NName)r%   rK   r&   r   namer(   r*   r   r   r&   `   r2   zAutoScalingGroup.__init__r,   r   r   r*   r   rK   _   r.   rK   c                       r"   )ConfigurationOptionDescriptionc                    s  t t|   t|d | _t|d | _|d rt|d nd | _|d r,t|d nd | _|d r9t|d nd | _	t|d | _
t|d | _|d rVt|d | _nd | _t|d	 | _g | _|d
 rx|d
 D ]}t|}| j| qkt|d | _d S )NChangeSeverityDefaultValue	MaxLengthMaxValueMinValuerM   	NamespaceRegexUserDefinedValueOptions	ValueType)r%   rO   r&   r   change_severitydefault_valueint
max_length	max_value	min_valuerN   	namespaceOptionRestrictionRegexregexuser_definedvalue_optionsr<   
value_type)r   r)   rB   value_optionr*   r   r   r&   g   s$   z'ConfigurationOptionDescription.__init__r,   r   r   r*   r   rO   f   r.   rO   c                       r"   )ConfigurationOptionSettingc                    s<   t t|   t|d | _t|d | _t|d | _d S )NrU   
OptionNameValue)r%   rg   r&   r   r`   option_namer   r(   r*   r   r   r&      s   z#ConfigurationOptionSetting.__init__r,   r   r   r*   r   rg   ~   r.   rg   c                       r"   ) ConfigurationSettingsDescriptionc                    s   t t|   t|d | _t|d | _t|d | _t|d | _	t|d | _
t|d | _g | _|d rK|d D ]}t|}| j| q>t|d | _t|d	 | _d S )
Nr4   r6   r7   DeploymentStatusr8   EnvironmentNameOptionSettingsSolutionStackNameTemplateName)r%   rk   r&   r   r:   r   r=   r>   r?   deployment_statusr@   environment_nameoption_settingsrg   r<   solution_stack_nametemplate_namer   r)   rB   option_settingr*   r   r   r&      s   z)ConfigurationSettingsDescription.__init__r,   r   r   r*   r   rk      r.   rk   c                       r"   )EnvironmentDescriptionc                    s   t t|   t|d | _t|d | _t|d | _t|d | _	t|d | _
t|d | _t|d | _t|d | _t|d	 | _|d
 rTt|d
 | _nd | _t|d | _t|d | _t|d | _t|d | _d S )Nr4   CNAMEr6   r7   r8   EndpointURLEnvironmentIdrm   Health	Resourcesro   Statusrp   rG   )r%   rx   r&   r   r:   cnamer   r=   r>   r?   r@   endpoint_urlenvironment_idrr   healthEnvironmentResourcesDescription	resourcesrt   statusru   rJ   r(   r*   r   r   r&      s"   zEnvironmentDescription.__init__r,   r   r   r*   r   rx      r.   rx   c                       r"   )EnvironmentInfoDescriptionc                    sL   t t|   t|d | _t|d | _t|d | _t|d | _	d S )NEc2InstanceIdInfoTypeMessageSampleTimestamp)
r%   r   r&   r   ec2_instance_id	info_typemessager   r=   sample_timestampr(   r*   r   r   r&      s
   z#EnvironmentInfoDescription.__init__r,   r   r   r*   r   r      r.   r   c                       r"   )EnvironmentResourceDescriptionc                    s  t t|   g | _|d r|d D ]}t|}| j| qt|d | _g | _|d r>|d D ]}t	|}| j| q1g | _
|d rV|d D ]}t|}| j
| qIg | _|d rn|d D ]}t|}| j| qag | _|d r|d D ]}t|}| j| qyd S d S )NAutoScalingGroupsrm   	InstancesLaunchConfigurationsLoadBalancersTriggers)r%   r   r&   auto_scaling_groupsrK   r<   r   rr   	instancesInstancelaunch_configurationsLaunchConfigurationload_balancersLoadBalancertriggersTrigger)r   r)   rB   auto_scaling_groupinstancelaunch_configurationload_balancertriggerr*   r   r   r&      s:   z'EnvironmentResourceDescription.__init__r,   r   r   r*   r   r      r.   r   c                       r"   )r   c                    r#   )Nr   )r%   r   r&   LoadBalancerDescriptionr   r(   r*   r   r   r&      r+   z(EnvironmentResourcesDescription.__init__r,   r   r   r*   r   r      r.   r   c                       r"   )EventDescriptionc                    s   t t|   t|d | _t|d | _t|d | _t|d | _	t|d | _
t|d | _t|d | _t|d | _d S )	Nr4   rm   	EventDater   r0   Severityrp   rG   )r%   r   r&   r   r:   rr   r   r=   
event_dater   r1   severityru   rJ   r(   r*   r   r   r&      s   zEventDescription.__init__r,   r   r   r*   r   r      r.   r   c                       r"   )r   c                    r/   )NId)r%   r   r&   r   idr(   r*   r   r   r&      r2   zInstance.__init__r,   r   r   r*   r   r      r.   r   c                       r"   )r   c                    r/   rL   )r%   r   r&   r   rN   r(   r*   r   r   r&      r2   zLaunchConfiguration.__init__r,   r   r   r*   r   r      r.   r   c                       r"   )Listenerc                    s:   t t|   |d rt|d nd | _t|d | _d S )NPortProtocol)r%   r   r&   r\   portr   protocolr(   r*   r   r   r&     s   zListener.__init__r,   r   r   r*   r   r     r.   r   c                       r"   )r   c                    r/   rL   )r%   r   r&   r   rN   r(   r*   r   r   r&   
  r2   zLoadBalancer.__init__r,   r   r   r*   r   r   	  r.   r   c                       r"   )r   c                    s^   t t|   t|d | _g | _|d r&|d D ]}t|}| j| qt|d | _d S )NDomain	ListenersLoadBalancerName)	r%   r   r&   r   domain	listenersr   r<   load_balancer_name)r   r)   rB   listenerr*   r   r   r&     s   z LoadBalancerDescription.__init__r,   r   r   r*   r   r     r.   r   c                       r"   )ra   c                    s&   t t|   |d | _|d | _d S )NLabelPattern)r%   ra   r&   labelpatternr(   r*   r   r   r&     s   
zOptionRestrictionRegex.__init__r,   r   r   r*   r   ra     r.   ra   c                       r"   )SolutionStackDescriptionc                    sP   t t|   g | _|d r|d D ]}t|}| j| qt|d | _d S )NPermittedFileTypesro   )r%   r   r&   permitted_file_typesr   r<   rt   )r   r)   rB   permitted_file_typer*   r   r   r&   &  s   z!SolutionStackDescription.__init__r,   r   r   r*   r   r   %  r.   r   c                       r"   )rH   c                    s.   t t|   t|d | _t|d | _d S )NS3BucketS3Key)r%   rH   r&   r   	s3_buckets3_keyr(   r*   r   r   r&   2  s   zS3Location.__init__r,   r   r   r*   r   rH   1  r.   rH   c                       r"   )r   c                    r/   rL   )r%   r   r&   r   rN   r(   r*   r   r   r&   :  r2   zTrigger.__init__r,   r   r   r*   r   r   9  r.   r   c                       r"   )ValidationMessagec                    sJ   t t|   t|d | _t|d | _t|d | _t|d | _d S )Nr   rU   rh   r   )r%   r   r&   r   r   r`   rj   r   r(   r*   r   r   r&   A  s
   zValidationMessage.__init__r,   r   r   r*   r   r   @  r.   r   c                       r"   )CheckDNSAvailabilityResponsec                    s@   |d }t t| | |d }t|d | _t|d | _d S )Nr   CheckDNSAvailabilityResultFullyQualifiedCNAME	Available)r%   r   r&   r   fully_qualified_cnamebool	availabler(   r*   r   r   r&   L  s
   z%CheckDNSAvailabilityResponse.__init__r,   r   r   r*   r   r   K  r.   r   c                   @      e Zd ZdS )CheckDnsAvailabilityResponseNr   r    r!   r   r   r   r   r   W      r   c                       r"   )CreateApplicationResponsec                    D   |d }t t| | |d }|d rt|d | _d S d | _d S )Nr   CreateApplicationResultApplication)r%   r   r&   r3   applicationr(   r*   r   r   r&   [     
z"CreateApplicationResponse.__init__r,   r   r   r*   r   r   Z  r.   r   c                       r"   ) CreateApplicationVersionResponsec                    r   )Nr   CreateApplicationVersionResultApplicationVersion)r%   r   r&   rE   application_versionr(   r*   r   r   r&   g  r   z)CreateApplicationVersionResponse.__init__r,   r   r   r*   r   r   f  r.   r   c                       r"   )#CreateConfigurationTemplateResponsec                       |d }t t| | |d }t|d | _t|d | _t|d | _t|d | _	t|d | _
t|d | _g | _|d	 rT|d	 D ]}t|}| j| qGt|d
 | _t|d | _d S )Nr   !CreateConfigurationTemplateResultr4   r6   r7   rl   r8   rm   rn   ro   rp   )r%   r   r&   r   r:   r   r=   r>   r?   rq   r@   rr   rs   rg   r<   rt   ru   rv   r*   r   r   r&   s      z,CreateConfigurationTemplateResponse.__init__r,   r   r   r*   r   r   r  r.   r   c                       r"   )CreateEnvironmentResponsec                       |d }t t| | |d }t|d | _t|d | _t|d | _t|d | _	t|d | _
t|d | _t|d	 | _t|d
 | _t|d | _|d r]t|d | _nd | _t|d | _t|d | _t|d | _t|d | _d S )Nr   CreateEnvironmentResultr4   ry   r6   r7   r8   rz   r{   rm   r|   r}   ro   r~   rp   rG   )r%   r   r&   r   r:   r   r   r=   r>   r?   r@   r   r   rr   r   r   r   rt   r   ru   rJ   r(   r*   r   r   r&     &   z"CreateEnvironmentResponse.__init__r,   r   r   r*   r   r     r.   r   c                       r"   )CreateStorageLocationResponsec                    s2   |d }t t| | |d }t|d | _d S )Nr   CreateStorageLocationResultr   )r%   r   r&   r   r   r(   r*   r   r   r&     s   z&CreateStorageLocationResponse.__init__r,   r   r   r*   r   r     r.   r   c                       r"   )DeleteApplicationResponsec                       |d }t t| | d S )Nr   )r%   r   r&   r(   r*   r   r   r&        z"DeleteApplicationResponse.__init__r,   r   r   r*   r   r     r.   r   c                       r"   ) DeleteApplicationVersionResponsec                    r   )Nr   )r%   r   r&   r(   r*   r   r   r&     r   z)DeleteApplicationVersionResponse.__init__r,   r   r   r*   r   r     r.   r   c                       r"   )#DeleteConfigurationTemplateResponsec                    r   )Nr   )r%   r   r&   r(   r*   r   r   r&     r   z,DeleteConfigurationTemplateResponse.__init__r,   r   r   r*   r   r     r.   r   c                       r"   )&DeleteEnvironmentConfigurationResponsec                    r   )Nr   )r%   r   r&   r(   r*   r   r   r&     r   z/DeleteEnvironmentConfigurationResponse.__init__r,   r   r   r*   r   r     r.   r   c                       r"   )#DescribeApplicationVersionsResponsec                    X   |d }t t| | |d }g | _|d r(|d D ]}t|}| j| qd S d S )Nr   !DescribeApplicationVersionsResultApplicationVersions)r%   r   r&   application_versionsrE   r<   )r   r)   rB   r   r*   r   r   r&        z,DescribeApplicationVersionsResponse.__init__r,   r   r   r*   r   r     r.   r   c                       r"   )DescribeApplicationsResponsec                    r   )Nr   DescribeApplicationsResultApplications)r%   r   r&   applicationsr3   r<   )r   r)   rB   r   r*   r   r   r&     r   z%DescribeApplicationsResponse.__init__r,   r   r   r*   r   r     r.   r   c                       r"   )$DescribeConfigurationOptionsResponsec                    b   |d }t t| | |d }g | _|d r(|d D ]}t|}| j| qt|d | _d S )Nr   "DescribeConfigurationOptionsResultOptionsro   )r%   r   r&   optionsrO   r<   r   rt   )r   r)   rB   optionr*   r   r   r&        z-DescribeConfigurationOptionsResponse.__init__r,   r   r   r*   r   r     r.   r   c                       r"   )%DescribeConfigurationSettingsResponsec                    r   )Nr   #DescribeConfigurationSettingsResultConfigurationSettings)r%   r   r&   configuration_settingsrk   r<   )r   r)   rB   configuration_settingr*   r   r   r&     r   z.DescribeConfigurationSettingsResponse.__init__r,   r   r   r*   r   r     r.   r   c                       r"   )$DescribeEnvironmentResourcesResponsec                    r   )Nr   "DescribeEnvironmentResourcesResultEnvironmentResources)r%   r   r&   r   environment_resourcesr(   r*   r   r   r&     r   z-DescribeEnvironmentResourcesResponse.__init__r,   r   r   r*   r   r     r.   r   c                       r"   )DescribeEnvironmentsResponsec                    r   )Nr  DescribeEnvironmentsResultEnvironments)r%   r  r&   environmentsrx   r<   )r   r)   rB   environmentr*   r   r   r&     r   z%DescribeEnvironmentsResponse.__init__r,   r   r   r*   r   r    r.   r  c                       r"   )DescribeEventsResponsec                    r   )Nr  DescribeEventsResultEvents	NextToken)r%   r  r&   eventsr   r<   r   next_tokent)r   r)   rB   eventr*   r   r   r&     r   zDescribeEventsResponse.__init__r,   r   r   r*   r   r    r.   r  c                       r"   )#ListAvailableSolutionStacksResponsec                    s   |d }t t| | |d }g | _|d r(|d D ]}t|}| j| qg | _|d r@|d D ]}t|}| j| q3d S d S )Nr  !ListAvailableSolutionStacksResultSolutionStackDetailsSolutionStacks)r%   r  r&   solution_stack_detailsr   r<   solution_stacksr   )r   r)   rB   solution_stack_detailsolution_stackr*   r   r   r&     s   z,ListAvailableSolutionStacksResponse.__init__r,   r   r   r*   r   r    r.   r  c                       r"   )RebuildEnvironmentResponsec                    r   )Nr  )r%   r  r&   r(   r*   r   r   r&   0  r   z#RebuildEnvironmentResponse.__init__r,   r   r   r*   r   r  /  r.   r  c                       r"   )RequestEnvironmentInfoResponsec                    r   )Nr  )r%   r  r&   r(   r*   r   r   r&   6  r   z'RequestEnvironmentInfoResponse.__init__r,   r   r   r*   r   r  5  r.   r  c                       r"   )RestartAppServerResponsec                    r   )Nr  )r%   r  r&   r(   r*   r   r   r&   <  r   z!RestartAppServerResponse.__init__r,   r   r   r*   r   r  ;  r.   r  c                       r"   )RetrieveEnvironmentInfoResponsec                    r   )Nr  RetrieveEnvironmentInfoResultEnvironmentInfo)r%   r  r&   environment_infor   r<   )r   r)   rB   r  r*   r   r   r&   B  r   z(RetrieveEnvironmentInfoResponse.__init__r,   r   r   r*   r   r  A  r.   r  c                       r"   )SwapEnvironmentCNAMEsResponsec                    r   )Nr  )r%   r  r&   r(   r*   r   r   r&   O  r   z&SwapEnvironmentCNAMEsResponse.__init__r,   r   r   r*   r   r  N  r.   r  c                   @   r   )SwapEnvironmentCnamesResponseNr   r   r   r   r   r  T  r   r  c                       r"   )TerminateEnvironmentResponsec                    r   )Nr   TerminateEnvironmentResultr4   ry   r6   r7   r8   rz   r{   rm   r|   r}   ro   r~   rp   rG   )r%   r   r&   r   r:   r   r   r=   r>   r?   r@   r   r   rr   r   r   r   rt   r   ru   rJ   r(   r*   r   r   r&   X  r   z%TerminateEnvironmentResponse.__init__r,   r   r   r*   r   r   W  r.   r   c                       r"   )UpdateApplicationResponsec                    r   )Nr"  UpdateApplicationResultr   )r%   r"  r&   r3   r   r(   r*   r   r   r&   q  r   z"UpdateApplicationResponse.__init__r,   r   r   r*   r   r"  p  r.   r"  c                       r"   ) UpdateApplicationVersionResponsec                    r   )Nr$  UpdateApplicationVersionResultr   )r%   r$  r&   rE   r   r(   r*   r   r   r&   }  r   z)UpdateApplicationVersionResponse.__init__r,   r   r   r*   r   r$  |  r.   r$  c                       r"   )#UpdateConfigurationTemplateResponsec                    r   )Nr&  !UpdateConfigurationTemplateResultr4   r6   r7   rl   r8   rm   rn   ro   rp   )r%   r&  r&   r   r:   r   r=   r>   r?   rq   r@   rr   rs   rg   r<   rt   ru   rv   r*   r   r   r&     r   z,UpdateConfigurationTemplateResponse.__init__r,   r   r   r*   r   r&    r.   r&  c                       r"   )UpdateEnvironmentResponsec                    r   )Nr(  UpdateEnvironmentResultr4   ry   r6   r7   r8   rz   r{   rm   r|   r}   ro   r~   rp   rG   )r%   r(  r&   r   r:   r   r   r=   r>   r?   r@   r   r   rr   r   r   r   rt   r   ru   rJ   r(   r*   r   r   r&     r   z"UpdateEnvironmentResponse.__init__r,   r   r   r*   r   r(    r.   r(  c                       r"   )%ValidateConfigurationSettingsResponsec                    r   )Nr*  #ValidateConfigurationSettingsResultMessages)r%   r*  r&   messagesr   r<   )r   r)   rB   r   r*   r   r   r&     r   z.ValidateConfigurationSettingsResponse.__init__r,   r   r   r*   r   r*    r.   r*  N)<__doc__r   boto.compatr   objectr   r   r$   r3   rE   rK   rO   rg   rk   rx   r   r   r   r   r   r   r   r   r   ra   r   rH   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r  r  r  r  r  r  r  r  r  r   r"  r$  r&  r(  r*  r   r   r   r   <module>   st    %
	
 
	