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.
20243 20244 20245 20246 20247 20248 20249 20250 20251 20252 20253 20254 20255 20256 20257 20258 |
# File 'lib/ovirtsdk4/types.rb', line 20243 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.
20263 20264 20265 20266 20267 20268 20269 20270 20271 20272 20273 20274 20275 20276 20277 20278 |
# File 'lib/ovirtsdk4/types.rb', line 20263 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.
19829 19830 19831 |
# File 'lib/ovirtsdk4/types.rb', line 19829 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.
19842 19843 19844 19845 19846 19847 |
# File 'lib/ovirtsdk4/types.rb', line 19842 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.
19854 19855 19856 |
# File 'lib/ovirtsdk4/types.rb', line 19854 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment
attribute.
19863 19864 19865 |
# File 'lib/ovirtsdk4/types.rb', line 19863 def comment=(value) @comment = value end |
#description ⇒ String
Returns the value of the description
attribute.
19872 19873 19874 |
# File 'lib/ovirtsdk4/types.rb', line 19872 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description
attribute.
19881 19882 19883 |
# File 'lib/ovirtsdk4/types.rb', line 19881 def description=(value) @description = value end |
#disk ⇒ Disk
Returns the value of the disk
attribute.
19890 19891 19892 |
# File 'lib/ovirtsdk4/types.rb', line 19890 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.
19903 19904 19905 19906 19907 19908 |
# File 'lib/ovirtsdk4/types.rb', line 19903 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.
19915 19916 19917 |
# File 'lib/ovirtsdk4/types.rb', line 19915 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.
19928 19929 19930 19931 19932 19933 |
# File 'lib/ovirtsdk4/types.rb', line 19928 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.
20283 20284 20285 20286 20287 20288 20289 20290 20291 20292 20293 20294 20295 20296 20297 20298 |
# File 'lib/ovirtsdk4/types.rb', line 20283 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.
19940 19941 19942 |
# File 'lib/ovirtsdk4/types.rb', line 19940 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.
19953 19954 19955 19956 19957 19958 |
# File 'lib/ovirtsdk4/types.rb', line 19953 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.
19965 19966 19967 |
# File 'lib/ovirtsdk4/types.rb', line 19965 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.
19978 19979 19980 19981 19982 19983 |
# File 'lib/ovirtsdk4/types.rb', line 19978 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.
19990 19991 19992 |
# File 'lib/ovirtsdk4/types.rb', line 19990 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.
20003 20004 20005 20006 20007 20008 |
# File 'lib/ovirtsdk4/types.rb', line 20003 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.
20015 20016 20017 |
# File 'lib/ovirtsdk4/types.rb', line 20015 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id
attribute.
20024 20025 20026 |
# File 'lib/ovirtsdk4/types.rb', line 20024 def id=(value) @id = value end |
#kind ⇒ StatisticKind
Returns the value of the kind
attribute.
20033 20034 20035 |
# File 'lib/ovirtsdk4/types.rb', line 20033 def kind @kind end |
#kind=(value) ⇒ Object
Sets the value of the kind
attribute.
20042 20043 20044 |
# File 'lib/ovirtsdk4/types.rb', line 20042 def kind=(value) @kind = value end |
#name ⇒ String
Returns the value of the name
attribute.
20051 20052 20053 |
# File 'lib/ovirtsdk4/types.rb', line 20051 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name
attribute.
20060 20061 20062 |
# File 'lib/ovirtsdk4/types.rb', line 20060 def name=(value) @name = value end |
#nic ⇒ Nic
Returns the value of the nic
attribute.
20069 20070 20071 |
# File 'lib/ovirtsdk4/types.rb', line 20069 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.
20082 20083 20084 20085 20086 20087 |
# File 'lib/ovirtsdk4/types.rb', line 20082 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.
20094 20095 20096 |
# File 'lib/ovirtsdk4/types.rb', line 20094 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.
20107 20108 20109 20110 20111 20112 |
# File 'lib/ovirtsdk4/types.rb', line 20107 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.
20119 20120 20121 |
# File 'lib/ovirtsdk4/types.rb', line 20119 def type @type end |
#type=(value) ⇒ Object
Sets the value of the type
attribute.
20128 20129 20130 |
# File 'lib/ovirtsdk4/types.rb', line 20128 def type=(value) @type = value end |
#unit ⇒ StatisticUnit
Returns the value of the unit
attribute.
20137 20138 20139 |
# File 'lib/ovirtsdk4/types.rb', line 20137 def unit @unit end |
#unit=(value) ⇒ Object
Sets the value of the unit
attribute.
20146 20147 20148 |
# File 'lib/ovirtsdk4/types.rb', line 20146 def unit=(value) @unit = value end |
#values ⇒ Array<Value>
Returns the value of the values
attribute.
20155 20156 20157 |
# File 'lib/ovirtsdk4/types.rb', line 20155 def values @values end |
#values=(list) ⇒ Object
Sets the value of the values
attribute.
20164 20165 20166 20167 20168 20169 20170 20171 20172 20173 20174 |
# File 'lib/ovirtsdk4/types.rb', line 20164 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.
20181 20182 20183 |
# File 'lib/ovirtsdk4/types.rb', line 20181 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.
20194 20195 20196 20197 20198 20199 |
# File 'lib/ovirtsdk4/types.rb', line 20194 def vm=(value) if value.is_a?(Hash) value = Vm.new(value) end @vm = value end |