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.
19691 19692 19693 19694 19695 19696 19697 19698 19699 19700 19701 19702 19703 19704 19705 19706 |
# File 'lib/ovirtsdk4/types.rb', line 19691 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.
19711 19712 19713 19714 19715 19716 19717 19718 19719 19720 19721 19722 19723 19724 19725 19726 |
# File 'lib/ovirtsdk4/types.rb', line 19711 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.
19277 19278 19279 |
# File 'lib/ovirtsdk4/types.rb', line 19277 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.
19290 19291 19292 19293 19294 19295 |
# File 'lib/ovirtsdk4/types.rb', line 19290 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.
19302 19303 19304 |
# File 'lib/ovirtsdk4/types.rb', line 19302 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment
attribute.
19311 19312 19313 |
# File 'lib/ovirtsdk4/types.rb', line 19311 def comment=(value) @comment = value end |
#description ⇒ String
Returns the value of the description
attribute.
19320 19321 19322 |
# File 'lib/ovirtsdk4/types.rb', line 19320 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description
attribute.
19329 19330 19331 |
# File 'lib/ovirtsdk4/types.rb', line 19329 def description=(value) @description = value end |
#disk ⇒ Disk
Returns the value of the disk
attribute.
19338 19339 19340 |
# File 'lib/ovirtsdk4/types.rb', line 19338 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.
19351 19352 19353 19354 19355 19356 |
# File 'lib/ovirtsdk4/types.rb', line 19351 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.
19363 19364 19365 |
# File 'lib/ovirtsdk4/types.rb', line 19363 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.
19376 19377 19378 19379 19380 19381 |
# File 'lib/ovirtsdk4/types.rb', line 19376 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.
19731 19732 19733 19734 19735 19736 19737 19738 19739 19740 19741 19742 19743 19744 19745 19746 |
# File 'lib/ovirtsdk4/types.rb', line 19731 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.
19388 19389 19390 |
# File 'lib/ovirtsdk4/types.rb', line 19388 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.
19401 19402 19403 19404 19405 19406 |
# File 'lib/ovirtsdk4/types.rb', line 19401 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.
19413 19414 19415 |
# File 'lib/ovirtsdk4/types.rb', line 19413 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.
19426 19427 19428 19429 19430 19431 |
# File 'lib/ovirtsdk4/types.rb', line 19426 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.
19438 19439 19440 |
# File 'lib/ovirtsdk4/types.rb', line 19438 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.
19451 19452 19453 19454 19455 19456 |
# File 'lib/ovirtsdk4/types.rb', line 19451 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.
19463 19464 19465 |
# File 'lib/ovirtsdk4/types.rb', line 19463 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id
attribute.
19472 19473 19474 |
# File 'lib/ovirtsdk4/types.rb', line 19472 def id=(value) @id = value end |
#kind ⇒ StatisticKind
Returns the value of the kind
attribute.
19481 19482 19483 |
# File 'lib/ovirtsdk4/types.rb', line 19481 def kind @kind end |
#kind=(value) ⇒ Object
Sets the value of the kind
attribute.
19490 19491 19492 |
# File 'lib/ovirtsdk4/types.rb', line 19490 def kind=(value) @kind = value end |
#name ⇒ String
Returns the value of the name
attribute.
19499 19500 19501 |
# File 'lib/ovirtsdk4/types.rb', line 19499 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name
attribute.
19508 19509 19510 |
# File 'lib/ovirtsdk4/types.rb', line 19508 def name=(value) @name = value end |
#nic ⇒ Nic
Returns the value of the nic
attribute.
19517 19518 19519 |
# File 'lib/ovirtsdk4/types.rb', line 19517 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.
19530 19531 19532 19533 19534 19535 |
# File 'lib/ovirtsdk4/types.rb', line 19530 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.
19542 19543 19544 |
# File 'lib/ovirtsdk4/types.rb', line 19542 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.
19555 19556 19557 19558 19559 19560 |
# File 'lib/ovirtsdk4/types.rb', line 19555 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.
19567 19568 19569 |
# File 'lib/ovirtsdk4/types.rb', line 19567 def type @type end |
#type=(value) ⇒ Object
Sets the value of the type
attribute.
19576 19577 19578 |
# File 'lib/ovirtsdk4/types.rb', line 19576 def type=(value) @type = value end |
#unit ⇒ StatisticUnit
Returns the value of the unit
attribute.
19585 19586 19587 |
# File 'lib/ovirtsdk4/types.rb', line 19585 def unit @unit end |
#unit=(value) ⇒ Object
Sets the value of the unit
attribute.
19594 19595 19596 |
# File 'lib/ovirtsdk4/types.rb', line 19594 def unit=(value) @unit = value end |
#values ⇒ Array<Value>
Returns the value of the values
attribute.
19603 19604 19605 |
# File 'lib/ovirtsdk4/types.rb', line 19603 def values @values end |
#values=(list) ⇒ Object
Sets the value of the values
attribute.
19612 19613 19614 19615 19616 19617 19618 19619 19620 19621 19622 |
# File 'lib/ovirtsdk4/types.rb', line 19612 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.
19629 19630 19631 |
# File 'lib/ovirtsdk4/types.rb', line 19629 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.
19642 19643 19644 19645 19646 19647 |
# File 'lib/ovirtsdk4/types.rb', line 19642 def vm=(value) if value.is_a?(Hash) value = Vm.new(value) end @vm = value end |