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.
14535 14536 14537 14538 14539 14540 14541 14542 |
# File 'lib/ovirtsdk4/types.rb', line 14535 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.
14547 14548 14549 14550 14551 14552 14553 14554 |
# File 'lib/ovirtsdk4/types.rb', line 14547 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.
14408 14409 14410 |
# File 'lib/ovirtsdk4/types.rb', line 14408 def block_statistics @block_statistics end |
#block_statistics=(list) ⇒ Object
Sets the value of the block_statistics
attribute.
14417 14418 14419 14420 14421 14422 14423 14424 14425 14426 14427 |
# File 'lib/ovirtsdk4/types.rb', line 14417 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.
14434 14435 14436 |
# File 'lib/ovirtsdk4/types.rb', line 14434 def duration @duration end |
#duration=(value) ⇒ Object
Sets the value of the duration
attribute.
14443 14444 14445 |
# File 'lib/ovirtsdk4/types.rb', line 14443 def duration=(value) @duration = value end |
#fop_statistics ⇒ Array<FopStatistic>
Returns the value of the fop_statistics
attribute.
14452 14453 14454 |
# File 'lib/ovirtsdk4/types.rb', line 14452 def fop_statistics @fop_statistics end |
#fop_statistics=(list) ⇒ Object
Sets the value of the fop_statistics
attribute.
14461 14462 14463 14464 14465 14466 14467 14468 14469 14470 14471 |
# File 'lib/ovirtsdk4/types.rb', line 14461 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.
14559 14560 14561 14562 14563 14564 14565 14566 |
# File 'lib/ovirtsdk4/types.rb', line 14559 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.
14478 14479 14480 |
# File 'lib/ovirtsdk4/types.rb', line 14478 def profile_type @profile_type end |
#profile_type=(value) ⇒ Object
Sets the value of the profile_type
attribute.
14487 14488 14489 |
# File 'lib/ovirtsdk4/types.rb', line 14487 def profile_type=(value) @profile_type = value end |
#statistics ⇒ Array<Statistic>
Returns the value of the statistics
attribute.
14496 14497 14498 |
# File 'lib/ovirtsdk4/types.rb', line 14496 def statistics @statistics end |
#statistics=(list) ⇒ Object
Sets the value of the statistics
attribute.
14505 14506 14507 14508 14509 14510 14511 14512 14513 14514 14515 |
# File 'lib/ovirtsdk4/types.rb', line 14505 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 |