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
true
ifself
andother
have the same attributes and values. -
#brick ⇒ GlusterBrick
Returns the value of the
brick
attribute. -
#brick=(value) ⇒ Object
Sets the value of the
brick
attribute. -
#comment ⇒ String
Returns the value of the
comment
attribute. -
#comment=(value) ⇒ Object
Sets the value of the
comment
attribute. -
#description ⇒ String
Returns the value of the
description
attribute. -
#description=(value) ⇒ Object
Sets the value of the
description
attribute. -
#disk ⇒ Disk
Returns the value of the
disk
attribute. -
#disk=(value) ⇒ Object
Sets the value of the
disk
attribute. -
#gluster_volume ⇒ GlusterVolume
Returns the value of the
gluster_volume
attribute. -
#gluster_volume=(value) ⇒ Object
Sets the value of the
gluster_volume
attribute. -
#hash ⇒ Object
Generates a hash value for this object.
-
#host ⇒ Host
Returns the value of the
host
attribute. -
#host=(value) ⇒ Object
Sets the value of the
host
attribute. -
#host_nic ⇒ HostNic
Returns the value of the
host_nic
attribute. -
#host_nic=(value) ⇒ Object
Sets the value of the
host_nic
attribute. -
#host_numa_node ⇒ NumaNode
Returns the value of the
host_numa_node
attribute. -
#host_numa_node=(value) ⇒ Object
Sets the value of the
host_numa_node
attribute. -
#id ⇒ String
Returns the value of the
id
attribute. -
#id=(value) ⇒ Object
Sets the value of the
id
attribute. -
#initialize(opts = {}) ⇒ Statistic
constructor
Creates a new instance of the Statistic class.
-
#kind ⇒ StatisticKind
Returns the value of the
kind
attribute. -
#kind=(value) ⇒ Object
Sets the value of the
kind
attribute. -
#name ⇒ String
Returns the value of the
name
attribute. -
#name=(value) ⇒ Object
Sets the value of the
name
attribute. -
#nic ⇒ Nic
Returns the value of the
nic
attribute. -
#nic=(value) ⇒ Object
Sets the value of the
nic
attribute. -
#step ⇒ Step
Returns the value of the
step
attribute. -
#step=(value) ⇒ Object
Sets the value of the
step
attribute. -
#type ⇒ ValueType
Returns the value of the
type
attribute. -
#type=(value) ⇒ Object
Sets the value of the
type
attribute. -
#unit ⇒ StatisticUnit
Returns the value of the
unit
attribute. -
#unit=(value) ⇒ Object
Sets the value of the
unit
attribute. -
#values ⇒ Array<Value>
Returns the value of the
values
attribute. -
#values=(list) ⇒ Object
Sets the value of the
values
attribute. -
#vm ⇒ Vm
Returns the value of the
vm
attribute. -
#vm=(value) ⇒ Object
Sets the value of the
vm
attribute.
Methods included from Type
Constructor Details
#initialize(opts = {}) ⇒ Statistic
Creates a new instance of the OvirtSDK4::Statistic class.
19861 19862 19863 19864 19865 19866 19867 19868 19869 19870 19871 19872 19873 19874 19875 19876 |
# File 'lib/ovirtsdk4/types.rb', line 19861 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.
19881 19882 19883 19884 19885 19886 19887 19888 19889 19890 19891 19892 19893 19894 19895 19896 |
# File 'lib/ovirtsdk4/types.rb', line 19881 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.
19447 19448 19449 |
# File 'lib/ovirtsdk4/types.rb', line 19447 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.
19460 19461 19462 19463 19464 19465 |
# File 'lib/ovirtsdk4/types.rb', line 19460 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.
19472 19473 19474 |
# File 'lib/ovirtsdk4/types.rb', line 19472 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment
attribute.
19481 19482 19483 |
# File 'lib/ovirtsdk4/types.rb', line 19481 def comment=(value) @comment = value end |
#description ⇒ String
Returns the value of the description
attribute.
19490 19491 19492 |
# File 'lib/ovirtsdk4/types.rb', line 19490 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description
attribute.
19499 19500 19501 |
# File 'lib/ovirtsdk4/types.rb', line 19499 def description=(value) @description = value end |
#disk ⇒ Disk
Returns the value of the disk
attribute.
19508 19509 19510 |
# File 'lib/ovirtsdk4/types.rb', line 19508 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.
19521 19522 19523 19524 19525 19526 |
# File 'lib/ovirtsdk4/types.rb', line 19521 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.
19533 19534 19535 |
# File 'lib/ovirtsdk4/types.rb', line 19533 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.
19546 19547 19548 19549 19550 19551 |
# File 'lib/ovirtsdk4/types.rb', line 19546 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.
19901 19902 19903 19904 19905 19906 19907 19908 19909 19910 19911 19912 19913 19914 19915 19916 |
# File 'lib/ovirtsdk4/types.rb', line 19901 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.
19558 19559 19560 |
# File 'lib/ovirtsdk4/types.rb', line 19558 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.
19571 19572 19573 19574 19575 19576 |
# File 'lib/ovirtsdk4/types.rb', line 19571 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.
19583 19584 19585 |
# File 'lib/ovirtsdk4/types.rb', line 19583 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.
19596 19597 19598 19599 19600 19601 |
# File 'lib/ovirtsdk4/types.rb', line 19596 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.
19608 19609 19610 |
# File 'lib/ovirtsdk4/types.rb', line 19608 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.
19621 19622 19623 19624 19625 19626 |
# File 'lib/ovirtsdk4/types.rb', line 19621 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.
19633 19634 19635 |
# File 'lib/ovirtsdk4/types.rb', line 19633 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id
attribute.
19642 19643 19644 |
# File 'lib/ovirtsdk4/types.rb', line 19642 def id=(value) @id = value end |
#kind ⇒ StatisticKind
Returns the value of the kind
attribute.
19651 19652 19653 |
# File 'lib/ovirtsdk4/types.rb', line 19651 def kind @kind end |
#kind=(value) ⇒ Object
Sets the value of the kind
attribute.
19660 19661 19662 |
# File 'lib/ovirtsdk4/types.rb', line 19660 def kind=(value) @kind = value end |
#name ⇒ String
Returns the value of the name
attribute.
19669 19670 19671 |
# File 'lib/ovirtsdk4/types.rb', line 19669 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name
attribute.
19678 19679 19680 |
# File 'lib/ovirtsdk4/types.rb', line 19678 def name=(value) @name = value end |
#nic ⇒ Nic
Returns the value of the nic
attribute.
19687 19688 19689 |
# File 'lib/ovirtsdk4/types.rb', line 19687 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.
19700 19701 19702 19703 19704 19705 |
# File 'lib/ovirtsdk4/types.rb', line 19700 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.
19712 19713 19714 |
# File 'lib/ovirtsdk4/types.rb', line 19712 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.
19725 19726 19727 19728 19729 19730 |
# File 'lib/ovirtsdk4/types.rb', line 19725 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.
19737 19738 19739 |
# File 'lib/ovirtsdk4/types.rb', line 19737 def type @type end |
#type=(value) ⇒ Object
Sets the value of the type
attribute.
19746 19747 19748 |
# File 'lib/ovirtsdk4/types.rb', line 19746 def type=(value) @type = value end |
#unit ⇒ StatisticUnit
Returns the value of the unit
attribute.
19755 19756 19757 |
# File 'lib/ovirtsdk4/types.rb', line 19755 def unit @unit end |
#unit=(value) ⇒ Object
Sets the value of the unit
attribute.
19764 19765 19766 |
# File 'lib/ovirtsdk4/types.rb', line 19764 def unit=(value) @unit = value end |
#values ⇒ Array<Value>
Returns the value of the values
attribute.
19773 19774 19775 |
# File 'lib/ovirtsdk4/types.rb', line 19773 def values @values end |
#values=(list) ⇒ Object
Sets the value of the values
attribute.
19782 19783 19784 19785 19786 19787 19788 19789 19790 19791 19792 |
# File 'lib/ovirtsdk4/types.rb', line 19782 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.
19799 19800 19801 |
# File 'lib/ovirtsdk4/types.rb', line 19799 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.
19812 19813 19814 19815 19816 19817 |
# File 'lib/ovirtsdk4/types.rb', line 19812 def vm=(value) if value.is_a?(Hash) value = Vm.new(value) end @vm = value end |