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.
19815 19816 19817 19818 19819 19820 19821 19822 19823 19824 19825 19826 19827 19828 19829 19830 |
# File 'lib/ovirtsdk4/types.rb', line 19815 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.
19835 19836 19837 19838 19839 19840 19841 19842 19843 19844 19845 19846 19847 19848 19849 19850 |
# File 'lib/ovirtsdk4/types.rb', line 19835 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.
19401 19402 19403 |
# File 'lib/ovirtsdk4/types.rb', line 19401 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.
19414 19415 19416 19417 19418 19419 |
# File 'lib/ovirtsdk4/types.rb', line 19414 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.
19426 19427 19428 |
# File 'lib/ovirtsdk4/types.rb', line 19426 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment attribute.
19435 19436 19437 |
# File 'lib/ovirtsdk4/types.rb', line 19435 def comment=(value) @comment = value end |
#description ⇒ String
Returns the value of the description attribute.
19444 19445 19446 |
# File 'lib/ovirtsdk4/types.rb', line 19444 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description attribute.
19453 19454 19455 |
# File 'lib/ovirtsdk4/types.rb', line 19453 def description=(value) @description = value end |
#disk ⇒ Disk
Returns the value of the disk attribute.
19462 19463 19464 |
# File 'lib/ovirtsdk4/types.rb', line 19462 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.
19475 19476 19477 19478 19479 19480 |
# File 'lib/ovirtsdk4/types.rb', line 19475 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.
19487 19488 19489 |
# File 'lib/ovirtsdk4/types.rb', line 19487 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.
19500 19501 19502 19503 19504 19505 |
# File 'lib/ovirtsdk4/types.rb', line 19500 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.
19855 19856 19857 19858 19859 19860 19861 19862 19863 19864 19865 19866 19867 19868 19869 19870 |
# File 'lib/ovirtsdk4/types.rb', line 19855 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.
19512 19513 19514 |
# File 'lib/ovirtsdk4/types.rb', line 19512 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.
19525 19526 19527 19528 19529 19530 |
# File 'lib/ovirtsdk4/types.rb', line 19525 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.
19537 19538 19539 |
# File 'lib/ovirtsdk4/types.rb', line 19537 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.
19550 19551 19552 19553 19554 19555 |
# File 'lib/ovirtsdk4/types.rb', line 19550 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.
19562 19563 19564 |
# File 'lib/ovirtsdk4/types.rb', line 19562 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.
19575 19576 19577 19578 19579 19580 |
# File 'lib/ovirtsdk4/types.rb', line 19575 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.
19587 19588 19589 |
# File 'lib/ovirtsdk4/types.rb', line 19587 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id attribute.
19596 19597 19598 |
# File 'lib/ovirtsdk4/types.rb', line 19596 def id=(value) @id = value end |
#kind ⇒ StatisticKind
Returns the value of the kind attribute.
19605 19606 19607 |
# File 'lib/ovirtsdk4/types.rb', line 19605 def kind @kind end |
#kind=(value) ⇒ Object
Sets the value of the kind attribute.
19614 19615 19616 |
# File 'lib/ovirtsdk4/types.rb', line 19614 def kind=(value) @kind = value end |
#name ⇒ String
Returns the value of the name attribute.
19623 19624 19625 |
# File 'lib/ovirtsdk4/types.rb', line 19623 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name attribute.
19632 19633 19634 |
# File 'lib/ovirtsdk4/types.rb', line 19632 def name=(value) @name = value end |
#nic ⇒ Nic
Returns the value of the nic attribute.
19641 19642 19643 |
# File 'lib/ovirtsdk4/types.rb', line 19641 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.
19654 19655 19656 19657 19658 19659 |
# File 'lib/ovirtsdk4/types.rb', line 19654 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.
19666 19667 19668 |
# File 'lib/ovirtsdk4/types.rb', line 19666 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.
19679 19680 19681 19682 19683 19684 |
# File 'lib/ovirtsdk4/types.rb', line 19679 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.
19691 19692 19693 |
# File 'lib/ovirtsdk4/types.rb', line 19691 def type @type end |
#type=(value) ⇒ Object
Sets the value of the type attribute.
19700 19701 19702 |
# File 'lib/ovirtsdk4/types.rb', line 19700 def type=(value) @type = value end |
#unit ⇒ StatisticUnit
Returns the value of the unit attribute.
19709 19710 19711 |
# File 'lib/ovirtsdk4/types.rb', line 19709 def unit @unit end |
#unit=(value) ⇒ Object
Sets the value of the unit attribute.
19718 19719 19720 |
# File 'lib/ovirtsdk4/types.rb', line 19718 def unit=(value) @unit = value end |
#values ⇒ Array<Value>
Returns the value of the values attribute.
19727 19728 19729 |
# File 'lib/ovirtsdk4/types.rb', line 19727 def values @values end |
#values=(list) ⇒ Object
Sets the value of the values attribute.
19736 19737 19738 19739 19740 19741 19742 19743 19744 19745 19746 |
# File 'lib/ovirtsdk4/types.rb', line 19736 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.
19753 19754 19755 |
# File 'lib/ovirtsdk4/types.rb', line 19753 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.
19766 19767 19768 19769 19770 19771 |
# File 'lib/ovirtsdk4/types.rb', line 19766 def vm=(value) if value.is_a?(Hash) value = Vm.new(value) end @vm = value end |