1
0
Fork 0
mirror of https://github.com/fog/fog-aws.git synced 2022-11-09 13:50:52 -05:00
fog--fog-aws/lib/fog/aws/parsers/rds/describe_db_parameters.rb

43 lines
1.5 KiB
Ruby
Raw Normal View History

module Fog
module Parsers
module AWS
module RDS
class DescribeDBParameters < Fog::Parsers::Base
def reset
@response = { 'DescribeDBParametersResult' =>{}, 'ResponseMetadata' => {} }
@parameter = {}
@parameters = []
end
def start_element(name, attrs = [])
super
end
def end_element(name)
case name
when 'ParameterValue' then @parameter['ParameterValue'] = value
when 'DataType' then @parameter['DataType'] = value
when 'AllowedValues' then @parameter['AllowedValues'] = value
when 'Source' then @parameter['Source'] = value
when 'IsModifiable' then
@parameter['IsModifiable'] = value == 'true' ? true : false
when 'Description' then @parameter['Description'] = value
when 'ApplyType' then @parameter['ApplyType'] = value
when 'ParameterName' then @parameter['ParameterName'] = value
when 'Parameter'
@parameters << @parameter
@parameter = {}
when 'Marker'
@response['DescribeDBParametersResult']['Marker'] = value
when 'Parameters'
@response['DescribeDBParametersResult']['Parameters'] = @parameters
when 'RequestId'
@response['ResponseMetadata'][name] = value
end
end
end
end
end
end
end