Class: Aliyun::Oss::Struct::Part

Inherits:
Base
  • Object
show all
Defined in:
lib/aliyun/oss/struct/part.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from Aliyun::Oss::Struct::Base

Instance Attribute Details

#etagObject

String

:etag the etag for the part



10
11
12
# File 'lib/aliyun/oss/struct/part.rb', line 10

def etag
  @etag
end

#last_modifiedObject

Last Modified time



14
15
16
# File 'lib/aliyun/oss/struct/part.rb', line 14

def last_modified
  @last_modified
end

#numberObject

Integer

:number the part number



6
7
8
# File 'lib/aliyun/oss/struct/part.rb', line 6

def number
  @number
end

#sizeObject

Part size



17
18
19
# File 'lib/aliyun/oss/struct/part.rb', line 17

def size
  @size
end

Instance Method Details

#to_hashObject



23
24
25
26
27
28
29
30
31
32
# File 'lib/aliyun/oss/struct/part.rb', line 23

def to_hash
  if valid?
    {
      'PartNumber' => number,
      'ETag' => etag
    }
  else
    {}
  end
end