<s> import logging <EOL> from awscli . customizations . flatten import FlattenArguments , SEP <EOL> from botocore . compat import OrderedDict <EOL> LOG = logging . getLogger ( __name__ ) <EOL> DEFAULT_VALUE_TYPE_MAP = { <EOL> '<STR_LIT>' : int , <EOL> '<STR_LIT>' : float , <EOL> '<STR_LIT>' : int , <EOL> '<STR_LIT>' : float <EOL> } <EOL> def index_hydrate ( params , container , cli_type , key , value ) : <EOL> """<STR_LIT>""" <EOL> if '<STR_LIT>' not in params : <EOL> params [ '<STR_LIT>' ] = { } <EOL> if '<STR_LIT>' not in params [ '<STR_LIT>' ] : <EOL> raise RuntimeError ( '<STR_LIT>' ) <EOL> _type = params [ '<STR_LIT>' ] [ '<STR_LIT>' ] <EOL> _type = '<STR_LIT>' . join ( [ i . capitalize ( ) for i in _type . split ( '<STR_LIT:->' ) ] ) <EOL> if _type == '<STR_LIT>' : <EOL> _type = '<STR_LIT>' <EOL> if key . split ( SEP ) [ - <NUM_LIT:1> ] == '<STR_LIT>' : <EOL> value = DEFAULT_VALUE_TYPE_MAP . get ( _type , lambda x : x ) ( value ) <EOL> if _type + '<STR_LIT>' not in params [ '<STR_LIT>' ] : <EOL> params [ '<STR_LIT>' ] [ _type + '<STR_LIT>' ] = { } <EOL> params [ '<STR_LIT>' ] [ _type + '<STR_LIT>' ] [ key . split ( SEP ) [ - <NUM_LIT:1> ] ] = value <EOL> FLATTEN_CONFIG = { <EOL> "<STR_LIT>" : { <EOL> "<STR_LIT>" : { <EOL> "<STR_LIT>" : False , <EOL> "<STR_LIT>" : OrderedDict ( [ <EOL> ( "<STR_LIT>" , { "<STR_LIT:name>" : "<STR_LIT:name>" } ) , <EOL> ( "<STR_LIT>" , { "<STR_LIT:name>" : "<STR_LIT>" } ) , ] ) , <EOL> } <EOL> } , <EOL> "<STR_LIT>" : { <EOL> "<STR_LIT>" : { <EOL> "<STR_LIT>" : False , <EOL> "<STR_LIT>" : OrderedDict ( [ <EOL> ( "<STR_LIT>" , { "<STR_LIT:name>" : "<STR_LIT:name>" } ) , <EOL> ( "<STR_LIT>" , { "<STR_LIT:name>" : "<STR_LIT:type>" } ) , <EOL> ( "<STR_LIT>" , { "<STR_LIT:name>" : "<STR_LIT>" , <EOL> "<STR_LIT:type>" : "<STR_LIT:string>" , <EOL> "<STR_LIT>" : index_hydrate } ) , <EOL> ( "<STR_LIT>" , { "<STR_LIT:name>" : "<STR_LIT>" , <EOL> "<STR_LIT>" : index_hydrate } ) , <EOL> ( "<STR_LIT>" , { "<STR_LIT:name>" : "<STR_LIT>" , <EOL> "<STR_LIT>" : index_hydrate } ) , <EOL> ( "<STR_LIT>" , { "<STR_LIT:name>" : "<STR_LIT>" , <EOL> "<STR_LIT>" : index_hydrate } ) , <EOL> ( "<STR_LIT>" , { "<STR_LIT:name>" : "<STR_LIT>" , <EOL> "<STR_LIT>" : index_hydrate } ) , <EOL> ( "<STR_LIT>" , { "<STR_LIT:name>" : "<STR_LIT>" , <EOL> "<STR_LIT>" : index_hydrate } ) , <EOL> ( "<STR_LIT>" , { "<STR_LIT:name>" : "<STR_LIT>" , <EOL> "<STR_LIT>" : index_hydrate } ) <EOL> ] ) <EOL> } <EOL> } <EOL> } <EOL> def initialize ( cli ) : <EOL> """<STR_LIT>""" <EOL> flattened = FlattenArguments ( '<STR_LIT>' , FLATTEN_CONFIG ) <EOL> flattened . register ( cli ) </s>
