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.
14940 14941 14942 14943 14944 14945 14946 14947 |
# File 'lib/ovirtsdk4/types.rb', line 14940 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.
14952 14953 14954 14955 14956 14957 14958 14959 |
# File 'lib/ovirtsdk4/types.rb', line 14952 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.
14813 14814 14815 |
# File 'lib/ovirtsdk4/types.rb', line 14813 def block_statistics @block_statistics end |
#block_statistics=(list) ⇒ Object
Sets the value of the block_statistics
attribute.
14822 14823 14824 14825 14826 14827 14828 14829 14830 14831 14832 |
# File 'lib/ovirtsdk4/types.rb', line 14822 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.
14839 14840 14841 |
# File 'lib/ovirtsdk4/types.rb', line 14839 def duration @duration end |
#duration=(value) ⇒ Object
Sets the value of the duration
attribute.
14848 14849 14850 |
# File 'lib/ovirtsdk4/types.rb', line 14848 def duration=(value) @duration = value end |
#fop_statistics ⇒ Array<FopStatistic>
Returns the value of the fop_statistics
attribute.
14857 14858 14859 |
# File 'lib/ovirtsdk4/types.rb', line 14857 def fop_statistics @fop_statistics end |
#fop_statistics=(list) ⇒ Object
Sets the value of the fop_statistics
attribute.
14866 14867 14868 14869 14870 14871 14872 14873 14874 14875 14876 |
# File 'lib/ovirtsdk4/types.rb', line 14866 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.
14964 14965 14966 14967 14968 14969 14970 14971 |
# File 'lib/ovirtsdk4/types.rb', line 14964 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.
14883 14884 14885 |
# File 'lib/ovirtsdk4/types.rb', line 14883 def profile_type @profile_type end |
#profile_type=(value) ⇒ Object
Sets the value of the profile_type
attribute.
14892 14893 14894 |
# File 'lib/ovirtsdk4/types.rb', line 14892 def profile_type=(value) @profile_type = value end |
#statistics ⇒ Array<Statistic>
Returns the value of the statistics
attribute.
14901 14902 14903 |
# File 'lib/ovirtsdk4/types.rb', line 14901 def statistics @statistics end |
#statistics=(list) ⇒ Object
Sets the value of the statistics
attribute.
14910 14911 14912 14913 14914 14915 14916 14917 14918 14919 14920 |
# File 'lib/ovirtsdk4/types.rb', line 14910 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 |