2011-02-02 01:20:44 -05:00
|
|
|
module Fog
|
|
|
|
module Parsers
|
|
|
|
module AWS
|
|
|
|
module SNS
|
|
|
|
|
|
|
|
class GetTopicAttributes < Fog::Parsers::Base
|
|
|
|
|
|
|
|
def reset
|
|
|
|
@response = { 'Attributes' => {} }
|
|
|
|
end
|
|
|
|
|
|
|
|
def end_element(name)
|
|
|
|
case name
|
2011-07-19 18:53:26 -04:00
|
|
|
when 'key'
|
|
|
|
@key = @value.rstrip
|
|
|
|
when 'value'
|
|
|
|
case @key
|
|
|
|
when 'SubscriptionsConfirmed', 'SubscriptionsDeleted', 'SubscriptionsPending'
|
|
|
|
@response['Attributes'][@key] = @value.rstrip.to_i
|
|
|
|
else
|
|
|
|
@response['Attributes'][@key] = @value.rstrip
|
|
|
|
end
|
2011-02-02 01:20:44 -05:00
|
|
|
when 'RequestId'
|
|
|
|
@response[name] = @value
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|