Sha256: 94da0f2a859c1aea1cd90a5b2b4a1e9aa0d1d5a77be42fe46431c9b6ac22bc50

Contents?: true

Size: 1.01 KB

Versions: 82

Compression:

Stored size: 1.01 KB

Contents

module Fog
  module Parsers
    module AWS
      module RDS
        class EventSubscriptionParser < Fog::Parsers::Base
          def reset
            @event_subscription = fresh_event_subscription
          end

          def fresh_event_subscription
            {'EventCategories'=> []}
          end

          def start_element(name, attrs = [])
            super
            case name
            when 'EventCategoriesList'
              @in_event_categories_list = true
            end
          end

          def end_element(name)
            case name
            when 'EventCategory'
              @event_subscription['EventCategories'] << value
              @in_event_categories_list = false
            when 'SubscriptionCreationTime'
              @event_subscription[name] = Time.parse(value)
            when 'Enabled', 'CustomerAwsId', 'SourceType', 'Status', 'CustSubscriptionId', 'SnsTopicArn'
              @event_subscription[name] = value
            end
          end
        end
      end
    end
  end
end

Version data entries

82 entries across 80 versions & 3 rubygems

Version Path
fog-aws-3.11.0 lib/fog/aws/parsers/rds/event_subscription_parser.rb
fog-aws-3.10.0 lib/fog/aws/parsers/rds/event_subscription_parser.rb
fog-aws-3.9.0 lib/fog/aws/parsers/rds/event_subscription_parser.rb
fog-aws-3.8.0 lib/fog/aws/parsers/rds/event_subscription_parser.rb
fog-aws-3.7.0 lib/fog/aws/parsers/rds/event_subscription_parser.rb
fog-aws-3.6.7 lib/fog/aws/parsers/rds/event_subscription_parser.rb
fog-aws-3.6.6 lib/fog/aws/parsers/rds/event_subscription_parser.rb
fog-aws-3.6.5 lib/fog/aws/parsers/rds/event_subscription_parser.rb
fog-aws-3.6.4 lib/fog/aws/parsers/rds/event_subscription_parser.rb
fog-aws-3.6.3 lib/fog/aws/parsers/rds/event_subscription_parser.rb
fog-aws-3.6.2 lib/fog/aws/parsers/rds/event_subscription_parser.rb
fog-aws-3.5.2 lib/fog/aws/parsers/rds/event_subscription_parser.rb
fog-aws-3.5.1 lib/fog/aws/parsers/rds/event_subscription_parser.rb
fog-aws-3.5.0 lib/fog/aws/parsers/rds/event_subscription_parser.rb
fog-aws-3.4.0 lib/fog/aws/parsers/rds/event_subscription_parser.rb
fog-aws-3.3.0 lib/fog/aws/parsers/rds/event_subscription_parser.rb
fog-aws-3.2.0 lib/fog/aws/parsers/rds/event_subscription_parser.rb
fog-aws-3.1.0 lib/fog/aws/parsers/rds/event_subscription_parser.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.5.0/gems/fog-aws-2.0.1/lib/fog/aws/parsers/rds/event_subscription_parser.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.4.0/gems/fog-aws-2.0.1/lib/fog/aws/parsers/rds/event_subscription_parser.rb