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



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

def etag
  @etag
end

#last_modifiedObject

Last Modified time



12
13
14
# File 'lib/aliyun/oss/struct/part.rb', line 12

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



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

def size
  @size
end

Instance Method Details

#e_tag=(e_tag) ⇒ Object



25
26
27
# File 'lib/aliyun/oss/struct/part.rb', line 25

def e_tag=(e_tag)
  @etag = e_tag
end

#part_number=(part_number) ⇒ Object



21
22
23
# File 'lib/aliyun/oss/struct/part.rb', line 21

def part_number=(part_number)
  @number = part_number
end

#to_hashObject



29
30
31
32
33
34
35
36
37
38
# File 'lib/aliyun/oss/struct/part.rb', line 29

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