Class: OvirtSDK4::Statistic

Inherits:
Identified show all
Defined in:
lib/ovirtsdk4/types.rb,
lib/ovirtsdk4/types.rb

Instance Method Summary (collapse)

Methods included from Type

#href, #href=

Constructor Details

- (Statistic) initialize(opts = {})

Creates a new instance of the OvirtSDK4::Statistic class.

Parameters:

  • opts (Hash) (defaults to: {})

    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.

Options Hash (opts):

  • :brick (GlusterBrick, Hash)

    The value of attribute brick.

  • :comment (String)

    The value of attribute comment.

  • :description (String)

    The value of attribute description.

  • :disk (Disk, Hash)

    The value of attribute disk.

  • :gluster_volume (GlusterVolume, Hash)

    The value of attribute gluster_volume.

  • :host (Host, Hash)

    The value of attribute host.

  • :host_nic (HostNic, Hash)

    The value of attribute host_nic.

  • :host_numa_node (NumaNode, Hash)

    The value of attribute host_numa_node.

  • :id (String)

    The value of attribute id.

  • :kind (StatisticKind)

    The value of attribute kind.

  • :name (String)

    The value of attribute name.

  • :nic (Nic, Hash)

    The value of attribute nic.

  • :step (Step, Hash)

    The value of attribute step.

  • :type (ValueType)

    The value of attribute type.

  • :unit (StatisticUnit)

    The value of attribute unit.

  • :values (Array<Value>, Array<Hash>)

    The values of attribute values.

  • :vm (Vm, Hash)

    The value of attribute vm.



14934
14935
14936
14937
14938
14939
14940
14941
14942
14943
14944
14945
14946
14947
14948
14949
14950
14951
14952
14953
# File 'lib/ovirtsdk4/types.rb', line 14934

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

Instance Method Details

- (GlusterBrick) brick

Returns the value of the brick attribute.

Returns:



14521
14522
14523
# File 'lib/ovirtsdk4/types.rb', line 14521

def brick
  return @brick
end

- (Object) brick=(value)

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.

Parameters:



14534
14535
14536
14537
14538
14539
# File 'lib/ovirtsdk4/types.rb', line 14534

def brick=(value)
  if value.is_a?(Hash)
    value = GlusterBrick.new(value)
  end
  @brick = value
end

- (String) comment

Returns the value of the comment attribute.

Returns:

  • (String)


14546
14547
14548
# File 'lib/ovirtsdk4/types.rb', line 14546

def comment
  return @comment
end

- (Object) comment=(value)

Sets the value of the comment attribute.

Parameters:

  • value (String)


14555
14556
14557
# File 'lib/ovirtsdk4/types.rb', line 14555

def comment=(value)
  @comment = value
end

- (String) description

Returns the value of the description attribute.

Returns:

  • (String)


14564
14565
14566
# File 'lib/ovirtsdk4/types.rb', line 14564

def description
  return @description
end

- (Object) description=(value)

Sets the value of the description attribute.

Parameters:

  • value (String)


14573
14574
14575
# File 'lib/ovirtsdk4/types.rb', line 14573

def description=(value)
  @description = value
end

- (Disk) disk

Returns the value of the disk attribute.

Returns:



14582
14583
14584
# File 'lib/ovirtsdk4/types.rb', line 14582

def disk
  return @disk
end

- (Object) disk=(value)

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.

Parameters:

  • value (Disk, Hash)


14595
14596
14597
14598
14599
14600
# File 'lib/ovirtsdk4/types.rb', line 14595

def disk=(value)
  if value.is_a?(Hash)
    value = Disk.new(value)
  end
  @disk = value
end

- (GlusterVolume) gluster_volume

Returns the value of the gluster_volume attribute.

Returns:



14607
14608
14609
# File 'lib/ovirtsdk4/types.rb', line 14607

def gluster_volume
  return @gluster_volume
end

- (Object) gluster_volume=(value)

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.

Parameters:



14620
14621
14622
14623
14624
14625
# File 'lib/ovirtsdk4/types.rb', line 14620

def gluster_volume=(value)
  if value.is_a?(Hash)
    value = GlusterVolume.new(value)
  end
  @gluster_volume = value
end

- (Host) host

Returns the value of the host attribute.

Returns:



14632
14633
14634
# File 'lib/ovirtsdk4/types.rb', line 14632

def host
  return @host
end

- (Object) host=(value)

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.

Parameters:

  • value (Host, Hash)


14645
14646
14647
14648
14649
14650
# File 'lib/ovirtsdk4/types.rb', line 14645

def host=(value)
  if value.is_a?(Hash)
    value = Host.new(value)
  end
  @host = value
end

- (HostNic) host_nic

