def index_hydrate(params, container, cli_type, key, value):
 if ('IndexField' not in params):
  params['IndexField'] = {}
 if ('IndexFieldType' not in params['IndexField']):
  raise RuntimeError('You must pass the --type option.')
 _type = params['IndexField']['IndexFieldType']
 _type = ''.join([i.capitalize() for i in _type.split('-')])
 if (_type == 'Latlon'):
  _type = 'LatLon'
 if (key.split(SEP)[(-1)] == 'DefaultValue'):
  value = DEFAULT_VALUE_TYPE_MAP.get(_type, (lambda x: x))(value)
 if ((_type + 'Options') not in params['IndexField']):
  params['IndexField'][(_type + 'Options')] = {}
 params['IndexField'][(_type + 'Options')][key.split(SEP)[(-1)]] = value

def index_hydrate ( params , container , cli_type , key , value ) : if ( 'IndexField' not in params ) : params [ 'IndexField' ] = { } if ( 'IndexFieldType' not in params [ 'IndexField' ] ) : raise RuntimeError ( 'You must pass the --type option.' ) _type = params [ 'IndexField' ] [ 'IndexFieldType' ] _type = '' . join ( [ i . capitalize ( ) for i in _type . split ( '-' ) ] ) if ( _type == 'Latlon' ) : _type = 'LatLon' if ( key . split ( SEP ) [ ( - 1 ) ] == 'DefaultValue' ) : value = DEFAULT_VALUE_TYPE_MAP . get ( _type , ( lambda x : x ) ) ( value ) if ( ( _type + 'Options' ) not in params [ 'IndexField' ] ) : params [ 'IndexField' ] [ ( _type + 'Options' ) ] = { } params [ 'IndexField' ] [ ( _type + 'Options' ) ] [ key . split ( SEP ) [ ( - 1 ) ] ] = value
hydrate an index-field option value to construct something like:: index_field: { doubleoptions: { defaultvalue: 0 .