Class: OvirtSDK4::ProfileDetail
- Defined in:
- lib/ovirtsdk4/types.rb,
lib/ovirtsdk4/types.rb
Instance Method Summary collapse
-
#==(other) ⇒ Object
Returns
trueifselfandotherhave the same attributes and values. -
#block_statistics ⇒ Array<BlockStatistic>
Returns the value of the
block_statisticsattribute. -
#block_statistics=(list) ⇒ Object
Sets the value of the
block_statisticsattribute. -
#duration ⇒ Integer
Returns the value of the
durationattribute. -
#duration=(value) ⇒ Object
Sets the value of the
durationattribute. -
#fop_statistics ⇒ Array<FopStatistic>
Returns the value of the
fop_statisticsattribute. -
#fop_statistics=(list) ⇒ Object
Sets the value of the
fop_statisticsattribute. -
#hash ⇒ Object
Generates a hash value for this object.
-
#initialize(opts = {}) ⇒ ProfileDetail
constructor
Creates a new instance of the ProfileDetail class.
-
#profile_type ⇒ String
Returns the value of the
profile_typeattribute. -
#profile_type=(value) ⇒ Object
Sets the value of the
profile_typeattribute. -
#statistics ⇒ Array<Statistic>
Returns the value of the
statisticsattribute. -
#statistics=(list) ⇒ Object
Sets the value of the
statisticsattribute.
Methods included from Type
Constructor Details
#initialize(opts = {}) ⇒ ProfileDetail
Creates a new instance of the OvirtSDK4::ProfileDetail class.
15683 15684 15685 15686 15687 15688 15689 15690 |
# File 'lib/ovirtsdk4/types.rb', line 15683 def initialize(opts = {}) super(opts) self.block_statistics = opts[:block_statistics] self.duration = opts[:duration] self.fop_statistics = opts[:fop_statistics] self.profile_type = opts[:profile_type] self.statistics = opts[:statistics] end |
Instance Method Details
#==(other) ⇒ Object
Returns true if self and other have the same attributes and values.
15695 15696 15697 15698 15699 15700 15701 15702 |
# File 'lib/ovirtsdk4/types.rb', line 15695 def ==(other) super && @block_statistics == other.block_statistics && @duration == other.duration && @fop_statistics == other.fop_statistics && @profile_type == other.profile_type && @statistics == other.statistics end |
#block_statistics ⇒ Array<BlockStatistic>
Returns the value of the block_statistics attribute.
15556 15557 15558 |
# File 'lib/ovirtsdk4/types.rb', line 15556 def block_statistics @block_statistics end |
#block_statistics=(list) ⇒ Object
Sets the value of the block_statistics attribute.
15565 15566 15567 15568 15569 15570 15571 15572 15573 15574 15575 |
# File 'lib/ovirtsdk4/types.rb', line 15565 def block_statistics=(list) if list.class == Array list = List.new(list) list.each_with_index do |value, index| if value.is_a?(Hash) list[index] = BlockStatistic.new(value) end end end @block_statistics = list end |
#duration ⇒ Integer
Returns the value of the duration attribute.
15582 15583 15584 |
# File 'lib/ovirtsdk4/types.rb', line 15582 def duration @duration end |
#duration=(value) ⇒ Object
Sets the value of the duration attribute.
15591 15592 15593 |
# File 'lib/ovirtsdk4/types.rb', line 15591 def duration=(value) @duration = value end |
#fop_statistics ⇒ Array<FopStatistic>
Returns the value of the fop_statistics attribute.
15600 15601 15602 |
# File 'lib/ovirtsdk4/types.rb', line 15600 def fop_statistics @fop_statistics end |
#fop_statistics=(list) ⇒ Object
Sets the value of the fop_statistics attribute.
15609 15610 15611 15612 15613 15614 15615 15616 15617 15618 15619 |
# File 'lib/ovirtsdk4/types.rb', line 15609 def fop_statistics=(list) if list.class == Array list = List.new(list) list.each_with_index do |value, index| if value.is_a?(Hash) list[index] = FopStatistic.new(value) end end end @fop_statistics = list end |
#hash ⇒ Object
Generates a hash value for this object.
15707 15708 15709 15710 15711 15712 15713 15714 |
# File 'lib/ovirtsdk4/types.rb', line 15707 def hash super + @block_statistics.hash + @duration.hash + @fop_statistics.hash + @profile_type.hash + @statistics.hash end |
#profile_type ⇒ String
Returns the value of the profile_type attribute.
15626 15627 15628 |
# File 'lib/ovirtsdk4/types.rb', line 15626 def profile_type @profile_type end |
#profile_type=(value) ⇒ Object
Sets the value of the profile_type attribute.
15635 15636 15637 |
# File 'lib/ovirtsdk4/types.rb', line 15635 def profile_type=(value) @profile_type = value end |
#statistics ⇒ Array<Statistic>
Returns the value of the statistics attribute.
15644 15645 15646 |
# File 'lib/ovirtsdk4/types.rb', line 15644 def statistics @statistics end |
#statistics=(list) ⇒ Object
Sets the value of the statistics attribute.
15653 15654 15655 15656 15657 15658 15659 15660 15661 15662 15663 |
# File 'lib/ovirtsdk4/types.rb', line 15653 def statistics=(list) if list.class == Array list = List.new(list) list.each_with_index do |value, index| if value.is_a?(Hash) list[index] = Statistic.new(value) end end end @statistics = list end |