Sha256: 980502e41d6a898f629011c15abbfebe82035fc153cdb0dc55089666d5835ca9

Contents?: true

Size: 1.07 KB

Versions: 39

Compression:

Stored size: 1.07 KB

Contents

module Fog
  module Storage
    class AWS
      class Version < Fog::Model
        identity  :version,             :aliases => 'VersionId'

        attribute :key,                 :aliases => 'Key'
        attribute :last_modified,       :aliases => ['Last-Modified', 'LastModified']
        attribute :latest,              :aliases => 'IsLatest', :type => :boolean
        attribute :content_length,      :aliases => ['Content-Length', 'Size'], :type => :integer
        attribute :delete_marker,       :type => :boolean

        def file
          @file ||= if collection.file
            collection.file.directory.files.get(key, 'versionId' => version)
          else
            collection.directory.files.get(key, 'versionId' => version)
          end
        end

        def destroy
          if collection.file
            collection.service.delete_object(collection.file.directory.key, key, 'versionId' => version)
          else
            collection.service.delete_object(collection.directory.key, key, 'versionId' => version)
          end
        end
      end
    end
  end
end

Version data entries

39 entries across 37 versions & 3 rubygems

Version Path
fog-aws-0.9.2 lib/fog/aws/models/storage/version.rb
fog-aws-0.9.1 lib/fog/aws/models/storage/version.rb
fog-aws-0.9.0 lib/fog/aws/models/storage/version.rb
fog-aws-0.8.1 lib/fog/aws/models/storage/version.rb
fog-aws-0.8.0 lib/fog/aws/models/storage/version.rb
vagrant-cloudstack-1.2.0 vendor/bundle/gems/fog-aws-0.7.5/lib/fog/aws/models/storage/version.rb
fog-aws-0.7.6 lib/fog/aws/models/storage/version.rb
fog-aws-0.7.5 lib/fog/aws/models/storage/version.rb
fog-aws-0.7.4 lib/fog/aws/models/storage/version.rb
fog-aws-0.7.3 lib/fog/aws/models/storage/version.rb
fog-aws-0.7.2 lib/fog/aws/models/storage/version.rb
fog-aws-0.6.0 lib/fog/aws/models/storage/version.rb
fog-aws-0.5.0 lib/fog/aws/models/storage/version.rb
fog-aws-0.4.1 lib/fog/aws/models/storage/version.rb
fog-aws-0.4.0 lib/fog/aws/models/storage/version.rb
fog-aws-0.3.0 lib/fog/aws/models/storage/version.rb
fog-aws-0.2.2 lib/fog/aws/models/storage/version.rb
fog-aws-0.2.0 lib/fog/aws/models/storage/version.rb
fog-aws-0.1.2 lib/fog/aws/models/storage/version.rb