class OvirtSDK4::Statistic
Public Class Methods
Creates a new instance of the {Statistic} class.
@param opts [Hash] A hash containing the attributes of the object. The keys of the hash
should be symbols corresponding to the names of the attributes. The values of the hash should be the values of the attributes.
@option opts [GlusterBrick, Hash] :brick The value of attribute `brick`.
@option opts [String] :comment The value of attribute `comment`.
@option opts [String] :description The value of attribute `description`.
@option opts [Disk, Hash] :disk The value of attribute `disk`.
@option opts [GlusterVolume, Hash] :gluster_volume The value of attribute `gluster_volume`.
@option opts [Host, Hash] :host The value of attribute `host`.
@option opts [HostNic, Hash] :host_nic The value of attribute `host_nic`.
@option opts [NumaNode, Hash] :host_numa_node The value of attribute `host_numa_node`.
@option opts [String] :id The value of attribute `id`.
@option opts [StatisticKind] :kind The value of attribute `kind`.
@option opts [String] :name The value of attribute `name`.
@option opts [Nic, Hash] :nic The value of attribute `nic`.
@option opts [Step, Hash] :step The value of attribute `step`.
@option opts [ValueType] :type The value of attribute `type`.
@option opts [StatisticUnit] :unit The value of attribute `unit`.
@option opts [Array<Value>, Array<Hash>] :values The values of attribute `values`.
@option opts [Vm, Hash] :vm The value of attribute `vm`.
# File lib/ovirtsdk4/types.rb, line 15525 def initialize(opts = {}) super(opts) self.brick = opts[:brick] self.comment = opts[:comment] self.description = opts[:description] 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.id = opts[:id] self.kind = opts[:kind] self.name = opts[:name] 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
Public Instance Methods
Returns the value of the `brick` attribute.
@return [GlusterBrick]
# File lib/ovirtsdk4/types.rb, line 15112 def brick return @brick end
Sets the value of the `brick` attribute.
@param value [GlusterBrick, Hash]
The `value` parameter can be an instance of {OvirtSDK4::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.
# File lib/ovirtsdk4/types.rb, line 15125 def brick=(value) if value.is_a?(Hash) value = GlusterBrick.new(value) end @brick = value end
Returns the value of the `comment` attribute.
@return [String]
# File lib/ovirtsdk4/types.rb, line 15137 def comment return @comment end
Sets the value of the `comment` attribute.
@param value [String]
# File lib/ovirtsdk4/types.rb, line 15146 def comment=(value) @comment = value end
Returns the value of the `description` attribute.
@return [String]
# File lib/ovirtsdk4/types.rb, line 15155 def description return @description end
Sets the value of the `description` attribute.
@param value [String]
# File lib/ovirtsdk4/types.rb, line 15164 def description=(value) @description = value end
Returns the value of the `disk` attribute.
@return [Disk]
# File lib/ovirtsdk4/types.rb, line 15173 def disk return @disk end
Sets the value of the `disk` attribute.
@param value [Disk, Hash]
The `value` parameter can be an instance of {OvirtSDK4::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.
# File lib/ovirtsdk4/types.rb, line 15186 def disk=(value) if value.is_a?(Hash) value = Disk.new(value) end @disk = value end
Returns the value of the `gluster_volume` attribute.
@return [GlusterVolume]
# File lib/ovirtsdk4/types.rb, line 15198 def gluster_volume return @gluster_volume end
Sets the value of the `gluster_volume` attribute.
@param value [GlusterVolume, Hash]
The `value` parameter can be an instance of {OvirtSDK4::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.
# File lib/ovirtsdk4/types.rb, line 15211 def gluster_volume=(value) if value.is_a?(Hash) value = GlusterVolume.new(value) end @gluster_volume = value end
Returns the value of the `host` attribute.
@return [Host]
# File lib/ovirtsdk4/types.rb, line 15223 def host return @host end
Sets the value of the `host` attribute.
@param value [Host, Hash]
The `value` parameter can be an instance of {OvirtSDK4::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.
# File lib/ovirtsdk4/types.rb, line 15236 def host=(value) if value.is_a?(Hash) value = Host.new(value) end @host = value end
Returns the value of the `host_nic` attribute.
@return [HostNic]
# File lib/ovirtsdk4/types.rb, line 15248 def host_nic return @host_nic end
Sets the value of the `host_nic` attribute.
@param value [HostNic, Hash]
The `value` parameter can be an instance of {OvirtSDK4::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.
# File lib/ovirtsdk4/types.rb, line 15261 def host_nic=(value) if value.is_a?(Hash) value = HostNic.new(value) end @host_nic = value end
Returns the value of the `host_numa_node` attribute.
@return [NumaNode]
# File lib/ovirtsdk4/types.rb, line 15273 def host_numa_node return @host_numa_node end
Sets the value of the `host_numa_node` attribute.
@param value [NumaNode, Hash]
The `value` parameter can be an instance of {OvirtSDK4::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.
# File lib/ovirtsdk4/types.rb, line 15286 def host_numa_node=(value) if value.is_a?(Hash) value = NumaNode.new(value) end @host_numa_node = value end
Returns the value of the `id` attribute.
@return [String]
# File lib/ovirtsdk4/types.rb, line 15298 def id return @id end
Sets the value of the `id` attribute.
@param value [String]
# File lib/ovirtsdk4/types.rb, line 15307 def id=(value) @id = value end
Returns the value of the `kind` attribute.
@return [StatisticKind]
# File lib/ovirtsdk4/types.rb, line 15316 def kind return @kind end
Sets the value of the `kind` attribute.
@param value [StatisticKind]
# File lib/ovirtsdk4/types.rb, line 15325 def kind=(value) @kind = value end
Returns the value of the `name` attribute.
@return [String]
# File lib/ovirtsdk4/types.rb, line 15334 def name return @name end
Sets the value of the `name` attribute.
@param value [String]
# File lib/ovirtsdk4/types.rb, line 15343 def name=(value) @name = value end
Returns the value of the `nic` attribute.
@return [Nic]
# File lib/ovirtsdk4/types.rb, line 15352 def nic return @nic end
Sets the value of the `nic` attribute.
@param value [Nic, Hash]
The `value` parameter can be an instance of {OvirtSDK4::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.
# File lib/ovirtsdk4/types.rb, line 15365 def nic=(value) if value.is_a?(Hash) value = Nic.new(value) end @nic = value end
Returns the value of the `step` attribute.
@return [Step]
# File lib/ovirtsdk4/types.rb, line 15377 def step return @step end
Sets the value of the `step` attribute.
@param value [Step, Hash]
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.
# File lib/ovirtsdk4/types.rb, line 15390 def step=(value) if value.is_a?(Hash) value = Step.new(value) end @step = value end
Returns the value of the `type` attribute.
@return [ValueType]
# File lib/ovirtsdk4/types.rb, line 15402 def type return @type end
Sets the value of the `type` attribute.
@param value [ValueType]
# File lib/ovirtsdk4/types.rb, line 15411 def type=(value) @type = value end
Returns the value of the `unit` attribute.
@return [StatisticUnit]
# File lib/ovirtsdk4/types.rb, line 15420 def unit return @unit end
Sets the value of the `unit` attribute.
@param value [StatisticUnit]
# File lib/ovirtsdk4/types.rb, line 15429 def unit=(value) @unit = value end
Returns the value of the `values` attribute.
@return [Array<Value>]
# File lib/ovirtsdk4/types.rb, line 15438 def values return @values end
Sets the value of the `values` attribute.
@param list [Array<Value>]
# File lib/ovirtsdk4/types.rb, line 15446 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
Returns the value of the `vm` attribute.
@return [Vm]
# File lib/ovirtsdk4/types.rb, line 15463 def vm return @vm end
Sets the value of the `vm` attribute.
@param value [Vm, Hash]
The `value` parameter can be an instance of {OvirtSDK4::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.
# File lib/ovirtsdk4/types.rb, line 15476 def vm=(value) if value.is_a?(Hash) value = Vm.new(value) end @vm = value end