Class: OvirtSDK4::ReportedDevice

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

- (ReportedDevice) initialize(opts = {})

Creates a new instance of the OvirtSDK4::ReportedDevice 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):

  • :comment (String)

    The value of attribute comment.

  • :description (String)

    The value of attribute description.

  • :id (String)

    The value of attribute id.

  • :ips (Array<Ip>, Array<Hash>)

    The values of attribute ips.

  • :mac (Mac, Hash)

    The value of attribute mac.

  • :name (String)

    The value of attribute name.

  • :type (ReportedDeviceType)

    The value of attribute type.

  • :vm (Vm, Hash)

    The value of attribute vm.



12862
12863
12864
12865
12866
12867
12868
12869
12870
12871
12872
# File 'lib/ovirtsdk4/types.rb', line 12862

def initialize(opts = {})
  super(opts)
  self.comment = opts[:comment]
  self.description = opts[:description]
  self.id = opts[:id]
  self.ips = opts[:ips]
  self.mac = opts[:mac]
  self.name = opts[:name]
  self.type = opts[:type]
  self.vm = opts[:vm]
end

Instance Method Details

- (String) comment

Returns the value of the comment attribute.

Returns:

  • (String)


12678
12679
12680
# File 'lib/ovirtsdk4/types.rb', line 12678

def comment
  return @comment
end

- (Object) comment=(value)

Sets the value of the comment attribute.

Parameters:

  • value (String)


12687
12688
12689
# File 'lib/ovirtsdk4/types.rb', line 12687

def comment=(value)
  @comment = value
end

- (String) description

Returns the value of the description attribute.

Returns:

  • (String)


12696
12697
12698
# File 'lib/ovirtsdk4/types.rb', line 12696

def description
  return @description
end

- (Object) description=(value)

Sets the value of the description attribute.

Parameters:

  • value (String)


12705
12706
12707
# File 'lib/ovirtsdk4/types.rb', line 12705

def description=(value)
  @description = value
end

- (String) id

Returns the value of the id attribute.

Returns:

  • (String)


12714
12715
12716
# File 'lib/ovirtsdk4/types.rb', line 12714

def id
  return @id
end

- (Object) id=(value)

Sets the value of the id attribute.

Parameters:

  • value (String)


12723
12724
12725
# File 'lib/ovirtsdk4/types.rb', line 12723

def id=(value)
  @id = value
end

- (Array<Ip>) ips

Returns the value of the ips attribute.

Returns:

  • (Array<Ip>)


12732
12733
12734
# File 'lib/ovirtsdk4/types.rb', line 12732

def ips
  return @ips
end

- (Object) ips=(list)

Sets the value of the ips attribute.

Parameters:

  • list (Array<Ip>)


12740
12741
12742
12743
12744
12745
12746
12747
12748
12749
12750
# File 'lib/ovirtsdk4/types.rb', line 12740

def ips=(list)
  if list.class == Array
    list = List.new(list)
    list.each_with_index do |value, index|
      if value.is_a?(Hash)
        list[index] = Ip.new(value)
      end
    end
  end
  @ips = list
end

- (Mac) mac

Returns the value of the mac attribute.

Returns:



12757
12758
12759
# File 'lib/ovirtsdk4/types.rb', line 12757

def mac
  return @mac
end

- (Object) mac=(value)

Sets the value of the mac attribute.

The value parameter can be an instance of Mac 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 (Mac, Hash)


12770
12771
12772
12773
12774
12775
# File 'lib/ovirtsdk4/types.rb', line 12770

def mac=(value)
  if value.is_a?(Hash)
    value = Mac.new(value)
  end
  @mac = value
end

- (String) name

Returns the value of the name attribute.

Returns:

  • (String)


12782
12783
12784
# File 'lib/ovirtsdk4/types.rb', line 12782

def name
  return @name
end

- (Object) name=(value)

Sets the value of the name attribute.

Parameters:

  • value (String)


12791
12792
12793
# File 'lib/ovirtsdk4/types.rb', line 12791

def name=(value)
  @name = value
end

- (ReportedDeviceType) type

Returns the value of the type attribute.

Returns:



12800
12801
12802
# File 'lib/ovirtsdk4/types.rb', line 12800

def type
  return @type
end

- (Object) type=(value)

Sets the value of the type attribute.

Parameters:



12809
12810
12811
# File 'lib/ovirtsdk4/types.rb', line 12809

def type=(value)
  @type = value
end

- (Vm) vm

Returns the value of the vm attribute.

Returns:



12818
12819
12820
# File 'lib/ovirtsdk4/types.rb', line 12818

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)


12831
12832
12833
12834
12835
12836
# File 'lib/ovirtsdk4/types.rb', line 12831

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