Sha256: f141033c617b570eddf5d262d1fb669411df5793511f25326640cb3a2d002537

Contents?: true

Size: 781 Bytes

Versions: 1

Compression:

Stored size: 781 Bytes

Contents

module Fog
  module Parsers
    module AWS
      module IAM

        class ListMFADevices < Fog::Parsers::Base

          def reset
            @mfa_device = {}
            @response = { 'MFADevices' => [] }
          end

          def end_element(name)
            case name
            when 'SerialNumber', 'UserName'
              @mfa_device[name] = value
            when 'EnableDate'
              @mfa_device[name] = Time.parse(value)
            when 'member'
              @response['MFADevices'] << @mfa_device
              @mfa_device = {}
            when 'IsTruncated'
              response[name] = (value == 'true')
            when 'Marker', 'RequestId'
              response[name] = value
            end
          end

        end

      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
fog-1.22.0 lib/fog/aws/parsers/iam/list_mfa_devices.rb