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.
20716 20717 20718 20719 20720 20721 20722 20723 20724 20725 20726 20727 20728 20729 20730 20731 |
# File 'lib/ovirtsdk4/types.rb', line 20716 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.
20736 20737 20738 20739 20740 20741 20742 20743 20744 20745 20746 20747 20748 20749 20750 20751 |
# File 'lib/ovirtsdk4/types.rb', line 20736 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.
20302 20303 20304 |
# File 'lib/ovirtsdk4/types.rb', line 20302 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.
20315 20316 20317 20318 20319 20320 |
# File 'lib/ovirtsdk4/types.rb', line 20315 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.
20327 20328 20329 |
# File 'lib/ovirtsdk4/types.rb', line 20327 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment
attribute.
20336 20337 20338 |
# File 'lib/ovirtsdk4/types.rb', line 20336 def comment=(value) @comment = value end |
#description ⇒ String
Returns the value of the description
attribute.
20345 20346 20347 |
# File 'lib/ovirtsdk4/types.rb', line 20345 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description
attribute.
20354 20355 20356 |
# File 'lib/ovirtsdk4/types.rb', line 20354 def description=(value) @description = value end |
#disk ⇒ Disk
Returns the value of the disk
attribute.
20363 20364 20365 |
# File 'lib/ovirtsdk4/types.rb', line 20363 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.
20376 20377 20378 20379 20380 20381 |
# File 'lib/ovirtsdk4/types.rb', line 20376 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.
20388 20389 20390 |
# File 'lib/ovirtsdk4/types.rb', line 20388 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.
20401 20402 20403 20404 20405 20406 |
# File 'lib/ovirtsdk4/types.rb', line 20401 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.
20756 20757 20758 20759 20760 20761 20762 20763 20764 20765 20766 20767 20768 20769 20770 20771 |
# File 'lib/ovirtsdk4/types.rb', line 20756 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.
20413 20414 20415 |
# File 'lib/ovirtsdk4/types.rb', line 20413 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.
20426 20427 20428 20429 20430 20431 |
# File 'lib/ovirtsdk4/types.rb', line 20426 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.
20438 20439 20440 |
# File 'lib/ovirtsdk4/types.rb', line 20438 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.
20451 20452 20453 20454 20455 20456 |
# File 'lib/ovirtsdk4/types.rb', line 20451 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.
20463 20464 20465 |
# File 'lib/ovirtsdk4/types.rb', line 20463 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.
20476 20477 20478 20479 20480 20481 |
# File 'lib/ovirtsdk4/types.rb', line 20476 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.
20488 20489 20490 |
# File 'lib/ovirtsdk4/types.rb', line 20488 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id
attribute.
20497 20498 20499 |
# File 'lib/ovirtsdk4/types.rb', line 20497 def id=(value) @id = value end |
#kind ⇒ StatisticKind
Returns the value of the kind
attribute.
20506 20507 20508 |
# File 'lib/ovirtsdk4/types.rb', line 20506 def kind @kind end |
#kind=(value) ⇒ Object
Sets the value of the kind
attribute.
20515 20516 20517 |
# File 'lib/ovirtsdk4/types.rb', line 20515 def kind=(value) @kind = value end |
#name ⇒ String
Returns the value of the name
attribute.
20524 20525 20526 |
# File 'lib/ovirtsdk4/types.rb', line 20524 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name
attribute.
20533 20534 20535 |
# File 'lib/ovirtsdk4/types.rb', line 20533 def name=(value) @name = value end |
#nic ⇒ Nic
Returns the value of the nic
attribute.
20542 20543 20544 |
# File 'lib/ovirtsdk4/types.rb', line 20542 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.
20555 20556 20557 20558 20559 20560 |
# File 'lib/ovirtsdk4/types.rb', line 20555 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.
20567 20568 20569 |
# File 'lib/ovirtsdk4/types.rb', line 20567 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.
20580 20581 20582 20583 20584 20585 |
# File 'lib/ovirtsdk4/types.rb', line 20580 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.
20592 20593 20594 |
# File 'lib/ovirtsdk4/types.rb', line 20592 def type @type end |
#type=(value) ⇒ Object
Sets the value of the type
attribute.
20601 20602 20603 |
# File 'lib/ovirtsdk4/types.rb', line 20601 def type=(value) @type = value end |
#unit ⇒ StatisticUnit
Returns the value of the unit
attribute.
20610 20611 20612 |
# File 'lib/ovirtsdk4/types.rb', line 20610 def unit @unit end |
#unit=(value) ⇒ Object
Sets the value of the unit
attribute.
20619 20620 20621 |
# File 'lib/ovirtsdk4/types.rb', line 20619 def unit=(value) @unit = value end |
#values ⇒ Array<Value>
Returns the value of the values
attribute.
20628 20629 20630 |
# File 'lib/ovirtsdk4/types.rb', line 20628 def values @values end |
#values=(list) ⇒ Object
Sets the value of the values
attribute.
20637 20638 20639 20640 20641 20642 20643 20644 20645 20646 20647 |
# File 'lib/ovirtsdk4/types.rb', line 20637 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.
20654 20655 20656 |
# File 'lib/ovirtsdk4/types.rb', line 20654 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.
20667 20668 20669 20670 20671 20672 |
# File 'lib/ovirtsdk4/types.rb', line 20667 def vm=(value) if value.is_a?(Hash) value = Vm.new(value) end @vm = value end |