Class: OvirtSDK4::ProfileDetail
- Defined in:
- lib/ovirtsdk4/types.rb,
lib/ovirtsdk4/types.rb
Instance Method Summary collapse
-
#==(other) ⇒ Object
Returns
true
ifself
andother
have the same attributes and values. -
#block_statistics ⇒ Array<BlockStatistic>
Returns the value of the
block_statistics
attribute. -
#block_statistics=(list) ⇒ Object
Sets the value of the
block_statistics
attribute. -
#duration ⇒ Integer
Returns the value of the
duration
attribute. -
#duration=(value) ⇒ Object
Sets the value of the
duration
attribute. -
#fop_statistics ⇒ Array<FopStatistic>
Returns the value of the
fop_statistics
attribute. -
#fop_statistics=(list) ⇒ Object
Sets the value of the
fop_statistics
attribute. -
#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_type
attribute. -
#profile_type=(value) ⇒ Object
Sets the value of the
profile_type
attribute. -
#statistics ⇒ Array<Statistic>
Returns the value of the
statistics
attribute. -
#statistics=(list) ⇒ Object
Sets the value of the
statistics
attribute.
Methods included from Type
Constructor Details
#initialize(opts = {}) ⇒ ProfileDetail
Creates a new instance of the OvirtSDK4::ProfileDetail class.
14683 14684 14685 14686 14687 14688 14689 14690 |
# File 'lib/ovirtsdk4/types.rb', line 14683 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.
14695 14696 14697 14698 14699 14700 14701 14702 |
# File 'lib/ovirtsdk4/types.rb', line 14695 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.
14556 14557 14558 |
# File 'lib/ovirtsdk4/types.rb', line 14556 def block_statistics @block_statistics end |
#block_statistics=(list) ⇒ Object
Sets the value of the block_statistics
attribute.
14565 14566 14567 14568 14569 14570 14571 14572 14573 14574 14575 |
# File 'lib/ovirtsdk4/types.rb', line 14565 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.
14582 14583 14584 |
# File 'lib/ovirtsdk4/types.rb', line 14582 def duration @duration end |
#duration=(value) ⇒ Object
Sets the value of the duration
attribute.
14591 14592 14593 |
# File 'lib/ovirtsdk4/types.rb', line 14591 def duration=(value) @duration = value end |
#fop_statistics ⇒ Array<FopStatistic>
Returns the value of the fop_statistics
attribute.
14600 14601 14602 |
# File 'lib/ovirtsdk4/types.rb', line 14600 def fop_statistics @fop_statistics end |
#fop_statistics=(list) ⇒ Object
Sets the value of the fop_statistics
attribute.
14609 14610 14611 14612 14613 14614 14615 14616 14617 14618 14619 |
# File 'lib/ovirtsdk4/types.rb', line 14609 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.
14707 14708 14709 14710 14711 14712 14713 14714 |
# File 'lib/ovirtsdk4/types.rb', line 14707 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.
14626 14627 14628 |
# File 'lib/ovirtsdk4/types.rb', line 14626 def profile_type @profile_type end |
#profile_type=(value) ⇒ Object
Sets the value of the profile_type
attribute.
14635 14636 14637 |
# File 'lib/ovirtsdk4/types.rb', line 14635 def profile_type=(value) @profile_type = value end |
#statistics ⇒ Array<Statistic>
Returns the value of the statistics
attribute.
14644 14645 14646 |
# File 'lib/ovirtsdk4/types.rb', line 14644 def statistics @statistics end |
#statistics=(list) ⇒ Object
Sets the value of the statistics
attribute.
14653 14654 14655 14656 14657 14658 14659 14660 14661 14662 14663 |
# File 'lib/ovirtsdk4/types.rb', line 14653 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 |