<s> """<STR_LIT>""" <EOL> from boto . rds . dbsecuritygroup import DBSecurityGroup <EOL> from boto . resultset import ResultSet <EOL> class OptionGroup ( object ) : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self , connection = None , name = None , engine_name = None , <EOL> major_engine_version = None , description = None , <EOL> allow_both_vpc_and_nonvpc = False , vpc_id = None ) : <EOL> self . name = name <EOL> self . engine_name = engine_name <EOL> self . major_engine_version = major_engine_version <EOL> self . description = description <EOL> self . allow_both_vpc_and_nonvpc = allow_both_vpc_and_nonvpc <EOL> self . vpc_id = vpc_id <EOL> self . options = [ ] <EOL> def __repr__ ( self ) : <EOL> return '<STR_LIT>' % self . name <EOL> def startElement ( self , name , attrs , connection ) : <EOL> if name == '<STR_LIT>' : <EOL> self . options = ResultSet ( [ <EOL> ( '<STR_LIT>' , Option ) <EOL> ] ) <EOL> else : <EOL> return None <EOL> def endElement ( self , name , value , connection ) : <EOL> if name == '<STR_LIT>' : <EOL> self . name = value <EOL> elif name == '<STR_LIT>' : <EOL> self . engine_name = value <EOL> elif name == '<STR_LIT>' : <EOL> self . major_engine_version = value <EOL> elif name == '<STR_LIT>' : <EOL> self . description = value <EOL> elif name == '<STR_LIT>' : <EOL> if value . lower ( ) == '<STR_LIT:true>' : <EOL> self . allow_both_vpc_and_nonvpc = True <EOL> else : <EOL> self . allow_both_vpc_and_nonvpc = False <EOL> elif name == '<STR_LIT>' : <EOL> self . vpc_id = value <EOL> else : <EOL> setattr ( self , name , value ) <EOL> def delete ( self ) : <EOL> return self . connection . delete_option_group ( self . name ) <EOL> class Option ( object ) : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self , name = None , description = None , permanent = False , <EOL> persistent = False , port = None , settings = None , <EOL> db_security_groups = None , vpc_security_groups = None ) : <EOL> self . name = name <EOL> self . description = description <EOL> self . permanent = permanent <EOL> self . persistent = persistent <EOL> self . port = port <EOL> self . settings = settings <EOL> self . db_security_groups = db_security_groups <EOL> self . vpc_security_groups = vpc_security_groups <EOL> if self . settings is None : <EOL> self . settings = [ ] <EOL> if self . db_security_groups is None : <EOL> self . db_security_groups = [ ] <EOL> if self . vpc_security_groups is None : <EOL> self . vpc_security_groups = [ ] <EOL> def __repr__ ( self ) : <EOL> return '<STR_LIT>' % self . name <EOL> def startElement ( self , name , attrs , connection ) : <EOL> if name == '<STR_LIT>' : <EOL> self . settings = ResultSet ( [ <EOL> ( '<STR_LIT>' , OptionSetting ) <EOL> ] ) <EOL> elif name == '<STR_LIT>' : <EOL> self . db_security_groups = ResultSet ( [ <EOL> ( '<STR_LIT>' , DBSecurityGroup ) <EOL> ] ) <EOL> elif name == '<STR_LIT>' : <EOL> self . vpc_security_groups = ResultSet ( [ <EOL> ( '<STR_LIT>' , VpcSecurityGroup ) <EOL> ] ) <EOL> else : <EOL> return None <EOL> def endElement ( self , name , value , connection ) : <EOL> if name == '<STR_LIT>' : <EOL> self . name = value <EOL> elif name == '<STR_LIT>' : <EOL> self . description = value <EOL> elif name == '<STR_LIT>' : <EOL> if value . lower ( ) == '<STR_LIT:true>' : <EOL> self . permenant = True <EOL> else : <EOL> self . permenant = False <EOL> elif name == '<STR_LIT>' : <EOL> if value . lower ( ) == '<STR_LIT:true>' : <EOL> self . persistent = True <EOL> else : <EOL> self . persistent = False <EOL> elif name == '<STR_LIT>' : <EOL> self . port = int ( value ) <EOL> else : <EOL> setattr ( self , name , value ) <EOL> class OptionSetting ( object ) : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self , name = None , description = None , value = None , <EOL> default_value = False , allowed_values = None , data_type = None , <EOL> apply_type = None , is_modifiable = False , is_collection = False ) : <EOL> self . name = name <EOL> self . description = description <EOL> self . value = value <EOL> self . default_value = default_value <EOL> self . allowed_values = allowed_values <EOL> self . data_type = data_type <EOL> self . apply_type = apply_type <EOL> self . is_modifiable = is_modifiable <EOL> self . is_collection = is_collection <EOL> def __repr__ ( self ) : <EOL> return '<STR_LIT>' % self . name <EOL> def startElement ( self , name , attrs , connection ) : <EOL> return None <EOL> def endElement ( self , name , value , connection ) : <EOL> if name == '<STR_LIT:Name>' : <EOL> self . name = value <EOL> elif name == '<STR_LIT>' : <EOL> self . description = value <EOL> elif name == '<STR_LIT>' : <EOL> self . value = value <EOL> elif name == '<STR_LIT>' : <EOL> self . default_value = value <EOL> elif name == '<STR_LIT>' : <EOL> self . allowed_values = value <EOL> elif name == '<STR_LIT>' : <EOL> self . data_type = value <EOL> elif name == '<STR_LIT>' : <EOL> self . apply_type = value <EOL> elif name == '<STR_LIT>' : <EOL> if value . lower ( ) == '<STR_LIT:true>' : <EOL> self . is_modifiable = True <EOL> else : <EOL> self . is_modifiable = False <EOL> elif name == '<STR_LIT>' : <EOL> if value . lower ( ) == '<STR_LIT:true>' : <EOL> self . is_collection = True <EOL> else : <EOL> self . is_collection = False <EOL> else : <EOL> setattr ( self , name , value ) <EOL> class VpcSecurityGroup ( object ) : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self , vpc_id = None , status = None ) : <EOL> self . vpc_id = vpc_id <EOL> self . status = status <EOL> def __repr__ ( self ) : <EOL> return '<STR_LIT>' % self . vpc_id <EOL> def startElement ( self , name , attrs , connection ) : <EOL> pass <EOL> def endElement ( self , name , value , connection ) : <EOL> if name == '<STR_LIT>' : <EOL> self . vpc_id = value <EOL> elif name == '<STR_LIT>' : <EOL> self . status = value <EOL> else : <EOL> setattr ( self , name , value ) <EOL> class OptionGroupOption ( object ) : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self , name = None , description = None , engine_name = None , <EOL> major_engine_version = None , min_minor_engine_version = None , <EOL> permanent = False , persistent = False , port_required = False , <EOL> default_port = None , settings = None , depends_on = None ) : <EOL> self . name = name <EOL> self . description = description <EOL> self . engine_name = engine_name <EOL> self . major_engine_version = major_engine_version <EOL> self . min_minor_engine_version = min_minor_engine_version <EOL> self . permanent = permanent <EOL> self . persistent = persistent <EOL> self . port_required = port_required <EOL> self . default_port = default_port <EOL> self . settings = settings <EOL> self . depends_on = depends_on <EOL> if self . settings is None : <EOL> self . settings = [ ] <EOL> if self . depends_on is None : <EOL> self . depends_on = [ ] <EOL> def __repr__ ( self ) : <EOL> return '<STR_LIT>' % self . name <EOL> def startElement ( self , name , attrs , connection ) : <EOL> if name == '<STR_LIT>' : <EOL> self . settings = ResultSet ( [ <EOL> ( '<STR_LIT>' , OptionGroupOptionSetting ) <EOL> ] ) <EOL> elif name == '<STR_LIT>' : <EOL> self . depends_on = [ ] <EOL> else : <EOL> return None <EOL> def endElement ( self , name , value , connection ) : <EOL> if name == '<STR_LIT:Name>' : <EOL> self . name = value <EOL> elif name == '<STR_LIT>' : <EOL> self . description = value <EOL> elif name == '<STR_LIT>' : <EOL> self . engine_name = value <EOL> elif name == '<STR_LIT>' : <EOL> self . major_engine_version = value <EOL> elif name == '<STR_LIT>' : <EOL> self . min_minor_engine_version = value <EOL> elif name == '<STR_LIT>' : <EOL> if value . lower ( ) == '<STR_LIT:true>' : <EOL> self . permenant = True <EOL> else : <EOL> self . permenant = False <EOL> elif name == '<STR_LIT>' : <EOL> if value . lower ( ) == '<STR_LIT:true>' : <EOL> self . persistent = True <EOL> else : <EOL> self . persistent = False <EOL> elif name == '<STR_LIT>' : <EOL> if value . lower ( ) == '<STR_LIT:true>' : <EOL> self . port_required = True <EOL> else : <EOL> self . port_required = False <EOL> elif name == '<STR_LIT>' : <EOL> self . default_port = int ( value ) <EOL> else : <EOL> setattr ( self , name , value ) <EOL> class OptionGroupOptionSetting ( object ) : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self , name = None , description = None , default_value = False , <EOL> allowed_values = None , apply_type = None , is_modifiable = False ) : <EOL> self . name = name <EOL> self . description = description <EOL> self . default_value = default_value <EOL> self . allowed_values = allowed_values <EOL> self . apply_type = apply_type <EOL> self . is_modifiable = is_modifiable <EOL> def __repr__ ( self ) : <EOL> return '<STR_LIT>' % self . name <EOL> def startElement ( self , name , attrs , connection ) : <EOL> return None <EOL> def endElement ( self , name , value , connection ) : <EOL> if name == '<STR_LIT>' : <EOL> self . name = value <EOL> elif name == '<STR_LIT>' : <EOL> self . description = value <EOL> elif name == '<STR_LIT>' : <EOL> self . default_value = value <EOL> elif name == '<STR_LIT>' : <EOL> self . allowed_values = value <EOL> elif name == '<STR_LIT>' : <EOL> self . apply_type = value <EOL> elif name == '<STR_LIT>' : <EOL> if value . lower ( ) == '<STR_LIT:true>' : <EOL> self . is_modifiable = True <EOL> else : <EOL> self . is_modifiable = False <EOL> else : <EOL> setattr ( self , name , value ) </s>
