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.
14581 14582 14583 14584 14585 14586 14587 14588 |
# File 'lib/ovirtsdk4/types.rb', line 14581 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.
14593 14594 14595 14596 14597 14598 14599 14600 |
# File 'lib/ovirtsdk4/types.rb', line 14593 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.
14454 14455 14456 |
# File 'lib/ovirtsdk4/types.rb', line 14454 def block_statistics @block_statistics end |
#block_statistics=(list) ⇒ Object
Sets the value of the block_statistics
attribute.
14463 14464 14465 14466 14467 14468 14469 14470 14471 14472 14473 |
# File 'lib/ovirtsdk4/types.rb', line 14463 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.
14480 14481 14482 |
# File 'lib/ovirtsdk4/types.rb', line 14480 def duration @duration end |
#duration=(value) ⇒ Object
Sets the value of the duration
attribute.
14489 14490 14491 |
# File 'lib/ovirtsdk4/types.rb', line 14489 def duration=(value) @duration = value end |
#fop_statistics ⇒ Array<FopStatistic>
Returns the value of the fop_statistics
attribute.
14498 14499 14500 |
# File 'lib/ovirtsdk4/types.rb', line 14498 def fop_statistics @fop_statistics end |
#fop_statistics=(list) ⇒ Object
Sets the value of the fop_statistics
attribute.
14507 14508 14509 14510 14511 14512 14513 14514 14515 14516 14517 |
# File 'lib/ovirtsdk4/types.rb', line 14507 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.
14605 14606 14607 14608 14609 14610 14611 14612 |
# File 'lib/ovirtsdk4/types.rb', line 14605 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.
14524 14525 14526 |
# File 'lib/ovirtsdk4/types.rb', line 14524 def profile_type @profile_type end |
#profile_type=(value) ⇒ Object
Sets the value of the profile_type
attribute.
14533 14534 14535 |
# File 'lib/ovirtsdk4/types.rb', line 14533 def profile_type=(value) @profile_type = value end |
#statistics ⇒ Array<Statistic>
Returns the value of the statistics
attribute.
14542 14543 14544 |
# File 'lib/ovirtsdk4/types.rb', line 14542 def statistics @statistics end |
#statistics=(list) ⇒ Object
Sets the value of the statistics
attribute.
14551 14552 14553 14554 14555 14556 14557 14558 14559 14560 14561 |
# File 'lib/ovirtsdk4/types.rb', line 14551 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 |