Class: OvirtSDK4::Statistic
- Inherits:
-
Identified
- Object
- Struct
- Identified
- OvirtSDK4::Statistic
- Defined in:
- lib/ovirtsdk4/types.rb,
lib/ovirtsdk4/types.rb
Instance Method Summary collapse
-
#==(other) ⇒ Object
Returns
trueifselfandotherhave the same attributes and values. -
#brick ⇒ GlusterBrick
Returns the value of the
brickattribute. -
#brick=(value) ⇒ Object
Sets the value of the
brickattribute. -
#comment ⇒ String
Returns the value of the
commentattribute. -
#comment=(value) ⇒ Object
Sets the value of the
commentattribute. -
#description ⇒ String
Returns the value of the
descriptionattribute. -
#description=(value) ⇒ Object
Sets the value of the
descriptionattribute. -
#disk ⇒ Disk
Returns the value of the
diskattribute. -
#disk=(value) ⇒ Object
Sets the value of the
diskattribute. -
#gluster_volume ⇒ GlusterVolume
Returns the value of the
gluster_volumeattribute. -
#gluster_volume=(value) ⇒ Object
Sets the value of the
gluster_volumeattribute. -
#hash ⇒ Object
Generates a hash value for this object.
-
#host ⇒ Host
Returns the value of the
hostattribute. -
#host=(value) ⇒ Object
Sets the value of the
hostattribute. -
#host_nic ⇒ HostNic
Returns the value of the
host_nicattribute. -
#host_nic=(value) ⇒ Object
Sets the value of the
host_nicattribute. -
#host_numa_node ⇒ NumaNode
Returns the value of the
host_numa_nodeattribute. -
#host_numa_node=(value) ⇒ Object
Sets the value of the
host_numa_nodeattribute. -
#id ⇒ String
Returns the value of the
idattribute. -
#id=(value) ⇒ Object
Sets the value of the
idattribute. -
#initialize(opts = {}) ⇒ Statistic
constructor
Creates a new instance of the Statistic class.
-
#kind ⇒ StatisticKind
Returns the value of the
kindattribute. -
#kind=(value) ⇒ Object
Sets the value of the
kindattribute. -
#name ⇒ String
Returns the value of the
nameattribute. -
#name=(value) ⇒ Object
Sets the value of the
nameattribute. -
#nic ⇒ Nic
Returns the value of the
nicattribute. -
#nic=(value) ⇒ Object
Sets the value of the
nicattribute. -
#step ⇒ Step
Returns the value of the
stepattribute. -
#step=(value) ⇒ Object
Sets the value of the
stepattribute. -
#type ⇒ ValueType
Returns the value of the
typeattribute. -
#type=(value) ⇒ Object
Sets the value of the
typeattribute. -
#unit ⇒ StatisticUnit
Returns the value of the
unitattribute. -
#unit=(value) ⇒ Object
Sets the value of the
unitattribute. -
#values ⇒ Array<Value>
Returns the value of the
valuesattribute. -
#values=(list) ⇒ Object
Sets the value of the
valuesattribute. -
#vm ⇒ Vm
Returns the value of the
vmattribute. -
#vm=(value) ⇒ Object
Sets the value of the
vmattribute.
Methods included from Type
Constructor Details
#initialize(opts = {}) ⇒ Statistic
Creates a new instance of the OvirtSDK4::Statistic class.
20986 20987 20988 20989 20990 20991 20992 20993 20994 20995 20996 20997 20998 20999 21000 21001 |
# File 'lib/ovirtsdk4/types.rb', line 20986 def initialize(opts = {}) super(opts) self.brick = opts[:brick] self.disk = opts[:disk] self.gluster_volume = opts[:gluster_volume] self.host = opts[:host] self.host_nic = opts[:host_nic] self.host_numa_node = opts[:host_numa_node] self.kind = opts[:kind] self.nic = opts[:nic] self.step = opts[:step] self.type = opts[:type] self.unit = opts[:unit] self.values = opts[:values] self.vm = opts[:vm] end |
Instance Method Details
#==(other) ⇒ Object
Returns true if self and other have the same attributes and values.
21006 21007 21008 21009 21010 21011 21012 21013 21014 21015 21016 21017 21018 21019 21020 21021 |
# File 'lib/ovirtsdk4/types.rb', line 21006 def ==(other) super && @brick == other.brick && @disk == other.disk && @gluster_volume == other.gluster_volume && @host == other.host && @host_nic == other.host_nic && @host_numa_node == other.host_numa_node && @kind == other.kind && @nic == other.nic && @step == other.step && @type == other.type && @unit == other.unit && @values == other.values && @vm == other.vm end |
#brick ⇒ GlusterBrick
Returns the value of the brick attribute.
20572 20573 20574 |
# File 'lib/ovirtsdk4/types.rb', line 20572 def brick @brick end |
#brick=(value) ⇒ Object
Sets the value of the brick attribute.
The value parameter can be an instance of GlusterBrick or a hash.
If it is a hash then a new instance will be created passing the hash as the
opts parameter to the constructor.
20585 20586 20587 20588 20589 20590 |
# File 'lib/ovirtsdk4/types.rb', line 20585 def brick=(value) if value.is_a?(Hash) value = GlusterBrick.new(value) end @brick = value end |
#comment ⇒ String
Returns the value of the comment attribute.
20597 20598 20599 |
# File 'lib/ovirtsdk4/types.rb', line 20597 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment attribute.
20606 20607 20608 |
# File 'lib/ovirtsdk4/types.rb', line 20606 def comment=(value) @comment = value end |
#description ⇒ String
Returns the value of the description attribute.
20615 20616 20617 |
# File 'lib/ovirtsdk4/types.rb', line 20615 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description attribute.
20624 20625 20626 |
# File 'lib/ovirtsdk4/types.rb', line 20624 def description=(value) @description = value end |
#disk ⇒ Disk
Returns the value of the disk attribute.
20633 20634 20635 |
# File 'lib/ovirtsdk4/types.rb', line 20633 def disk @disk end |
#disk=(value) ⇒ Object
Sets the value of the disk attribute.
The value parameter can be an instance of Disk or a hash.
If it is a hash then a new instance will be created passing the hash as the
opts parameter to the constructor.
20646 20647 20648 20649 20650 20651 |
# File 'lib/ovirtsdk4/types.rb', line 20646 def disk=(value) if value.is_a?(Hash) value = Disk.new(value) end @disk = value end |
#gluster_volume ⇒ GlusterVolume
Returns the value of the gluster_volume attribute.
20658 20659 20660 |
# File 'lib/ovirtsdk4/types.rb', line 20658 def gluster_volume @gluster_volume end |
#gluster_volume=(value) ⇒ Object
Sets the value of the gluster_volume attribute.
The value parameter can be an instance of GlusterVolume or a hash.
If it is a hash then a new instance will be created passing the hash as the
opts parameter to the constructor.
20671 20672 20673 20674 20675 20676 |
# File 'lib/ovirtsdk4/types.rb', line 20671 def gluster_volume=(value) if value.is_a?(Hash) value = GlusterVolume.new(value) end @gluster_volume = value end |
#hash ⇒ Object
Generates a hash value for this object.
21026 21027 21028 21029 21030 21031 21032 21033 21034 21035 21036 21037 21038 21039 21040 21041 |
# File 'lib/ovirtsdk4/types.rb', line 21026 def hash super + @brick.hash + @disk.hash + @gluster_volume.hash + @host.hash + @host_nic.hash + @host_numa_node.hash + @kind.hash + @nic.hash + @step.hash + @type.hash + @unit.hash + @values.hash + @vm.hash end |
#host ⇒ Host
Returns the value of the host attribute.
20683 20684 20685 |
# File 'lib/ovirtsdk4/types.rb', line 20683 def host @host end |
#host=(value) ⇒ Object
Sets the value of the host attribute.
The value parameter can be an instance of Host or a hash.
If it is a hash then a new instance will be created passing the hash as the
opts parameter to the constructor.
20696 20697 20698 20699 20700 20701 |
# File 'lib/ovirtsdk4/types.rb', line 20696 def host=(value) if value.is_a?(Hash) value = Host.new(value) end @host = value end |
#host_nic ⇒ HostNic
Returns the value of the host_nic attribute.
20708 20709 20710 |
# File 'lib/ovirtsdk4/types.rb', line 20708 def host_nic @host_nic end |
#host_nic=(value) ⇒ Object
Sets the value of the host_nic attribute.
The value parameter can be an instance of HostNic or a hash.
If it is a hash then a new instance will be created passing the hash as the
opts parameter to the constructor.
20721 20722 20723 20724 20725 20726 |
# File 'lib/ovirtsdk4/types.rb', line 20721 def host_nic=(value) if value.is_a?(Hash) value = HostNic.new(value) end @host_nic = value end |
#host_numa_node ⇒ NumaNode
Returns the value of the host_numa_node attribute.
20733 20734 20735 |
# File 'lib/ovirtsdk4/types.rb', line 20733 def host_numa_node @host_numa_node end |
#host_numa_node=(value) ⇒ Object
Sets the value of the host_numa_node attribute.
The value parameter can be an instance of NumaNode or a hash.
If it is a hash then a new instance will be created passing the hash as the
opts parameter to the constructor.
20746 20747 20748 20749 20750 20751 |
# File 'lib/ovirtsdk4/types.rb', line 20746 def host_numa_node=(value) if value.is_a?(Hash) value = NumaNode.new(value) end @host_numa_node = value end |
#id ⇒ String
Returns the value of the id attribute.
20758 20759 20760 |
# File 'lib/ovirtsdk4/types.rb', line 20758 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id attribute.
20767 20768 20769 |
# File 'lib/ovirtsdk4/types.rb', line 20767 def id=(value) @id = value end |
#kind ⇒ StatisticKind
Returns the value of the kind attribute.
20776 20777 20778 |
# File 'lib/ovirtsdk4/types.rb', line 20776 def kind @kind end |
#kind=(value) ⇒ Object
Sets the value of the kind attribute.
20785 20786 20787 |
# File 'lib/ovirtsdk4/types.rb', line 20785 def kind=(value) @kind = value end |
#name ⇒ String
Returns the value of the name attribute.
20794 20795 20796 |
# File 'lib/ovirtsdk4/types.rb', line 20794 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name attribute.
20803 20804 20805 |
# File 'lib/ovirtsdk4/types.rb', line 20803 def name=(value) @name = value end |
#nic ⇒ Nic
Returns the value of the nic attribute.
20812 20813 20814 |
# File 'lib/ovirtsdk4/types.rb', line 20812 def nic @nic end |
#nic=(value) ⇒ Object
Sets the value of the nic attribute.
The value parameter can be an instance of Nic or a hash.
If it is a hash then a new instance will be created passing the hash as the
opts parameter to the constructor.
20825 20826 20827 20828 20829 20830 |
# File 'lib/ovirtsdk4/types.rb', line 20825 def nic=(value) if value.is_a?(Hash) value = Nic.new(value) end @nic = value end |
#step ⇒ Step
Returns the value of the step attribute.
20837 20838 20839 |
# File 'lib/ovirtsdk4/types.rb', line 20837 def step @step end |
#step=(value) ⇒ Object
Sets the value of the step attribute.
The value parameter can be an instance of OvirtSDK4::Step or a hash.
If it is a hash then a new instance will be created passing the hash as the
opts parameter to the constructor.
20850 20851 20852 20853 20854 20855 |
# File 'lib/ovirtsdk4/types.rb', line 20850 def step=(value) if value.is_a?(Hash) value = Step.new(value) end @step = value end |
#type ⇒ ValueType
Returns the value of the type attribute.
20862 20863 20864 |
# File 'lib/ovirtsdk4/types.rb', line 20862 def type @type end |
#type=(value) ⇒ Object
Sets the value of the type attribute.
20871 20872 20873 |
# File 'lib/ovirtsdk4/types.rb', line 20871 def type=(value) @type = value end |
#unit ⇒ StatisticUnit
Returns the value of the unit attribute.
20880 20881 20882 |
# File 'lib/ovirtsdk4/types.rb', line 20880 def unit @unit end |
#unit=(value) ⇒ Object
Sets the value of the unit attribute.
20889 20890 20891 |
# File 'lib/ovirtsdk4/types.rb', line 20889 def unit=(value) @unit = value end |
#values ⇒ Array<Value>
Returns the value of the values attribute.
20898 20899 20900 |
# File 'lib/ovirtsdk4/types.rb', line 20898 def values @values end |
#values=(list) ⇒ Object
Sets the value of the values attribute.
20907 20908 20909 20910 20911 20912 20913 20914 20915 20916 20917 |
# File 'lib/ovirtsdk4/types.rb', line 20907 def values=(list) if list.class == Array list = List.new(list) list.each_with_index do |value, index| if value.is_a?(Hash) list[index] = Value.new(value) end end end @values = list end |
#vm ⇒ Vm
Returns the value of the vm attribute.
20924 20925 20926 |
# File 'lib/ovirtsdk4/types.rb', line 20924 def vm @vm end |
#vm=(value) ⇒ Object
Sets the value of the vm attribute.
The value parameter can be an instance of Vm or a hash.
If it is a hash then a new instance will be created passing the hash as the
opts parameter to the constructor.
20937 20938 20939 20940 20941 20942 |
# File 'lib/ovirtsdk4/types.rb', line 20937 def vm=(value) if value.is_a?(Hash) value = Vm.new(value) end @vm = value end |