o .&a@sddlZddlmZddlmZeeZddiddiddd d d dd d d ddddigZddgZddZ ddZ ddZ Gddde Z Gddde ZGddde ZdS)N) configutils) exceptionsname service_rolelog_uriinstance_profileec2_attributesInstanceProfile)rarg_name arg_value_keykey_nameKeyNameenable_debuggingboolean)rtype key_pair_filestringcst}fdd|DS)Ncsg|] }|r|qS) is_applicable).0xcommandrB/usr/lib/python3/dist-packages/awscli/customizations/emr/config.py $sz1get_applicable_configurations..) _create_supported_configurations)rsupported_configurationsrrrget_applicable_configurations"srcCstd|vr|dnd}|dkr.d|vr|dn|d}d|vr"|dnd}t|d||}|S|dkr8t|d}|S)Nrrr rr r)StringConfigurationBooleanConfiguration)config config_typeconfig_arg_nameconfig_arg_value_key configurationrrr_create_supported_configuration's$ r%cCsddtDS)NcSsg|]}t|qSr)r%)rr rrrr9s z4_create_supported_configurations..)SUPPORTED_CONFIG_LISTrrrrr8src@s4eZdZddZddZddZddZd d Zd S) ConfigurationcCs||_||_dSN)rr )selfrr rrr__init__?s zConfiguration.__init__cCtd)NrNotImplementedErrorr)rrrrrCzConfiguration.is_applicablecCr+)N is_presentr,r) parsed_argsrrrr0Fr/zConfiguration.is_presentcCr+)Naddr,r)rr2valuerrrr3Ir/zConfiguration.addcCs t||dSr()getattr)r)r2r rrr _check_argLs zConfiguration._check_argN)__name__ __module__ __qualname__r*rr0r3r7rrrrr'=s  r'cs6eZdZd fdd ZddZddZdd ZZS) rNcstt|||||_dSr()superrr*r )r)rr r  __class__rrr*Rs zStringConfiguration.__init__cCs||jddSN_-) supports_argr replacer.rrrrVsz!StringConfiguration.is_applicablecCs4|js |||jS|||jo|jt||jvSr()r r7r r6r1rrrr0Ys zStringConfiguration.is_presentcCsJ|js t||j|dS|||jst||ji|t||j|j<dSr()r setattrr r7r6r4rrrr3`s zStringConfiguration.addr(r8r9r:r*rr0r3 __classcell__rrr<rrPs rcs4eZdZfddZddZddZddZZS) rcs tt|||d||_dS)Nno_)r;rr*no_version_arg_name)r)rr<rrr*kszBooleanConfiguration.__init__cCs(||jddo||jddSr>)rAr rBrGr.rrrrosz"BooleanConfiguration.is_applicablecCs|||jp |||jSr()r7r rGr1rrrr0ss zBooleanConfiguration.is_presentcCsr|dkrt||jdt||jddS|dkr,t||jdt||jddStj||jt|jd)NtrueTFfalse) config_value config_keyprofile_var_name) lowerrCr rGrInvalidBooleanConfigErrorrget_current_profile_var_name_sessionr4rrrr3ws  zBooleanConfiguration.addrDrrr<rris  r)loggingawscli.customizations.emrrr getLoggerr8LOGr&TYPESrr%robjectr'rrrrrrs,