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.
15413 15414 15415 15416 15417 15418 15419 15420 |
# File 'lib/ovirtsdk4/types.rb', line 15413 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.
15425 15426 15427 15428 15429 15430 15431 15432 |
# File 'lib/ovirtsdk4/types.rb', line 15425 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.
15286 15287 15288 |
# File 'lib/ovirtsdk4/types.rb', line 15286 def block_statistics @block_statistics end |
#block_statistics=(list) ⇒ Object
Sets the value of the block_statistics
attribute.
15295 15296 15297 15298 15299 15300 15301 15302 15303 15304 15305 |
# File 'lib/ovirtsdk4/types.rb', line 15295 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.
15312 15313 15314 |
# File 'lib/ovirtsdk4/types.rb', line 15312 def duration @duration end |
#duration=(value) ⇒ Object
Sets the value of the duration
attribute.
15321 15322 15323 |
# File 'lib/ovirtsdk4/types.rb', line 15321 def duration=(value) @duration = value end |
#fop_statistics ⇒ Array<FopStatistic>
Returns the value of the fop_statistics
attribute.
15330 15331 15332 |
# File 'lib/ovirtsdk4/types.rb', line 15330 def fop_statistics @fop_statistics end |
#fop_statistics=(list) ⇒ Object
Sets the value of the fop_statistics
attribute.
15339 15340 15341 15342 15343 15344 15345 15346 15347 15348 15349 |
# File 'lib/ovirtsdk4/types.rb', line 15339 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.
15437 15438 15439 15440 15441 15442 15443 15444 |
# File 'lib/ovirtsdk4/types.rb', line 15437 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.
15356 15357 15358 |
# File 'lib/ovirtsdk4/types.rb', line 15356 def profile_type @profile_type end |
#profile_type=(value) ⇒ Object
Sets the value of the profile_type
attribute.
15365 15366 15367 |
# File 'lib/ovirtsdk4/types.rb', line 15365 def profile_type=(value) @profile_type = value end |
#statistics ⇒ Array<Statistic>
Returns the value of the statistics
attribute.
15374 15375 15376 |
# File 'lib/ovirtsdk4/types.rb', line 15374 def statistics @statistics end |
#statistics=(list) ⇒ Object
Sets the value of the statistics
attribute.
15383 15384 15385 15386 15387 15388 15389 15390 15391 15392 15393 |
# File 'lib/ovirtsdk4/types.rb', line 15383 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 |