Returns the value of the host_nic attribute.

Returns:



14657
14658
14659
# File 'lib/ovirtsdk4/types.rb', line 14657

def host_nic
  return @host_nic
end

- (Object) host_nic=(value)

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.

Parameters:



14670
14671
14672
14673
14674
14675
# File 'lib/ovirtsdk4/types.rb', line 14670

def host_nic=(value)
  if value.is_a?(Hash)
    value = HostNic.new(value)
  end
  @host_nic = value
end

- (NumaNode) host_numa_node

Returns the value of the host_numa_node attribute.

Returns:



14682
14683
14684
# File 'lib/ovirtsdk4/types.rb', line 14682

def host_numa_node
  return @host_numa_node
end

- (Object) host_numa_node=(value)

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.

Parameters:



14695
14696
14697
14698
14699
14700
# File 'lib/ovirtsdk4/types.rb', line 14695

def host_numa_node=(value)
  if value.is_a?(Hash)
    value = NumaNode.new(value)
  end
  @host_numa_node = value
end

- (String) id

Returns the value of the id attribute.

Returns:

  • (String)


14707
14708
14709
# File 'lib/ovirtsdk4/types.rb', line 14707

def id
  return @id
end

- (Object) id=(value)

Sets the value of the id attribute.

Parameters:

  • value (String)


14716
14717
14718
# File 'lib/ovirtsdk4/types.rb', line 14716

def id=(value)
  @id = value
end

- (StatisticKind) kind

Returns the value of the kind attribute.

Returns:



14725
14726
14727
# File 'lib/ovirtsdk4/types.rb', line 14725

def kind
  return @kind
end

- (Object) kind=(value)

Sets the value of the kind attribute.

Parameters:



14734
14735
14736
# File 'lib/ovirtsdk4/types.rb', line 14734

def kind=(value)
  @kind = value
end

- (String) name

Returns the value of the name attribute.

Returns:

  • (String)


14743
14744
14745
# File 'lib/ovirtsdk4/types.rb', line 14743

def name
  return @name
end

- (Object) name=(value)

Sets the value of the name attribute.

Parameters:

  • value (String)


14752
14753
14754
# File 'lib/ovirtsdk4/types.rb', line 14752

def name=(value)
  @name = value
end

- (Nic) nic

Returns the value of the nic attribute.

Returns:



14761
14762
14763
# File 'lib/ovirtsdk4/types.rb', line 14761

def nic
  return @nic
end

- (Object) nic=(value)

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.

Parameters:

  • value (Nic, Hash)


14774
14775
14776
14777
14778
14779
# File 'lib/ovirtsdk4/types.rb', line 14774

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.

Returns:



14786
14787
14788
# File 'lib/ovirtsdk4/types.rb', line 14786

def step
  return @step
end

- (Object) step=(value)

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.

Parameters:

  • value (Step, Hash)


14799
14800
14801
14802
14803
14804
# File 'lib/ovirtsdk4/types.rb', line 14799

def step=(value)
  if value.is_a?(Hash)
    value = Step.new(value)
  end
  @step = value
end

- (ValueType) type

Returns the value of the type attribute.

Returns:



14811
14812
14813
# File 'lib/ovirtsdk4/types.rb', line 14811

def type
  return @type
end

- (Object) type=(value)

Sets the value of the type attribute.

Parameters:



14820
14821
14822
# File 'lib/ovirtsdk4/types.rb', line 14820

def type=(value)
  @type = value
end

- (StatisticUnit) unit

Returns the value of the unit attribute.

Returns:



14829
14830
14831
# File 'lib/ovirtsdk4/types.rb', line 14829

def unit
  return @unit
end

- (Object) unit=(value)

Sets the value of the unit attribute.

Parameters:



14838
14839
14840
# File 'lib/ovirtsdk4/types.rb', line 14838

def unit=(value)
  @unit = value
end

- (Array<Value>) values

Returns the value of the values attribute.

Returns:



14847
14848
14849
# File 'lib/ovirtsdk4/types.rb', line 14847

def values
  return @values
end

- (Object) values=(list)

Sets the value of the values attribute.

Parameters:



14855
14856
14857
14858
14859
14860
14861
14862
14863
14864
14865
# File 'lib/ovirtsdk4/types.rb', line 14855

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.

Returns:



14872
14873
14874
# File 'lib/ovirtsdk4/types.rb', line 14872

def vm
  return @vm
end

- (Object) vm=(value)

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.

Parameters:

  • value (Vm, Hash)


14885
14886
14887
14888
14889
14890
# File 'lib/ovirtsdk4/types.rb', line 14885

def vm=(value)
  if value.is_a?(Hash)
    value = Vm.new(value)
  end
  @vm = value
end